org.annotation.agschema.graphics.vtree
Interface VTreeSelectionModel

All Superinterfaces:
java.util.EventListener, java.beans.PropertyChangeListener
All Known Implementing Classes:
VTreeSelectionModelImpl

public interface VTreeSelectionModel
extends java.beans.PropertyChangeListener

There are two parameters to the selection model.

  1. The selection mode - The mode decides which nodes can be selected together if any. In the SingleNodeSelection mode only one node can be selected at a time. In the SiblingSelection mode, if a node is selected, only siblings can be added to the selection. In the Discontinuous selection mode, an arbitrary set of nodes can be selected.
  2. The selection interpretation - This characterizes how the selection should be interpreted. With the SingleNodeInterpretation only nodes explicitly added to the selection model are selected. With the SubtreeInterpretation, when a node is selected, it is assumed that all its children are selected.

Author:
nikhild

Field Summary
static int DiscontinuousSelection
           
static int SiblingSelection
           
static int SingleNodeInterpretation
           
static int SingleNodeSelection
           
static int SubtreeInterpretation
           
 
Method Summary
 void add(javax.swing.tree.TreeNode node)
           
 void addListener(VTreeSelectionListener l)
           
 void clear()
           
 javax.swing.tree.TreeNode getLeadSelectionNode()
           
 javax.swing.tree.TreeNode getRoot()
           
 java.util.Enumeration getSelectedNodes()
           
 int getSelectionInterpretation()
           
 boolean isNodeSelected(javax.swing.tree.TreeNode node)
           
 void remove(javax.swing.tree.TreeNode node)
           
 void removeListener(VTreeSelectionListener l)
           
 void setMode(int mode)
           
 void setSelectionInterpretation(int interpretation)
           
 
Methods inherited from interface java.beans.PropertyChangeListener
propertyChange
 

Field Detail

SingleNodeSelection

public static final int SingleNodeSelection
See Also:
Constant Field Values

SiblingSelection

public static final int SiblingSelection
See Also:
Constant Field Values

DiscontinuousSelection

public static final int DiscontinuousSelection
See Also:
Constant Field Values

SingleNodeInterpretation

public static final int SingleNodeInterpretation
See Also:
Constant Field Values

SubtreeInterpretation

public static final int SubtreeInterpretation
See Also:
Constant Field Values
Method Detail

addListener

public void addListener(VTreeSelectionListener l)

removeListener

public void removeListener(VTreeSelectionListener l)

add

public void add(javax.swing.tree.TreeNode node)

getSelectedNodes

public java.util.Enumeration getSelectedNodes()

getLeadSelectionNode

public javax.swing.tree.TreeNode getLeadSelectionNode()

remove

public void remove(javax.swing.tree.TreeNode node)

clear

public void clear()

isNodeSelected

public boolean isNodeSelected(javax.swing.tree.TreeNode node)

setMode

public void setMode(int mode)

getRoot

public javax.swing.tree.TreeNode getRoot()

setSelectionInterpretation

public void setSelectionInterpretation(int interpretation)

getSelectionInterpretation

public int getSelectionInterpretation()