|
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object
|
+--java.awt.Component
|
+--java.awt.Container
|
+--javax.swing.JComponent
|
+--javax.swing.JRootPane
Unsafe:
| Field Summary | |
static int |
COLOR_CHOOSER_DIALOG
Enabled: Constant used for the windowDecorationStyle property. |
protected Container |
contentPane
The content pane. |
protected JButton |
defaultButton
The button that gets activated when the pane has the focus and a UI-specific action like pressing the Enter key occurs. |
protected javax.swing.JRootPane.DefaultAction |
defaultPressAction
Deprecated. As of Java 2 platform v1.3. |
protected javax.swing.JRootPane.DefaultAction |
defaultReleaseAction
Deprecated. As of Java 2 platform v1.3. |
static int |
ERROR_DIALOG
Enabled: Constant used for the windowDecorationStyle property. |
static int |
FILE_CHOOSER_DIALOG
Enabled: Constant used for the windowDecorationStyle property. |
static int |
FRAME
Enabled: Constant used for the windowDecorationStyle property. |
protected Component |
glassPane
The glass pane that overlays the menu bar and content pane, so it can intercept mouse movements and such. |
static int |
INFORMATION_DIALOG
Enabled: Constant used for the windowDecorationStyle property. |
protected JLayeredPane |
layeredPane
The layered pane that manages the menu bar and content pane. |
protected JMenuBar |
menuBar
The menu bar. |
private Component |
mostRecentFocusOwner
|
static int |
NONE
Enabled: Constant used for the windowDecorationStyle property. |
static int |
PLAIN_DIALOG
Enabled: Constant used for the windowDecorationStyle property. |
static int |
QUESTION_DIALOG
Enabled: Constant used for the windowDecorationStyle property. |
private static String |
uiClassID
|
static int |
WARNING_DIALOG
Enabled: Constant used for the windowDecorationStyle property. |
private int |
windowDecorationStyle
|
| Fields inherited from class javax.swing.JComponent |
_bounds, accessibleContext, listenerList, paintingChild, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
| Fields inherited from class java.awt.Container |
|
| Fields inherited from class java.awt.Component |
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
| Constructor Summary | |
JRootPane()
Suppressed: Creates a JRootPane, setting up its
glassPane, layeredPane,
and contentPane. |
|
| Method Summary | |
protected void |
addImpl(Component comp,
Object constraints,
int index)
Overridden to enforce the position of the glass component as the zero child. |
void |
addNotify()
Suppressed: Register ourselves with the SystemEventQueueUtils as a new
root pane. |
protected Container |
createContentPane()
Called by the constructor methods to create the default contentPane. |
protected Component |
createGlassPane()
Called by the constructor methods to create the default glassPane. |
protected JLayeredPane |
createLayeredPane()
Called by the constructor methods to create the default layeredPane. |
protected LayoutManager |
createRootLayout()
Called by the constructor methods to create the default layoutManager. |
AccessibleContext |
getAccessibleContext()
Suppressed: Gets the AccessibleContext associated with this
JRootPane. |
Container |
getContentPane()
Suppressed: Returns the content pane -- the container that holds the components parented by the root pane. |
JButton |
getDefaultButton()
Suppressed: Returns the value of the defaultButton property. |
Component |
getGlassPane()
Suppressed: Returns the current glass pane for this JRootPane. |
JMenuBar |
getJMenuBar()
Suppressed: Returns the menu bar from the layered pane. |
JLayeredPane |
getLayeredPane()
Suppressed: Gets the layered pane used by the root pane. |
JMenuBar |
getMenuBar()
Deprecated. As of Swing version 1.0.3 replaced by getJMenubar(). |
(package private) Component |
getMostRecentFocusOwner()
|
javax.swing.plaf.RootPaneUI |
getUI()
Suppressed: Returns the L&F object that renders this component. |
String |
getUIClassID()
Suppressed: Returns a string that specifies the name of the L&F class that renders this component. |
int |
getWindowDecorationStyle()
Suppressed: Returns a constant identifying the type of Window decorations the JRootPane is providing. |
boolean |
isOptimizedDrawingEnabled()
Suppressed: The glassPane and contentPane
have the same bounds, which means JRootPane
does not tiles its children and this should return false. |
boolean |
isValidateRoot()
Suppressed: If a descendant of this JRootPane calls
revalidate, validate from here on down. |
protected String |
paramString()
Returns a string representation of this JRootPane. |
void |
removeNotify()
Suppressed: Unregister ourselves from SystemEventQueueUtils. |
void |
setContentPane(Container content)
Suppressed: Sets the content pane -- the container that holds the components parented by the root pane. |
void |
setDefaultButton(JButton defaultButton)
Suppressed: Sets the defaultButton property,
which determines the current default button for this JRootPane. |
void |
setGlassPane(Component glass)
Suppressed: Sets a specified Component to be the glass pane for this
root pane. |
void |
setJMenuBar(JMenuBar menu)
Suppressed: Adds or changes the menu bar used in the layered pane. |
void |
setLayeredPane(JLayeredPane layered)
Suppressed: Sets the layered pane for the root pane. |
void |
setMenuBar(JMenuBar menu)
Deprecated. As of Swing version 1.0.3 replaced by setJMenuBar(JMenuBar menu). |
(package private) void |
setMostRecentFocusOwner(Component focusOwner)
|
void |
setUI(javax.swing.plaf.RootPaneUI ui)
Suppressed: Sets the L&F object that renders this component. |
void |
setWindowDecorationStyle(int windowDecorationStyle)
Suppressed: Sets the type of Window decorations (such as borders, widgets for closing a Window, title ...) the JRootPane should
provide. |
void |
updateUI()
Suppressed: Resets the UI property to a value from the current look and feel. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
private static final String uiClassID
public static final int NONE
JRootPane should not provide any sort of
Window decorations.
public static final int FRAME
JRootPane should provide decorations appropriate for
a Frame.
public static final int PLAIN_DIALOG
JRootPane should provide decorations appropriate for
a Dialog.
public static final int INFORMATION_DIALOG
JRootPane should provide decorations appropriate for
a Dialog used to display an informational message.
public static final int ERROR_DIALOG
JRootPane should provide decorations appropriate for
a Dialog used to display an error message.
public static final int COLOR_CHOOSER_DIALOG
JRootPane should provide decorations appropriate for
a Dialog used to display a JColorChooser.
public static final int FILE_CHOOSER_DIALOG
JRootPane should provide decorations appropriate for
a Dialog used to display a JFileChooser.
public static final int QUESTION_DIALOG
JRootPane should provide decorations appropriate for
a Dialog used to present a question to the user.
public static final int WARNING_DIALOG
JRootPane should provide decorations appropriate for
a Dialog used to display a warning message.
private Component mostRecentFocusOwner
private int windowDecorationStyle
protected JMenuBar menuBar
protected Container contentPane
protected JLayeredPane layeredPane
protected Component glassPane
protected JButton defaultButton
protected javax.swing.JRootPane.DefaultAction defaultPressAction
Action
in the JRootPane's ActionMap. Please refer to
the key bindings specification for further details.
defaultButtonprotected javax.swing.JRootPane.DefaultAction defaultReleaseAction
Action
in the JRootPane's ActionMap. Please refer to
the key bindings specification for further details.
defaultButton| Constructor Detail |
public JRootPane()
JRootPane, setting up its
glassPane, layeredPane,
and contentPane.
| Method Detail |
public int getWindowDecorationStyle()
JRootPane is providing.
NONE, FRAME,
PLAIN_DIALOG, INFORMATION_DIALOG,
ERROR_DIALOG, COLOR_CHOOSER_DIALOG,
FILE_CHOOSER_DIALOG, QUESTION_DIALOG or
WARNING_DIALOG.setWindowDecorationStyle(int)public void setWindowDecorationStyle(int windowDecorationStyle)
JRootPane should
provide. The default is to provide no Window decorations
(NONE).
This is only a hint, and some look and feels may not support this. This is a bound property.
windowDecorationStyle - Constant identifying Window decorations
to provide.
IllegalArgumentException - if style is
not one of: NONE, FRAME,
PLAIN_DIALOG, INFORMATION_DIALOG,
ERROR_DIALOG, COLOR_CHOOSER_DIALOG,
FILE_CHOOSER_DIALOG, QUESTION_DIALOG, or
WARNING_DIALOG.JDialog.setDefaultLookAndFeelDecorated(boolean),
JFrame.setDefaultLookAndFeelDecorated(boolean),
LookAndFeel.getSupportsWindowDecorations()public javax.swing.plaf.RootPaneUI getUI()
LabelUI objectpublic void setUI(javax.swing.plaf.RootPaneUI ui)
ui - the LabelUI L&F objectUIDefaults.getUI(javax.swing.JComponent)public void updateUI()
updateUI in class JComponentJComponent.updateUI()public String getUIClassID()
getUIClassID in class JComponentJComponent.getUIClassID(),
UIDefaults.getUI(javax.swing.JComponent)protected JLayeredPane createLayeredPane()
layeredPane.
Bt default it creates a new JLayeredPane.
layeredPaneprotected Container createContentPane()
contentPane.
By default this method creates a new JComponent add sets a
BorderLayout as its LayoutManager.
contentPaneprotected Component createGlassPane()
glassPane.
By default this method creates a new JComponent
with visibility set to false.
glassPaneprotected LayoutManager createRootLayout()
layoutManager.
layoutManager.public void setJMenuBar(JMenuBar menu)
menu - the JMenuBar to addpublic void setMenuBar(JMenuBar menu)
setJMenuBar(JMenuBar menu).
menu - the JMenuBar to add.public JMenuBar getJMenuBar()
JMenuBar used in the panepublic JMenuBar getMenuBar()
getJMenubar().
JMenuBar used in the panepublic void setContentPane(Container content)
Swing's painting architecture requires an opaque JComponent
in the containment hiearchy. This is typically provided by the
content pane. If you replace the content pane it is recommended you
replace it with an opaque JComponent.
content - the Container to use for component-contentspublic Container getContentPane()
Container that holds the component-contentspublic void setLayeredPane(JLayeredPane layered)
JMenuBar.
layered - the JLayeredPane to usepublic JLayeredPane getLayeredPane()
JMenuBar.
JLayeredPane currently in usepublic void setGlassPane(Component glass)
Component to be the glass pane for this
root pane. The glass pane should normally be a lightweight,
transparent component, because it will be made visible when
ever the root pane needs to grab input events. For example,
only one JInternalFrame is ever active when using a
DefaultDesktop, and any inactive JInternalFrames'
glass panes are made visible so that clicking anywhere within
an inactive JInternalFrame can activate it.
glass - the Component to use as the glass pane
for this JRootPanepublic Component getGlassPane()
JRootPane.
setGlassPane(java.awt.Component)public boolean isValidateRoot()
JRootPane calls
revalidate, validate from here on down.
Deferred requests to layout a component and its descendents again.
For example, calls to revalidate, are pushed upwards to
either a JRootPane or a JScrollPane
because both classes override isValidateRoot to return true.
isValidateRoot in class JComponentJComponent.isValidateRoot()public boolean isOptimizedDrawingEnabled()
glassPane and contentPane
have the same bounds, which means JRootPane
does not tiles its children and this should return false.
On the other hand, the glassPane
is normally not visible, and so this can return true if the
glassPane isn't visible. Therefore, the
return value here depends upon the visiblity of the
glassPane.
isOptimizedDrawingEnabled in class JComponentpublic void addNotify()
SystemEventQueueUtils as a new
root pane.
addNotify in class JComponentJComponent.registerKeyboardAction(java.awt.event.ActionListener, java.lang.String, javax.swing.KeyStroke, int)public void removeNotify()
SystemEventQueueUtils.
removeNotify in class JComponentaddNotify()public void setDefaultButton(JButton defaultButton)
defaultButton property,
which determines the current default button for this JRootPane.
The default button is the button which will be activated
when a UI-defined activation event (typically the Enter key)
occurs in the root pane regardless of whether or not the button
has keyboard focus (unless there is another component within
the root pane which consumes the activation event,
such as a JTextPane).
For default activation to work, the button must be an enabled
descendent of the root pane when activation occurs.
To remove a default button from this root pane, set this
property to null.
JButton.isDefaultButton()public JButton getDefaultButton()
defaultButton property.
JButton which is currently the default buttonsetDefaultButton(javax.swing.JButton)
protected void addImpl(Component comp,
Object constraints,
int index)
addImpl in class Containercomp - the component to be enhancedconstraints - the constraints to be respectedindex - the indexContainer.add(Component),
Container.add(Component, int),
Container.add(Component, java.lang.Object),
LayoutManager,
LayoutManager2void setMostRecentFocusOwner(Component focusOwner)
Component getMostRecentFocusOwner()
protected String paramString()
JRootPane.
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.
paramString in class JComponentJRootPane.public AccessibleContext getAccessibleContext()
AccessibleContext associated with this
JRootPane. For root panes, the
AccessibleContext takes the form of an
AccessibleJRootPane.
A new AccessibleJRootPane instance is created if necessary.
getAccessibleContext in interface AccessiblegetAccessibleContext in class JComponentAccessibleJRootPane that serves as the
AccessibleContext of this JRootPane
|
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||