提交 cece1496 编写于 作者: M malenkov

7165112: Incomprehensible garbage in doc for RootPaneContainer

Reviewed-by: alexsch
上级 1b4dccec
...@@ -46,9 +46,10 @@ import javax.accessibility.*; ...@@ -46,9 +46,10 @@ import javax.accessibility.*;
* <code>java.applet.Applet</code>. <code>JApplet</code> contains a * <code>java.applet.Applet</code>. <code>JApplet</code> contains a
* <code>JRootPane</code> as its only child. The <code>contentPane</code> * <code>JRootPane</code> as its only child. The <code>contentPane</code>
* should be the parent of any children of the <code>JApplet</code>. * should be the parent of any children of the <code>JApplet</code>.
* As a convenience <code>add</code> and its variants, <code>remove</code> and * As a convenience, the {@code add}, {@code remove}, and {@code setLayout}
* <code>setLayout</code> have been overridden to forward to the * methods of this class are overridden, so that they delegate calls
* <code>contentPane</code> as necessary. This means you can write: * to the corresponding methods of the {@code ContentPane}.
* For example, you can add a child component to an applet as follows:
* <pre> * <pre>
* applet.add(child); * applet.add(child);
* </pre> * </pre>
......
...@@ -44,9 +44,10 @@ import javax.accessibility.*; ...@@ -44,9 +44,10 @@ import javax.accessibility.*;
* as its only child. * as its only child.
* The {@code contentPane} should be the parent of any children of the * The {@code contentPane} should be the parent of any children of the
* {@code JDialog}. * {@code JDialog}.
* As a convenience {@code add} and its variants, {@code remove} and * As a convenience, the {@code add}, {@code remove}, and {@code setLayout}
* {@code setLayout} have been overridden to forward to the * methods of this class are overridden, so that they delegate calls
* {@code contentPane} as necessary. This means you can write: * to the corresponding methods of the {@code ContentPane}.
* For example, you can add a child component to a dialog as follows:
* <pre> * <pre>
* dialog.add(child); * dialog.add(child);
* </pre> * </pre>
......
...@@ -50,9 +50,10 @@ import javax.accessibility.*; ...@@ -50,9 +50,10 @@ import javax.accessibility.*;
* as a rule, contain * as a rule, contain
* all the non-menu components displayed by the <code>JFrame</code>. * all the non-menu components displayed by the <code>JFrame</code>.
* This is different from the AWT <code>Frame</code> case. * This is different from the AWT <code>Frame</code> case.
* As a conveniance <code>add</code> and its variants, <code>remove</code> and * As a convenience, the {@code add}, {@code remove}, and {@code setLayout}
* <code>setLayout</code> have been overridden to forward to the * methods of this class are overridden, so that they delegate calls
* <code>contentPane</code> as necessary. This means you can write: * to the corresponding methods of the {@code ContentPane}.
* For example, you can add a child component to a frame as follows:
* <pre> * <pre>
* frame.add(child); * frame.add(child);
* </pre> * </pre>
......
...@@ -63,9 +63,10 @@ import sun.swing.SwingUtilities2; ...@@ -63,9 +63,10 @@ import sun.swing.SwingUtilities2;
* <p> * <p>
* The <code>JInternalFrame</code> content pane * The <code>JInternalFrame</code> content pane
* is where you add child components. * is where you add child components.
* As a conveniance <code>add</code> and its variants, <code>remove</code> and * As a convenience, the {@code add}, {@code remove}, and {@code setLayout}
* <code>setLayout</code> have been overridden to forward to the * methods of this class are overridden, so that they delegate calls
* <code>contentPane</code> as necessary. This means you can write: * to the corresponding methods of the {@code ContentPane}.
* For example, you can add a child component to an internal frame as follows:
* <pre> * <pre>
* internalFrame.add(child); * internalFrame.add(child);
* </pre> * </pre>
......
...@@ -43,9 +43,10 @@ import javax.accessibility.*; ...@@ -43,9 +43,10 @@ import javax.accessibility.*;
* The <code>JWindow</code> component contains a <code>JRootPane</code> * The <code>JWindow</code> component contains a <code>JRootPane</code>
* as its only child. The <code>contentPane</code> should be the parent * as its only child. The <code>contentPane</code> should be the parent
* of any children of the <code>JWindow</code>. * of any children of the <code>JWindow</code>.
* As a conveniance <code>add</code> and its variants, <code>remove</code> and * As a convenience, the {@code add}, {@code remove}, and {@code setLayout}
* <code>setLayout</code> have been overridden to forward to the * methods of this class are overridden, so that they delegate calls
* <code>contentPane</code> as necessary. This means you can write: * to the corresponding methods of the {@code ContentPane}.
* For example, you can add a child component to a window as follows:
* <pre> * <pre>
* window.add(child); * window.add(child);
* </pre> * </pre>
......
...@@ -45,18 +45,18 @@ import java.awt.Container; ...@@ -45,18 +45,18 @@ import java.awt.Container;
* dropping a component on a RootPaneContainer would be interpreted * dropping a component on a RootPaneContainer would be interpreted
* as <code>frame.getContentPane().add(child)</code>. * as <code>frame.getContentPane().add(child)</code>.
* <p> * <p>
* For conveniance * As a convenience, the standard classes that implement this interface
* <code>JFrame</code>, <code>JDialog</code>, <code>JWindow</code>, * (such as {@code JFrame}, {@code JDialog}, {@code JWindow}, {@code JApplet},
* <code>JApplet</code> and <code>JInternalFrame</code>, by default, * and {@code JInternalFrame}) have their {@code add}, {@code remove},
* forward, by default, all calls to the <code>add</code>, * and {@code setLayout} methods overridden, so that they delegate calls
* <code>remove</code> and <code>setLayout</code> methods, to the * to the corresponding methods of the {@code ContentPane}.
* <code>contentPane</code>. This means you can call: * For example, you can add a child component to a frame as follows:
* <pre> * <pre>
* rootPaneContainer.add(component); * frame.add(child);
* </pre> * </pre>
* instead of: * instead of:
* <pre> * <pre>
* rootPaneContainer.getContentPane().add(component); * frame.getContentPane().add(child);
* </pre> * </pre>
* <p> * <p>
* The behavior of the <code>add</code> and * The behavior of the <code>add</code> and
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册