Remote Systems
v6.4.1

com.ibm.etools.systems.core.ui.propertypages
Class SystemComboBoxFieldEditor

java.lang.Object
  extended byFieldEditor
      extended bycom.ibm.etools.systems.core.ui.propertypages.SystemComboBoxFieldEditor

public class SystemComboBoxFieldEditor
extends FieldEditor

For string properties that have a discrete list of possibilities.

See Also:
Serialized Form

Field Summary
static String copyright
           
 
Constructor Summary
SystemComboBoxFieldEditor(String name, ResourceBundle rb, String rbKey, String[] contents, boolean readOnly, Composite parent)
          Constructor for SystemComboBoxFieldEditor, using an array for the contents, and specifying a resource bundle and key, from which we will retrieve the label and the tooltip text
SystemComboBoxFieldEditor(String name, String labelText, String[] contents, boolean readOnly, Composite parent)
          Constructor for SystemComboBoxFieldEditor, using an array for the contents
SystemComboBoxFieldEditor(String name, String labelText, Vector contents, boolean readOnly, Composite parent)
          Constructor for SystemComboBoxFieldEditor, using a Vector for the contents
 
Method Summary
protected  void adjustForNumColumns(int numColumns)
           
protected  void createModifyListener()
          Creates a modify text listener.
protected  void createSelectionListener()
          Creates a selection listener.
protected  void doFillIntoGrid(Composite parent, int numColumns)
          This is called by our parent's constructor, which is too soon for us!
protected  void doLoad()
           
protected  void doLoadDefault()
           
protected  void doOurFillIntoGrid()
          Create controls
protected  void doStore()
           
 int getNumberOfControls()
           
 Combo getTextControl()
          Returns this field editor's Combo control.
 Combo getTextControl(Composite parent)
          Returns this field editor's text control.
protected  boolean isReadOnly()
          Is this a readonly combo?
 boolean isValid()
          Override of parent to return validity state.
protected  void refreshValidState()
          Override of parent to refresh validity state by checking if the input is valid.
protected  void selectionChanged()
          Combobox selection changed
 void setFocus()
          Set focus
 void setMassager(ISystemMassager massager)
          Set the massager that is used to affect the user-entered text before saving it to the preference store
 void setToolTipText(String tip)
          Allows setting of tooltip text
 void setValidator(ISystemValidator validator)
          If this combobox is editable, set the validator to use here per keystroke
protected  void validate()
          Validate contents of combo field
protected  void valueChanged()
          Informs this field editor's listener, if it has one, about a change to the value (VALUE property) provided that the old and new values are different.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

copyright

public static final String copyright
See Also:
Constant Field Values
Constructor Detail

SystemComboBoxFieldEditor

public SystemComboBoxFieldEditor(String name,
                                 String labelText,
                                 Vector contents,
                                 boolean readOnly,
                                 Composite parent)
Constructor for SystemComboBoxFieldEditor, using a Vector for the contents

Parameters:
name - - the unique ID for this editor. Used as index in preference store
labelText - - the label to show as the prompt preceding the dropdown
contents - - the list of strings to show in the dropdown, as a vector
readOnly - - true if the user is to be prevented from entering text into the combo
parent - - the parent composite to host this editor

SystemComboBoxFieldEditor

public SystemComboBoxFieldEditor(String name,
                                 String labelText,
                                 String[] contents,
                                 boolean readOnly,
                                 Composite parent)
Constructor for SystemComboBoxFieldEditor, using an array for the contents

Parameters:
name - - the unique ID for this editor. Used as index in preference store
labelText - - the label to show as the prompt preceding the dropdown
contents - - the list of strings to show in the dropdown, as an array
readOnly - - true if the user is to be prevented from entering text into the combo
parent - - the parent composite to host this editor

SystemComboBoxFieldEditor

public SystemComboBoxFieldEditor(String name,
                                 ResourceBundle rb,
                                 String rbKey,
                                 String[] contents,
                                 boolean readOnly,
                                 Composite parent)
Constructor for SystemComboBoxFieldEditor, using an array for the contents, and specifying a resource bundle and key, from which we will retrieve the label and the tooltip text

Parameters:
name - - the unique ID for this editor. Used as index in preference store
rb - - the resource bundle from which to retrieve the mri
rbKey - - the key into the resource bundle, to get the label (+"label") and tooltip text (+"tooltip")
contents - - the list of strings to show in the dropdown, as an array
readOnly - - true if the user is to be prevented from entering text into the combo
parent - - the parent composite to host this editor
Method Detail

setValidator

public void setValidator(ISystemValidator validator)
If this combobox is editable, set the validator to use here per keystroke


setMassager

public void setMassager(ISystemMassager massager)
Set the massager that is used to affect the user-entered text before saving it to the preference store


getNumberOfControls

public int getNumberOfControls()
See Also:
FieldEditor

doStore

protected void doStore()
See Also:
FieldEditor

doLoadDefault

protected void doLoadDefault()
See Also:
FieldEditor

doLoad

protected void doLoad()
See Also:
FieldEditor

doFillIntoGrid

protected void doFillIntoGrid(Composite parent,
                              int numColumns)
This is called by our parent's constructor, which is too soon for us! So, we do nothing here and then call doOurFillIntoGrid later within our own constructor.

See Also:
FieldEditor

doOurFillIntoGrid

protected void doOurFillIntoGrid()
Create controls


adjustForNumColumns

protected void adjustForNumColumns(int numColumns)
See Also:
FieldEditor

getTextControl

public Combo getTextControl()
Returns this field editor's Combo control.


getTextControl

public Combo getTextControl(Composite parent)
Returns this field editor's text control.

The control is created if it does not yet exist

Parameters:
parent - the parent
Returns:
the text control

setToolTipText

public void setToolTipText(String tip)
Allows setting of tooltip text


isReadOnly

protected boolean isReadOnly()
Is this a readonly combo?


createSelectionListener

protected void createSelectionListener()
Creates a selection listener.


selectionChanged

protected void selectionChanged()
Combobox selection changed


createModifyListener

protected void createModifyListener()
Creates a modify text listener. Ony used for non-readonly flavours


validate

protected void validate()
Validate contents of combo field


valueChanged

protected void valueChanged()
Informs this field editor's listener, if it has one, about a change to the value (VALUE property) provided that the old and new values are different.

This hook is not called when the text is initialized (or reset to the default value) from the preference store.


isValid

public boolean isValid()
Override of parent to return validity state. If this readonly, we always return true, else we return result of last validation


refreshValidState

protected void refreshValidState()
Override of parent to refresh validity state by checking if the input is valid. Does nothing unless this is not a readonly combo.


setFocus

public void setFocus()
Set focus


Remote Systems
v6.4.1

Copyright © 2005 IBM Corp. All Rights Reserved.

Note: This documentation is for part of an interim API that is still under development and expected to change significantly before reaching stability. It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken (repeatedly) as the API evolves.