There is a generic selection dialog model, used to present a list and give details on
the list. The dialogue also allows for addition and removal of items from the list.
See also: selection dialog scenario,
Java source.
The general event talker provides an interface for the firing of events from the four
buttons to the listeners specified at run-time.
The selection dialogues use the following layout:
Internally the selection dialogue uses a set of vectors to represent the data. The
first vector contains the items in the main list. The remaining items contain the items to
be displayed in the bound editable text fields. There will always be the same number of
items in each of the vectors within the set.
Prototype screen
This uses a split screen and vertical flow layout rather than the grid layout as
specified above.
Prototype API
function |
returns |
parameters |
throws |
description |
addListItem |
- |
String |
Item Already Exists Exception |
adds an item to the list in the correct alphabetical location. |
removeListItem |
- |
String |
Item Does Not Exist Exception |
removes the stated item from the list. The matching is an exact string
match. |
setOKButtonText |
- |
String |
- |
Sets the text of the OK button. |
setAddButtonText |
- |
String |
- |
Sets the text of the Add button. |
setRemoveButtonText |
- |
String |
- |
Sets the text of the Remove button. |
setExitButtonText |
- |
String |
- |
Sets the text of the CANCEL button. |
setAddButtonEnabled |
- |
Boolean |
- |
If true the Add button is enabled. If false it is disabled. |
setRemoveButtonEnabled |
- |
Boolean |
- |
If true the Remove button is enabled. If false it is disabled. |
addEditItem |
- |
String Label
JTextBox valueBox
int Position
String Value
Listener ActionListener |
- |
Inserts the specified item at the specified point. If the point is zero
it is added at the start. If it is negative it is added at the end. |
setEditItemText |
- |
int Item
String Value |
- |
Sets the specified item's text box to the specified value. |
setListActionListener |
- |
Object |
- |
Sets the target listener of any list actions. |
getselectedItem |
String |
- |
- |
Gets the currently selected item in the form of a string. |
getList |
Defaultable Vector |
- |
- |
Returns the list in the form of a defaultable list vector. |
|