All Packages Class Hierarchy This Package Previous Next Index
Class symantec.itools.awt.ListSpinner
java.lang.Object
|
+----java.awt.Component
|
+----java.awt.Container
|
+----java.awt.Panel
|
+----symantec.itools.awt.Spinner
|
+----symantec.itools.awt.ListSpinner
- public class ListSpinner
- extends Spinner
Creates a text box, containing a list of items, with up and down arrows.
Use this component to allow your users to move through a set of fixed
values or type a valid value in the box.
At run time only the selected value is displayed in the text box.
- See Also:
- Spinner
-
list
- The list of strings that get displayed in the spinner.
-
ListSpinner()
- Constructs an empty ListSpinner.
-
addItem(String)
- Adds a string to the end of the list.
-
addNotify()
- Tells this component that it has been added to a container.
-
getCurrentText()
- Gets the currently selected string from the list.
-
getListItems()
- Returns the current list as an array of Strings.
-
setListItems(String[])
- Adds the given string array to the end of the list.
list
protected Vector list
- The list of strings that get displayed in the spinner.
ListSpinner
public ListSpinner()
- Constructs an empty ListSpinner.
addNotify
public void addNotify()
- Tells this component that it has been added to a container.
This is a standard Java AWT method which gets called by the AWT when
this component is added to a container. Typically, it is used to
create this component's peer.
Here it's used to get the length of the largest string in the list.
- Overrides:
- addNotify in class Spinner
- See Also:
- removeNotify
addItem
public void addItem(String s)
- Adds a string to the end of the list.
- Parameters:
- s - the string to be appended to the list
- See Also:
- setListItems
getCurrentText
public String getCurrentText()
- Gets the currently selected string from the list.
- Returns:
- the string currently visible in the Spinner
- Overrides:
- getCurrentText in class Spinner
setListItems
public void setListItems(String items[])
- Adds the given string array to the end of the list.
- Parameters:
- items - the items to add to the list
- See Also:
- getListItems
getListItems
public String[] getListItems()
- Returns the current list as an array of Strings.
- Returns:
- the current list
- See Also:
- setListItems
All Packages Class Hierarchy This Package Previous Next Index