public class BaseRootPaneUI extends BasicRootPaneUI
RootPaneUI.
BaseRootPaneUI provides support for the windowDecorationStyle property of
JRootPane. BaseRootPaneUI does this by way of installing a custom
LayoutManager, a private Component to render the appropriate widgets, and a private
Border. The LayoutManager is always installed, regardless of the value of the
windowDecorationStyle property, but the Border and Component are only
installed/added if the windowDecorationStyle is other than JRootPane.NONE.
Warning:
Serialized objects of this class will not be compatible with future Swing releases. The current serialization support
is appropriate for short term storage or RMI between applications running the same version of Swing. As of 1.4,
support for long term storage of all JavaBeansTM
has been added to the java.beans package. Please see XMLEncoder.
| Modifier and Type | Field and Description |
|---|---|
static int |
COLOR_CHOOSER_DIALOG |
static int |
ERROR_DIALOG |
static int |
FILE_CHOOSER_DIALOG |
static int |
FRAME |
static int |
INFORMATION_DIALOG |
static int |
MAXIMIZED_BOTH |
static int |
MAXIMIZED_HORIZ |
static int |
MAXIMIZED_VERT |
static int |
NONE |
static int |
PLAIN_DIALOG |
static int |
QUESTION_DIALOG |
static int |
WARNING_DIALOG |
| Constructor and Description |
|---|
BaseRootPaneUI() |
| Modifier and Type | Method and Description |
|---|---|
LayoutManager |
createLayoutManager()
Returns a
LayoutManager that will be set on the JRootPane. |
JComponent |
createTitlePane(JRootPane root)
Returns the
JComponent to render the window decoration style. |
static ComponentUI |
createUI(JComponent c)
Creates a UI for a
JRootPane. |
MouseInputListener |
createWindowMouseInputListener(JRootPane root)
Returns a
MouseListener that will be added to the Window containing the
JRootPane. |
JRootPane |
getRootPane() |
BaseTitlePane |
getTitlePane()
Returns the
BaseTitlePane rendering the title pane. |
void |
installBorder(JRootPane root) |
void |
installClientDecorations(JRootPane root) |
void |
installLayout(JRootPane root)
Installs the appropriate LayoutManager on the
JRootPane to render the window decorations. |
protected void |
installListeners(JRootPane root) |
void |
installUI(JComponent c) |
void |
installWindowListeners(JRootPane root,
Component parent)
Installs the necessary Listeners on the parent
Window, if there is one. |
void |
propertyChange(PropertyChangeEvent e) |
void |
setTitlePane(JRootPane root,
JComponent titlePane)
Sets the window title pane -- the JComponent used to provide a plaf a way to override the native operating
system's window title pane with one whose look and feel are controlled by the plaf.
|
void |
uninstallBorder(JRootPane root)
Removes any border that may have been installed.
|
void |
uninstallClientDecorations(JRootPane root) |
void |
uninstallLayout(JRootPane root) |
protected void |
uninstallListeners(JRootPane root) |
void |
uninstallUI(JComponent c) |
void |
uninstallWindowListeners(JRootPane root)
Uninstalls the necessary Listeners on the
Window the Listeners were last installed on. |
installComponents, installDefaults, installKeyboardActions, uninstallComponents, uninstallDefaults, uninstallKeyboardActionscontains, getAccessibleChild, getAccessibleChildrenCount, getBaseline, getBaselineResizeBehavior, getMaximumSize, getMinimumSize, getPreferredSize, paint, updatepublic 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
public static final int MAXIMIZED_HORIZ
public static final int MAXIMIZED_VERT
public static final int MAXIMIZED_BOTH
public static ComponentUI createUI(JComponent c)
JRootPane.c - the JRootPane the RootPaneUI will be created forpublic void installUI(JComponent c)
installUI in class BasicRootPaneUIpublic void uninstallUI(JComponent c)
uninstallUI in class BasicRootPaneUIprotected void installListeners(JRootPane root)
installListeners in class BasicRootPaneUIprotected void uninstallListeners(JRootPane root)
uninstallListeners in class BasicRootPaneUIpublic void installBorder(JRootPane root)
public void uninstallBorder(JRootPane root)
root - public void installWindowListeners(JRootPane root, Component parent)
Window, if there is one.
This takes the parent so that cleanup can be done from removeNotify, at which point the parent
hasn't been reset yet.
root - parent - The parent of the JRootPanepublic void uninstallWindowListeners(JRootPane root)
Window the Listeners were last installed on.root - public void installLayout(JRootPane root)
JRootPane to render the window decorations.root - public void uninstallLayout(JRootPane root)
public void installClientDecorations(JRootPane root)
public void uninstallClientDecorations(JRootPane root)
public JComponent createTitlePane(JRootPane root)
JComponent to render the window decoration style.root - public MouseInputListener createWindowMouseInputListener(JRootPane root)
MouseListener that will be added to the Window containing the
JRootPane.root - public LayoutManager createLayoutManager()
LayoutManager that will be set on the JRootPane.public void setTitlePane(JRootPane root, JComponent titlePane)
root - the JRootPane where to set the title panetitlePane - the JComponent to use for the window title pane.public BaseTitlePane getTitlePane()
BaseTitlePane rendering the title pane. If this returns null, it implies there is no need
to render window decorations.setTitlePane(javax.swing.JRootPane, javax.swing.JComponent)public JRootPane getRootPane()
public void propertyChange(PropertyChangeEvent e)
propertyChange in interface PropertyChangeListenerpropertyChange in class BasicRootPaneUICopyright © 2014. All Rights Reserved.