com.fruitioninc.jwc
Class ListBox

java.lang.Object
  |
  +--com.fruitioninc.jwc.Component
        |
        +--com.fruitioninc.jwc.ListBox
Direct Known Subclasses:
ThreadLocalListBox

public class ListBox
extends Component

A component that allows the user to select one or more elements from a list.


Field Summary
 
Fields inherited from class com.fruitioninc.jwc.Component
NAME_DELIMITER
 
Constructor Summary
ListBox()
          Creates a non-state-fill ListBox with zero elements.
ListBox(java.lang.Object[] elements)
          Creates a non-state-full ListBox with some initial elements.
ListBox(java.lang.String name)
          Creates a non-state-full ListBox with the given name.
ListBox(java.lang.String name, ListBoxModel model)
          Creates a ListBox with the given name and model.
ListBox(java.lang.String name, java.lang.Object[] elements)
          Creates a non-state-full ListBox with the given name and initial elements.
 
Method Summary
 ListBoxModel getListBoxModel()
          Returns this ListBox's model.
 boolean getMultiselect()
          Returns true if this ListBox allows multiple elements to be selected.
 int getSize()
          Returns the vertical height of this ListBox measured in rows.
 void setMultiselect(boolean b)
          Specifies whether this ListBox allows multiple elements to be selected.
 void setSize(int size)
          Sets the vertical height of this ListBox measured in rows.
 
Methods inherited from class com.fruitioninc.jwc.Component
addComponentListener, addMouseListener, fireComponentSerialize, fireMouseClicked, getApplication, getComponentListenerCount, getComponentListeners, getContainer, getModel, getMouseListenerCount, getMouseListeners, getName, getPathName, getView, setModel
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ListBox

public ListBox()
Creates a non-state-fill ListBox with zero elements.


ListBox

public ListBox(java.lang.Object[] elements)
Creates a non-state-full ListBox with some initial elements.

Parameters:
elements - initial elements for the ListBox.

ListBox

public ListBox(java.lang.String name)
Creates a non-state-full ListBox with the given name.

Parameters:
name - name of the ListBox

ListBox

public ListBox(java.lang.String name,
               java.lang.Object[] elements)
Creates a non-state-full ListBox with the given name and initial elements.

Parameters:
name - name of the ListBox
elements - initial elements for the ListBox.

ListBox

public ListBox(java.lang.String name,
               ListBoxModel model)
Creates a ListBox with the given name and model.

Parameters:
name - name of the ListBox
model - the ListBox's model
Method Detail

getListBoxModel

public ListBoxModel getListBoxModel()
Returns this ListBox's model.


getMultiselect

public boolean getMultiselect()
Returns true if this ListBox allows multiple elements to be selected.


setMultiselect

public void setMultiselect(boolean b)
Specifies whether this ListBox allows multiple elements to be selected. By default, ListBox's allow only one element to be selected.


getSize

public int getSize()
Returns the vertical height of this ListBox measured in rows.


setSize

public void setSize(int size)
Sets the vertical height of this ListBox measured in rows.