org.springframework.richclient.list
Class ListSingleSelectionGuard
java.lang.Object
org.springframework.richclient.list.AbstractListSelectionGuard
org.springframework.richclient.list.ListSingleSelectionGuard
- All Implemented Interfaces:
- PropertyChangeListener, EventListener
public class ListSingleSelectionGuard
- extends AbstractListSelectionGuard
This class applies a guard to a Guarded
object that only enables the
guarded object if the provided list selection model value holder has exactly
one item selected.
- Author:
- Larry Streepy
Method Summary |
protected boolean |
shouldEnable(int[] selected)
Determine if the guarded object should be enabled based on the contents
of the current selection model value. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ListSingleSelectionGuard
public ListSingleSelectionGuard(ValueModel selectionHolder,
Guarded guarded)
- Constructor.
- Parameters:
selectionHolder
- ValueModel holding the list selection (value must
be an array of int (int[]guarded
- Object to guard
shouldEnable
protected boolean shouldEnable(int[] selected)
- Determine if the guarded object should be enabled based on the contents
of the current selection model value.
- Specified by:
shouldEnable
in class AbstractListSelectionGuard
- Parameters:
selected
- The array of selected rows
- Returns:
- boolean true if the guarded object should be enabled
Copyright © 2004-2008 The Spring Framework. All Rights Reserved.