WUI : API


org.westofj.wui
Class WList

java.lang.Object
  extended byorg.westofj.wui.Widget
      extended byorg.westofj.wui.WList
Direct Known Subclasses:
WRadioList, WSelectList

public abstract class WList
extends Widget

Implements base functionality for user selection of a single value from a list of values. The wui framework provides multiple concrete implementations of this class including WSelectList and WRadioList.

Version:
$Revision: 1.3 $, $Date: 2004/03/08 01:57:35 $
Author:
bill

Constructor Summary
WList()
          Constructs an empty single selection list.
WList(List options)
          Constructs a single selection list with the specified options.
WList(Object[] options)
          Constructs a single selection list with the specified options.
 
Method Summary
 void clearSelection()
          Clears the current selection.
 List getOptions()
          Returns the selectable options.
 int getSelectedIndex()
          Returns the index in the list of options of the currently selected value.
 Object getSelectedValue()
          Returns the currently selected value.
 boolean isSelectedIndex(int selectedIndex)
          Returns true if the specified index is the selected index, false otherwise.
 void setOptions(List options)
          Sets the options for the list.
 void setOptions(Object[] options)
          Sets the options for the list.
 void setSelectedIndex(int selectedIndex)
          Sets the selected value to the value at the specified index.
 void setSelectedValue(Object value)
          Sets the selected value to the specified value.
 
Methods inherited from class org.westofj.wui.Widget
addChangeListener, getRunner, handleNoParams, handleParams, hasChangeListeners, removeChangeListener, render, stateChanged
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WList

public WList()
Constructs an empty single selection list.


WList

public WList(List options)
Constructs a single selection list with the specified options.

Parameters:
options - the selectable options.

WList

public WList(Object[] options)
Constructs a single selection list with the specified options.

Parameters:
options - the selectable options.
Method Detail

clearSelection

public void clearSelection()
Clears the current selection.


getOptions

public List getOptions()
Returns the selectable options.

Returns:
List the selectable options.

getSelectedIndex

public int getSelectedIndex()
Returns the index in the list of options of the currently selected value.

Returns:
int the index of the selected option.

getSelectedValue

public Object getSelectedValue()
Returns the currently selected value.

Returns:
Object the selected value.

isSelectedIndex

public boolean isSelectedIndex(int selectedIndex)
Returns true if the specified index is the selected index, false otherwise.

Parameters:
selectedIndex - the index to test.
Returns:
boolean true if the specified index is the selected index, false otherwise.

setOptions

public void setOptions(List options)
Sets the options for the list.

Parameters:
options - the selectable options.

setOptions

public void setOptions(Object[] options)
Sets the options for the list.

Parameters:
options - the selectable options.

setSelectedIndex

public void setSelectedIndex(int selectedIndex)
Sets the selected value to the value at the specified index.

Parameters:
selectedIndex - the selected index.

setSelectedValue

public void setSelectedValue(Object value)
Sets the selected value to the specified value.

Parameters:
value - the selected value.

Copyright (c) 2003 West of J - All rights reserved.