本文整理了Java中org.eclipse.swt.widgets.Table.getGridLineWidth()
方法的一些代码示例,展示了Table.getGridLineWidth()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Table.getGridLineWidth()
方法的具体详情如下:
包路径:org.eclipse.swt.widgets.Table
类名称:Table
方法名:getGridLineWidth
[英]Returns the width in pixels of a grid line.
[中]返回网格线的宽度(以像素为单位)。
代码示例来源:origin: org.eclipse.platform/org.eclipse.ui.workbench
/**
* Returns the number of items the table can fit in its current layout
*/
private int computeNumberOfItems() {
Rectangle rect = table.getClientArea ();
int itemHeight = table.getItemHeight ();
int headerHeight = table.getHeaderHeight ();
return (rect.height - headerHeight + itemHeight - 1) / (itemHeight + table.getGridLineWidth());
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.jface
@Override
public int getVisibleItemCount() {
Table table = viewer.getTable();
Rectangle rect = table.getClientArea ();
int itemHeight = table.getItemHeight ();
int headerHeight = table.getHeaderHeight ();
return (rect.height - headerHeight + itemHeight - 1) / (itemHeight + table.getGridLineWidth());
}
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jface
@Override
public int getVisibleItemCount() {
Table table = viewer.getTable();
Rectangle rect = table.getClientArea ();
int itemHeight = table.getItemHeight ();
int headerHeight = table.getHeaderHeight ();
return (rect.height - headerHeight + itemHeight - 1) / (itemHeight + table.getGridLineWidth());
}
代码示例来源:origin: org.eclipse.rap/org.eclipse.rap.jface
public int getVisibleItemCount() {
Table table = viewer.getTable();
Rectangle rect = table.getClientArea ();
int itemHeight = table.getItemHeight ();
int headerHeight = table.getHeaderHeight ();
return (rect.height - headerHeight + itemHeight - 1) / (itemHeight + table.getGridLineWidth());
}
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.ui
public static int getTableHeightHint(Table table, int rows) {
if (table.getFont().equals(JFaceResources.getDefaultFont()))
table.setFont(JFaceResources.getDialogFont());
int result= table.getItemHeight() * rows + table.getHeaderHeight();
if (table.getLinesVisible())
result+= table.getGridLineWidth() * (rows - 1);
return result;
}
代码示例来源:origin: org.eclipse.xtext/ui
public static int getTableHeightHint(Table table, int rows) {
if (table.getFont().equals(JFaceResources.getDefaultFont()))
table.setFont(JFaceResources.getDialogFont());
int result = table.getItemHeight() * rows + table.getHeaderHeight();
if (table.getLinesVisible())
result += table.getGridLineWidth() * (rows - 1);
return result;
}
代码示例来源:origin: org.eclipse/org.eclipse.jdt.ui
public static int getTableHeightHint(Table table, int rows) {
if (table.getFont().equals(JFaceResources.getDefaultFont()))
table.setFont(JFaceResources.getDialogFont());
int result= table.getItemHeight() * rows + table.getHeaderHeight();
if (table.getLinesVisible())
result+= table.getGridLineWidth() * (rows - 1);
return result;
}
代码示例来源:origin: org.eclipse/org.eclipse.search
public static int getTableHeightHint(Table table, int rows) {
if (table.getFont().equals(JFaceResources.getDefaultFont()))
table.setFont(JFaceResources.getDialogFont());
int result= table.getItemHeight() * rows + table.getHeaderHeight();
if (table.getLinesVisible())
result+= table.getGridLineWidth() * (rows - 1);
return result;
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.search
public static int getTableHeightHint(Table table, int rows) {
if (table.getFont().equals(JFaceResources.getDefaultFont()))
table.setFont(JFaceResources.getDialogFont());
int result= table.getItemHeight() * rows + table.getHeaderHeight();
if (table.getLinesVisible())
result+= table.getGridLineWidth() * (rows - 1);
return result;
}
代码示例来源:origin: oyse/yedit
public static int getTableHeightHint(Table table, int rows) {
if (table.getFont().equals(JFaceResources.getDefaultFont()))
table.setFont(JFaceResources.getDialogFont());
int result= table.getItemHeight() * rows + table.getHeaderHeight();
if (table.getLinesVisible())
result+= table.getGridLineWidth() * (rows - 1);
return result;
}
代码示例来源:origin: org.eclipse.jdt/org.eclipse.jdt.ui
public static int getTableHeightHint(Table table, int rows) {
if (table.getFont().equals(JFaceResources.getDefaultFont()))
table.setFont(JFaceResources.getDialogFont());
int result= table.getItemHeight() * rows + table.getHeaderHeight();
if (table.getLinesVisible())
result+= table.getGridLineWidth() * (rows - 1);
return result;
}
代码示例来源:origin: org.eclipse/org.eclipse.datatools.sqltools.common.ui
public static int getTableHeightHint(Table table, int rows)
{
if (table.getFont().equals(JFaceResources.getDefaultFont()))
{
table.setFont(JFaceResources.getDialogFont());
}
int result = table.getItemHeight() * rows + table.getHeaderHeight();
if (table.getLinesVisible())
{
result += table.getGridLineWidth() * (rows - 1);
}
return result;
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.jface.text
/**
* Computes the table hight hint for <code>table</code>.
*
* @param table the table to compute the height for
* @param rows the number of rows to compute the height for
* @return the height hint for <code>table</code>
*/
private int getTableHeightHint(Table table, int rows) {
if (table.getFont().equals(JFaceResources.getDefaultFont()))
table.setFont(JFaceResources.getDialogFont());
int result= table.getItemHeight() * rows;
if (table.getLinesVisible())
result+= table.getGridLineWidth() * (rows - 1);
// TODO adjust to correct size. +4 works on windows, but not others
// return result + 4;
return result;
}
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jface.text
/**
* Computes the table hight hint for <code>table</code>.
*
* @param table the table to compute the height for
* @param rows the number of rows to compute the height for
* @return the height hint for <code>table</code>
*/
private int getTableHeightHint(Table table, int rows) {
if (table.getFont().equals(JFaceResources.getDefaultFont()))
table.setFont(JFaceResources.getDialogFont());
int result= table.getItemHeight() * rows;
if (table.getLinesVisible())
result+= table.getGridLineWidth() * (rows - 1);
// TODO adjust to correct size. +4 works on windows, but not others
// return result + 4;
return result;
}
代码示例来源:origin: stackoverflow.com
Rectangle area = table.getClientArea();
int totalAreaWdith = area.width;
int lineWidth = table.getGridLineWidth();
int totalGridLineWidth = (columnCount-1)*lineWidth;
int totalColumnWidth = 0;
代码示例来源:origin: org.eclipse.swt.cocoa.macosx/x86_64
void tableMouseDown(Event event) {
if (isDisposed() || !isVisible()) return;
Point pt = new Point(event.x, event.y);
int lineWidth = table.getLinesVisible() ? table.getGridLineWidth() : 0;
TableItem item = table.getItem(pt);
if ((table.getStyle() & SWT.FULL_SELECTION) != 0) {
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.ppc
void tableMouseDown(Event event) {
if (isDisposed() || !isVisible()) return;
Point pt = new Point(event.x, event.y);
int lineWidth = table.getLinesVisible() ? table.getGridLineWidth() : 0;
TableItem item = table.getItem(pt);
if ((table.getStyle() & SWT.FULL_SELECTION) != 0) {
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.aix.ppc
void tableMouseDown(Event event) {
if (isDisposed() || !isVisible()) return;
Point pt = new Point(event.x, event.y);
int lineWidth = table.getLinesVisible() ? table.getGridLineWidth() : 0;
TableItem item = table.getItem(pt);
if ((table.getStyle() & SWT.FULL_SELECTION) != 0) {
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.swt.win32.win32.x86
void tableMouseDown(Event event) {
if (isDisposed() || !isVisible()) return;
Point pt = new Point(event.x, event.y);
int lineWidth = table.getLinesVisible() ? table.getGridLineWidth() : 0;
TableItem item = table.getItem(pt);
if ((table.getStyle() & SWT.FULL_SELECTION) != 0) {
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.s390x
void tableMouseDown(Event event) {
if (isDisposed() || !isVisible()) return;
Point pt = new Point(event.x, event.y);
int lineWidth = table.getLinesVisible() ? table.getGridLineWidth() : 0;
TableItem item = table.getItem(pt);
if ((table.getStyle() & SWT.FULL_SELECTION) != 0) {
内容来源于网络,如有侵权,请联系作者删除!