|
||||||||||
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
org.jdesktop.swingx.JXRootPane
public class JXRootPane
Extends the JRootPane by supporting specific placements for a toolbar and a status bar. If a status bar exists, then toolbars, menus will be registered with the status bar.
JXStatusBar
,
Serialized FormNested Class Summary | |
---|---|
protected class |
JXRootPane.XRootLayout
An extended RootLayout offering support for managing the status
bar. |
Nested classes/interfaces inherited from class javax.swing.JRootPane |
---|
JRootPane.AccessibleJRootPane, 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 | |
---|---|
protected JXStatusBar |
statusBar
The current status bar for this root pane. |
Fields inherited from class javax.swing.JRootPane |
---|
COLOR_CHOOSER_DIALOG, contentPane, defaultButton, defaultPressAction, defaultReleaseAction, ERROR_DIALOG, FILE_CHOOSER_DIALOG, FRAME, glassPane, INFORMATION_DIALOG, layeredPane, menuBar, NONE, PLAIN_DIALOG, QUESTION_DIALOG, 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 | |
---|---|
JXRootPane()
Creates an extended root pane. |
Method Summary | |
---|---|
protected Container |
createContentPane()
Called by the constructor methods to create the default contentPane . |
protected LayoutManager |
createRootLayout()
Called by the constructor methods to create the default layoutManager . |
JButton |
getCancelButton()
Returns the value of the cancelButton property. |
JXStatusBar |
getStatusBar()
Gets the currently installed status bar. |
JToolBar |
getToolBar()
The currently installed tool bar. |
void |
setCancelButton(JButton cancelButton)
Sets the cancelButton property,
which determines the current default cancel button for this JRootPane . |
void |
setJMenuBar(JMenuBar menuBar)
Adds or changes the menu bar used in the layered pane. |
void |
setLayout(LayoutManager layout)
Sets the layout manager for this container. |
void |
setStatusBar(JXStatusBar statusBar)
Set the status bar for this root pane. |
void |
setToolBar(JToolBar toolBar)
Set the toolbar bar for this root pane. |
Methods inherited from class javax.swing.JRootPane |
---|
addImpl, addNotify, createGlassPane, createLayeredPane, getAccessibleContext, getContentPane, getDefaultButton, getGlassPane, getJMenuBar, getLayeredPane, getMenuBar, getUI, getUIClassID, getWindowDecorationStyle, isOptimizedDrawingEnabled, isValidateRoot, paramString, removeNotify, setContentPane, setDefaultButton, setGlassPane, setLayeredPane, setMenuBar, setUI, setWindowDecorationStyle, updateUI |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected JXStatusBar statusBar
Constructor Detail |
---|
public JXRootPane()
Method Detail |
---|
protected Container createContentPane()
contentPane
.
By default this method creates a new JComponent
add sets a
BorderLayout
as its LayoutManager
.
createContentPane
in class JRootPane
contentPane
public void setLayout(LayoutManager layout)
setLayout
in class Container
layout
- the specified layout managerContainer.doLayout()
,
Container.getLayout()
protected LayoutManager createRootLayout()
layoutManager
.
createRootLayout
in class JRootPane
layoutManager
.public void setStatusBar(JXStatusBar statusBar)
statusBar
- the status bar to usepublic JXStatusBar getStatusBar()
public void setToolBar(JToolBar toolBar)
JXRootPane
, then it is removed prior to setting the new tool
bar. If an implementation needs to handle more than one tool bar, a
subclass will need to override the singleton logic used here or manually
add toolbars with getContentPane().add
.
toolBar
- the toolbar to registerpublic JToolBar getToolBar()
public void setJMenuBar(JMenuBar menuBar)
setJMenuBar
in class JRootPane
menuBar
- the JMenuBar
to addpublic void setCancelButton(JButton cancelButton)
cancelButton
property,
which determines the current default cancel button for this JRootPane
.
The cancel button is the button which will be activated
when a UI-defined activation event (typically the ESC 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
descendant of the root pane when activation occurs.
To remove a cancel button from this root pane, set this
property to null
.
cancelButton
- the JButton
which is to be the cancel buttongetCancelButton()
public JButton getCancelButton()
cancelButton
property.
JButton
which is currently the default cancel buttonsetCancelButton(javax.swing.JButton)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |