< prev index next >

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

Print this page

        

@@ -38,32 +38,32 @@
   * <p>
   * The state of the tree selection is characterized by
   * a set of TreePaths, and optionally a set of integers. The mapping
   * from TreePath to integer is done by way of an instance of RowMapper.
   * It is not necessary for a TreeSelectionModel to have a RowMapper to
-  * correctly operate, but without a RowMapper <code>getSelectionRows</code>
+  * correctly operate, but without a RowMapper {@code getSelectionRows}
   * will return null.
   *
   * <p>
   *
   * A TreeSelectionModel can be configured to allow only one
-  * path (<code>SINGLE_TREE_SELECTION</code>) a number of
-  * contiguous paths (<code>CONTIGUOUS_TREE_SELECTION</code>) or a number of
-  * discontiguous paths (<code>DISCONTIGUOUS_TREE_SELECTION</code>).
-  * A <code>RowMapper</code> is used to determine if TreePaths are
+  * path ({@code SINGLE_TREE_SELECTION}) a number of
+  * contiguous paths ({@code CONTIGUOUS_TREE_SELECTION}) or a number of
+  * discontiguous paths ({@code DISCONTIGUOUS_TREE_SELECTION}).
+  * A {@code RowMapper} is used to determine if TreePaths are
   * contiguous.
-  * In the absence of a RowMapper <code>CONTIGUOUS_TREE_SELECTION</code> and
-  * <code>DISCONTIGUOUS_TREE_SELECTION</code> behave the same, that is they
+  * In the absence of a RowMapper {@code CONTIGUOUS_TREE_SELECTION} and
+  * {@code DISCONTIGUOUS_TREE_SELECTION} behave the same, that is they
   * allow any number of paths to be contained in the TreeSelectionModel.
   *
   * <p>
   *
-  * For a selection model of <code>CONTIGUOUS_TREE_SELECTION</code> any
-  * time the paths are changed (<code>setSelectionPath</code>,
-  * <code>addSelectionPath</code> ...) the TreePaths are again checked to
+  * For a selection model of {@code CONTIGUOUS_TREE_SELECTION} any
+  * time the paths are changed ({@code setSelectionPath},
+  * {@code addSelectionPath} ...) the TreePaths are again checked to
   * make they are contiguous. A check of the TreePaths can also be forced
-  * by invoking <code>resetRowSelection</code>. How a set of discontiguous
+  * by invoking {@code resetRowSelection}. How a set of discontiguous
   * TreePaths is mapped to a contiguous set is left to implementors of
   * this interface to enforce a particular policy.
   *
   * <p>
   *

@@ -72,12 +72,12 @@
   * <pre>
   *   TreePath[] paths = new TreePath[] { treePath, treePath };
   *   treeSelectionModel.setSelectionPaths(paths);
   * </pre>
   * should result in only one path being selected:
-  * <code>treePath</code>, and
-  * not two copies of <code>treePath</code>.
+  * {@code treePath}, and
+  * not two copies of {@code treePath}.
   *
   * <p>
   *
   * The lead TreePath is the last path that was added (or set). The lead
   * row is then the row that corresponds to the TreePath as determined

@@ -104,89 +104,89 @@
      * Sets the selection model, which must be one of SINGLE_TREE_SELECTION,
      * CONTIGUOUS_TREE_SELECTION or DISCONTIGUOUS_TREE_SELECTION.
      * <p>
      * This may change the selection if the current selection is not valid
      * for the new mode. For example, if three TreePaths are
-     * selected when the mode is changed to <code>SINGLE_TREE_SELECTION</code>,
+     * selected when the mode is changed to {@code SINGLE_TREE_SELECTION},
      * only one TreePath will remain selected. It is up to the particular
      * implementation to decide what TreePath remains selected.
      *
      * @param   mode    selection mode to be set
      */
     void setSelectionMode(int mode);
 
     /**
      * Returns the current selection mode, one of
-     * <code>SINGLE_TREE_SELECTION</code>,
-     * <code>CONTIGUOUS_TREE_SELECTION</code> or
-     * <code>DISCONTIGUOUS_TREE_SELECTION</code>.
+     * {@code SINGLE_TREE_SELECTION},
+     * {@code CONTIGUOUS_TREE_SELECTION} or
+     * {@code DISCONTIGUOUS_TREE_SELECTION}.
      *
      * @return          the current selection mode
      */
     int getSelectionMode();
 
     /**
       * Sets the selection to path. If this represents a change, then
-      * the TreeSelectionListeners are notified. If <code>path</code> is
-      * null, this has the same effect as invoking <code>clearSelection</code>.
+      * the TreeSelectionListeners are notified. If {@code path} is
+      * null, this has the same effect as invoking {@code clearSelection}.
       *
       * @param  path    new path to select
       */
     void setSelectionPath(TreePath path);
 
     /**
       * Sets the selection to path. If this represents a change, then
-      * the TreeSelectionListeners are notified. If <code>paths</code> is
-      * null, this has the same effect as invoking <code>clearSelection</code>.
+      * the TreeSelectionListeners are notified. If {@code paths} is
+      * null, this has the same effect as invoking {@code clearSelection}.
       *
       * @param  paths   new selection
       */
     void setSelectionPaths(TreePath[] paths);
 
     /**
       * Adds path to the current selection. If path is not currently
       * in the selection the TreeSelectionListeners are notified. This has
-      * no effect if <code>path</code> is null.
+      * no effect if {@code path} is null.
       *
       * @param  path    the new path to add to the current selection
       */
     void addSelectionPath(TreePath path);
 
     /**
       * Adds paths to the current selection.  If any of the paths in
       * paths are not currently in the selection the TreeSelectionListeners
       * are notified. This has
-      * no effect if <code>paths</code> is null.
+      * no effect if {@code paths} is null.
       *
       * @param  paths   the new paths to add to the current selection
       */
     void addSelectionPaths(TreePath[] paths);
 
     /**
       * Removes path from the selection. If path is in the selection
       * The TreeSelectionListeners are notified. This has no effect if
-      * <code>path</code> is null.
+      * {@code path} is null.
       *
       * @param  path    the path to remove from the selection
       */
     void removeSelectionPath(TreePath path);
 
     /**
       * Removes paths from the selection.  If any of the paths in
-      * <code>paths</code>
+      * {@code paths}
       * are in the selection, the TreeSelectionListeners are notified.
-      * This method has no effect if <code>paths</code> is null.
+      * This method has no effect if {@code paths} is null.
       *
       * @param  paths   the path to remove from the selection
       */
     void removeSelectionPaths(TreePath[] paths);
 
     /**
       * Returns the first path in the selection. How first is defined is
       * up to implementors, and may not necessarily be the TreePath with
       * the smallest integer value as determined from the
-      * <code>RowMapper</code>.
+      * {@code RowMapper}.
       *
       * @return         the first path in the selection
       */
     TreePath getSelectionPath();
 

@@ -204,11 +204,11 @@
      * @return          the number of paths that are selected
      */
     int getSelectionCount();
 
     /**
-      * Returns true if the path, <code>path</code>, is in the current
+      * Returns true if the path, {@code path}, is in the current
       * selection.
       *
       * @param  path    the path to be loked for
       * @return         whether the {@code path} is in the current selection
       */

@@ -272,11 +272,11 @@
      *                  for the current set of selected TreePaths
       */
     int getMaxSelectionRow();
 
     /**
-      * Returns true if the row identified by <code>row</code> is selected.
+      * Returns true if the row identified by {@code row} is selected.
       *
       * @param  row     row to check
       * @return         whether the row is selected
       */
     boolean isRowSelected(int row);
< prev index next >