< prev index next >

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

Print this page

        

@@ -44,11 +44,11 @@
 import javax.swing.border.EmptyBorder;
 import sun.swing.DefaultLookup;
 
 /**
  * Displays an entry in a tree.
- * <code>DefaultTreeCellRenderer</code> is not opaque and
+ * {@code DefaultTreeCellRenderer} is not opaque and
  * unless you subclass paint you should not change this.
  * See <a
  href="http://docs.oracle.com/javase/tutorial/uiswing/components/tree.html">How to Use Trees</a>
  * in <em>The Java Tutorial</em>
  * for examples of customizing node display using this class.

@@ -74,16 +74,16 @@
  *   <tr><td>"borderSelectionColor"<td>"Tree.selectionBorderColor"
  * </table>
  * <p>
  * <strong><a name="override">Implementation Note:</a></strong>
  * This class overrides
- * <code>invalidate</code>,
- * <code>validate</code>,
- * <code>revalidate</code>,
- * <code>repaint</code>,
+ * {@code invalidate},
+ * {@code validate},
+ * {@code revalidate},
+ * {@code repaint},
  * and
- * <code>firePropertyChange</code>
+ * {@code firePropertyChange}
  * solely to improve performance.
  * If not overridden, these frequently called methods would execute code paths
  * that are unnecessary for the default tree cell renderer.
  * If you write your own renderer,
  * take care to weigh the benefits and

@@ -94,11 +94,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 Rob Davis
  * @author Ray Ryan
  * @author Scott Violet

@@ -410,15 +410,15 @@
     public Color getBorderSelectionColor() {
         return borderSelectionColor;
     }
 
     /**
-     * Subclassed to map <code>FontUIResource</code>s to null. If
-     * <code>font</code> is null, or a <code>FontUIResource</code>, this
+     * Subclassed to map {@code FontUIResource}s to null. If
+     * {@code font} is null, or a {@code FontUIResource}, this
      * has the effect of letting the font of the JTree show
-     * through. On the other hand, if <code>font</code> is non-null, and not
-     * a <code>FontUIResource</code>, the font becomes <code>font</code>.
+     * through. On the other hand, if {@code font} is non-null, and not
+     * a {@code FontUIResource}, the font becomes {@code font}.
      */
     public void setFont(Font font) {
         if(font instanceof FontUIResource)
             font = null;
         super.setFont(font);

@@ -439,30 +439,30 @@
         }
         return font;
     }
 
     /**
-     * Subclassed to map <code>ColorUIResource</code>s to null. If
-     * <code>color</code> is null, or a <code>ColorUIResource</code>, this
+     * Subclassed to map {@code ColorUIResource}s to null. If
+     * {@code color} is null, or a {@code ColorUIResource}, this
      * has the effect of letting the background color of the JTree show
-     * through. On the other hand, if <code>color</code> is non-null, and not
-     * a <code>ColorUIResource</code>, the background becomes
-     * <code>color</code>.
+     * through. On the other hand, if {@code color} is non-null, and not
+     * a {@code ColorUIResource}, the background becomes
+     * {@code color}.
      */
     public void setBackground(Color color) {
         if(color instanceof ColorUIResource)
             color = null;
         super.setBackground(color);
     }
 
     /**
       * Configures the renderer based on the passed in components.
       * The value is set from messaging the tree with
-      * <code>convertValueToText</code>, which ultimately invokes
-      * <code>toString</code> on <code>value</code>.
+      * {@code convertValueToText}, which ultimately invokes
+      * {@code toString} on {@code value}.
       * The foreground color is set based on the selection and the icon
-      * is set based on the <code>leaf</code> and <code>expanded</code>
+      * is set based on the {@code leaf} and {@code expanded}
       * parameters.
       */
     public Component getTreeCellRendererComponent(JTree tree, Object value,
                                                   boolean sel,
                                                   boolean expanded,

@@ -599,11 +599,11 @@
         }
         return 0;
     }
 
     /**
-     * Overrides <code>JComponent.getPreferredSize</code> to
+     * Overrides {@code JComponent.getPreferredSize} to
      * return slightly wider preferred size value.
      */
     public Dimension getPreferredSize() {
         Dimension        retDimension = super.getPreferredSize();
 
< prev index next >