|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.swing.plaf.ComponentUI
javax.swing.plaf.RootPaneUI
javax.swing.plaf.basic.BasicRootPaneUI
com.jtattoo.plaf.BaseRootPaneUI
public class BaseRootPaneUI
This source is a modified copy of javax.swing.plaf.metal.MetalRootPaneUI
Provides the base look and feel implementation of 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
.
Field Summary | |
---|---|
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 Summary | |
---|---|
BaseRootPaneUI()
|
Method Summary | |
---|---|
LayoutManager |
createLayoutManager()
Returns a LayoutManager that will be set on the
JRootPane . |
BaseTitlePane |
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 JComponent 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. |
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,
BaseTitlePane 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)
|
void |
uninstallUI(JComponent c)
|
void |
uninstallWindowListeners(JRootPane root)
Uninstalls the necessary Listeners on the Window the
Listeners were last installed on. |
Methods inherited from class javax.swing.plaf.basic.BasicRootPaneUI |
---|
installComponents, installDefaults, installKeyboardActions, installListeners, uninstallComponents, uninstallDefaults, uninstallKeyboardActions, uninstallListeners |
Methods inherited from class javax.swing.plaf.ComponentUI |
---|
contains, getAccessibleChild, getAccessibleChildrenCount, getBaseline, getBaselineResizeBehavior, getMaximumSize, getMinimumSize, getPreferredSize, paint, update |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, 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
public static final int MAXIMIZED_HORIZ
public static final int MAXIMIZED_VERT
public static final int MAXIMIZED_BOTH
Constructor Detail |
---|
public BaseRootPaneUI()
Method Detail |
---|
public static ComponentUI createUI(JComponent c)
JRootPane
.
c
- the JRootPane the RootPaneUI will be created for
public void installUI(JComponent c)
installUI
in class BasicRootPaneUI
public void uninstallUI(JComponent c)
uninstallUI
in class BasicRootPaneUI
public void installBorder(JRootPane root)
public void uninstallBorder(JRootPane 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.
parent
- The parent of the JRootPanepublic void uninstallWindowListeners(JRootPane root)
Window
the
Listeners were last installed on.
public void installLayout(JRootPane root)
JRootPane
to render the window decorations.
public void uninstallLayout(JRootPane root)
public void installClientDecorations(JRootPane root)
public void uninstallClientDecorations(JRootPane root)
public BaseTitlePane createTitlePane(JRootPane root)
JComponent
to render the window decoration
style.
public MouseInputListener createWindowMouseInputListener(JRootPane root)
MouseListener
that will be added to the
Window
containing the JRootPane
.
public LayoutManager createLayoutManager()
LayoutManager
that will be set on the
JRootPane
.
public void setTitlePane(JRootPane root, BaseTitlePane titlePane)
content
- the JComponent
to use for the window title pane.public BaseTitlePane getTitlePane()
JComponent
rendering the title pane. If this
returns null, it implies there is no need to render window decorations.
setTitlePane(javax.swing.JRootPane, com.jtattoo.plaf.BaseTitlePane)
public JRootPane getRootPane()
public void propertyChange(PropertyChangeEvent e)
propertyChange
in interface PropertyChangeListener
propertyChange
in class BasicRootPaneUI
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |