< prev index next >

src/java.desktop/share/classes/javax/swing/Box.java

Print this page

        

@@ -39,27 +39,27 @@
  * Box provides several class methods
  * that are useful for containers using BoxLayout --
  * even non-Box containers.
  *
  * <p>
- * The <code>Box</code> class can create several kinds
+ * The {@code Box} class can create several kinds
  * of invisible components
  * that affect layout:
  * glue, struts, and rigid areas.
- * If all the components your <code>Box</code> contains
+ * If all the components your {@code Box} contains
  * have a fixed size,
  * you might want to use a glue component
- * (returned by <code>createGlue</code>)
+ * (returned by {@code createGlue})
  * to control the components' positions.
  * If you need a fixed amount of space between two components,
  * try using a strut
- * (<code>createHorizontalStrut</code> or <code>createVerticalStrut</code>).
+ * ({@code createHorizontalStrut} or {@code createVerticalStrut}).
  * If you need an invisible component
  * that always takes up the same amount of space,
- * get it by invoking <code>createRigidArea</code>.
+ * get it by invoking {@code createRigidArea}.
  * <p>
- * If you are implementing a <code>BoxLayout</code> you
+ * If you are implementing a {@code BoxLayout} you
  * can find further information and examples in
  * <a
  href="http://docs.oracle.com/javase/tutorial/uiswing/layout/box.html">How to Use BoxLayout</a>,
  * a section in <em>The Java Tutorial.</em>
  * <p>

@@ -67,11 +67,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}.
  *
  * @see BoxLayout
  *
  * @author  Timothy Prinzing

@@ -79,32 +79,32 @@
  */
 @SuppressWarnings("serial")
 public class Box extends JComponent implements Accessible {
 
     /**
-     * Creates a <code>Box</code> that displays its components
+     * Creates a {@code Box} that displays its components
      * along the specified axis.
      *
      * @param axis  can be {@link BoxLayout#X_AXIS},
      *              {@link BoxLayout#Y_AXIS},
      *              {@link BoxLayout#LINE_AXIS} or
      *              {@link BoxLayout#PAGE_AXIS}.
-     * @throws AWTError if the <code>axis</code> is invalid
+     * @throws AWTError if the {@code axis} is invalid
      * @see #createHorizontalBox
      * @see #createVerticalBox
      */
     public Box(int axis) {
         super();
         super.setLayout(new BoxLayout(this, axis));
     }
 
     /**
-     * Creates a <code>Box</code> that displays its components
-     * from left to right. If you want a <code>Box</code> that
+     * Creates a {@code Box} that displays its components
+     * from left to right. If you want a {@code Box} that
      * respects the component orientation you should create the
-     * <code>Box</code> using the constructor and pass in
-     * <code>BoxLayout.LINE_AXIS</code>, eg:
+     * {@code Box} using the constructor and pass in
+     * {@code BoxLayout.LINE_AXIS}, eg:
      * <pre>
      *   Box lineBox = new Box(BoxLayout.LINE_AXIS);
      * </pre>
      *
      * @return the box

@@ -112,15 +112,15 @@
     public static Box createHorizontalBox() {
         return new Box(BoxLayout.X_AXIS);
     }
 
     /**
-     * Creates a <code>Box</code> that displays its components
-     * from top to bottom. If you want a <code>Box</code> that
+     * Creates a {@code Box} that displays its components
+     * from top to bottom. If you want a {@code Box} that
      * respects the component orientation you should create the
-     * <code>Box</code> using the constructor and pass in
-     * <code>BoxLayout.PAGE_AXIS</code>, eg:
+     * {@code Box} using the constructor and pass in
+     * {@code BoxLayout.PAGE_AXIS}, eg:
      * <pre>
      *   Box lineBox = new Box(BoxLayout.PAGE_AXIS);
      * </pre>
      *
      * @return the box

@@ -222,11 +222,11 @@
      * the fixed-size components are centered in the box.
      *
      * <p>
      *
      * To use glue,
-     * call <code>Box.createGlue</code>
+     * call {@code Box.createGlue}
      * and add the returned component to a container.
      * The glue component has no minimum or preferred size,
      * so it takes no space unless excess space is available.
      * If excess space is available,
      * then the glue component takes its share of available

@@ -268,17 +268,17 @@
     public void setLayout(LayoutManager l) {
         throw new AWTError("Illegal request");
     }
 
     /**
-     * Paints this <code>Box</code>.  If this <code>Box</code> has a UI this
+     * Paints this {@code Box}.  If this {@code Box} has a UI this
      * method invokes super's implementation, otherwise if this
-     * <code>Box</code> is opaque the <code>Graphics</code> is filled
+     * {@code Box} is opaque the {@code Graphics} is filled
      * using the background.
      *
-     * @param g the <code>Graphics</code> to paint to
-     * @throws NullPointerException if <code>g</code> is null
+     * @param g the {@code Graphics} to paint to
+     * @throws NullPointerException if {@code g} is null
      * @since 1.6
      */
     protected void paintComponent(Graphics g) {
         if (ui != null) {
             // On the off chance some one created a UI, honor it

@@ -298,11 +298,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}.
      */
     @SuppressWarnings("serial")
     public static class Filler extends JComponent implements Accessible {
 

@@ -337,18 +337,18 @@
         }
 
         // ---- Component methods ------------------------------------------
 
         /**
-         * Paints this <code>Filler</code>.  If this
-         * <code>Filler</code> has a UI this method invokes super's
-         * implementation, otherwise if this <code>Filler</code> is
-         * opaque the <code>Graphics</code> is filled using the
+         * Paints this {@code Filler}.  If this
+         * {@code Filler} has a UI this method invokes super's
+         * implementation, otherwise if this {@code Filler} is
+         * opaque the {@code Graphics} is filled using the
          * background.
          *
-         * @param g the <code>Graphics</code> to paint to
-         * @throws NullPointerException if <code>g</code> is null
+         * @param g the {@code Graphics} to paint to
+         * @throws NullPointerException if {@code g} is null
          * @since 1.6
          */
         protected void paintComponent(Graphics g) {
             if (ui != null) {
                 // On the off chance some one created a UI, honor it

@@ -379,11 +379,11 @@
             return accessibleContext;
         }
 
         /**
          * This class implements accessibility support for the
-         * <code>Box.Filler</code> class.
+         * {@code Box.Filler} class.
          */
         @SuppressWarnings("serial")
         protected class AccessibleBoxFiller extends AccessibleAWTComponent {
             // AccessibleContext methods
             //

@@ -420,11 +420,11 @@
         return accessibleContext;
     }
 
     /**
      * This class implements accessibility support for the
-     * <code>Box</code> class.
+     * {@code Box} class.
      */
     @SuppressWarnings("serial")
     protected class AccessibleBox extends AccessibleAWTContainer {
         // AccessibleContext methods
         //
< prev index next >