com.arsdigita.formbuilder.ui
Class DecimalSingleSelectionModel

java.lang.Object
  extended bycom.arsdigita.bebop.AbstractSingleSelectionModel
      extended bycom.arsdigita.formbuilder.ui.DecimalSingleSelectionModel
All Implemented Interfaces:
Lockable, SingleSelectionModel

public class DecimalSingleSelectionModel
extends AbstractSingleSelectionModel


Field Summary
 
Fields inherited from class com.arsdigita.bebop.AbstractSingleSelectionModel
versionId
 
Constructor Summary
DecimalSingleSelectionModel(SingleSelectionModel selection)
           
 
Method Summary
 void addChangeListener(ChangeListener l)
          Adds a change listener to the model.
 void clearSelection(PageState state)
          Clears the selection.
 Object getSelectedKey(PageState state)
          Returns the key that identifies the selected element.
 ParameterModel getStateParameter()
          Returns the state parameter that will be used to keep track of the currently selected key.
 boolean isSelected(PageState state)
          Returns true if there is a selected element.
 void removeChangeListener(ChangeListener l)
          Removes a change listener from the model.
 void setSelectedKey(PageState state, Object key)
          Sets the selected key.
 
Methods inherited from class com.arsdigita.bebop.AbstractSingleSelectionModel
fireStateChanged, isLocked, lock
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DecimalSingleSelectionModel

public DecimalSingleSelectionModel(SingleSelectionModel selection)
Method Detail

isSelected

public boolean isSelected(PageState state)
Description copied from class: AbstractSingleSelectionModel
Returns true if there is a selected element.

Specified by:
isSelected in interface SingleSelectionModel
Overrides:
isSelected in class AbstractSingleSelectionModel
Parameters:
state - the state of the current request
Returns:
true if there is a selected component; false otherwise.

getSelectedKey

public Object getSelectedKey(PageState state)
Description copied from interface: SingleSelectionModel
Returns the key that identifies the selected element.

Specified by:
getSelectedKey in interface SingleSelectionModel
Specified by:
getSelectedKey in class AbstractSingleSelectionModel

setSelectedKey

public void setSelectedKey(PageState state,
                           Object key)
Description copied from interface: SingleSelectionModel
Sets the selected key. If key is not in the collection of objects underlying this model, an IllegalArgumentException is thrown.

Specified by:
setSelectedKey in interface SingleSelectionModel
Specified by:
setSelectedKey in class AbstractSingleSelectionModel

clearSelection

public void clearSelection(PageState state)
Description copied from interface: SingleSelectionModel
Clears the selection.

Specified by:
clearSelection in interface SingleSelectionModel
Overrides:
clearSelection in class AbstractSingleSelectionModel

addChangeListener

public void addChangeListener(ChangeListener l)
Description copied from interface: SingleSelectionModel
Adds a change listener to the model. The listener's stateChanged method is called whenever the selected key changes.

Specified by:
addChangeListener in interface SingleSelectionModel
Overrides:
addChangeListener in class AbstractSingleSelectionModel

removeChangeListener

public void removeChangeListener(ChangeListener l)
Description copied from interface: SingleSelectionModel
Removes a change listener from the model.

Specified by:
removeChangeListener in interface SingleSelectionModel
Overrides:
removeChangeListener in class AbstractSingleSelectionModel

getStateParameter

public ParameterModel getStateParameter()
Description copied from interface: SingleSelectionModel
Returns the state parameter that will be used to keep track of the currently selected key. Typically, the implementing class will simply call:
return new StringParameter("foo");

This method may return null if a state parameter is not appropriate in the context of the implementing class.

Returns:
the state parameter to use to keep track of the currently selected component, or null if a state parameter is not appropriate.


Copyright (c) 2004 Red Hat, Inc. Corporation. All Rights Reserved. Generated at July 20 2004:2337 UTC