|
||||||||||
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 and any MessageSource components will be registered with the status bar.
Components should be added using the addComponent
method. This
method will walk the containment hierarchy of the added component and will
register all MessageSource
or ProgressSource
components.
JXStatusBar
,
MessageEvent
,
MessageSource
,
ProgressSource
,
Serialized FormNested Class Summary |
---|
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 |
---|
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()
|
Method Summary | |
---|---|
void |
addComponent(Component comp)
Adds a component to the root pane. |
JButton |
getCancelButton()
Returns the value of the cancelButton property. |
Component[] |
getContentComponents()
Return an array of components that were added to the content panel with addComponent. |
JXStatusBar |
getStatusBar()
|
JToolBar |
getToolBar()
|
void |
removeComponent(Component comp)
Removes a component from the center panel. |
void |
setCancelButton(JButton cancelButton)
Sets the cancelButton property,
which determines the current default cancel button for this JRootPane . |
void |
setJMenuBar(JMenuBar menuBar)
Set the menu bar for this root pane. |
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 java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public JXRootPane()
Method Detail |
---|
public void addComponent(Component comp)
MessageSource
then it will be registered with the
status bar.
public void removeComponent(Component comp)
public Component[] getContentComponents()
public void setStatusBar(JXStatusBar statusBar)
statusBar
- the status bar to usepublic JXStatusBar getStatusBar()
public void setToolBar(JToolBar toolBar)
MouseMessagingHandler
so that mouse over messages will be
sent to the status bar. If a tool bar is currently registered with this
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 registerMouseMessagingHandler
public JToolBar getToolBar()
public void setJMenuBar(JMenuBar menuBar)
MouseMessagingHandler
so that mouse over messages will be sent to the status bar.
setJMenuBar
in class JRootPane
menuBar
- the menu bar to registerMouseMessagingHandler
public 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
descendent 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 buttonJButton#getCancelButton
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 |