|
RSE Release 3.2 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.rse.ui.SystemWidgetHelpers
public class SystemWidgetHelpers
Static methods that can be used when writing SWT GUI code. They simply make it more productive.
Field Summary | |
---|---|
static Label |
previousLabel
|
static boolean |
traceHelpIDs
|
Constructor Summary | |
---|---|
SystemWidgetHelpers()
|
Method Summary | |
---|---|
static String |
appendColon(String label)
Appends a colon to a label, if the label doesn't already end in a colon of the proper size. |
static Button |
createBrowseButton(Composite group,
Listener listener)
Creates a new "Browse..." pushbutton instance and sets the default layout data. |
static Button |
createBrowseButton(Composite group,
Listener listener,
String tooltip)
Deprecated. |
static Button |
createCheckBox(Composite group,
int horizontalSpan,
Listener listener,
String label,
String tooltip)
Creates a new checkbox instance with the given horizontal span and sets the default layout data, and sets the tooltip text. |
static Button |
createCheckBox(Composite group,
int horizontalSpan,
String label,
Listener listener)
Creates a new checkbox instance with the given horizontal span and sets the default layout data. |
static Button |
createCheckBox(Composite group,
Listener listener,
String label,
String tooltip)
Creates a new checkbox instance and sets the default layout data, and sets the tooltip text. |
static Button |
createCheckBox(Composite group,
String label,
Listener listener)
Creates a new checkbox instance and sets the default layout data. |
static Combo |
createCombo(Composite parent,
Listener listener)
Creates a new combobox instance and sets the default layout data. |
static Combo |
createCombo(Composite parent,
Listener listener,
String toolTip)
Creates a new combobox instance and sets the default layout data, with tooltip text. |
static Label |
createCommandStatusLine(Composite parent,
int horizontalSpan)
Create a label to show a command string as it is being built-up in a dialog This version uses a default height of 3 normal lines. |
static Label |
createCommandStatusLine(Composite parent,
int horizontalSpan,
int heightInLines)
Create a label to show a command string as it is being built-up in a dialog. |
static Composite |
createComposite(Composite parent,
int numColumns)
Creates composite control and sets the default layout data. |
static Composite |
createComposite(Composite parent,
int parentSpan,
int numColumns,
boolean border,
String label,
int marginSize,
int spacingSize)
This is the most flexible composite creation method. |
static SystemHostCombo |
createConnectionCombo(Composite parent,
SelectionListener listener,
IRSESystemType[] systemTypes,
ISubSystemConfiguration factory,
String factoryId,
String factoryCategory,
IHost defaultConnection,
int horizontalSpan,
boolean newButton)
Creates a new remote system connection combobox instance and sets the default layout data, with tooltip text. |
static Composite |
createFlushComposite(Composite parent,
int numColumns)
Creates "flush" composite control and sets the default layout data. |
static Group |
createGroupComposite(Composite parent,
int numColumns,
String label)
Creates group composite control and sets the default layout data. |
static SystemHistoryCombo |
createHistoryCombo(Composite parent,
SelectionListener listener,
String historyKey,
boolean readonly,
String tooltip)
Creates a new historical combobox instance and sets the default layout data, with tooltip text. |
static Combo |
createHostNameCombo(Composite parent,
Listener listener,
IRSESystemType systemType)
Creates a hostname combination box. |
static Button |
createImageButton(Composite group,
Image image,
Listener listener)
Creates a new pushbutton instance with an image, vs text. |
static InheritableEntryField |
createInheritableTextField(Composite parent,
String toggleToolTip,
String entryToolTip)
Create an entry field controlled by an inherit/override switch button After creating the widget, call setLocal to set initial state, and setInheritedText/setLocalText to set inherited/local text |
static Label |
createLabel(Composite parent,
String text)
Creates a label instance and inserts it into a given GridLayout. |
static Label |
createLabel(Composite parent,
String text,
int span)
Creates a label instance and inserts it into a given GridLayout. |
static Label |
createLabel(Composite parent,
String text,
int span,
boolean wantBorder)
Creates a label instance and inserts it into a given GridLayout, optionally with a border style |
static Label |
createLabel(Composite parent,
String text,
String tooltip)
Creates a label instance and inserts it into a given GridLayout. |
static Label |
createLabel(Composite parent,
String text,
String tooltip,
int span,
boolean wantBorder)
Creates a label instance and inserts it into a given GridLayout. |
static Combo |
createLabeledCombo(Composite parent,
Listener listener,
String label,
String tooltip)
Create a labeled combo field and insert it into a GridLayout, and assign tooltip text. |
static Label |
createLabeledLabel(Composite parent,
String label,
String tooltip,
boolean wantBorder)
Create a pair of labels, the first being a prompt and the second being a value. |
static Combo |
createLabeledReadonlyCombo(Composite parent,
Listener listener,
String labelText,
String tooltip)
Create a labeled readonly combo field and insert it into a GridLayout, and assign tooltip text. |
static Text |
createLabeledReadonlyTextField(Composite parent,
String text,
String tooltip)
Create a labeled readonly text field and insert it into a GridLayout, and assign tooltip text. |
static Text |
createLabeledTextField(Composite parent,
Listener listener,
String labelText,
String tooltip)
Create a labeled text field and insert it into a GridLayout, and assign tooltip text. |
static Label |
createLabeledVerbiage(Composite parent,
String labelText,
String tooltip,
int span,
boolean border,
int widthHint)
Create a labeled verbiage (wrappable label) field and insert it into a GridLayout, and assign tooltip text. |
static List |
createListBox(Composite group,
Listener listener,
boolean multiSelect,
String label,
String tooltip)
Creates a new listbox instance and sets the default layout data. |
static List |
createListBox(Composite group,
String label,
Listener listener,
boolean multiSelect)
Creates a new listbox instance and sets the default layout data. |
static List |
createListBox(Composite group,
String label,
Listener listener,
boolean multiSelect,
int columnSpan)
Creates a new listbox instance and sets the default layout data. |
static List |
createListBox(Composite group,
String label,
Listener listener,
boolean multiSelect,
String tooltip)
Creates a new listbox instance and sets the default layout data. |
static Text |
createMultiLineLabeledTextField(Composite parent,
Listener listener,
String labelString,
String tooltip,
int heightHint)
Create a multiline labeled text field and insert it into a GridLayout, and assign tooltip text. |
static Text |
createMultiLineTextField(Composite parent,
Listener listener,
int heightHint)
Create a multiline text field and insert it into a GridLayout. |
static Button |
createPushButton(Composite group,
Listener listener,
String label,
String tooltip)
This one takes the resource bundle key and appends "label" and "tooltip" to it to get the label and tooltip text. |
static Button |
createPushButton(Composite group,
String label,
Listener listener)
Creates a new pushbutton instance and sets the default layout data. |
static Button |
createPushButton(Composite group,
String label,
Listener listener,
String tooltip)
Creates a new pushbutton instance and sets the default layout data, and assign tooltip text Assign the listener to the passed in implementer of Listener. |
static Button |
createRadioButton(Composite group,
Listener listener,
String label)
Creates a new radiobutton instance and sets the default layout data, and assigns tooltip text. |
static Button |
createRadioButton(Composite group,
Listener listener,
String label,
String tooltip)
Creates a new radiobutton instance and sets the default layout data, and assigns tooltip text. |
static Button |
createRadioButton(Composite group,
String label,
Listener listener)
Creates a new radiobutton instance and sets the default layout data. |
static Combo |
createReadonlyCombo(Composite parent,
Listener listener)
Creates a new readonly combobox instance and sets the default layout data. |
static Combo |
createReadonlyCombo(Composite parent,
Listener listener,
String tooltip)
Creates a new readonly combobox instance and sets the default layout data, with tooltip text. |
static Text |
createReadonlyTextField(Composite parent)
Create a readonly text field and insert it into a GridLayout. |
static Text |
createReadonlyTextField(Composite parent,
String toolTip)
Create a readonly text field and insert it into a GridLayout, and assign tooltip text. |
static Label |
createRigidFillerLabel(Composite parent,
int span,
int widthHint)
Creates a label for use a simple filler, to eat up space. |
static void |
createSpacerLine(Composite parent,
int columnSpan,
boolean wantBorder)
Create a spacer line. |
static Combo |
createSystemTypeCombo(Composite parent,
Listener listener,
IRSESystemType[] systemTypes)
Creates a readonly system type combination box with the given system types. |
static Text |
createTextField(Composite parent,
Listener listener)
Create a text field and insert it into a GridLayout. |
static Text |
createTextField(Composite parent,
Listener listener,
String toolTip)
Create a text field and insert it into a GridLayout, and assign tooltip text. |
static Composite |
createTightComposite(Composite parent,
int numColumns)
Creates "tight" composite control and sets the default layout data. |
static Label |
createVerbiage(Composite parent,
String text,
int span,
boolean border,
int widthHint)
Creates a widget for displaying text verbiage that spans multiple lines. |
static Composite |
createVerticalBeginComposite(Composite parent,
int parentSpan,
int numColumns,
boolean border,
String label,
int marginSize,
int spacingSize)
Creates a composite with vertical alignment GridData.VERTICAL_ALIGN_BEGINNING. |
static Label |
getFirstColumnOneLabel(Composite composite)
Given a composite that has been layed out, return the first label found in the first column. |
static Label |
getLastLabel()
Return the prompting label from the last call to createLabeledXXXX. |
static String[] |
getSystemTypeLabels(IRSESystemType[] systemTypes)
Return the labels for the given list of system types. |
static IRSESystemType[] |
getValidSystemTypes(String[] restrictIds)
Return the list of all registered valid system types. |
static void |
lineUpPrompts(Composite composite)
Helper method to line up the leading prompts in a composite, taking into account composite prompts nested within. |
static void |
setCompositeHelp(Composite parent,
String helpID)
Given a Composite, this method walks all the children recursively and and sets the infopop help id for each child control where help makes sense (eg, buttons, combos, entry fields, lists, trees). |
static void |
setHelp(Control c,
IViewPart view,
Object id)
Deprecated. |
static void |
setHelp(Control c,
String id)
Set the context id for a control |
static void |
setHelp(IAction c,
String id)
Set the context id for an action |
static void |
setHelp(MenuItem c,
String id)
Set the context id for a menu item |
static Mnemonics |
setMnemonics(Composite parent)
Given a Composite, this method walks all the children recursively and and sets the mnemonics uniquely for each child control where a mnemonic makes sense (eg, buttons). |
static Mnemonics |
setMnemonics(Composite parent,
boolean applyToPrecedingLabels)
Same as above but also whether to apply mnemonics to labels preceding text fields, combos and inheritable entry fields. |
static void |
setMnemonics(Menu menu)
Given an SWT Menu, "walk it" and automatically assign unique mnemonics for every menu item in it, and then for each submenu, do so for it too. |
static Mnemonics |
setMnemonics(Mnemonics mnemonics,
Composite parent)
Same as above but takes as input a previously populated mnemonics object, which records already-used mnemonics for whatever scope you want (a dialog usually). |
static Mnemonics |
setPreferencePageMnemonics(Composite parent)
Same as above but specifically for preference pages |
static Mnemonics |
setPreferencePageMnemonics(Composite parent,
boolean applyToPrecedingLabels)
Same as above but also whether to apply mnemonics to labels preceding text fields, combos and inheritable entry fields. |
static Mnemonics |
setWizardPageMnemonics(Composite parent)
Same as above but specifically for wizard pages |
static Mnemonics |
setWizardPageMnemonics(Composite parent,
boolean applyToPrecedingLabels)
Same as above but also whether to apply mnemonics to labels preceding text fields, combos and inheritable entry fields. |
static void |
sortSystemTypesByLabel(IRSESystemType[] systemTypes)
Sorts the given array of systemTypes in ascending order by system type label. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static boolean traceHelpIDs
public static Label previousLabel
Constructor Detail |
---|
public SystemWidgetHelpers()
Method Detail |
---|
public static Composite createComposite(Composite parent, int parentSpan, int numColumns, boolean border, String label, int marginSize, int spacingSize)
parent
- Parent compositeparentSpan
- number of columns this is to span in the parent's compositenumColumns
- number of columns this composite is to haveborder
- true if you want to show an etched border around the compositelabel
- optional label to show in the border. Forces border to truemarginSize
- the number pixels around the composite. -1 means Eclipse defaultspacingSize
- the number pixels around the composite controls. -1 means Eclipse defaultpublic static Composite createVerticalBeginComposite(Composite parent, int parentSpan, int numColumns, boolean border, String label, int marginSize, int spacingSize)
parent
- Parent compositeparentSpan
- number of columns this is to span in the parent's compositenumColumns
- number of columns this composite is to haveborder
- true if you want to show an etched border around the compositelabel
- optional label to show in the border. Forces border to truemarginSize
- the number pixels around the composite. -1 means Eclipse defaultspacingSize
- the number pixels around the composite controls. -1 means Eclipse defaultpublic static Composite createComposite(Composite parent, int numColumns)
parent
- GridLayout composite to put the new group composite into.numColumns
- Number of columns the new group will contain.public static Group createGroupComposite(Composite parent, int numColumns, String label)
parent
- GridLayout composite to put the new group composite into.numColumns
- Number of columns the new group will contain.label
- Text to display in the group border. Can be null.public static Composite createTightComposite(Composite parent, int numColumns)
parent
- GridLayout composite to put the new group composite into.numColumns
- Number of columns the new group will contain.public static Composite createFlushComposite(Composite parent, int numColumns)
parent
- GridLayout composite to put the new group composite into.numColumns
- Number of columns the new group will contain.public static Label createRigidFillerLabel(Composite parent, int span, int widthHint)
parent
- Composite to put the field into.span
- Horizontal spanwidthHint
- How wide to make it. Pass -1 to use SWT defaultpublic static Label createLabel(Composite parent, String text)
parent
- GridLayout composite to put the field into.text
- Text to display in the label.public static Label createLabel(Composite parent, String text, int span)
parent
- Composite to put the field into.text
- Text to display in the label.span
- Horizontal spanpublic static Label createLabel(Composite parent, String text, int span, boolean wantBorder)
parent
- Composite to put the field into.text
- Text to display in the label.span
- Horizontal spanwantBorder
- true to place border around the labelpublic static Label createLabel(Composite parent, String text, String tooltip)
parent
- GridLayout composite to put the field into.text
- tooltip
- public static Label createLabel(Composite parent, String text, String tooltip, int span, boolean wantBorder)
parent
- Composite to put the field into.text
- tooltip
- span
- Horizontal spanwantBorder
- true to place border around the labelpublic static Label createLabeledLabel(Composite parent, String label, String tooltip, boolean wantBorder)
The first label is set to not grab excess horizontal space, while the second one is, since its contents are variable.
To help with initial sizing, the widthHint of the second is set to 100.
If you need a handle to the prompting label, immediately call getLastLabel()
parent
- composite to put the fields into. Will be added sequentiallylabel
- tooltip
- wantBorder
- true if a border is desired around the second label (the value vs the prompt)
public static Label getLastLabel()
public static void createSpacerLine(Composite parent, int columnSpan, boolean wantBorder)
public static Label createVerbiage(Composite parent, String text, int span, boolean border, int widthHint)
parent
- Composite to put the field into.text
- String is the verbiage text to displayspan
- Horizontal spanborder
- true if you want a border around the verbiagewidthHint
- number of pixels to limit width to before wrapping. 200 is a reasonable number
public static Label createLabeledVerbiage(Composite parent, String labelText, String tooltip, int span, boolean border, int widthHint)
If you need a handle to the prompting label, immediately call getLastLabel()
parent
- composite to put the field into.labelText
- tooltip
- span
- Horizontal spanborder
- true if you want a border around the verbiagewidthHint
- number of pixels to limit width to before wrapping. 200 is a reasonable number
public static Label createCommandStatusLine(Composite parent, int horizontalSpan)
public static Label createCommandStatusLine(Composite parent, int horizontalSpan, int heightInLines)
public static Text createTextField(Composite parent, Listener listener)
parent
- GridLayout composite to put the field into.listener
- Listener object to listen for events. Can be null.public static Text createTextField(Composite parent, Listener listener, String toolTip)
parent
- composite to put the field into.listener
- object to listen for events. Can be null.toolTip
- tooltip textpublic static Text createLabeledTextField(Composite parent, Listener listener, String labelText, String tooltip)
If you need a handle to the prompting label, immediately call getLastLabel()
parent
- composite to put the field into.listener
- object to listen for events. Can be null.labelText
- the labeltooltip
- the tooltip
public static Text createReadonlyTextField(Composite parent)
parent
- GridLayout composite to put the field into.public static Text createReadonlyTextField(Composite parent, String toolTip)
parent
- composite to put the field into.toolTip
- public static Text createLabeledReadonlyTextField(Composite parent, String text, String tooltip)
If you need a handle to the prompting label, immediately call getLastLabel()
parent
- composite to put the field into.text
- the labeltooltip
- the tooltip
public static Text createMultiLineTextField(Composite parent, Listener listener, int heightHint)
parent
- GridLayout composite to put the field into.listener
- Listener object to listen for events. Can be null.public static Text createMultiLineLabeledTextField(Composite parent, Listener listener, String labelString, String tooltip, int heightHint)
parent
- composite to put the field into.listener
- object to listen for events. Can be null.labelString
- the labeltooltip
- the tooltip
public static Button createCheckBox(Composite group, String label, Listener listener)
group
- composite to put the checkbox into.label
- to display in the checkbox.listener
- object to listen for events. Can be null.public static Button createCheckBox(Composite group, int horizontalSpan, String label, Listener listener)
group
- composite to put the checkbox into.horizontalSpan
- number of columns this checkbox is to span.label
- to display in the checkbox.listener
- object to listen for events. Can be null.public static Button createCheckBox(Composite group, Listener listener, String label, String tooltip)
group
- composite to put the checkbox into.listener
- object to listen for events. Can be null.label
- the labeltooltip
- the tooltippublic static Button createCheckBox(Composite group, int horizontalSpan, Listener listener, String label, String tooltip)
group
- composite to put the checkbox into.horizontalSpan
- number of columns to span.listener
- object to listen for events. Can be null.label
- the labeltooltip
- the tooltippublic static Button createRadioButton(Composite group, String label, Listener listener)
group
- composite to put the button into.label
- to display in the buttonlistener
- object to listen for events. Can be null.public static Button createRadioButton(Composite group, Listener listener, String label, String tooltip)
group
- composite to put the button into.listener
- object to listen for events. Can be null.label
- the labeltooltip
- the tooltippublic static Button createRadioButton(Composite group, Listener listener, String label)
group
- composite to put the button into.listener
- object to listen for events. Can be null.label
- the labelpublic static Button createImageButton(Composite group, Image image, Listener listener)
group
- The composite to put the button into.image
- The image to display in the buttonlistener
- The object to listen for events. Can be null.public static Button createPushButton(Composite group, String label, Listener listener)
group
- composite to put the button into.label
- to display in the buttonlistener
- object to listen for events. Can be null.public static Button createPushButton(Composite group, String label, Listener listener, String tooltip)
group
- composite to put the button into.label
- to display in the buttonlistener
- object to listen for events. Can be null.tooltip
- the tooltippublic static Button createPushButton(Composite group, Listener listener, String label, String tooltip)
group
- composite to put the button into.listener
- object to listen for events. Can be null.label
- the labeltooltip
- the tooltippublic static Button createBrowseButton(Composite group, Listener listener)
group
- composite to put the button into.listener
- object to listen for events. Can be null.public static Button createBrowseButton(Composite group, Listener listener, String tooltip)
group
- composite to put the button into.listener
- object to listen for events. Can be null.tooltip
- the tooltip textpublic static List createListBox(Composite group, String label, Listener listener, boolean multiSelect)
group
- composite to put the button into.label
- to display above the list box (can be null).listener
- object to listen for events. Can be null.multiSelect
- true if this is to be a multiple selection list. False for single selection.public static List createListBox(Composite group, String label, Listener listener, boolean multiSelect, int columnSpan)
group
- composite to put the button into.label
- to display above the list box (can be null).listener
- object to listen for events. Can be null.multiSelect
- true if this is to be a multiple selection list. False for single selection.columnSpan
- number of columns this should spanpublic static List createListBox(Composite group, String label, Listener listener, boolean multiSelect, String tooltip)
group
- composite to put the button into.label
- to display above the list box (can be null).listener
- object to listen for events. Can be null.multiSelect
- true if this is to be a multiple selection list. False for single selection.tooltip
- the tooltippublic static List createListBox(Composite group, Listener listener, boolean multiSelect, String label, String tooltip)
group
- composite to put the button into.listener
- object to listen for events. Can be null.multiSelect
- true if this is to be a multiple selection list. False for single selection.label
- the labeltooltip
- the tooltippublic static Combo createCombo(Composite parent, Listener listener)
parent
- composite to put the button into.listener
- object to listen for selection events. Can be null.
If you want to listen for modify events, call addListener(SWT.Modify,this) on your own.public static Combo createCombo(Composite parent, Listener listener, String toolTip)
parent
- composite to put the combo into.listener
- object to listen for selection events. Can be null.
If you want to listen for modify events, call addListener(SWT.Modify,this) on your own.toolTip
- tooltip textpublic static Combo createLabeledCombo(Composite parent, Listener listener, String label, String tooltip)
If you need a handle to the prompting label, immediately call getLastLabel()
parent
- composite to put the field into.listener
- object to listen for selection events. Can be null.
If you want to listen for modify events, call addListener(SWT.Modify,this) on your own.label
- the label texttooltip
- the tooltip for the combo field
public static Combo createReadonlyCombo(Composite parent, Listener listener)
parent
- composite to put the button into.listener
- object to listen for selection events. Can be null.
If you want to listen for modify events, call addListener(SWT.Modify,this) on your own.public static Combo createReadonlyCombo(Composite parent, Listener listener, String tooltip)
parent
- composite to put the button into.listener
- object to listen for selection events. Can be null.
If you want to listen for modify events, call addListener(SWT.Modify,this) on your own.tooltip
- public static Combo createLabeledReadonlyCombo(Composite parent, Listener listener, String labelText, String tooltip)
If you need a handle to the prompting label, immediately call getLastLabel()
parent
- composite to put the field into.listener
- object to listen for selection events. Can be null.
If you want to listen for modify events, call addListener(SWT.Modify,this) on your own.labelText
- the labeltooltip
- the tooltip
public static SystemHistoryCombo createHistoryCombo(Composite parent, SelectionListener listener, String historyKey, boolean readonly, String tooltip)
Assign the listener to the passed in implementer of Listener.
A historical combobox is one that persists its contents between sessions. The management of that persistence is handled for you!.
parent
- composite to put the combo into.listener
- object to listen for selection events. Can be null.
If you want to listen for modify events, call addListener(SWT.Modify,this) on your own.historyKey
- the preferences key (any unique string) to use to persist this combo's historyreadonly
- true if this combo is to be readonly, forcing user to select from the historytooltip
- the tooltippublic static SystemHostCombo createConnectionCombo(Composite parent, SelectionListener listener, IRSESystemType[] systemTypes, ISubSystemConfiguration factory, String factoryId, String factoryCategory, IHost defaultConnection, int horizontalSpan, boolean newButton)
Assign the listener to the passed in implementer of Listener.
A remote system connection combobox is one that allows users to select a connection. The connection list can be subsetted by system type, subsystem factory or subsystem factory category. It has a "Connection:" prompt in front of it and optionally a "New..." button beside it.
parent
- composite to put the combo into.listener
- object to listen for selection events. Can be null.
If you want to listen for modify events, call addSelectionListener(...) on your own.systemTypes
- array of system types to subset connection list by. Specify a single entry of '*' for
all system types. Specify this OR specify factory OR specify factoryCategory
OR specify factory Idfactory
- the subsystem factory to subset connection list by. Only connections with a subsystem
owned by this factory are listed. Specify this OR specify systemTypes OR specify factoryCategory
OR specify factory IdfactoryId
- the subsystem factory id to subset connection list by. Only connections with a
subsystem owned by this factory are listed, where id is a string specified in the
plugin.xml file for the subsystem factory extension point definition.
Specify this OR specify factory OR specify systemTypes OR specify factory categoryfactoryCategory
- the subsystem factory category to subset connection list by. Only connections with a
subsystem owned by a factory of this category are listed, where category is a string specified in the
plugin.xml file for the subsystem factory extension point definition.
Specify this OR specify factory OR specify factory Id OR specify systemTypesdefaultConnection
- the connection to pre-select. Can be null.horizontalSpan
- number of columns this should spannewButton
- true if the combo is to have a "New..." button beside itpublic static IRSESystemType[] getValidSystemTypes(String[] restrictIds)
restrictIds
- An array of system type IDs to restrict the
returned list of valid system types to only those requested,
or null
to return all valid system types.
public static void sortSystemTypesByLabel(IRSESystemType[] systemTypes)
systemTypes
- list of system types to sortpublic static String[] getSystemTypeLabels(IRSESystemType[] systemTypes)
systemTypes
- an array of system types
public static Combo createSystemTypeCombo(Composite parent, Listener listener, IRSESystemType[] systemTypes)
Combo.getSelectionIndex()
and use the return value as
an index into the array of system types they provided.
parent
- the parent composite to embed this widget in.listener
- a listener for selection events.systemTypes
- an array of system types to show in this Combo.
Must not be null
.
Fill this with the result of getValidSystemTypes(String[])
with a null argument in order to get a combo box with all valid
system types.
public static Combo createHostNameCombo(Composite parent, Listener listener, IRSESystemType systemType)
Does NOT create the leading prompt or anything except the combo.
public static InheritableEntryField createInheritableTextField(Composite parent, String toggleToolTip, String entryToolTip)
After creating the widget, call setLocal to set initial state, and setInheritedText/setLocalText to set inherited/local text
parent
- composite to put the button into.toggleToolTip
- text for the toggle. Can be nullentryToolTip
- text for the entry field. Can be null
public static void lineUpPrompts(Composite composite)
public static Label getFirstColumnOneLabel(Composite composite)
public static Mnemonics setMnemonics(Composite parent)
public static Mnemonics setMnemonics(Composite parent, boolean applyToPrecedingLabels)
public static Mnemonics setWizardPageMnemonics(Composite parent)
public static Mnemonics setWizardPageMnemonics(Composite parent, boolean applyToPrecedingLabels)
public static Mnemonics setPreferencePageMnemonics(Composite parent)
public static Mnemonics setPreferencePageMnemonics(Composite parent, boolean applyToPrecedingLabels)
public static Mnemonics setMnemonics(Mnemonics mnemonics, Composite parent)
public static void setMnemonics(Menu menu)
menu
- the menubar to add mnemonics forpublic static void setCompositeHelp(Composite parent, String helpID)
Call this after populating your controls.
public static void setHelp(Control c, IViewPart view, Object id)
public static void setHelp(Control c, String id)
public static void setHelp(IAction c, String id)
public static void setHelp(MenuItem c, String id)
public static String appendColon(String label)
label
- the label which to examine for a colon
|
RSE Release 3.2 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |