|
Rational Developer for Power Systems Software V7.6 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object FieldEditor com.ibm.etools.iseries.rse.ui.preferences.ListEditor
public abstract class ListEditor
An abstract field editor that manages a list of input values. The editor displays a list containing the values, buttons for adding and removing values, and Up and Down buttons to adjust the order of elements in the list.
Subclasses must implement the parseString
,
createList
, and createNewInputObject
framework methods.
Field Summary | |
---|---|
protected boolean |
_bUpperCase
|
protected int |
_iMaxItems
|
protected Button |
addButton
The Add button. |
protected Composite |
buttonBox
The button box containing the Add, Remove, Up, and Down buttons; null if none (before creation or after disposal). |
static String |
Copyright
|
protected Button |
downButton
The Down button. |
protected List |
list
The list widget; null if none
(before creation or after disposal). |
protected Button |
removeButton
The Remove button. |
protected SelectionListener |
selectionListener
The selection listener. |
protected Button |
upButton
The Up button. |
Constructor Summary | |
---|---|
protected |
ListEditor()
Creates a new list field editor |
protected |
ListEditor(String name,
String labelText,
Composite parent)
Creates a list field editor. |
Method Summary | |
---|---|
protected void |
addPressed()
Notifies that the Add button has been pressed. |
protected void |
adjustForNumColumns(int numColumns)
|
protected void |
createButtons(Composite buttonBox)
Creates the Add, Remove, Up, and Down button in the given button box. |
protected abstract String |
createList(String[] items)
Combines the given list of items into a single string. |
protected Button |
createPushButton(Composite parent,
String key)
Helper method to create a push button. |
void |
createSelectionListener()
Creates a selection listener. |
protected void |
doFillIntoGrid(Composite parent,
int numColumns)
|
protected void |
doLoad()
|
protected void |
doLoadDefault()
|
protected void |
doStore()
|
protected void |
downPressed()
Notifies that the Down button has been pressed. |
Composite |
getButtonBoxControl(Composite parent)
Returns this field editor's button box containing the Add, Remove, Up, and Down button. |
List |
getListControl(Composite parent)
Returns this field editor's list control. |
protected abstract String |
getNewInputObject()
Creates and returns a new item for the list. |
int |
getNumberOfControls()
|
protected SelectionListener |
getSelectionListener()
Returns this field editor's selection listener. |
protected Shell |
getShell()
Returns this field editor's shell. |
protected abstract String[] |
parseString(String stringList)
Splits the given string into a list of strings. |
protected void |
removePressed()
Notifies that the Remove button has been pressed. |
protected void |
selectionChanged()
Notifies that the list selection has changed. |
void |
setFocus()
|
protected void |
setItemLimit(int iMaxItems)
|
protected void |
setUpperCase(boolean bUpperCase)
|
protected void |
swap(boolean up)
Moves the currently selected item up or down. |
protected void |
upPressed()
Notifies that the Up button has been pressed. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String Copyright
protected List list
null
if none
(before creation or after disposal).
protected Composite buttonBox
null
if none (before creation or after disposal).
protected Button addButton
protected Button removeButton
protected Button upButton
protected Button downButton
protected SelectionListener selectionListener
protected int _iMaxItems
protected boolean _bUpperCase
Constructor Detail |
---|
protected ListEditor()
protected ListEditor(String name, String labelText, Composite parent)
name
- the name of the preference this field editor works onlabelText
- the label text of the field editorparent
- the parent of the field editor's controlMethod Detail |
---|
protected void addPressed()
protected void adjustForNumColumns(int numColumns)
protected void createButtons(Composite buttonBox)
buttonBox
- the box for the buttonsprotected abstract String createList(String[] items)
parseString
.
Subclasses must implement this method.
items
- the list of items
parseString(java.lang.String)
protected Button createPushButton(Composite parent, String key)
parent
- the parent controlkey
- the resource name used to supply the button's label textpublic void createSelectionListener()
protected void doFillIntoGrid(Composite parent, int numColumns)
protected void doLoad()
protected void doLoadDefault()
protected void doStore()
protected void downPressed()
public Composite getButtonBoxControl(Composite parent)
parent
- the parent control
public List getListControl(Composite parent)
parent
- the parent control
protected abstract String getNewInputObject()
Subclasses must implement this method.
public int getNumberOfControls()
protected SelectionListener getSelectionListener()
protected Shell getShell()
This method is internal to the framework; subclassers should not call this method.
protected abstract String[] parseString(String stringList)
createList
.
Subclasses must implement this method.
stringList
- the string
String
createList(java.lang.String[])
protected void removePressed()
protected void selectionChanged()
public void setFocus()
protected void setItemLimit(int iMaxItems)
protected void setUpperCase(boolean bUpperCase)
protected void swap(boolean up)
up
- true
if the item should move up,
and false
if it should move downprotected void upPressed()
|
Rational Developer for Power Systems Software V7.6 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |