org.springframework.richclient.list
Class ListMultipleSelectionGuard
java.lang.Object
org.springframework.richclient.list.AbstractListSelectionGuard
org.springframework.richclient.list.ListMultipleSelectionGuard
- All Implemented Interfaces:
- PropertyChangeListener, EventListener
public class ListMultipleSelectionGuard
- 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 one or
more item selected. This can also be configured to monitor for an exact
number of selected items.
- 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 |
ListMultipleSelectionGuard
public ListMultipleSelectionGuard(ValueModel selectionHolder,
Guarded guarded)
- Constructor.
- Parameters:
selectionHolder
- ValueModel holding the list selection (value must
be an array of int (int[]
guarded
- Object to guard
ListMultipleSelectionGuard
public ListMultipleSelectionGuard(ValueModel selectionHolder,
Guarded guarded,
int requiredCount)
- Constructor.
- Parameters:
selectionHolder
- ValueModel holding the list selection (value must
be an array of int (int[]
guarded
- Object to guardrequiredCount
- Required number of selected items to enable
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-2009 The Spring Framework. All Rights Reserved.