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 Details

    • 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 Details

    • test

      public boolean test()
      Description copied from interface: ActivationCriterion
      TODO: return an Object (null for passed test).
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • 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