Methods Summary |
---|
protected void | addImpl(java.awt.Component comp, java.lang.Object constraints, int index)Adds the specified child Component .
This method is overridden to conditionally forwad calls to the
contentPane .
By default, children are added to the contentPane instead
of the frame, refer to {@link javax.swing.RootPaneContainer} for
details.
if(isRootPaneCheckingEnabled()) {
getContentPane().add(comp, constraints, index);
}
else {
super.addImpl(comp, constraints, index);
}
|
protected javax.swing.JRootPane | createRootPane()Called by the constructor methods to create the default rootPane.
JRootPane rp = new JRootPane();
// NOTE: this uses setOpaque vs LookAndFeel.installProperty as there
// is NO reason for the RootPane not to be opaque. For painting to
// work the contentPane must be opaque, therefor the RootPane can
// also be opaque.
rp.setOpaque(true);
return rp;
|
public javax.accessibility.AccessibleContext | getAccessibleContext()Gets the AccessibleContext associated with this JApplet.
For JApplets, the AccessibleContext takes the form of an
AccessibleJApplet.
A new AccessibleJApplet instance is created if necessary.
if (accessibleContext == null) {
accessibleContext = new AccessibleJApplet();
}
return accessibleContext;
|
public java.awt.Container | getContentPane()Returns the contentPane object for this applet.
return getRootPane().getContentPane();
|
public java.awt.Component | getGlassPane()Returns the glassPane object for this applet.
return getRootPane().getGlassPane();
|
public javax.swing.JMenuBar | getJMenuBar()Returns the menubar set on this applet.
return getRootPane().getMenuBar();
|
public javax.swing.JLayeredPane | getLayeredPane()Returns the layeredPane object for this applet.
return getRootPane().getLayeredPane();
|
public javax.swing.JRootPane | getRootPane()Returns the rootPane object for this applet.
return rootPane;
|
protected boolean | isRootPaneCheckingEnabled()Returns whether calls to add and
setLayout are forwarded to the contentPane .
return rootPaneCheckingEnabled;
|
protected java.lang.String | paramString()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 null .
String rootPaneString = (rootPane != null ?
rootPane.toString() : "");
String rootPaneCheckingEnabledString = (rootPaneCheckingEnabled ?
"true" : "false");
return super.paramString() +
",rootPane=" + rootPaneString +
",rootPaneCheckingEnabled=" + rootPaneCheckingEnabledString;
|
public void | remove(java.awt.Component comp)Removes the specified component from the container. If
comp is not the rootPane , this will forward
the call to the contentPane . This will do nothing if
comp is not a child of the JFrame or
contentPane .
if (comp == rootPane) {
super.remove(comp);
} else {
getContentPane().remove(comp);
}
|
public void | setContentPane(java.awt.Container contentPane)Sets the contentPane property. This method is called by the constructor.
getRootPane().setContentPane(contentPane);
|
public void | setGlassPane(java.awt.Component glassPane)Sets the glassPane property.
This method is called by the constructor.
getRootPane().setGlassPane(glassPane);
|
public void | setJMenuBar(javax.swing.JMenuBar menuBar)Sets the menubar for this applet.
getRootPane().setMenuBar(menuBar);
|
public void | setLayeredPane(javax.swing.JLayeredPane layeredPane)Sets the layeredPane property. This method is called by the constructor.
getRootPane().setLayeredPane(layeredPane);
|
public void | setLayout(java.awt.LayoutManager manager)Sets the LayoutManager .
Overridden to conditionally forward the call to the
contentPane .
Refer to {@link javax.swing.RootPaneContainer} for
more information.
if(isRootPaneCheckingEnabled()) {
getContentPane().setLayout(manager);
}
else {
super.setLayout(manager);
}
|
protected void | setRootPane(javax.swing.JRootPane root)Sets the rootPane property. This method is called by the constructor.
if(rootPane != null) {
remove(rootPane);
}
rootPane = root;
if(rootPane != null) {
boolean checkingEnabled = isRootPaneCheckingEnabled();
try {
setRootPaneCheckingEnabled(false);
add(rootPane, BorderLayout.CENTER);
}
finally {
setRootPaneCheckingEnabled(checkingEnabled);
}
}
|
protected void | setRootPaneCheckingEnabled(boolean enabled)Sets whether calls to add and
setLayout are forwarded to the contentPane .
rootPaneCheckingEnabled = enabled;
|
public void | update(java.awt.Graphics g)Just calls paint(g) . This method was overridden to
prevent an unnecessary call to clear the background.
paint(g);
|