JSR-209 (Final Release)

javax.swing
Interface RootPaneContainer

All Known Implementing Classes:
JFrame, JInternalFrame

public interface RootPaneContainer

This interface is implemented by components that have a single JInternalFrame. The methods in this interface are just covers for the JRootPane properties, e.g. getContentPane() is generally implemented like this:

     public Container getContentPane() {
         return getRootPane().getContentPane();
     }
 

See Also:
JRootPane, JInternalFrame

Method Summary
 java.awt.Container getContentPane()
          Returns the contentPane.
 java.awt.Component getGlassPane()
          Returns the glassPane.
 JLayeredPane getLayeredPane()
          Returns the layeredPane.
 JRootPane getRootPane()
          Return this component's single JRootPane child.
 void setContentPane(java.awt.Container contentPane)
          The "contentPane" is the primary container for application specific components.
 void setGlassPane(java.awt.Component glassPane)
          The glassPane is always the first child of the rootPane and the rootPanes layout manager ensures that it's always as big as the rootPane.
 void setLayeredPane(JLayeredPane layeredPane)
          A Container that manages the contentPane and in some cases a menu bar.
 

Method Detail

getRootPane

public JRootPane getRootPane()
Return this component's single JRootPane child. A conventional implementation of this interface will have all of the other methods indirect through this one. The rootPane has two children: the glassPane and the layeredPane.

Returns:
this components single JRootPane child.
See Also:
JRootPane

setContentPane

public void setContentPane(java.awt.Container contentPane)
The "contentPane" is the primary container for application specific components. Applications should add children to the contentPane, set its layout manager, and so on.

The contentPane my not be null.

Generally implemented with getRootPane().setContentPane(contentPane);

Parameters:
contentPane - the Container to use for the contents of this JRootPane
Throws:
java.awt.IllegalComponentStateException - (a runtime exception) if the content pane parameter is null
See Also:
JRootPane.getContentPane(), getContentPane()

getContentPane

public java.awt.Container getContentPane()
Returns the contentPane.

Returns:
the value of the contentPane property.
See Also:
setContentPane(java.awt.Container)

setLayeredPane

public void setLayeredPane(JLayeredPane layeredPane)
A Container that manages the contentPane and in some cases a menu bar. The layeredPane can be used by descendants that want to add a child to the RootPaneContainer that isn't layout managed. For example an internal dialog or a drag and drop effect component.

The layeredPane may not be null.

Generally implemented with

 
    getRootPane().setLayeredPane(layeredPane);

Throws:
java.awt.IllegalComponentStateException - (a runtime exception) if the layered pane parameter is null
See Also:
getLayeredPane(), JRootPane.getLayeredPane()

getLayeredPane

public JLayeredPane getLayeredPane()
Returns the layeredPane.

Returns:
the value of the layeredPane property.
See Also:
setLayeredPane(javax.swing.JLayeredPane)

setGlassPane

public void setGlassPane(java.awt.Component glassPane)
The glassPane is always the first child of the rootPane and the rootPanes layout manager ensures that it's always as big as the rootPane. By default it's transparent and not visible. It can be used to temporarily grab all keyboard and mouse input by adding listeners and then making it visible. by default it's not visible.

The glassPane may not be null.

Generally implemented with getRootPane().setGlassPane(glassPane);

See Also:
getGlassPane(), JRootPane.setGlassPane(java.awt.Component)

getGlassPane

public java.awt.Component getGlassPane()
Returns the glassPane.

Returns:
the value of the glassPane property.
See Also:
setGlassPane(java.awt.Component)

JSR-209 (Final Release)

Java and Java 2D are trademarks or registered trademarks of Sun Microsystems, Inc. in the U.S. and other countries.
Copyright 1993 - 2006 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, California 95054, U.S.A. All Rights Reserved.
Use of this specification is subject to this license.