|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavabook.JavaBookDialog
javabook.MultiInputBox
This dialog is for accepting multiple input values. Input values are returned as an array of String objects. You have to convert the String values to appropriate data type in your code.
This class is provided as freeware. You are free to use as provided or modify to your heart's content. But you use it at your own risk. No implied or explicit warranty is given.
Field Summary | |
static java.lang.String[] |
NO_ITEM
Constant to represent no selection for the getSelectedItem method. |
Fields inherited from class javabook.JavaBookDialog |
ERROR_ICON, INFO_ICON, NO_ICON, QUESTION_ICON, WARNING_ICON |
Constructor Summary | |
MultiInputBox(java.awt.Frame owner,
int size)
Constructs a MultiInputBox with the owner frame and size input lines. |
|
MultiInputBox(java.awt.Frame owner,
java.lang.String[] labels)
Constructs a MultiInputBox with the owner frame and labels for input lines. |
Method Summary | |
java.lang.String[] |
getInputs()
Returns the input values entered by the user. |
boolean |
isCanceled()
Returns true if the state of this dialog is CANCEL. |
void |
setLabels(java.lang.String[] label)
Assigns the input line labels to the passed array |
void |
setResetOption(boolean option)
Sets the reset flag. |
void |
setValue(int index,
java.lang.String value)
Sets the value to the input line at the index position. |
Methods inherited from class javabook.JavaBookDialog |
setIcon, setLocation, setTitle |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String[] NO_ITEM
Constructor Detail |
public MultiInputBox(java.awt.Frame owner, int size)
owner
- the owning Frame objectsize
- the number of input linespublic MultiInputBox(java.awt.Frame owner, java.lang.String[] labels)
owner
- the owning Frame objectlabels
- the array of String for input line labelsMethod Detail |
public java.lang.String[] getInputs()
public boolean isCanceled()
public void setLabels(java.lang.String[] label)
label
- an array of String for input line labelspublic void setResetOption(boolean option)
option
- pass 'true' to reset the input fieldspublic void setValue(int index, java.lang.String value)
index
- the position of the input line to set the valuevalue
- the value to assign to the input line
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |