Rational Developer for Power Systems Software
V7.6

com.ibm.etools.iseries.edit.ui.preferences
Class ComboBoxFieldEditor

java.lang.Object
  extended by FieldEditor
      extended by com.ibm.etools.iseries.edit.ui.preferences.ComboBoxFieldEditor
Direct Known Subclasses:
AutoCloseControlFieldEditor

public class ComboBoxFieldEditor
extends FieldEditor

For string properties that have a discrete list of possibilities. Also known as a Combo box.


Field Summary
static String copyright
           
 
Constructor Summary
ComboBoxFieldEditor(String name, String labelText, String[] contents, boolean readonly, Composite parent)
          Constructor for ComboBoxFieldEditor
ComboBoxFieldEditor(String name, String labelText, Vector<String> contents, boolean readonly, Composite parent)
          Constructor for ComboBoxFieldEditor
 
Method Summary
protected  void adjustForNumColumns(int numColumns)
           
 void createModifyListener()
          Creates a selection listener.
 void createSelectionListener()
          Creates a selection listener.
protected  void doFillIntoGrid(Composite parent, int numColumns)
           
protected  void doLoad()
           
protected  void doLoadDefault()
           
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.
 boolean isValid()
           
protected  void refreshValidState()
           
 void selectionChanged()
          Combobox selection changed
 void setHelp(String contextId)
          Method setHelp.
 void setIgnoreLoadedList(boolean value)
          set whether or not the combo box control should display the values set when constructed, or use the values loaded from the preferences.
 void setToolTipText(String tip)
          Allows setting of tooltip text
 void setValidator(ISystemValidator validator)
          Method setValidator Sets the validator to be used to check if the contents are valid
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

copyright

public static String copyright
Constructor Detail

ComboBoxFieldEditor

public ComboBoxFieldEditor(String name,
                           String labelText,
                           Vector<String> contents,
                           boolean readonly,
                           Composite parent)
Constructor for ComboBoxFieldEditor

Parameters:
name - field editor's name
labelText - the label to the left of the combo
contents - the list of given options
readonly - whether the text box can be edited
parent - parent composite

ComboBoxFieldEditor

public ComboBoxFieldEditor(String name,
                           String labelText,
                           String[] contents,
                           boolean readonly,
                           Composite parent)
Constructor for ComboBoxFieldEditor

Parameters:
name - field editor's name labelText the label to the left of the combo contents the list of given options readonly whether the text box can be edited parent parent composite
Method Detail

adjustForNumColumns

protected void adjustForNumColumns(int numColumns)
See Also:
FieldEditor#adjustForNumColumns(int)

doFillIntoGrid

protected void doFillIntoGrid(Composite parent,
                              int numColumns)
See Also:
FieldEditor#doFillIntoGrid(Composite, int)

doLoad

protected void doLoad()
See Also:
FieldEditor#doLoad()

doLoadDefault

protected void doLoadDefault()
See Also:
FieldEditor#doLoadDefault()

doStore

protected void doStore()
See Also:
FieldEditor#doStore()

getNumberOfControls

public int getNumberOfControls()
See Also:
FieldEditor#getNumberOfControls()

getTextControl

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

Returns:
the text 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


createSelectionListener

public void createSelectionListener()
Creates a selection listener.


createModifyListener

public void createModifyListener()
Creates a selection listener.


selectionChanged

public void selectionChanged()
Combobox selection changed


setHelp

public void setHelp(String contextId)
Method setHelp. Sets the info pop help for this field editor

Parameters:
contextId - the context ID for the help

setValidator

public void setValidator(ISystemValidator validator)
Method setValidator Sets the validator to be used to check if the contents are valid


refreshValidState

protected void refreshValidState()
See Also:
FieldEditor

isValid

public boolean isValid()
See Also:
FieldEditor

setIgnoreLoadedList

public void setIgnoreLoadedList(boolean value)
set whether or not the combo box control should display the values set when constructed, or use the values loaded from the preferences.

Parameters:
value - true if the initial value set in the constructor should always be use, false otherwise.
Since:
5.1.2 //54905

Rational Developer for Power Systems Software
V7.6

Copyright © 2011 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.