All Packages Class Hierarchy This Package Previous Next Index
Class jclass.bwt.JCSpinBoxString
java.lang.Object
|
+----java.awt.Component
|
+----java.awt.Container
|
+----java.awt.Panel
|
+----jclass.bwt.JCContainer
|
+----jclass.bwt.JCSpinBox
|
+----jclass.bwt.JCSpinBoxString
- public class JCSpinBoxString
- extends JCSpinBox
JCSpinBoxString provides the capabilities of JCSpinBox which
allows the user to select a value from a ring of related choices which
are displayed in sequence.
By default, the text field is editable. If the user attempts to enter an
invalid value, it is disallowed.
Properties
Events
| Class | Listener | Description |
|
JCSpinBoxEvent | addSpinBoxListener | Posted when the user changes the value |
-
JCSpinBoxString()
- Creates an empty SpinBox.
-
JCSpinBoxString(Applet, String)
- Creates a SpinBox which reads parameters from the applet's HTML file.
-
JCSpinBoxString(int)
- Creates an empty SpinBox with the specified number of columns.
-
calcValue(int)
- Gets the value to be displayed.
-
enableArrowButtons()
- Disables the arrow buttons if the end of the range is reached.
-
getParameters()
- Reads the parameter values from the HTML page using the component's applet.
-
getPosition()
- Gets the Position value.
-
getStringList()
- Gets the StringList value.
-
initTextValue()
- Sets the text field's initial value.
-
setIntValue(int)
- Sets the current value as an int.
-
setPosition(int)
- Sets the position of the currently displayed item (default: 0)
(the index in the StringValues list).
-
setStringList(String[])
- Sets the array of values to be displayed.
HTML param name/value: "StringList"/comma-separated list
-
setTextValue(Object)
- Sets the text field's value.
-
validate(Object)
- Validates the text field's value after the user has changed it.
-
validateKey(char)
- Validates a key typed into the text field.
JCSpinBoxString
public JCSpinBoxString()
- Creates an empty SpinBox. No parameters are read from an HTML file.
JCSpinBoxString
public JCSpinBoxString(int cols)
- Creates an empty SpinBox with the specified number of columns.
No parameters are read from an HTML file.
JCSpinBoxString
public JCSpinBoxString(Applet applet,
String name)
- Creates a SpinBox which reads parameters from the applet's HTML file.
- Parameters:
- applet - the applet whose PARAM tags are to be read
- name - if this is not null, only parameters preceded by this name are read
- See Also:
- getParameter
getParameters
protected void getParameters()
- Reads the parameter values from the HTML page using the component's applet.
The values will override those previously set.
- Overrides:
- getParameters in class JCSpinBox
getStringList
public String[] getStringList()
- Gets the StringList value.
- See Also:
- setStringList
setStringList
public void setStringList(String v[])
- Sets the array of values to be displayed.
HTML param name/value: "StringList"/comma-separated list
getPosition
public int getPosition()
- Gets the Position value.
- Overrides:
- getPosition in class JCSpinBox
- See Also:
- setPosition
setPosition
public void setPosition(int v)
- Sets the position of the currently displayed item (default: 0)
(the index in the StringValues list).
HTML param name/value: "Position"/int
- Overrides:
- setPosition in class JCSpinBox
- See Also:
- setStringList
setIntValue
public void setIntValue(int v)
- Sets the current value as an int.
- Overrides:
- setIntValue in class JCSpinBox
calcValue
protected Object calcValue(int dir)
- Gets the value to be displayed.
The position value is also updated.
- Parameters:
- dir - INCREMENT, DECREMENT or NONE
- Overrides:
- calcValue in class JCSpinBox
initTextValue
protected void initTextValue()
- Sets the text field's initial value.
- Overrides:
- initTextValue in class JCSpinBox
setTextValue
protected void setTextValue(Object value)
- Sets the text field's value.
- Overrides:
- setTextValue in class JCSpinBox
enableArrowButtons
protected void enableArrowButtons()
- Disables the arrow buttons if the end of the range is reached.
- Overrides:
- enableArrowButtons in class JCSpinBox
- See Also:
- setAutoArrowDisable
validateKey
protected boolean validateKey(char key)
- Validates a key typed into the text field.
- Returns:
- true always
- Overrides:
- validateKey in class JCSpinBox
validate
protected boolean validate(Object value)
- Validates the text field's value after the user has changed it.
If the value is valid, the position is determined.
- Returns:
- false if the value is invalid
- Overrides:
- validate in class JCSpinBox
- See Also:
- setPosition
All Packages Class Hierarchy This Package Previous Next Index