WUI : API


org.westofj.wui
Class WMultiList

java.lang.Object
  extended byorg.westofj.wui.Widget
      extended byorg.westofj.wui.WMultiList
Direct Known Subclasses:
WCheckList, WGrabBox, WMultiSelectList

public abstract class WMultiList
extends Widget

Implements base functionality for user selection of multiple values from a list of values. The wui framework provides multiple concrete implementations of this class including WMultiSelectList, WCheckList and WGrabBox. TODO: Add change listener handling

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

Constructor Summary
WMultiList()
          Constructs an empty multiple selection list.
WMultiList(List options)
          Constructs a multiple selection list with the specified options.
WMultiList(Object[] options)
          Constructs a multiple selection list with the specified options.
 
Method Summary
 void addSelectedIndex(int selectedIndex)
          Adds the value at the specified index to the set of selected values.
 void clearSelection()
          Clears the current selection.
 List getOptions()
          Returns the list of selectable options.
 List getSelectedIndices()
          Returns a list of indices in the list of selectable options of the currently selected values.
 List getSelectedValues()
          Returns a list of the currently selected values.
 boolean isSelectedIndex(int selectedIndex)
          Returns true if the specified index is in the set of selected indices, false otherwise.
 void removeSelectedIndex(int selectedIndex)
          Removes the specified index from the list of selected indices.
 void selectAll()
          Adds all values to the list of selected values.
 void setOptions(List options)
          Sets the list of selectable options.
 void setOptions(Object[] options)
          Sets the list of selectable options.
 void setSelectedIndices(int[] selectedIndices)
          Sets the set of selected indices to the specified array of indices.
 void setSelectedIndices(List selectedIndices)
          Sets the set of selected indices to the specified list of indices.
 void setSelectedValues(List values)
          Sets the selected values to the specified list of values.
 void setSelectedValues(Object[] values)
          Sets the selected values to the specified array of values.
 
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

WMultiList

public WMultiList()
Constructs an empty multiple selection list.


WMultiList

public WMultiList(List options)
Constructs a multiple selection list with the specified options.

Parameters:
options - the list of selectable options.

WMultiList

public WMultiList(Object[] options)
Constructs a multiple selection list with the specified options.

Parameters:
options - the list of selectable options.
Method Detail

addSelectedIndex

public void addSelectedIndex(int selectedIndex)
Adds the value at the specified index to the set of selected values.

Parameters:
selectedIndex - the specified index.

clearSelection

public void clearSelection()
Clears the current selection.


getOptions

public List getOptions()
Returns the list of selectable options.

Returns:
List the list of selectable options.

getSelectedIndices

public List getSelectedIndices()
Returns a list of indices in the list of selectable options of the currently selected values.

Returns:
List the indices in the list of selectable options of the currently selected values.

getSelectedValues

public List getSelectedValues()
Returns a list of the currently selected values.

Returns:
List the list of currently selected values.

isSelectedIndex

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

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

removeSelectedIndex

public void removeSelectedIndex(int selectedIndex)
Removes the specified index from the list of selected indices.

Parameters:
selectedIndex - the index to remove.

selectAll

public void selectAll()
Adds all values to the list of selected values.


setOptions

public void setOptions(List options)
Sets the list of selectable options.

Parameters:
options - the list of selectable options.

setOptions

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

Parameters:
options - the list of selectable options.

setSelectedIndices

public void setSelectedIndices(int[] selectedIndices)
Sets the set of selected indices to the specified array of indices.

Parameters:
selectedIndices - the selected indices to set.

setSelectedIndices

public void setSelectedIndices(List selectedIndices)
Sets the set of selected indices to the specified list of indices.

Parameters:
selectedIndices - the selected indices to set.

setSelectedValues

public void setSelectedValues(List values)
Sets the selected values to the specified list of values.

Parameters:
values - the selected values.

setSelectedValues

public void setSelectedValues(Object[] values)
Sets the selected values to the specified array of values.

Parameters:
values - the selected values.

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