< prev index next >

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

Print this page

        

@@ -41,11 +41,11 @@
  * Serialized objects of this class will not be compatible with
  * future Swing releases. The current serialization support is
  * appropriate for short term storage or RMI between applications running
  * the same version of Swing.  As of 1.4, support for long term storage
  * of all JavaBeans&trade;
- * has been added to the <code>java.beans</code> package.
+ * has been added to the {@code java.beans} package.
  * Please see {@link java.beans.XMLEncoder}.
  *
  * @author Scott Violet
  */
 @SuppressWarnings("serial") // Same-version serialization only

@@ -292,12 +292,12 @@
         }
         return null;
     }
 
     /**
-     * Marks the path <code>path</code> expanded state to
-     * <code>isExpanded</code>.
+     * Marks the path {@code path} expanded state to
+     * {@code isExpanded}.
      */
     public void setExpandedState(TreePath path, boolean isExpanded) {
         if(isExpanded)
             ensurePathIsExpanded(path, true);
         else if(path != null) {

@@ -525,13 +525,13 @@
 
     private void visibleNodesChanged() {
     }
 
     /**
-     * Returns the bounds for the given node. If <code>childIndex</code>
-     * is -1, the bounds of <code>parent</code> are returned, otherwise
-     * the bounds of the node at <code>childIndex</code> are returned.
+     * Returns the bounds for the given node. If {@code childIndex}
+     * is -1, the bounds of {@code parent} are returned, otherwise
+     * the bounds of the node at {@code childIndex} are returned.
      */
     private Rectangle getBounds(FHTreeStateNode parent, int childIndex,
                                   Rectangle placeIn) {
         boolean              expanded;
         int                  level;

@@ -589,11 +589,11 @@
     private void removeMapping(FHTreeStateNode node) {
         treePathMapping.remove(node.getTreePath());
     }
 
     /**
-     * Returns the node previously added for <code>path</code>. This may
+     * Returns the node previously added for {@code path}. This may
      * return null, if you to create a node use getNodeForPath.
      */
     private FHTreeStateNode getMapping(TreePath path) {
         return treePathMapping.get(path);
     }

@@ -785,11 +785,11 @@
             }
         }
 
         /**
          * Messaged when this node is removed from its parent, this messages
-         * <code>removedFromMapping</code> to remove all the children.
+         * {@code removedFromMapping} to remove all the children.
          */
         public void remove(int childIndex) {
             FHTreeStateNode     node = (FHTreeStateNode)getChildAt(childIndex);
 
             node.removeFromMapping();

@@ -820,19 +820,19 @@
         public int getChildIndex() {
             return childIndex;
         }
 
         /**
-         * Returns the <code>TreePath</code> of the receiver.
+         * Returns the {@code TreePath} of the receiver.
          */
         public TreePath getTreePath() {
             return path;
         }
 
         /**
          * Returns the child for the passed in model index, this will
-         * return <code>null</code> if the child for <code>index</code>
+         * return {@code null} if the child for {@code index}
          * has not yet been created (expanded).
          */
         public FHTreeStateNode getChildAtModelIndex(int index) {
             // PENDING: Make this a binary search!
             for(int counter = getChildCount() - 1; counter >= 0; counter--)

@@ -860,11 +860,11 @@
             return row;
         }
 
         /**
          * Returns the row of the child with a model index of
-         * <code>index</code>.
+         * {@code index}.
          */
         public int getRowToModelIndex(int index) {
             FHTreeStateNode      child;
             int                  lastRow = getRow() + 1;
             int                  retValue = lastRow;

@@ -963,13 +963,13 @@
                     ((FHTreeStateNode)getChildAt(counter)).removeFromMapping();
             }
         }
 
         /**
-         * Creates a new node to represent <code>userObject</code>.
+         * Creates a new node to represent {@code userObject}.
          * This does NOT check to ensure there isn't already a child node
-         * to manage <code>userObject</code>.
+         * to manage {@code userObject}.
          */
         protected FHTreeStateNode createChildFor(Object userObject) {
             int      newChildIndex = treeModel.getIndexOfChild
                                      (getUserObject(), userObject);
 

@@ -1000,11 +1000,11 @@
             return child;
         }
 
         /**
          * Adjusts the receiver, and all its children rows by
-         * <code>amount</code>.
+         * {@code amount}.
          */
         protected void adjustRowBy(int amount) {
             row += amount;
             if(isExpanded) {
                 for(int counter = getChildCount() - 1; counter >= 0;

@@ -1013,11 +1013,11 @@
             }
         }
 
         /**
          * Adjusts this node, its child, and its parent starting at
-         * an index of <code>index</code> index is the index of the child
+         * an index of {@code index} index is the index of the child
          * to start adjusting from, which is not necessarily the model
          * index.
          */
         protected void adjustRowBy(int amount, int startIndex) {
             // Could check isVisible, but probably isn't worth it.

@@ -1049,11 +1049,11 @@
             }
             adjustRowCountBy(childRowCount);
         }
 
         /**
-         * Sets the receivers row to <code>nextRow</code> and recursively
+         * Sets the receivers row to {@code nextRow} and recursively
          * updates all the children of the receivers rows. The index the
          * next row is to be placed as is returned.
          */
         protected int setRowAndChildren(int nextRow) {
             row = nextRow;

@@ -1080,14 +1080,14 @@
             return lastRow + childCount - lastModelIndex;
         }
 
         /**
          * Resets the receivers children's rows. Starting with the child
-         * at <code>childIndex</code> (and <code>modelIndex</code>) to
-         * <code>newRow</code>. This uses <code>setRowAndChildren</code>
+         * at {@code childIndex} (and {@code modelIndex}) to
+         * {@code newRow}. This uses {@code setRowAndChildren}
          * to recursively descend children, and uses
-         * <code>resetRowSelection</code> to ascend parents.
+         * {@code resetRowSelection} to ascend parents.
          */
         // This can be rather expensive, but is needed for the collapse
         // case this is resulting from a remove (although I could fix
         // that by having instances of FHTreeStateNode hold a ref to
         // the number of children). I prefer this though, making determing

@@ -1121,21 +1121,21 @@
             }
         }
 
         /**
          * Makes the receiver visible, but invoking
-         * <code>expandParentAndReceiver</code> on the superclass.
+         * {@code expandParentAndReceiver} on the superclass.
          */
         protected void makeVisible() {
             FHTreeStateNode       parent = (FHTreeStateNode)getParent();
 
             if(parent != null)
                 parent.expandParentAndReceiver();
         }
 
         /**
-         * Invokes <code>expandParentAndReceiver</code> on the parent,
+         * Invokes {@code expandParentAndReceiver} on the parent,
          * and expands the receiver.
          */
         protected void expandParentAndReceiver() {
             FHTreeStateNode       parent = (FHTreeStateNode)getParent();
 

@@ -1164,11 +1164,11 @@
                 }
             }
         }
 
         /**
-         * Collapses the receiver. If <code>adjustRows</code> is true,
+         * Collapses the receiver. If {@code adjustRows} is true,
          * the rows of nodes after the receiver are adjusted.
          */
         protected void collapse(boolean adjustRows) {
             if(isExpanded) {
                 if(isVisible() && adjustRows) {

@@ -1218,12 +1218,12 @@
             if(!added)
                 add(newChild);
         }
 
         /**
-         * Removes the child at <code>modelIndex</code>.
-         * <code>isChildVisible</code> should be true if the receiver
+         * Removes the child at {@code modelIndex}.
+         * {@code isChildVisible} should be true if the receiver
          * is visible and expanded.
          */
         protected void removeChildAtModelIndex(int modelIndex,
                                                boolean isChildVisible) {
             FHTreeStateNode     childNode = getChildAtModelIndex(modelIndex);

@@ -1272,11 +1272,11 @@
             }
         }
 
         /**
          * Adjusts the child indexs of the receivers children by
-         * <code>amount</code>, starting at <code>index</code>.
+         * {@code amount}, starting at {@code index}.
          */
         protected void adjustChildIndexs(int index, int amount) {
             for(int counter = index, maxCounter = getChildCount();
                 counter < maxCounter; counter++) {
                 ((FHTreeStateNode)getChildAt(counter)).childIndex += amount;

@@ -1316,15 +1316,15 @@
             }
             childCount++;
         }
 
         /**
-         * Returns true if there is a row for <code>row</code>.
-         * <code>nextRow</code> gives the bounds of the receiver.
-         * Information about the found row is returned in <code>info</code>.
-         * This should be invoked on root with <code>nextRow</code> set
-         * to <code>getRowCount</code>().
+         * Returns true if there is a row for {@code row}.
+         * {@code nextRow} gives the bounds of the receiver.
+         * Information about the found row is returned in {@code info}.
+         * This should be invoked on root with {@code nextRow} set
+         * to {@code getRowCount}().
          */
         protected boolean getPathForRow(int row, int nextRow,
                                         SearchInfo info) {
             if(this.row == row) {
                 info.node = this;

@@ -1421,12 +1421,12 @@
             return retCount;
         }
 
         /**
          * Returns the number of children that are expanded to
-         * <code>stopIndex</code>. This does not include the number
-         * of children that the child at <code>stopIndex</code> might
+         * {@code stopIndex}. This does not include the number
+         * of children that the child at {@code stopIndex} might
          * have.
          */
         protected int getNumExpandedChildrenTo(int stopIndex) {
             FHTreeStateNode    aChild;
             int                retCount = stopIndex;

@@ -1532,12 +1532,12 @@
             updateNextObject();
             return retObject;
         }
 
         /**
-         * Determines the next object by invoking <code>updateNextIndex</code>
-         * and if not succesful <code>findNextValidParent</code>.
+         * Determines the next object by invoking {@code updateNextIndex}
+         * and if not succesful {@code findNextValidParent}.
          */
         protected void updateNextObject() {
             if(!updateNextIndex()) {
                 findNextValidParent();
             }

@@ -1570,11 +1570,11 @@
             }
             return false;
         }
 
         /**
-         * Updates <code>nextIndex</code> returning false if it is beyond
+         * Updates {@code nextIndex} returning false if it is beyond
          * the number of children of parent.
          */
         protected boolean updateNextIndex() {
             // nextIndex == -1 identifies receiver, make sure is expanded
             // before descend.
< prev index next >