1 15 16 17 package swingwtx.swing.tree; 18 19 import java.beans.PropertyChangeListener ; 20 import swingwtx.swing.event.*; 21 22 public interface TreeSelectionModel 23 { 24 25 public static final int SINGLE_TREE_SELECTION = 1; 26 public static final int CONTIGUOUS_TREE_SELECTION = 2; 27 public static final int DISCONTIGUOUS_TREE_SELECTION = 4; 28 29 void setSelectionMode(int mode); 30 int getSelectionMode(); 31 void setSelectionPath(TreePath path); 32 void setSelectionPaths(TreePath[] paths); 33 void addSelectionPath(TreePath path); 34 void addSelectionPaths(TreePath[] paths); 35 void removeSelectionPath(TreePath path); 36 void removeSelectionPaths(TreePath[] paths); 37 TreePath getSelectionPath(); 38 TreePath[] getSelectionPaths(); 39 int getSelectionCount(); 40 boolean isPathSelected(TreePath path); 41 boolean isSelectionEmpty(); 42 void clearSelection(); 43 void setRowMapper(RowMapper newMapper); 44 RowMapper getRowMapper(); 45 int[] getSelectionRows(); 46 int getMinSelectionRow(); 47 int getMaxSelectionRow(); 48 boolean isRowSelected(int row); 49 void resetRowSelection(); 50 int getLeadSelectionRow(); 51 TreePath getLeadSelectionPath(); 52 void addPropertyChangeListener(PropertyChangeListener listener); 53 void removePropertyChangeListener(PropertyChangeListener listener); 54 void addTreeSelectionListener(TreeSelectionListener x); 55 void removeTreeSelectionListener(TreeSelectionListener x); 56 } 57 58 | Popular Tags |