< prev index next >
src/java.desktop/share/classes/javax/swing/RootPaneContainer.java
Print this page
*** 31,51 ****
/**
* This interface is implemented by components that have a single
* JRootPane child: JDialog, JFrame, JWindow, JApplet, JInternalFrame.
* The methods in this interface are just <i>covers</i> for the JRootPane
! * properties, e.g. <code>getContentPane()</code> is generally implemented
* like this:<pre>
* public Container getContentPane() {
* return getRootPane().getContentPane();
* }
* </pre>
* This interface serves as a <i>marker</i> for Swing GUI builders
* that need to treat components like JFrame, that contain a
* single JRootPane, specially. For example in a GUI builder,
* dropping a component on a RootPaneContainer would be interpreted
! * as <code>frame.getContentPane().add(child)</code>.
* <p>
* As a convenience, the standard classes that implement this interface
* (such as {@code JFrame}, {@code JDialog}, {@code JWindow}, {@code JApplet},
* and {@code JInternalFrame}) have their {@code add}, {@code remove},
* and {@code setLayout} methods overridden, so that they delegate calls
--- 31,51 ----
/**
* This interface is implemented by components that have a single
* JRootPane child: JDialog, JFrame, JWindow, JApplet, JInternalFrame.
* The methods in this interface are just <i>covers</i> for the JRootPane
! * properties, e.g. {@code getContentPane()} is generally implemented
* like this:<pre>
* public Container getContentPane() {
* return getRootPane().getContentPane();
* }
* </pre>
* This interface serves as a <i>marker</i> for Swing GUI builders
* that need to treat components like JFrame, that contain a
* single JRootPane, specially. For example in a GUI builder,
* dropping a component on a RootPaneContainer would be interpreted
! * as {@code frame.getContentPane().add(child)}.
* <p>
* As a convenience, the standard classes that implement this interface
* (such as {@code JFrame}, {@code JDialog}, {@code JWindow}, {@code JApplet},
* and {@code JInternalFrame}) have their {@code add}, {@code remove},
* and {@code setLayout} methods overridden, so that they delegate calls
*** 57,74 ****
* instead of:
* <pre>
* frame.getContentPane().add(child);
* </pre>
* <p>
! * The behavior of the <code>add</code> and
! * <code>setLayout</code> methods for
! * <code>JFrame</code>, <code>JDialog</code>, <code>JWindow</code>,
! * <code>JApplet</code> and <code>JInternalFrame</code> is controlled by
! * the <code>rootPaneCheckingEnabled</code> property. If this property is
* true (the default), then calls to these methods are
! * forwarded to the <code>contentPane</code>; if false, these
! * methods operate directly on the <code>RootPaneContainer</code>. This
* property is only intended for subclasses, and is therefore protected.
*
* @see JRootPane
* @see JFrame
* @see JDialog
--- 57,74 ----
* instead of:
* <pre>
* frame.getContentPane().add(child);
* </pre>
* <p>
! * The behavior of the {@code add} and
! * {@code setLayout} methods for
! * {@code JFrame}, {@code JDialog}, {@code JWindow},
! * {@code JApplet} and {@code JInternalFrame} is controlled by
! * the {@code rootPaneCheckingEnabled} property. If this property is
* true (the default), then calls to these methods are
! * forwarded to the {@code contentPane}; if false, these
! * methods operate directly on the {@code RootPaneContainer}. This
* property is only intended for subclasses, and is therefore protected.
*
* @see JRootPane
* @see JFrame
* @see JDialog
*** 99,109 ****
* the contentPane, set its layout manager, and so on.
* <p>
* The contentPane may not be null.
* <p>
* Generally implemented with
! * <code>getRootPane().setContentPane(contentPane);</code>
*
* @exception java.awt.IllegalComponentStateException (a runtime
* exception) if the content pane parameter is null
* @param contentPane the Container to use for the contents of this
* JRootPane
--- 99,109 ----
* the contentPane, set its layout manager, and so on.
* <p>
* The contentPane may not be null.
* <p>
* Generally implemented with
! * {@code getRootPane().setContentPane(contentPane);}
*
* @exception java.awt.IllegalComponentStateException (a runtime
* exception) if the content pane parameter is null
* @param contentPane the Container to use for the contents of this
* JRootPane
*** 160,170 ****
* by default it's not visible.
* <p>
* The glassPane may not be null.
* <p>
* Generally implemented with
! * <code>getRootPane().setGlassPane(glassPane);</code>
*
* @param glassPane the glass pane
* @see #getGlassPane
* @see JRootPane#setGlassPane
*/
--- 160,170 ----
* by default it's not visible.
* <p>
* The glassPane may not be null.
* <p>
* Generally implemented with
! * {@code getRootPane().setGlassPane(glassPane);}
*
* @param glassPane the glass pane
* @see #getGlassPane
* @see JRootPane#setGlassPane
*/
< prev index next >