下面列出了org.eclipse.swt.widgets.Table#getItemHeight ( ) 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。
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;
}
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;
}
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;
}
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;
}