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

The following examples show how to use org.eclipse.swt.widgets.Table#getItemHeight() . 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 check out the related API usage on the sidebar.
Example 1
Source File: SWTUtil.java    From xtext-eclipse with 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
Source File: SWTUtil.java    From APICloud-Studio with GNU General Public License v3.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 3
Source File: SWTUtil.java    From Eclipse-Postfix-Code-Completion with 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;
}
 
Example 4
Source File: SWTUtil.java    From Pydev with 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;
}