Java Code Examples for org.eclipse.swt.widgets.Table#getItemHeight()

The following examples show how to use org.eclipse.swt.widgets.Table#getItemHeight() . These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may want to check out the right sidebar which shows the related API usage.
Example 1
Source Project: xtext-eclipse   File: SWTUtil.java    License: Eclipse Public License 2.0 5 votes vote down vote up
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;
}
 
Example 2
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;
}
 
Example 3
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;
}
 
Example 4
Source Project: Pydev   File: SWTUtil.java    License: Eclipse Public License 1.0 5 votes vote down vote up
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;
}