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

Variable Index

 o list
The list of strings that get displayed in the spinner.

Constructor Index

 o ListSpinner()
Constructs an empty ListSpinner.

Method Index

 o addItem(String)
Adds a string to the end of the list.
 o addNotify()
Tells this component that it has been added to a container.
 o getCurrentText()
Gets the currently selected string from the list.
 o getListItems()
Returns the current list as an array of Strings.
 o setListItems(String[])
Adds the given string array to the end of the list.

Variables

 o list
  protected Vector list
The list of strings that get displayed in the spinner.

Constructors

 o ListSpinner
  public ListSpinner()
Constructs an empty ListSpinner.

Methods

 o 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
 o 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
 o 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
 o 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
 o 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