TPTP 4.4.0 Testing Tools Project
Internal API Specification

org.eclipse.tptp.test.manual.runner.ui.internal.util
Class SWTUtilities

java.lang.Object
  extended byorg.eclipse.tptp.test.manual.runner.ui.internal.util.SWTUtilities

public final class SWTUtilities
extends java.lang.Object

SWT utilities.

Since:
August 7, 2005

Constructor Summary
SWTUtilities()
           
 
Method Summary
static void addAttachmentTableItem(org.eclipse.swt.widgets.Table table, java.io.File file)
           
static void clearImageCache()
           
static org.eclipse.swt.graphics.Image getDisabledImage(java.lang.String imageName)
           
static org.eclipse.swt.graphics.Image getEnabledImage(java.lang.String imageName)
           
static java.lang.String getFileExtension(java.io.File file)
           
static org.eclipse.swt.layout.GridLayout getGridLayout(int numColumns, boolean makeColumnsEqualWidth, int margin, int spacing)
           
static org.eclipse.swt.layout.GridLayout getGridLayout(int numColumns, boolean makeColumnsEqualWidth, int marginWidth, int marginHeight, int spacing)
           
static org.eclipse.swt.layout.GridLayout getGridLayout(int numColumns, boolean makeColumnsEqualWidth, int marginWidth, int marginHeight, int horizontalSpacing, int verticalSpacing)
           
static org.eclipse.swt.layout.GridLayout getGridLayout(int numColumns, int margin, int spacing)
           
static org.eclipse.swt.graphics.Image getImage(java.lang.String imageName)
           
static boolean isExpandable(org.eclipse.swt.widgets.TreeItem treeItem)
           
static void setEnabled(org.eclipse.swt.widgets.Composite composite, boolean enabled)
           
static org.eclipse.swt.graphics.Font setFontHeight(org.eclipse.swt.graphics.Font font, int height)
          Sets the height of the font to the height parameter in terms of points, where a point is one seventy-second of an inch.
static org.eclipse.swt.graphics.Font setFontStyle(org.eclipse.swt.graphics.Font font, int style)
          Sets the style of the font to the style parameter which is a bitwise OR of one or more of the SWT constants NORMAL, BOLD and ITALIC.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SWTUtilities

public SWTUtilities()
Method Detail

getGridLayout

public static org.eclipse.swt.layout.GridLayout getGridLayout(int numColumns,
                                                              int margin,
                                                              int spacing)

getGridLayout

public static org.eclipse.swt.layout.GridLayout getGridLayout(int numColumns,
                                                              boolean makeColumnsEqualWidth,
                                                              int margin,
                                                              int spacing)

getGridLayout

public static org.eclipse.swt.layout.GridLayout getGridLayout(int numColumns,
                                                              boolean makeColumnsEqualWidth,
                                                              int marginWidth,
                                                              int marginHeight,
                                                              int spacing)

getGridLayout

public static org.eclipse.swt.layout.GridLayout getGridLayout(int numColumns,
                                                              boolean makeColumnsEqualWidth,
                                                              int marginWidth,
                                                              int marginHeight,
                                                              int horizontalSpacing,
                                                              int verticalSpacing)

addAttachmentTableItem

public static void addAttachmentTableItem(org.eclipse.swt.widgets.Table table,
                                          java.io.File file)

getFileExtension

public static java.lang.String getFileExtension(java.io.File file)

setEnabled

public static void setEnabled(org.eclipse.swt.widgets.Composite composite,
                              boolean enabled)

isExpandable

public static boolean isExpandable(org.eclipse.swt.widgets.TreeItem treeItem)

clearImageCache

public static void clearImageCache()

getDisabledImage

public static org.eclipse.swt.graphics.Image getDisabledImage(java.lang.String imageName)

getEnabledImage

public static org.eclipse.swt.graphics.Image getEnabledImage(java.lang.String imageName)

getImage

public static org.eclipse.swt.graphics.Image getImage(java.lang.String imageName)

setFontStyle

public static org.eclipse.swt.graphics.Font setFontStyle(org.eclipse.swt.graphics.Font font,
                                                         int style)
Sets the style of the font to the style parameter which is a bitwise OR of one or more of the SWT constants NORMAL, BOLD and ITALIC. All other style bits are ignored.

Parameters:
style - The new style for this Font.
See Also:
FontData.setStyle(int)

setFontHeight

public static org.eclipse.swt.graphics.Font setFontHeight(org.eclipse.swt.graphics.Font font,
                                                          int height)
Sets the height of the font to the height parameter in terms of points, where a point is one seventy-second of an inch.

Throws:
java.lang.IllegalArgumentException - If the height is negative.
See Also:
FontData.setHeight(int)

TPTP 4.4.0 Testing Tools Project
Internal API Specification