| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.eclipse.datatools.sqltools.result.internal.ui.utils.UIUtil
public class UIUtil
UI related utility methods.
| Field Summary | |
|---|---|
| static int | DEFAULT_BUTTON_WIDTH | 
| static int | DEFAULT_COMBO_WIDTH | 
| static int | DEFAULT_RADIO_FILL | 
| static int | DEFAULT_TEXTBOX_WIDTH | 
| Constructor Summary | |
|---|---|
| UIUtil() | |
| Method Summary | |
|---|---|
| static int | convertHeightInCharsToPixels(int chars,
                             org.eclipse.swt.widgets.Control control)Returns the height in pixels given the characters number. | 
| static int | convertWidthInCharsToPixels(int chars,
                            org.eclipse.swt.widgets.Control control)Returns the width in pixels given the characters number. | 
| 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,
            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.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.Button | createPushButton(org.eclipse.swt.widgets.Composite parent,
                 java.lang.String label) | 
| 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.Text | createTextBox(org.eclipse.swt.widgets.Composite parent)Creates a text field | 
| static org.eclipse.swt.widgets.Text | createTextBox(org.eclipse.swt.widgets.Composite parent,
              int numColumns)Creates a text field | 
| static org.eclipse.swt.widgets.Text | createTextBox(org.eclipse.swt.widgets.Composite parent,
              int numColumns,
              int minWidth)Creates a text field | 
| static org.eclipse.swt.widgets.Text | createTextBox(org.eclipse.swt.widgets.Composite parent,
              int numColumns,
              int minWidth,
              int minHeight)Creates a text field | 
| static org.eclipse.swt.widgets.Text | createTextBox(org.eclipse.swt.widgets.Composite parent,
              java.lang.String text)Creates a text field | 
| static java.lang.String[] | getTokenNames(java.lang.String tokenString)Builds an array of strings from a token list string. | 
| Methods inherited from class java.lang.Object | 
|---|
| equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Field Detail | 
|---|
public static final int DEFAULT_BUTTON_WIDTH
public static final int DEFAULT_COMBO_WIDTH
public static final int DEFAULT_TEXTBOX_WIDTH
public static final int DEFAULT_RADIO_FILL
| Constructor Detail | 
|---|
public UIUtil()
| Method Detail | 
|---|
public static int convertWidthInCharsToPixels(int chars,
                                              org.eclipse.swt.widgets.Control control)
chars - number of characterscontrol - the widget which contains font information, should not be null
public static int convertHeightInCharsToPixels(int chars,
                                               org.eclipse.swt.widgets.Control control)
chars - number of characterscontrol - the widget which contains font information, should not be null
public static org.eclipse.swt.widgets.Label createLabel(org.eclipse.swt.widgets.Composite parent,
                                                        java.lang.String text,
                                                        int numColumns,
                                                        int indent)
parent - the parent for the new labeltext - the text for the new labelnumColumns - the number of columns for the new compositeindent - number of pixels to indent from the left
public static org.eclipse.swt.widgets.Label createLabel(org.eclipse.swt.widgets.Composite parent,
                                                        java.lang.String text,
                                                        int numColumns)
parent - the parent for the new labeltext - the text for the new labelnumColumns - the number of columns for the new composite
public static org.eclipse.swt.widgets.Button createPushButton(org.eclipse.swt.widgets.Composite parent,
                                                              java.lang.String label)
public static org.eclipse.swt.widgets.Button createPushButton(org.eclipse.swt.widgets.Composite parent,
                                                              java.lang.String label,
                                                              int widthHint)
parent - the parent for the new buttonlabel - the label for the new buttonwidthHint - use this width for the button.
public static org.eclipse.swt.widgets.Group createGroup(org.eclipse.swt.widgets.Composite parent,
                                                        java.lang.String title,
                                                        int numColumns)
parent - the parent for the new grouptitle - the label for the new groupnumColumns - the number of columns for the new group
public static org.eclipse.swt.widgets.Group createGroup(org.eclipse.swt.widgets.Composite parent,
                                                        java.lang.String title,
                                                        int numColumns,
                                                        int horizontalSpan,
                                                        int gridDataFill)
parent - the parent for the new grouptitle - the label for the new groupnumColumns - the number of columns for the new grouphorizontalSpan - 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
public static org.eclipse.swt.widgets.Button createCheckBox(org.eclipse.swt.widgets.Composite parent)
parent - the composite in which to create the checkboxlabel - the string to set into the checkboxnumColumns - the number of columns the new checkbox is to occupy
public static org.eclipse.swt.widgets.Button createCheckBox(org.eclipse.swt.widgets.Composite parent,
                                                            java.lang.String label,
                                                            int numColumns)
parent - the composite in which to create the checkboxlabel - the string to set into the checkboxnumColumns - the number of columns the new checkbox is to occupy
public static org.eclipse.swt.widgets.Button createCheckBox(org.eclipse.swt.widgets.Composite parent,
                                                            java.lang.String label,
                                                            int numColumns,
                                                            int indent)
parent - the composite in which to create the checkboxlabel - the string to set into the checkboxnumColumns - the number of columns the new checkbox is to occupyindent - the number of pixels to indent from the left
public static org.eclipse.swt.widgets.Text createTextBox(org.eclipse.swt.widgets.Composite parent)
parent - the parent of the new text field
public static org.eclipse.swt.widgets.Text createTextBox(org.eclipse.swt.widgets.Composite parent,
                                                         java.lang.String text)
parent - the parent of the new text field
public static org.eclipse.swt.widgets.Text createTextBox(org.eclipse.swt.widgets.Composite parent,
                                                         int numColumns)
parent - the parent of the new text fieldnumColumns - number of columns the text box is to occupy
public static org.eclipse.swt.widgets.Text createTextBox(org.eclipse.swt.widgets.Composite parent,
                                                         int numColumns,
                                                         int minWidth)
parent - the parent of the new text fieldnumColumns - number of columns the text box is to occupyminWidth - minimum width of text field
public static org.eclipse.swt.widgets.Text createTextBox(org.eclipse.swt.widgets.Composite parent,
                                                         int numColumns,
                                                         int minWidth,
                                                         int minHeight)
parent - the parent of the new text fieldnumColumns - number of columns the text box is to occupyminWidth - minimum width of text field
public static org.eclipse.swt.widgets.Combo createCombo(org.eclipse.swt.widgets.Composite parent,
                                                        java.lang.String tokenString,
                                                        int numColumns)
parent - the composite in which to create the combotokenString - a tokenized string that will be split into the fields.numColumns - the number of columns the new combo is to occupy
public static org.eclipse.swt.widgets.Combo createCombo(org.eclipse.swt.widgets.Composite parent,
                                                        java.lang.String tokenString,
                                                        int numColumns,
                                                        int minWidth)
parent - the composite in which to create the combotokenString - a tokenized string that will be split into the fields.numColumns - the number of columns the new combo is to occupyminWidth - minimum width of combo box in pixels
public static org.eclipse.swt.widgets.Combo createCombo(org.eclipse.swt.widgets.Composite parent,
                                                        java.lang.String[] items,
                                                        int numColumns,
                                                        int minWidth)
parent - the composite in which to create the comboitems - the items in the combonumColumns - the number of columns the new combo is to occupyminWidth - minimum width of combo box in pixels
public static org.eclipse.swt.widgets.Combo createCombo(org.eclipse.swt.widgets.Composite parent,
                                                        java.lang.String tokenString,
                                                        int numColumns,
                                                        int minWidth,
                                                        boolean editable)
parent - the composite in which to create the comboitems - the items in the combonumColumns - the number of columns the new combo is to occupyminWidth - minimum width of combo box in pixelseditable - whether the items in the combo is editable
public static org.eclipse.swt.widgets.Combo createCombo(org.eclipse.swt.widgets.Composite parent,
                                                        java.lang.String[] items,
                                                        int numColumns,
                                                        int minWidth,
                                                        boolean editable)
parent - the composite in which to create the comboitems - the items in the combonumColumns - the number of columns the new combo is to occupyminWidth - minimum width of combo box in pixelseditable - whether the items in the combo is editable
public static java.lang.String[] getTokenNames(java.lang.String tokenString)
tokenString - 
| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||