src/share/classes/javax/swing/tree/TreeSelectionModel.java

Print this page




  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any
  23  * questions.
  24  */
  25 
  26 package javax.swing.tree;
  27 
  28 import javax.swing.event.*;
  29 import java.beans.PropertyChangeListener;
  30 
  31 /**
  32   * This interface represents the current state of the selection for
  33   * the tree component.
  34   * For information and examples of using tree selection models,
  35   * see <a href="http://java.sun.com/docs/books/tutorial/uiswing/components/tree.html">How to Use Trees</a>
  36   * in <em>The Java Tutorial.</em>
  37   *
  38   * <p>
  39   * The state of the tree selection is characterized by
  40   * a set of TreePaths, and optionally a set of integers. The mapping
  41   * from TreePath to integer is done by way of an instance of RowMapper.
  42   * It is not necessary for a TreeSelectionModel to have a RowMapper to
  43   * correctly operate, but without a RowMapper <code>getSelectionRows</code>
  44   * will return null.
  45   *
  46   * <p>
  47   *
  48   * A TreeSelectionModel can be configured to allow only one
  49   * path (<code>SINGLE_TREE_SELECTION</code>) a number of
  50   * continguous paths (<code>CONTIGUOUS_TREE_SELECTION</code>) or a number of
  51   * discontiguous paths (<code>DISCONTIGUOUS_TREE_SELECTION</code>).
  52   * A <code>RowMapper</code> is used to determine if TreePaths are
  53   * contiguous.
  54   * In the absence of a RowMapper <code>CONTIGUOUS_TREE_SELECTION</code> and
  55   * <code>DISCONTIGUOUS_TREE_SELECTION</code> behave the same, that is they




  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any
  23  * questions.
  24  */
  25 
  26 package javax.swing.tree;
  27 
  28 import javax.swing.event.*;
  29 import java.beans.PropertyChangeListener;
  30 
  31 /**
  32   * This interface represents the current state of the selection for
  33   * the tree component.
  34   * For information and examples of using tree selection models,
  35   * see <a href="http://docs.oracle.com/javase/tutorial/uiswing/components/tree.html">How to Use Trees</a>
  36   * in <em>The Java Tutorial.</em>
  37   *
  38   * <p>
  39   * The state of the tree selection is characterized by
  40   * a set of TreePaths, and optionally a set of integers. The mapping
  41   * from TreePath to integer is done by way of an instance of RowMapper.
  42   * It is not necessary for a TreeSelectionModel to have a RowMapper to
  43   * correctly operate, but without a RowMapper <code>getSelectionRows</code>
  44   * will return null.
  45   *
  46   * <p>
  47   *
  48   * A TreeSelectionModel can be configured to allow only one
  49   * path (<code>SINGLE_TREE_SELECTION</code>) a number of
  50   * continguous paths (<code>CONTIGUOUS_TREE_SELECTION</code>) or a number of
  51   * discontiguous paths (<code>DISCONTIGUOUS_TREE_SELECTION</code>).
  52   * A <code>RowMapper</code> is used to determine if TreePaths are
  53   * contiguous.
  54   * In the absence of a RowMapper <code>CONTIGUOUS_TREE_SELECTION</code> and
  55   * <code>DISCONTIGUOUS_TREE_SELECTION</code> behave the same, that is they