public class Choose
extends java.lang.Object
It defines:
| Modifier and Type | Field and Description |
|---|---|
private boolean |
autoReturn
AUTO-RETURN option.
|
private ColorSpec |
color
Custom color.
|
private boolean |
defined
At least one CHOOSE item has been defined.
|
private java.util.LinkedList<java.lang.String> |
fieldHelps
Holds the HELP text for the FIELD items.
|
private boolean |
fieldMode
true if in FIELD mode, false for ROW mode. |
private java.util.LinkedList<GenericWidget> |
fields
Holds the field widgets in the FIELD mode.
|
private java.util.List<java.lang.String> |
goOn
Holds the GO-ON keys.
|
private Accessor |
keysVar
Highlight and navigation variable.
|
private boolean |
noError
NO-ERROR option.
|
private double |
pause
CHOOSE timeout.
|
private GenericWidget |
row
Holds the field widget in the ROW mode.
|
private java.lang.String |
rowHelp
Holds the HELP text for the ROW item.
|
| Constructor and Description |
|---|
Choose()
Default constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addField(GenericWidget field)
Adds a field to the CHOOSE instance.
|
void |
addField(GenericWidget[] fields)
Adds array of fields to the CHOOSE instance.
|
void |
addField(GenericWidget field,
java.lang.String help)
Adds a field with its help text to the CHOOSE instance.
|
void |
addGoOn(java.lang.String key)
Adds a key to the list of GO-ON keys.
|
void |
addGoOn(java.lang.String[] key)
Adds a key to the list of GO-ON keys.
|
void |
addHelp(java.lang.String help,
int num)
Add help string to last N items.
|
void |
addRow(GenericWidget row)
Sets the ROW mode and stores the row widget in the CHOOSE
instance.
|
void |
addRow(GenericWidget row,
java.lang.String help)
Sets the ROW mode and stores the row ID along with its help text
in the CHOOSE instance.
|
boolean |
getAutoReturn()
Checks whether the AUTO-RETURN option was specified.
|
ColorSpec |
getColor()
Gets the custom color specification.
|
ChooseData |
getData()
Get
ChooseData instance usable at client side. |
java.lang.String |
getFieldHelp(int index)
Gets the custom help text for the indexed field.
|
GenericWidget[] |
getFields()
Gets the array of field widgets for the CHOOSE .
|
int |
getFieldsCount()
Gets the count of fields for the FIELD mode CHOOSE .
|
java.lang.String[] |
getFieldsHelp()
Gets the help texts for all fields.
|
java.lang.String[] |
getGoOn()
Gets all the GO-ON keys.
|
java.lang.String |
getGoOn(int index)
Gets the indexed GO-ON key as a key label or function.
|
int |
getGoOnCount()
Gets the count of GO-ON keys defined.
|
java.lang.String |
getKeys()
Gets the initial keystrokes if any are defined..
|
Accessor |
getKeysVar()
Get keys variable.
|
boolean |
getNoError()
Checks whether the NO-ERROR option was specified.
|
double |
getPause()
Gets the timeout value.
|
GenericWidget |
getRow()
Gets the row widget if the CHOOSE is for rows.
|
java.lang.String |
getRowHelp()
Gets the custom help text for the row.
|
boolean |
isFieldHelp(int index)
Checks whether the indexed field was specified with a custom help text.
|
boolean |
isRow()
Queries the ROW mode of CHOOSE .
|
boolean |
isRowHelp()
Checks whether the row was specified with a custom help text.
|
void |
setAutoReturn()
Turns on the AUTO-RETURN option.
|
void |
setColor(ColorSpec c)
Specifies a color for this CHOOSE instance.
|
void |
setKeys(BaseDataType keysVar)
Highlights the matching item in the CHOOSE and saves the user
entered keystrokes.
|
void |
setNoError()
Turns on the NO-ERROR option.
|
void |
setPause(double seconds)
Specifies the CHOOSE timeout in seconds.
|
void |
setPause(NumberType seconds)
Specifies the CHOOSE timeout in seconds.
|
private boolean defined
private boolean fieldMode
true if in FIELD mode, false for ROW mode.private GenericWidget row
private java.lang.String rowHelp
private java.util.LinkedList<GenericWidget> fields
private java.util.LinkedList<java.lang.String> fieldHelps
private boolean autoReturn
private ColorSpec color
private java.util.List<java.lang.String> goOn
private Accessor keysVar
private boolean noError
private double pause
public void addRow(GenericWidget row)
row - row widget to use in choosepublic void addRow(GenericWidget row, java.lang.String help)
row - row widget to use in choosehelp - associated help textpublic void addField(GenericWidget field)
field - widget within the framepublic void addField(GenericWidget[] fields)
fields - Array of widgets within the framepublic void addField(GenericWidget field, java.lang.String help)
field - widget within the framehelp - associated help textpublic void addHelp(java.lang.String help,
int num)
help - Help string.num - Number of widgets.public void setAutoReturn()
public void setColor(ColorSpec c)
c - color specification instancepublic void addGoOn(java.lang.String[] key)
key - array of key labelspublic void addGoOn(java.lang.String key)
key - key labelpublic void setKeys(BaseDataType keysVar)
keysVar - Accessor for variable that contains keystrokes for an item and
receives keystrokes (up to 40) while the user navigatespublic void setNoError()
public void setPause(NumberType seconds)
seconds - maximum time between keystrokespublic void setPause(double seconds)
seconds - maximum time between keystrokespublic boolean isRow()
true if the CHOOSE specifies rows,
otherwise falsepublic GenericWidget getRow()
null if this CHOOSE is for
fields.public boolean isRowHelp()
true if there was a custom help text specifiedpublic java.lang.String getRowHelp()
nullpublic int getFieldsCount()
public GenericWidget[] getFields()
public boolean isFieldHelp(int index)
index - index of the field being checkedtrue if there was a custom help text specifiedpublic java.lang.String getFieldHelp(int index)
index - index of the field being queriednullpublic java.lang.String[] getFieldsHelp()
null if in ROW
mode.public boolean getAutoReturn()
true if AUTO-RETURN option was setpublic ColorSpec getColor()
ColorSpec for the custom color definition or
null if it wasn't specified.public int getGoOnCount()
public java.lang.String getGoOn(int index)
index - index of the field being queriednull if the index is out of range.public java.lang.String[] getGoOn()
public java.lang.String getKeys()
nullpublic Accessor getKeysVar()
public boolean getNoError()
true if NO-ERROR option was setpublic double getPause()
public ChooseData getData()
ChooseData instance usable at client side.ChooseData