|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.flexdock.util.RootWindow
public class RootWindow
This class provides an abstraction of root containers used in Swing. It
allows transparent use of methods common to JFrame
, JApplet
,
JWindow
, and JDialog
without making an outward distinction
between the different container types. This is accomplished by wrapping the
root component.
Field Summary | |
---|---|
static java.lang.Integer |
DEFAULT_MAXED_LAYER
|
Constructor Summary | |
---|---|
protected |
RootWindow(java.awt.Component root)
Creates a new RootSwingContainer wrapping the specified
component. |
Method Summary | |
---|---|
java.awt.Rectangle |
getBounds()
|
java.lang.Object |
getClientProperty(java.lang.Object key)
|
java.awt.Container |
getContentPane()
Returns the contentPane object for the wrapped component. |
java.awt.Component |
getGlassPane()
Returns the glassPane object for the wrapped component. |
javax.swing.JLayeredPane |
getLayeredPane()
Returns the layeredPane object for the wrapped component. |
java.awt.Point |
getLocationOnScreen()
Gets the location of the wrapped component in the form of a point specifying the component's top-left corner in the screen's coordinate space. |
java.lang.Integer |
getMaximizationLayer()
Deprecated. dead code last used in 0.2.0 |
java.awt.LayoutManager |
getMaximizedLayout()
Deprecated. dead code last used in 0.2.0 |
java.awt.Window[] |
getOwnedWindows()
Return an array containing all the windows this window currently owns. |
java.awt.Window |
getOwner()
|
java.awt.Component |
getRootContainer()
Returns the the wrapped component. |
static RootWindow |
getRootContainer(java.awt.Component c)
Traverses the container hierarchy to locate the root container and returns corresponding RootSwingContainer . |
javax.swing.JRootPane |
getRootPane()
Returns the rootPane object for the wrapped component. |
static RootWindow[] |
getVisibleWindows()
|
boolean |
isActive()
|
static boolean |
isValidRootContainer(java.awt.Component c)
Indicates whether the supplied Component is, in fact, a root
Swing container. |
void |
pack()
|
void |
putClientProperty(java.lang.Object key,
java.lang.Object value)
|
void |
revalidateContentPane()
Convenience method that calls revalidate() on the current content
pane if it is a JComponent . |
void |
setContentPane(java.awt.Container contentPane)
Sets the contentPane property for the wrapped component. |
void |
setGlassPane(java.awt.Component glassPane)
Sets the glassPane property for the wrapped component. |
void |
setLayeredPane(javax.swing.JLayeredPane layeredPane)
Sets the layeredPane property for the wrapped component. |
void |
setMaximizationLayer(java.lang.Integer layer)
Deprecated. dead code last used in 0.2.0 |
void |
setMaximizedLayout(java.awt.LayoutManager mgr)
Deprecated. dead code last used in 0.2.0 |
protected void |
setRootContainer(java.awt.Component root)
Sets the wrapped root container. |
void |
toFront()
|
void |
updateComponentTreeUI()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.Integer DEFAULT_MAXED_LAYER
Constructor Detail |
---|
protected RootWindow(java.awt.Component root)
RootSwingContainer
wrapping the specified
component.
Method Detail |
---|
public static RootWindow getRootContainer(java.awt.Component c)
RootSwingContainer
. If c
is
null
, a null
reference is returned.
c
- the container whose root we wish to find
RootSwingcontainer
public static boolean isValidRootContainer(java.awt.Component c)
Component
is, in fact, a root
Swing container.
c
- the Component
we wish to checkpublic static RootWindow[] getVisibleWindows()
public java.awt.Container getContentPane()
contentPane
object for the wrapped component.
contentPane
propertypublic java.awt.Component getGlassPane()
glassPane
object for the wrapped component.
glassPane
propertypublic javax.swing.JLayeredPane getLayeredPane()
layeredPane
object for the wrapped component.
layeredPane
propertypublic java.awt.Point getLocationOnScreen()
Point
representing the top-left corner of
the component's bounds in the coordinate space of the screen.public java.lang.Integer getMaximizationLayer()
Component
maximization.
Integer
indicating the maximization layer propertypublic java.awt.LayoutManager getMaximizedLayout()
LayoutManager
associated with Component
maximization within the RootSwingContainer
.
LayoutManager
indicating the maximization layout
propertypublic java.awt.Component getRootContainer()
JFrame
, JApplet
,
etc...)
public javax.swing.JRootPane getRootPane()
rootPane
object for the wrapped component.
rootPane
propertypublic void revalidateContentPane()
revalidate()
on the current content
pane if it is a JComponent
. If not, no action is taken.
public void setContentPane(java.awt.Container contentPane)
contentPane
property for the wrapped component.
contentPane
- the contentPane
object for the wrapped componentpublic void setGlassPane(java.awt.Component glassPane)
glassPane
property for the wrapped component.
glassPane
- the glassPane
object for the wrapped componentpublic void setLayeredPane(javax.swing.JLayeredPane layeredPane)
layeredPane
property for the wrapped component.
layeredPane
- the layeredPane
object for the wrapped componentpublic java.awt.Window[] getOwnedWindows()
public void setMaximizationLayer(java.lang.Integer layer)
Component
maximization within the
RootSwingContainer
. If layer
is null
,
DEFAULT_MAXED_LAYER is used instead.
layer
- an Integer
indicating the maximization layer propertypublic void setMaximizedLayout(java.awt.LayoutManager mgr)
LayoutManager
associated with Component
maximization within the RootSwingContainer
.
mgr
- the LayoutManager
associated with Component
maximization within the RootSwingContainer
.protected void setRootContainer(java.awt.Component root)
root
- the new wrapped root containerpublic void updateComponentTreeUI()
public void pack()
public void toFront()
public boolean isActive()
public java.awt.Window getOwner()
public java.awt.Rectangle getBounds()
public void putClientProperty(java.lang.Object key, java.lang.Object value)
public java.lang.Object getClientProperty(java.lang.Object key)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |