## org.eclipse.datatools.sqltools.common.ui.util
Class SWTUtils

    java.lang.Object
      org.eclipse.datatools.sqltools.common.ui.util.SWTUtils

    public class SWTUtils

extends java.lang.Object

This utility class provides convenience methods in creating controls on preference pages.

Author:
  syu

Field Summary
`static int` `DEFAULT_BUTTON_WIDTH`
`static int` `DEFAULT_COMBO_WIDTH`
`static int` `DEFAULT_RADIO_FILL`
`static int` `DEFAULT_TEXTBOX_WIDTH`

Constructor Summary
`SWTUtils()`

Method Summary
`static void` `computeScrollArea(org.eclipse.swt.custom.ScrolledComposite parentComposite, org.eclipse.swt.widgets.Composite childComposite)` Computes the size of the composite inside the scroll area so that scroll bars show up correctly.
`static org.eclipse.swt.widgets.Button` `createCheckBox(org.eclipse.swt.widgets.Composite parent)` Creates a new checkbox and sets the default layout data.
`static org.eclipse.swt.widgets.Button` `createCheckBox(org.eclipse.swt.widgets.Composite parent, java.lang.String label, int numColumns)` Creates a new checkbox and sets the default layout data.
`static org.eclipse.swt.widgets.Button` `createCheckBox(org.eclipse.swt.widgets.Composite parent, java.lang.String label, int numColumns, int indent)` Creates a new checkbox and sets the default layout data.
`static org.eclipse.swt.widgets.Combo` `createCombo(org.eclipse.swt.widgets.Composite parent, java.lang.String[] items, int numColumns)` Creates a combo box and sets the default layout data.
`static org.eclipse.swt.widgets.Combo` `createCombo(org.eclipse.swt.widgets.Composite parent, java.lang.String[] items, int numColumns, int minWidth)` Creates a combo box and sets the default layout data.
`static org.eclipse.swt.widgets.Combo` `createCombo(org.eclipse.swt.widgets.Composite parent, java.lang.String[] items, int numColumns, int minWidth, boolean editable)` Creates a combo box and sets the default layout data.
`static org.eclipse.swt.widgets.Combo` `createCombo(org.eclipse.swt.widgets.Composite parent, java.lang.String tokenString, int numColumns)` Creates a combo box and sets the default layout data.
`static org.eclipse.swt.widgets.Combo` `createCombo(org.eclipse.swt.widgets.Composite parent, java.lang.String tokenString, int numColumns, int minWidth)` Creates a combo box and sets the default layout data.
`static org.eclipse.swt.widgets.Combo` `createCombo(org.eclipse.swt.widgets.Composite parent, java.lang.String tokenString, int numColumns, int minWidth, boolean editable)` Creates a combo box and sets the default layout data.
`static org.eclipse.swt.widgets.Composite` `createComposite(org.eclipse.swt.widgets.Composite parent, int numColumns)` Creates composite control and sets the default layout data.
`static org.eclipse.swt.widgets.Composite` `createComposite(org.eclipse.swt.widgets.Composite parent, int numColumns, int verticalSpacing, int horizontalSpan)` Creates composite control and sets the default layout data.
`static org.eclipse.swt.widgets.Composite` `createComposite(org.eclipse.swt.widgets.Composite parent, int numColumns, int verticalSpacing, int horizontalSpan, int gridDataFill)` Creates composite control and sets the default layout data.
`static org.eclipse.swt.widgets.Composite` `createComposite(org.eclipse.swt.widgets.Composite parent, int numColumns, int verticalSpacing, int horizontalSpan, int gridDataFill, int horizontalSpacing, int marginWidth, int marginHeight)` Creates composite control and sets the default layout data.
`static org.eclipse.swt.widgets.Group` `createGroup(org.eclipse.swt.widgets.Composite parent, java.lang.String title, int numColumns)` Utility method that creates a group and sets the default layout data.
`static org.eclipse.swt.widgets.Group` `createGroup(org.eclipse.swt.widgets.Composite parent, java.lang.String title, int numColumns, int horizontalSpan, int gridDataFill)` Utility method that creates a group and sets the default layout data.
`static org.eclipse.swt.widgets.Label` `createLabel(org.eclipse.swt.widgets.Composite parent, java.lang.String text, int numColumns)` Utility method that creates a label instance and sets the default layout data.
`static org.eclipse.swt.widgets.Label` `createLabel(org.eclipse.swt.widgets.Composite parent, java.lang.String text, int numColumns, int indent)` Utility method that creates a label instance and sets the default layout data.
`static org.eclipse.swt.widgets.Label` `createLableImage(org.eclipse.swt.widgets.Composite parent, org.eclipse.swt.graphics.Image theImage, int numColumns, org.eclipse.swt.graphics.Color background)` Create a image label for sticking in a composite.
`static org.eclipse.swt.widgets.List` `createList(org.eclipse.swt.widgets.Composite parent, int numColumns, int minWidth, int minHeight, java.lang.String[] items)` Create a list with the items listed in it.
`static org.eclipse.swt.widgets.List` `createList(org.eclipse.swt.widgets.Composite parent, int numColumns, int minWidth, int minHeight, java.lang.String[] items, boolean bmulti)` Create a list with the items listed in it.
`static org.eclipse.swt.widgets.List` `createList(org.eclipse.swt.widgets.Composite parent, int numColumns, int minWidth, int minHeight, java.lang.String[] items, boolean bmulti, int verticalSpan)` Create a list with the items listed in it.
`static org.eclipse.swt.widgets.Button` `createPushButton(org.eclipse.swt.widgets.Composite parent, org.eclipse.swt.graphics.Image theImage, int widthHint)` Utility method that creates a push button instance and sets the default layout data.
`static org.eclipse.swt.widgets.Button` `createPushButton(org.eclipse.swt.widgets.Composite parent, java.lang.String label)` Utility method that creates a push button instance and sets the default layout data.
`static org.eclipse.swt.widgets.Button` `createPushButton(org.eclipse.swt.widgets.Composite parent, java.lang.String label, int widthHint)` Utility method that creates a push button instance and sets the default layout data.
`static org.eclipse.swt.widgets.Button` `createRadioButton(org.eclipse.swt.widgets.Composite parent, java.lang.String label)` Utility method that creates a radio button instance and sets the default layout data.
`static org.eclipse.swt.widgets.Button` `createRadioButton(org.eclipse.swt.widgets.Composite parent, java.lang.String label, int gridDataFill)` Utility method that creates a radio button instance and sets the default layout data.
`static org.eclipse.swt.widgets.Button` `createRadioButton(org.eclipse.swt.widgets.Composite parent, java.lang.String label, int gridDataFill, int horizontalSpan)` Utility method that creates a radio button instance and sets the default layout data.
`static void` `createSpacer(org.eclipse.swt.widgets.Composite parent, int numColumns)` Utility method that creates an empty line
`static void` `createSpacer(org.eclipse.swt.widgets.Composite parent, int numColumns, int minWidth)` Utility method that creates an empty line
`static org.eclipse.swt.widgets.Table` `createTable(org.eclipse.swt.widgets.Composite composite, java.lang.String[] columns, int tablewidth)` Create a table from a Composite object
`static org.eclipse.swt.widgets.Table` `createTable(org.eclipse.swt.widgets.Composite composite, java.lang.String tokenString, int tablewidth, int tableHeight)` Create a table from a Composite object
`static org.eclipse.swt.widgets.TableColumn` `createTableColumn(org.eclipse.swt.widgets.Table parent, org.eclipse.swt.graphics.Image image, int index)` Create a table column with the image and the width of the column is set to the image width.
`static org.eclipse.swt.widgets.TableColumn` `createTableColumn(org.eclipse.swt.widgets.Table parent, java.lang.String name, int index)` Create a table column
`static org.eclipse.swt.widgets.TableColumn` `createTableColumn(org.eclipse.swt.widgets.Table parent, java.lang.String name, int index, int tablewidth)` Create a table column
`static org.eclipse.swt.widgets.Text` `createTextBox(org.eclipse.swt.widgets.Composite parent)` Create a text field
`static org.eclipse.swt.widgets.Text` `createTextBox(org.eclipse.swt.widgets.Composite parent, int numColumns)` Create a text field
`static org.eclipse.swt.widgets.Text` `createTextBox(org.eclipse.swt.widgets.Composite parent, int numColumns, int minWidth)` Create a text field
`static org.eclipse.swt.widgets.Text` `createTextBox(org.eclipse.swt.widgets.Composite parent, int numColumns, int minWidth, int minHeight)` Create a text field
`static org.eclipse.swt.widgets.Text` `createTextBox(org.eclipse.swt.widgets.Composite parent, java.lang.String text)` Create a text field
`static org.eclipse.swt.widgets.Text` `createTextBoxScrollable(org.eclipse.swt.widgets.Composite parent, int numColumns, int minWidth, int minHeight)` Create a text field that is scrollable.
`static int` `getTableHeightHint(org.eclipse.swt.widgets.Table table, int rows)`
`static java.lang.String[]` `getTokenNames(java.lang.String tokenString)` Builds an array of strings from a token list string.
`static void` `listenModify(org.eclipse.swt.widgets.Composite container, org.eclipse.swt.widgets.Listener listener, org.eclipse.swt.widgets.Widget[] except)` register the listener recursively, except for the except component
`static boolean` `notEmpty(org.eclipse.swt.widgets.Combo text)` Checks that a Combo control is not null and not empty
`static boolean` `notEmpty(org.eclipse.swt.widgets.Text text)` Checks that a Text control is not null and not empty
`static void` `processError(java.lang.String msg, java.lang.Exception error, org.eclipse.core.runtime.IStatus status)`
`static void` `recursiveEnable(org.eclipse.swt.widgets.Control control, boolean enable)` Recursively enable/disable a group of controls.

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### DEFAULT_BUTTON_WIDTH

    public static final int DEFAULT_BUTTON_WIDTH

See Also:
  Constant Field Values

### DEFAULT_COMBO_WIDTH

    public static final int DEFAULT_COMBO_WIDTH

See Also:
  Constant Field Values

### DEFAULT_TEXTBOX_WIDTH

    public static final int DEFAULT_TEXTBOX_WIDTH

See Also:
  Constant Field Values

### DEFAULT_RADIO_FILL

    public static final int DEFAULT_RADIO_FILL

See Also:
  Constant Field Values

Constructor Detail

### SWTUtils

    public SWTUtils()

Method Detail

### createCheckBox

    public static org.eclipse.swt.widgets.Button createCheckBox(org.eclipse.swt.widgets.Composite parent)

  Creates a new checkbox and sets the default layout data.

  Parameters:
    `parent` - the composite in which to create the checkbox
    `label` - the string to set into the checkbox
    `numColumns` - the number of columns the new checkbox is to occupy
  Returns:
    the new checkbox

### createCheckBox

    public static org.eclipse.swt.widgets.Button createCheckBox(org.eclipse.swt.widgets.Composite parent,
                                                                java.lang.String label,
                                                                int numColumns)

  Creates a new checkbox and sets the default layout data.

  Parameters:
    `parent` - the composite in which to create the checkbox
    `label` - the string to set into the checkbox
    `numColumns` - the number of columns the new checkbox is to occupy
  Returns:
    the new checkbox

### createCheckBox

    public static org.eclipse.swt.widgets.Button createCheckBox(org.eclipse.swt.widgets.Composite parent,
                                                                java.lang.String label,
                                                                int numColumns,
                                                                int indent)

  Creates a new checkbox and sets the default layout data.

  Parameters:
    `parent` - the composite in which to create the checkbox
    `label` - the string to set into the checkbox
    `numColumns` - the number of columns the new checkbox is to occupy
    `indent` - the number of pixels to indent from the left
  Returns:
    the new checkbox

### createCombo

    public static org.eclipse.swt.widgets.Combo createCombo(org.eclipse.swt.widgets.Composite parent,
                                                            java.lang.String[] items,
                                                            int numColumns)

  Creates a combo box and sets the default layout data.

  Parameters:
    `parent` - the composite in which to create the combo
    `items` - the items in the combo
    `numColumns` - the number of columns the new combo is to occupy
  Returns:
    the new combo box

### createCombo

    public static org.eclipse.swt.widgets.Combo createCombo(org.eclipse.swt.widgets.Composite parent,
                                                            java.lang.String tokenString,
                                                            int numColumns)

  Creates a combo box and sets the default layout data.

  Parameters:
    `parent` - the composite in which to create the combo
    `tokenString` - a tokenized string that will be split into the fields.
    `numColumns` - the number of columns the new combo is to occupy
  Returns:
    the new combo box

### createCombo

    public static org.eclipse.swt.widgets.Combo createCombo(org.eclipse.swt.widgets.Composite parent,
                                                            java.lang.String tokenString,
                                                            int numColumns,
                                                            int minWidth)

  Creates a combo box and sets the default layout data.

  Parameters:
    `parent` - the composite in which to create the combo
    `tokenString` - a tokenized string that will be split into the fields.
    `numColumns` - the number of columns the new combo is to occupy
    `minWidth` - minimum width of combo box in pixels
  Returns:
    the new combo box

### createCombo

    public static org.eclipse.swt.widgets.Combo createCombo(org.eclipse.swt.widgets.Composite parent,
                                                            java.lang.String[] items,
                                                            int numColumns,
                                                            int minWidth)

  Creates a combo box and sets the default layout data.

  Parameters:
    `parent` - the composite in which to create the combo
    `items` - the items in the combo
    `numColumns` - the number of columns the new combo is to occupy
    `minWidth` - minimum width of combo box in pixels
  Returns:
    the new combo box

### createCombo

    public static org.eclipse.swt.widgets.Combo createCombo(org.eclipse.swt.widgets.Composite parent,
                                                            java.lang.String tokenString,
                                                            int numColumns,
                                                            int minWidth,
                                                            boolean editable)

  Creates a combo box and sets the default layout data.

  Parameters:
    `parent` - the composite in which to create the combo
    `items` - the items in the combo
    `numColumns` - the number of columns the new combo is to occupy
    `minWidth` - minimum width of combo box in pixels
    `editable` - whether the items in the combo is editable
  Returns:
    the new combo box

### createCombo

    public static org.eclipse.swt.widgets.Combo createCombo(org.eclipse.swt.widgets.Composite parent,
                                                            java.lang.String[] items,
                                                            int numColumns,
                                                            int minWidth,
                                                            boolean editable)

  Creates a combo box and sets the default layout data.

  Parameters:
    `parent` - the composite in which to create the combo
    `items` - the items in the combo
    `numColumns` - the number of columns the new combo is to occupy
    `minWidth` - minimum width of combo box in pixels
    `editable` - whether the items in the combo is editable
  Returns:
    the new combo box

### createComposite

    public static org.eclipse.swt.widgets.Composite createComposite(org.eclipse.swt.widgets.Composite parent,
                                                                    int numColumns)

  Creates composite control and sets the default layout data.

  Parameters:
    `parent` - the parent of the new composite
    `numColumns` - the number of columns for the new composite
  Returns:
    the newly-created coposite

### createComposite

    public static org.eclipse.swt.widgets.Composite createComposite(org.eclipse.swt.widgets.Composite parent,
                                                                    int numColumns,
                                                                    int verticalSpacing,
                                                                    int horizontalSpan)

  Creates composite control and sets the default layout data.

  Parameters:
    `parent` - the parent of the new composite
    `numColumns` - the number of columns for the new composite
    `verticalSpacing` - the spacing between rows.
    `horizontalSpan` - the span for this new composite over the original composite.
  Returns:
    the newly-created coposite

### createComposite

    public static org.eclipse.swt.widgets.Composite createComposite(org.eclipse.swt.widgets.Composite parent,
                                                                    int numColumns,
                                                                    int verticalSpacing,
                                                                    int horizontalSpan,
                                                                    int gridDataFill)

  Creates composite control and sets the default layout data.

  Parameters:
    `parent` - the parent of the new composite
    `numColumns` - the number of columns for the new composite
    `verticalSpacing` - the spacing between rows.
    `horizontalSpan` - the span for this new composite over the original composite.
    `gridDataFill` - the fill to use for this composite.
  Returns:
    the newly-created coposite

### createComposite

    public static org.eclipse.swt.widgets.Composite createComposite(org.eclipse.swt.widgets.Composite parent,
                                                                    int numColumns,
                                                                    int verticalSpacing,
                                                                    int horizontalSpan,
                                                                    int gridDataFill,
                                                                    int horizontalSpacing,
                                                                    int marginWidth,
                                                                    int marginHeight)

  Creates composite control and sets the default layout data.

  Parameters:
    `parent` - the parent of the new composite
    `numColumns` - the number of columns for the new composite
    `verticalSpacing` - the spacing between rows.
    `horizontalSpan` - the span for this new composite over the original composite.
    `gridDataFill` - the fill to use for this composite.
    `horizontalSpacing` - the spacing between objects.
    `_marginWidth` - the spacing at start and end of composite.
    `_marginHeight` - the spacing above and below composite.
  Returns:
    the newly-created coposite

### createGroup

    public static org.eclipse.swt.widgets.Group createGroup(org.eclipse.swt.widgets.Composite parent,
                                                            java.lang.String title,
                                                            int numColumns)

  Utility method that creates a group and sets the default layout data.

  Parameters:
    `parent` - the parent for the new group
    `title` - the label for the new group
    `numColumns` - the number of columns for the new group
  Returns:
    the newly created group

### createGroup

    public static org.eclipse.swt.widgets.Group createGroup(org.eclipse.swt.widgets.Composite parent,
                                                            java.lang.String title,
                                                            int numColumns,
                                                            int horizontalSpan,
                                                            int gridDataFill)

  Utility method that creates a group and sets the default layout data.

  Parameters:
    `parent` - the parent for the new group
    `title` - the label for the new group
    `numColumns` - the number of columns for the new group
    `horizontalSpan` - the number of columns this group should span on the parent composite.
    `fill` - the fill style of the new group -- set to for filling just around the object: GridData.BEGINNING | GridData.CENTER
  Returns:
    the newly created group

### createLabel

    public static org.eclipse.swt.widgets.Label createLabel(org.eclipse.swt.widgets.Composite parent,
                                                            java.lang.String text,
                                                            int numColumns)

  Utility method that creates a label instance and sets the default layout data.

  Parameters:
    `parent` - the parent for the new label
    `text` - the text for the new label
    `numColumns` - the number of columns for the new composite
  Returns:
    the new label

### createLabel

    public static org.eclipse.swt.widgets.Label createLabel(org.eclipse.swt.widgets.Composite parent,
                                                            java.lang.String text,
                                                            int numColumns,
                                                            int indent)

  Utility method that creates a label instance and sets the default layout data.

  Parameters:
    `parent` - the parent for the new label
    `text` - the text for the new label
    `numColumns` - the number of columns for the new composite
    `indent` - number of pixels to indent from the left
  Returns:
    the new label

### createLableImage

    public static org.eclipse.swt.widgets.Label createLableImage(org.eclipse.swt.widgets.Composite parent,
                                                                 org.eclipse.swt.graphics.Image theImage,
                                                                 int numColumns,
                                                                 org.eclipse.swt.graphics.Color background)

  Create a image label for sticking in a composite. The backgroud color is optional. Because images can have "transparent" natures, you might want to say the background is something other than the defaults composites background. NOTE: the caller is responsible for cleanup of the image and color objects.

  Parameters:
    `parent` - the parent for the new label
    `theImage` - the image for the new label
    `numColumns` - the number of columns for the new composite
    `background` - pass null to use the composites background.
  Returns:
    the new label

### createPushButton

    public static org.eclipse.swt.widgets.Button createPushButton(org.eclipse.swt.widgets.Composite parent,
                                                                  java.lang.String label)

  Utility method that creates a push button instance and sets the default layout data.

  Parameters:
    `parent` - the parent for the new button
    `label` - the label for the new button
  Returns:
    the newly-created button

### createPushButton

    public static org.eclipse.swt.widgets.Button createPushButton(org.eclipse.swt.widgets.Composite parent,
                                                                  java.lang.String label,
                                                                  int widthHint)

  Utility method that creates a push button instance and sets the default layout data.

  Parameters:
    `parent` - the parent for the new button
    `label` - the label for the new button
    `widthHint` - use this width for the button.
  Returns:
    the newly-created button

### createPushButton

    public static org.eclipse.swt.widgets.Button createPushButton(org.eclipse.swt.widgets.Composite parent,
                                                                  org.eclipse.swt.graphics.Image theImage,
                                                                  int widthHint)

  Utility method that creates a push button instance and sets the default layout data.

  Parameters:
    `parent` - the parent for the new button
    `label` - the label for the new button
    `widthHint` - use this width for the button.
  Returns:
    the newly-created button

### createRadioButton

    public static org.eclipse.swt.widgets.Button createRadioButton(org.eclipse.swt.widgets.Composite parent,
                                                                   java.lang.String label)

  Utility method that creates a radio button instance and sets the default layout data.

  Parameters:
    `parent` - the parent for the new button
    `label` - the label for the new button
  Returns:
    the newly-created button

### createRadioButton

    public static org.eclipse.swt.widgets.Button createRadioButton(org.eclipse.swt.widgets.Composite parent,
                                                                   java.lang.String label,
                                                                   int gridDataFill)

  Utility method that creates a radio button instance and sets the default layout data.

  Parameters:
    `parent` - the parent for the new button
    `label` - the label for the new button
  Returns:
    the newly-created button

### createRadioButton

    public static org.eclipse.swt.widgets.Button createRadioButton(org.eclipse.swt.widgets.Composite parent,
                                                                   java.lang.String label,
                                                                   int gridDataFill,
                                                                   int horizontalSpan)

  Utility method that creates a radio button instance and sets the default layout data.

  Parameters:
    `parent` - the parent for the new button
    `label` - the label for the new button
    `horizontalSpan` - number of columns occupied by button
  Returns:
    the newly-created button

### createSpacer

    public static void createSpacer(org.eclipse.swt.widgets.Composite parent,
                                    int numColumns)

  Utility method that creates an empty line

  Parameters:
    `parent` - the parent for the new label
    `numColumns` - the number of columns for the new composite

### createSpacer

    public static void createSpacer(org.eclipse.swt.widgets.Composite parent,
                                    int numColumns,
                                    int minWidth)

  Utility method that creates an empty line

  Parameters:
    `parent` - the parent for the new label
    `numColumns` - the number of columns for the new composite
    `int` - minimum width of spacer

### createTable

    public static org.eclipse.swt.widgets.Table createTable(org.eclipse.swt.widgets.Composite composite,
                                                            java.lang.String tokenString,
                                                            int tablewidth,
                                                            int tableHeight)

  Create a table from a Composite object

  Parameters:
    `composite` - the Composite this table is to be created from
    `tokenString` - A string containing names of the columns in the order that they should be displayed in the table with each column separated by a comma(',') or null if no columns need to be created.
    `tablewidth` - the minimum width for the table
  Returns:
    the new table

### createTable

    public static org.eclipse.swt.widgets.Table createTable(org.eclipse.swt.widgets.Composite composite,
                                                            java.lang.String[] columns,
                                                            int tablewidth)

  Create a table from a Composite object

  Parameters:
    `composite` - the Composite this table is to be created from
    `columns` - A string array containing names of the columns in the order that they should be displayed in the table, or null if no columns need to be created.
    `tablewidth` - the minimum width for the table
  Returns:
    the new table

### createTableColumn

    public static org.eclipse.swt.widgets.TableColumn createTableColumn(org.eclipse.swt.widgets.Table parent,
                                                                        java.lang.String name,
                                                                        int index)

  Create a table column

  Parameters:
    `parent` - the table that contains this column
    `name` - name of this column
    `index` - the column within the parent composite
  Returns:
    the new table column

### createTableColumn

    public static org.eclipse.swt.widgets.TableColumn createTableColumn(org.eclipse.swt.widgets.Table parent,
                                                                        org.eclipse.swt.graphics.Image image,
                                                                        int index)

  Create a table column with the image and the width of the column is set to the image width.

  Parameters:
    `parent` - the table that contains this column
    `image` - iamge for this column
  Returns:
    the new table column

### createTableColumn

    public static org.eclipse.swt.widgets.TableColumn createTableColumn(org.eclipse.swt.widgets.Table parent,
                                                                        java.lang.String name,
                                                                        int index,
                                                                        int tablewidth)

  Create a table column

  Parameters:
    `parent` - the table that contains this column
    `name` - name of this column
    `index` - the column within the parent composite
    `tablewidth` - the width for the column
  Returns:
    the new table column

### createTextBox

    public static org.eclipse.swt.widgets.Text createTextBox(org.eclipse.swt.widgets.Composite parent)

  Create a text field

  Parameters:
    `parent` - the parent of the new text field
  Returns:
    the new text field

### createTextBox

    public static org.eclipse.swt.widgets.Text createTextBox(org.eclipse.swt.widgets.Composite parent,
                                                             java.lang.String text)

  Create a text field

  Parameters:
    `parent` - the parent of the new text field
  Returns:
    the new text field

### createTextBox

    public static org.eclipse.swt.widgets.Text createTextBox(org.eclipse.swt.widgets.Composite parent,
                                                             int numColumns)

  Create a text field

  Parameters:
    `parent` - the parent of the new text field
    `numColumns` - number of columns the text box is to occupy
  Returns:
    the new text field

### createTextBox

    public static org.eclipse.swt.widgets.Text createTextBox(org.eclipse.swt.widgets.Composite parent,
                                                             int numColumns,
                                                             int minWidth)

  Create a text field

  Parameters:
    `parent` - the parent of the new text field
    `numColumns` - number of columns the text box is to occupy
    `minWidth` - minimum width of text field
  Returns:
    the new text field

### createTextBox

    public static org.eclipse.swt.widgets.Text createTextBox(org.eclipse.swt.widgets.Composite parent,
                                                             int numColumns,
                                                             int minWidth,
                                                             int minHeight)

  Create a text field

  Parameters:
    `parent` - the parent of the new text field
    `numColumns` - number of columns the text box is to occupy
    `minWidth` - minimum width of text field
  Returns:
    the new text field

### createTextBoxScrollable

    public static org.eclipse.swt.widgets.Text createTextBoxScrollable(org.eclipse.swt.widgets.Composite parent,
                                                                       int numColumns,
                                                                       int minWidth,
                                                                       int minHeight)

  Create a text field that is scrollable.

  Parameters:
    `parent` - the parent of the new text field
    `numColumns` - number of columns the text box is to occupy
    `minWidth` - minimum width of text field
    `minHeight` - minimum height of text field
  Returns:
    the new text field

### createList

    public static org.eclipse.swt.widgets.List createList(org.eclipse.swt.widgets.Composite parent,
                                                          int numColumns,
                                                          int minWidth,
                                                          int minHeight,
                                                          java.lang.String[] items)

  Create a list with the items listed in it.

  Parameters:
    `parent` - the parent of the new text field
    `numColumns` - number of columns the text box is to occupy
    `minWidth` - minimum width of text field
    `minHeight` - minimum height of text field
    `items` - the items in the list
  Returns:
    the new list

### createList

    public static org.eclipse.swt.widgets.List createList(org.eclipse.swt.widgets.Composite parent,
                                                          int numColumns,
                                                          int minWidth,
                                                          int minHeight,
                                                          java.lang.String[] items,
                                                          boolean bmulti)

  Create a list with the items listed in it.

  Parameters:
    `parent` - the parent of the new list box
    `numColumns` - number of columns the list box is to occupy
    `minWidth` - minimum width of list box
    `minHeight` - minimum height of list box
    `items` - the items in the list
    `bmulti` - whether multiple item selection is allowed
    `verticalSpan` - the number of rows the list box is to occupy
  Returns:
    the new list

### createList

    public static org.eclipse.swt.widgets.List createList(org.eclipse.swt.widgets.Composite parent,
                                                          int numColumns,
                                                          int minWidth,
                                                          int minHeight,
                                                          java.lang.String[] items,
                                                          boolean bmulti,
                                                          int verticalSpan)

  Create a list with the items listed in it.

  Parameters:
    `parent` - the parent of the new list box
    `numColumns` - number of columns the list box is to occupy
    `minWidth` - minimum width of list box
    `minHeight` - minimum height of list box
    `items` - the items in the list
    `bmulti` - whether multiple item selection is allowed
    `verticalSpan` - the number of rows the list box is to occupy
  Returns:
    the new list

### computeScrollArea

    public static void computeScrollArea(org.eclipse.swt.custom.ScrolledComposite parentComposite,
                                         org.eclipse.swt.widgets.Composite childComposite)

  Computes the size of the composite inside the scroll area so that scroll bars show up correctly.

  Parameters:
    `parentComposite` -
    `childComposite` -

### getTokenNames

    public static java.lang.String[] getTokenNames(java.lang.String tokenString)

  Builds an array of strings from a token list string. The token separator is a comma (',').

  Parameters:
    `tokenString` -
  Returns:
    String[]

### listenModify

    public static void listenModify(org.eclipse.swt.widgets.Composite container,
                                    org.eclipse.swt.widgets.Listener listener,
                                    org.eclipse.swt.widgets.Widget[] except)

  register the listener recursively, except for the except component

  Parameters:
    `container` -
    `listener` -
    `except` -

### notEmpty

    public static boolean notEmpty(org.eclipse.swt.widgets.Text text)

  Checks that a Text control is not null and not empty

  Parameters:
    `text` -
  Returns:

### notEmpty

    public static boolean notEmpty(org.eclipse.swt.widgets.Combo text)

  Checks that a Combo control is not null and not empty

  Parameters:
    `text` -
  Returns:

### recursiveEnable

    public static void recursiveEnable(org.eclipse.swt.widgets.Control control,
                                       boolean enable)

  Recursively enable/disable a group of controls. When set to disable, it will try to remember the original state of the control, so when recursive enable will only restore to its original state.

  Parameters:
    `control` -
    `enable` -

### getTableHeightHint

    public static int getTableHeightHint(org.eclipse.swt.widgets.Table table,
                                         int rows)

### processError

    public static void processError(java.lang.String msg,
                                    java.lang.Exception error,
                                    org.eclipse.core.runtime.IStatus status)