Rational Developer for Power Systems Software
V7.6

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

java.lang.Object
  extended by FieldEditor
      extended by com.ibm.etools.iseries.edit.ui.preferences.HistoryComboFieldEditor

public class HistoryComboFieldEditor
extends FieldEditor

Field editor for history combo.


Field Summary
static String copyright
           
 
Constructor Summary
HistoryComboFieldEditor(Composite parent, String name, String label, String historyKey, String[] contents, boolean readonly)
          Constructor
 
Method Summary
 void addModifyListener(ModifyListener listener)
          Adds a ModifyListener to listen for changes in the Combo widget
protected  void adjustForNumColumns(int numColumns)
           
protected  void doFillIntoGrid(Composite parent, int numColumns)
           
protected  void doLoad()
           
protected  void doLoadDefault()
           
protected  void doStore()
           
 int getNumberOfControls()
           
 String getText()
           
 boolean isValid()
           
protected  void refreshValidState()
           
 void removeModifyListener(ModifyListener listener)
          Removes a ModifyListener that was listening for changes in the Combo widget.
 void setAutoUppercase(boolean enable)
          Set auto-uppercase.
 void setDefaultContent(String[] contents)
          This method could be used to change the default contents of the Combo widget after the widget has been initialized.
 void setEnabled(boolean state)
          Sets if this Field Editor is enabled or disabled.
 void setHelp(String id)
          Sets the context help message for the text control.
 void setInitialSelection(String item)
          When loaded, the Combo widget will have an initial selection.
 void setText(String text)
          Sets the String shown in the Text control.
 void setTextLimit(int limit)
          Sets the maximum number of characters that the receiver's text field is capable of holding to be the argument.
 void setValidator(ISystemValidator validator)
          Specifies the validator that will be used to ensure that the content of the Combo widget is 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

HistoryComboFieldEditor

public HistoryComboFieldEditor(Composite parent,
                               String name,
                               String label,
                               String historyKey,
                               String[] contents,
                               boolean readonly)
Constructor

Parameters:
parent - Composite on which this FieldEditor would be placed.
name - Unique name identifying this FieldEditor.
label - The label shown next to the Combo widget.
historyKey - Unique identifier used to store the history in the Preference Store.
contents - Default contents to be inserted into the Combo widget. Those can not be cleared by the user.
readonly - If true, the widget would be disabled.
Method Detail

addModifyListener

public void addModifyListener(ModifyListener listener)
Adds a ModifyListener to listen for changes in the Combo widget

Parameters:
listener - interface for listening to changes in the Combo widget
See Also:
ModifyListener

adjustForNumColumns

protected void adjustForNumColumns(int numColumns)

doFillIntoGrid

protected void doFillIntoGrid(Composite parent,
                              int numColumns)

doLoad

protected void doLoad()

doLoadDefault

protected void doLoadDefault()

doStore

protected void doStore()

getNumberOfControls

public int getNumberOfControls()

getText

public String getText()
Returns:
returns the String that is contained in the Combo widget.

setDefaultContent

public void setDefaultContent(String[] contents)
This method could be used to change the default contents of the Combo widget after the widget has been initialized.

Parameters:
contents - The new default content that would be persisted in the history.

isValid

public boolean isValid()
Returns:
returns the validity of the contents based on the ISystemValidator that you provide.
See Also:
ISystemValidator

refreshValidState

protected void refreshValidState()

removeModifyListener

public void removeModifyListener(ModifyListener listener)
Removes a ModifyListener that was listening for changes in the Combo widget.

Parameters:
listener - interface for listening to changes in the Combo widget
See Also:
ModifyListener

setAutoUppercase

public void setAutoUppercase(boolean enable)
Set auto-uppercase. When enabled, all non-quoted values are uppercases when added to the history.


setEnabled

public void setEnabled(boolean state)
Sets if this Field Editor is enabled or disabled.

Parameters:
state - of the FieldEditor

setHelp

public void setHelp(String id)
Sets the context help message for the text control.

Parameters:
id - the id for the context help message

setInitialSelection

public void setInitialSelection(String item)
When loaded, the Combo widget will have an initial selection.

Parameters:
item - The item that will be selected by default.

setText

public void setText(String text)
Sets the String shown in the Text control.

Parameters:
text - the value to be set.

setTextLimit

public void setTextLimit(int limit)
Sets the maximum number of characters that the receiver's text field is capable of holding to be the argument.

Parameters:
limit - new text limit

setValidator

public void setValidator(ISystemValidator validator)
Specifies the validator that will be used to ensure that the content of the Combo widget is valid.

Parameters:
validator - the validator to be used.

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.