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

Name Method
AutoArrowDisable setAutoArrowDisable
Background setBackground
DoubleBuffer setDoubleBuffer
Font setFont
Foreground setForeground
Insets setInsets
Position setPosition
PreferredSize setPreferredSize
StringList setStringList
UserData setUserData

Events

Class Listener Description
JCSpinBoxEvent addSpinBoxListener Posted when the user changes the value


Constructor Index

 o JCSpinBoxString()
Creates an empty SpinBox.
 o JCSpinBoxString(Applet, String)
Creates a SpinBox which reads parameters from the applet's HTML file.
 o JCSpinBoxString(int)
Creates an empty SpinBox with the specified number of columns.

Method Index

 o calcValue(int)
Gets the value to be displayed.
 o enableArrowButtons()
Disables the arrow buttons if the end of the range is reached.
 o getParameters()
Reads the parameter values from the HTML page using the component's applet.
 o getPosition()
Gets the Position value.
 o getStringList()
Gets the StringList value.
 o initTextValue()
Sets the text field's initial value.
 o setIntValue(int)
Sets the current value as an int.
 o setPosition(int)
Sets the position of the currently displayed item (default: 0) (the index in the StringValues list).
 o setStringList(String[])
Sets the array of values to be displayed.

HTML param name/value: "StringList"/comma-separated list

 o setTextValue(Object)
Sets the text field's value.
 o validate(Object)
Validates the text field's value after the user has changed it.
 o validateKey(char)
Validates a key typed into the text field.

Constructors

 o JCSpinBoxString
 public JCSpinBoxString()
Creates an empty SpinBox. No parameters are read from an HTML file.

 o JCSpinBoxString
 public JCSpinBoxString(int cols)
Creates an empty SpinBox with the specified number of columns. No parameters are read from an HTML file.

 o 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

Methods

 o 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
 o getStringList
 public String[] getStringList()
Gets the StringList value.

See Also:
setStringList
 o setStringList
 public void setStringList(String v[])
Sets the array of values to be displayed.

HTML param name/value: "StringList"/comma-separated list

 o getPosition
 public int getPosition()
Gets the Position value.

Overrides:
getPosition in class JCSpinBox
See Also:
setPosition
 o 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
 o setIntValue
 public void setIntValue(int v)
Sets the current value as an int.

Overrides:
setIntValue in class JCSpinBox
 o 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
 o initTextValue
 protected void initTextValue()
Sets the text field's initial value.

Overrides:
initTextValue in class JCSpinBox
 o setTextValue
 protected void setTextValue(Object value)
Sets the text field's value.

Overrides:
setTextValue in class JCSpinBox
 o enableArrowButtons
 protected void enableArrowButtons()
Disables the arrow buttons if the end of the range is reached.

Overrides:
enableArrowButtons in class JCSpinBox
See Also:
setAutoArrowDisable
 o validateKey
 protected boolean validateKey(char key)
Validates a key typed into the text field.

Returns:
true always
Overrides:
validateKey in class JCSpinBox
 o 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