|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JRootPane
public class JRootPane
This class is where JComponents are added to. Unlike awt where you could just say frame.add(), with swing you need to say frame.getRootPane() (which delivers an instance of this class) and add your components to that. It is implemented by several 'layers' (pane() should be read as plane()) each on top of the others where you can add components to. (getContentPane(), getGlassPane(), getLayeredPane())
Nested Class Summary | |
---|---|
protected class |
JRootPane.AccessibleJRootPane
|
protected class |
JRootPane.RootLayout
|
Nested classes/interfaces inherited from class javax.swing.JComponent |
---|
JComponent.AccessibleJComponent |
Nested classes/interfaces inherited from class java.awt.Container |
---|
Container.AccessibleAWTContainer |
Nested classes/interfaces inherited from class java.awt.Component |
---|
Component.AccessibleAWTComponent, Component.BltBufferStrategy, Component.FlipBufferStrategy |
Field Summary | |
---|---|
static int |
COLOR_CHOOSER_DIALOG
|
protected Container |
contentPane
DOCUMENT ME! |
protected JButton |
defaultButton
|
protected Action |
defaultPressAction
Deprecated. since JDK1.3 |
protected Action |
defaultReleaseAction
Deprecated. since JDK1.3 |
static int |
ERROR_DIALOG
|
static int |
FILE_CHOOSER_DIALOG
|
static int |
FRAME
|
protected Component |
glassPane
DOCUMENT ME! |
static int |
INFORMATION_DIALOG
|
protected JLayeredPane |
layeredPane
DOCUMENT ME! |
protected JMenuBar |
menuBar
DOCUMENT ME! |
static int |
NONE
|
static int |
PLAIN_DIALOG
|
static int |
QUESTION_DIALOG
|
static int |
WARNING_DIALOG
|
Fields inherited from class javax.swing.JComponent |
---|
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
Fields inherited from class java.awt.Component |
---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
Fields inherited from interface java.awt.image.ImageObserver |
---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
---|---|
JRootPane()
Creates a new JRootPane object. |
Method Summary | |
---|---|
protected void |
addImpl(Component comp,
Object constraints,
int index)
DOCUMENT ME! |
protected Container |
createContentPane()
DOCUMENT ME! |
protected Component |
createGlassPane()
DOCUMENT ME! |
protected JLayeredPane |
createLayeredPane()
DOCUMENT ME! |
protected LayoutManager |
createRootLayout()
DOCUMENT ME! |
AccessibleContext |
getAccessibleContext()
Returns the accessible context for this JRootPane. |
Container |
getContentPane()
DOCUMENT ME! |
JButton |
getDefaultButton()
|
Component |
getGlassPane()
DOCUMENT ME! |
JMenuBar |
getJMenuBar()
DOCUMENT ME! |
JLayeredPane |
getLayeredPane()
DOCUMENT ME! |
JMenuBar |
getMenuBar()
Deprecated. Replaced by getJMenuBar() |
RootPaneUI |
getUI()
DOCUMENT ME! |
String |
getUIClassID()
DOCUMENT ME! |
int |
getWindowDecorationStyle()
|
boolean |
isOptimizedDrawingEnable()
This returns true if the glassPane is not
visible because then the root pane can guarantee to tile its children
(the only other direct child is a JLayeredPane which must figure its
optimizeDrawingEnabled state on its own). |
boolean |
isValidateRoot()
DOCUMENT ME! |
void |
setContentPane(Container p)
Sets the JRootPane's content pane. |
void |
setDefaultButton(JButton newButton)
|
void |
setGlassPane(Component f)
DOCUMENT ME! |
void |
setJMenuBar(JMenuBar m)
DOCUMENT ME! |
void |
setLayeredPane(JLayeredPane f)
Set the layered pane for the root pane. |
void |
setMenuBar(JMenuBar m)
Deprecated. Replaced by setJMenuBar() |
void |
setUI(RootPaneUI ui)
DOCUMENT ME! |
void |
setWindowDecorationStyle(int style)
|
void |
updateUI()
DOCUMENT ME! |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int NONE
public static final int FRAME
public static final int PLAIN_DIALOG
public static final int INFORMATION_DIALOG
public static final int ERROR_DIALOG
public static final int COLOR_CHOOSER_DIALOG
public static final int FILE_CHOOSER_DIALOG
public static final int QUESTION_DIALOG
public static final int WARNING_DIALOG
protected Component glassPane
protected JLayeredPane layeredPane
protected JMenuBar menuBar
protected Container contentPane
protected JButton defaultButton
protected Action defaultPressAction
protected Action defaultReleaseAction
Constructor Detail |
---|
public JRootPane()
JRootPane
object.
Method Detail |
---|
public void setJMenuBar(JMenuBar m)
m
- DOCUMENT ME!public void setMenuBar(JMenuBar m)
setJMenuBar()
public JMenuBar getJMenuBar()
public JMenuBar getMenuBar()
getJMenuBar()
public boolean isValidateRoot()
isValidateRoot
in class JComponent
public Container getContentPane()
public void setContentPane(Container p)
p
- the Container that will be the content pane
IllegalComponentStateException
- if p is nullprotected void addImpl(Component comp, Object constraints, int index)
addImpl
in class Container
comp
- DOCUMENT ME!constraints
- DOCUMENT ME!index
- DOCUMENT ME!public Component getGlassPane()
public void setGlassPane(Component f)
f
- DOCUMENT ME!public JLayeredPane getLayeredPane()
public void setLayeredPane(JLayeredPane f)
f
- The JLayeredPane to be used.
IllegalComponentStateException
- if JLayeredPane
parameter is null.protected LayoutManager createRootLayout()
protected Container createContentPane()
protected Component createGlassPane()
protected JLayeredPane createLayeredPane()
public RootPaneUI getUI()
public void setUI(RootPaneUI ui)
ui
- DOCUMENT ME!public void updateUI()
updateUI
in class JComponent
public String getUIClassID()
getUIClassID
in class JComponent
JComponent.setUI(javax.swing.plaf.ComponentUI)
,
JComponent.updateUI()
public JButton getDefaultButton()
public void setDefaultButton(JButton newButton)
public int getWindowDecorationStyle()
public void setWindowDecorationStyle(int style)
public boolean isOptimizedDrawingEnable()
true
if the glassPane
is not
visible because then the root pane can guarantee to tile its children
(the only other direct child is a JLayeredPane which must figure its
optimizeDrawingEnabled
state on its own).
true
if the glassPane
is not
visiblepublic AccessibleContext getAccessibleContext()
JRootPane.AccessibleJRootPane
.
getAccessibleContext
in interface Accessible
getAccessibleContext
in class JComponent
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |