Module com.iamsoft.util.ui
Class RangedSelectionDepthCriterion
- java.lang.Object
-
- com.iamsoft.util.ui.swing.activation.AbstractActivationCriterion
-
- com.iamsoft.util.ui.swing.activation.RangedSelectionDepthCriterion
-
- All Implemented Interfaces:
ActivationCriterion
public class RangedSelectionDepthCriterion extends AbstractActivationCriterion
Mandates that tree selections all have path sizes which fall in a specified range.
-
-
Constructor Summary
Constructors Constructor Description RangedSelectionDepthCriterion(TreeSelectionModel pSelectionModel, int pMinDepth, Integer pMaxDepth)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Set<TreePath>
getPriorSelection(TreePath[] pSelection, TreeSelectionEvent pEvt)
Guaranteed non-null.boolean
test()
TODO: return an Object (null for passed test).String
toString()
-
Methods inherited from class com.iamsoft.util.ui.swing.activation.AbstractActivationCriterion
addChangeListener, equals, fireSatisfactionChange, hashCode, inverse, removeChangeListener
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.iamsoft.util.ui.swing.activation.ActivationCriterion
getFailureMessage
-
-
-
-
Constructor Detail
-
RangedSelectionDepthCriterion
public RangedSelectionDepthCriterion(TreeSelectionModel pSelectionModel, int pMinDepth, Integer pMaxDepth)
- Parameters:
pSelectionModel
- Selection model against which paths are tested.pMinDepth
- Minimum acceptable tree path length.pMaxDepth
- Maximum acceptable tree path length (null for no max).
-
-
Method Detail
-
test
public boolean test()
Description copied from interface:ActivationCriterion
TODO: return an Object (null for passed test).
-
getPriorSelection
public static Set<TreePath> getPriorSelection(TreePath[] pSelection, TreeSelectionEvent pEvt)
Guaranteed non-null.- Parameters:
pSelection
- Current selection.pEvt
- Event that just occurred.- Returns:
- set tree paths
-
-