< prev index next >

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

Print this page

        

@@ -36,43 +36,43 @@
 
 import javax.accessibility.Accessible;
 import javax.accessibility.AccessibleContext;
 
 /**
- * An extended version of <code>java.applet.Applet</code> that adds support for
+ * An extended version of {@code java.applet.Applet} that adds support for
  * the JFC/Swing component architecture.
- * You can find task-oriented documentation about using <code>JApplet</code>
+ * You can find task-oriented documentation about using {@code JApplet}
  * in <em>The Java Tutorial</em>,
  * in the section
  * <a
  href="http://docs.oracle.com/javase/tutorial/uiswing/components/applet.html">How to Make Applets</a>.
  * <p>
- * The <code>JApplet</code> class is slightly incompatible with
- * <code>java.applet.Applet</code>.  <code>JApplet</code> contains a
- * <code>JRootPane</code> as its only child.  The <code>contentPane</code>
- * should be the parent of any children of the <code>JApplet</code>.
+ * The {@code JApplet} class is slightly incompatible with
+ * {@code java.applet.Applet}.  {@code JApplet} contains a
+ * {@code JRootPane} as its only child.  The {@code contentPane}
+ * should be the parent of any children of the {@code JApplet}.
  * As a convenience, the {@code add}, {@code remove}, and {@code setLayout}
  * methods of this class are overridden, so that they delegate calls
  * to the corresponding methods of the {@code ContentPane}.
  * For example, you can add a child component to an applet as follows:
  * <pre>
  *       applet.add(child);
  * </pre>
  *
- * And the child will be added to the <code>contentPane</code>.
- * The <code>contentPane</code> will always be non-<code>null</code>.
- * Attempting to set it to <code>null</code> will cause the
- * <code>JApplet</code> to throw an exception. The default
- * <code>contentPane</code> will have a <code>BorderLayout</code>
+ * And the child will be added to the {@code contentPane}.
+ * The {@code contentPane} will always be non-{@code null}.
+ * Attempting to set it to {@code null} will cause the
+ * {@code JApplet} to throw an exception. The default
+ * {@code contentPane} will have a {@code BorderLayout}
  * manager set on it.
  * Refer to {@link javax.swing.RootPaneContainer}
- * for details on adding, removing and setting the <code>LayoutManager</code>
- * of a <code>JApplet</code>.
+ * for details on adding, removing and setting the {@code LayoutManager}
+ * of a {@code JApplet}.
  * <p>
- * Please see the <code>JRootPane</code> documentation for a
- * complete description of the <code>contentPane</code>, <code>glassPane</code>,
- * and <code>layeredPane</code> properties.
+ * Please see the {@code JRootPane} documentation for a
+ * complete description of the {@code contentPane}, {@code glassPane},
+ * and {@code layeredPane} properties.
  * <p>
  * <strong>Warning:</strong> Swing is not thread safe. For more
  * information see <a
  * href="package-summary.html#threading">Swing's Threading
  * Policy</a>.

@@ -81,11 +81,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 javax.swing.RootPaneContainer
  * @beaninfo
  *      attribute: isContainer true

@@ -105,30 +105,30 @@
      * @see #setRootPane
      */
     protected JRootPane rootPane;
 
     /**
-     * If true then calls to <code>add</code> and <code>setLayout</code>
-     * will be forwarded to the <code>contentPane</code>. This is initially
-     * false, but is set to true when the <code>JApplet</code> is constructed.
+     * If true then calls to {@code add} and {@code setLayout}
+     * will be forwarded to the {@code contentPane}. This is initially
+     * false, but is set to true when the {@code JApplet} is constructed.
      *
      * @see #isRootPaneCheckingEnabled
      * @see #setRootPaneCheckingEnabled
      * @see javax.swing.RootPaneContainer
      */
     protected boolean rootPaneCheckingEnabled = false;
 
     /**
-     * The <code>TransferHandler</code> for this applet.
+     * The {@code TransferHandler} for this applet.
      */
     private TransferHandler transferHandler;
 
     /**
      * Creates a swing applet instance.
      * <p>
      * This constructor sets the component's locale property to the value
-     * returned by <code>JComponent.getDefaultLocale</code>.
+     * returned by {@code JComponent.getDefaultLocale}.
      *
      * @exception HeadlessException if GraphicsEnvironment.isHeadless()
      * returns true.
      * @see java.awt.GraphicsEnvironment#isHeadless
      * @see JComponent#getDefaultLocale

@@ -215,24 +215,24 @@
         SwingUtilities.installSwingDropTargetAsNecessary(this, transferHandler);
         firePropertyChange("transferHandler", oldHandler, newHandler);
     }
 
     /**
-     * Gets the <code>transferHandler</code> property.
+     * Gets the {@code transferHandler} property.
      *
-     * @return the value of the <code>transferHandler</code> property
+     * @return the value of the {@code transferHandler} property
      *
      * @see TransferHandler
      * @see #setTransferHandler
      * @since 1.6
      */
     public TransferHandler getTransferHandler() {
         return transferHandler;
     }
 
     /**
-     * Just calls <code>paint(g)</code>.  This method was overridden to
+     * Just calls {@code paint(g)}.  This method was overridden to
      * prevent an unnecessary call to clear the background.
      */
     public void update(Graphics g) {
         paint(g);
     }

@@ -261,14 +261,14 @@
         return getRootPane().getJMenuBar();
     }
 
 
     /**
-     * Returns whether calls to <code>add</code> and
-     * <code>setLayout</code> are forwarded to the <code>contentPane</code>.
+     * Returns whether calls to {@code add} and
+     * {@code setLayout} are forwarded to the {@code contentPane}.
      *
-     * @return true if <code>add</code> and <code>setLayout</code>
+     * @return true if {@code add} and {@code setLayout}
      *         are forwarded; false otherwise
      *
      * @see #addImpl
      * @see #setLayout
      * @see #setRootPaneCheckingEnabled

@@ -278,16 +278,16 @@
         return rootPaneCheckingEnabled;
     }
 
 
     /**
-     * Sets whether calls to <code>add</code> and
-     * <code>setLayout</code> are forwarded to the <code>contentPane</code>.
+     * Sets whether calls to {@code add} and
+     * {@code setLayout} are forwarded to the {@code contentPane}.
      *
-     * @param enabled  true if <code>add</code> and <code>setLayout</code>
+     * @param enabled  true if {@code add} and {@code setLayout}
      *        are forwarded, false if they should operate directly on the
-     *        <code>JApplet</code>.
+     *        {@code JApplet}.
      *
      * @see #addImpl
      * @see #setLayout
      * @see #isRootPaneCheckingEnabled
      * @see javax.swing.RootPaneContainer

@@ -299,21 +299,21 @@
         rootPaneCheckingEnabled = enabled;
     }
 
 
     /**
-     * Adds the specified child <code>Component</code>.
+     * Adds the specified child {@code Component}.
      * This method is overridden to conditionally forward calls to the
-     * <code>contentPane</code>.
-     * By default, children are added to the <code>contentPane</code> instead
+     * {@code contentPane}.
+     * By default, children are added to the {@code contentPane} instead
      * of the frame, refer to {@link javax.swing.RootPaneContainer} for
      * details.
      *
      * @param comp the component to be enhanced
      * @param constraints the constraints to be respected
      * @param index the index
-     * @exception IllegalArgumentException if <code>index</code> is invalid
+     * @exception IllegalArgumentException if {@code index} is invalid
      * @exception IllegalArgumentException if adding the container's parent
      *                  to itself
      * @exception IllegalArgumentException if adding a window to a container
      *
      * @see #setRootPaneCheckingEnabled

@@ -329,17 +329,17 @@
         }
     }
 
     /**
      * Removes the specified component from the container. If
-     * <code>comp</code> is not the <code>rootPane</code>, this will forward
-     * the call to the <code>contentPane</code>. This will do nothing if
-     * <code>comp</code> is not a child of the <code>JFrame</code> or
-     * <code>contentPane</code>.
+     * {@code comp} is not the {@code rootPane}, this will forward
+     * the call to the {@code contentPane}. This will do nothing if
+     * {@code comp} is not a child of the {@code JFrame} or
+     * {@code contentPane}.
      *
      * @param comp the component to be removed
-     * @throws NullPointerException if <code>comp</code> is null
+     * @throws NullPointerException if {@code comp} is null
      * @see #add
      * @see javax.swing.RootPaneContainer
      */
     public void remove(Component comp) {
         if (comp == rootPane) {

@@ -349,17 +349,17 @@
         }
     }
 
 
     /**
-     * Sets the <code>LayoutManager</code>.
+     * Sets the {@code LayoutManager}.
      * Overridden to conditionally forward the call to the
-     * <code>contentPane</code>.
+     * {@code contentPane}.
      * Refer to {@link javax.swing.RootPaneContainer} for
      * more information.
      *
-     * @param manager the <code>LayoutManager</code>
+     * @param manager the {@code LayoutManager}
      * @see #setRootPaneCheckingEnabled
      * @see javax.swing.RootPaneContainer
      */
     public void setLayout(LayoutManager manager) {
         if(isRootPaneCheckingEnabled()) {

@@ -501,11 +501,11 @@
         return super.getGraphics();
     }
 
     /**
      * Repaints the specified rectangle of this component within
-     * <code>time</code> milliseconds.  Refer to <code>RepaintManager</code>
+     * {@code time} milliseconds.  Refer to {@code RepaintManager}
      * for details on how the repaint is handled.
      *
      * @param     time   maximum time in milliseconds before update
      * @param     x    the <i>x</i> coordinate
      * @param     y    the <i>y</i> coordinate

@@ -527,11 +527,11 @@
     /**
      * Returns a string representation of this JApplet. This method
      * is intended to be used only for debugging purposes, and the
      * content and format of the returned string may vary between
      * implementations. The returned string may be empty but may not
-     * be <code>null</code>.
+     * be {@code null}.
      *
      * @return  a string representation of this JApplet.
      */
     protected String paramString() {
         String rootPaneString = (rootPane != null ?

@@ -571,11 +571,11 @@
         return accessibleContext;
     }
 
     /**
      * This class implements accessibility support for the
-     * <code>JApplet</code> class.
+     * {@code JApplet} class.
      */
     protected class AccessibleJApplet extends AccessibleApplet {
         // everything moved to new parent, AccessibleApplet
     }
 }
< prev index next >