org.flexdock.util
public class RootWindow extends Object
JFrame, JApplet,
JWindow, and JDialog without making an outward distinction
between the different container types. This is accomplished by wrapping the
root component.| Modifier and Type | Field and Description |
|---|---|
static Integer |
DEFAULT_MAXED_LAYER |
| Modifier | Constructor and Description |
|---|---|
protected |
RootWindow(Component root)
Creates a new
RootSwingContainer wrapping the specified
component. |
| Modifier and Type | Method and Description |
|---|---|
Rectangle |
getBounds() |
Object |
getClientProperty(Object key) |
Container |
getContentPane()
Returns the
contentPane object for the wrapped component. |
Component |
getGlassPane()
Returns the
glassPane object for the wrapped component. |
JLayeredPane |
getLayeredPane()
Returns the
layeredPane object for the wrapped component. |
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.
|
Integer |
getMaximizationLayer()
Deprecated.
dead code last used in 0.2.0
|
LayoutManager |
getMaximizedLayout()
Deprecated.
dead code last used in 0.2.0
|
Window[] |
getOwnedWindows()
Return an array containing all the windows this window currently owns.
|
Window |
getOwner() |
Component |
getRootContainer()
Returns the the wrapped component.
|
static RootWindow |
getRootContainer(Component c)
Traverses the container hierarchy to locate the root container and
returns corresponding
RootSwingContainer. |
JRootPane |
getRootPane()
Returns the
rootPane object for the wrapped component. |
static RootWindow[] |
getVisibleWindows() |
boolean |
isActive() |
static boolean |
isValidRootContainer(Component c)
Indicates whether the supplied
Component is, in fact, a root
Swing container. |
void |
pack() |
void |
putClientProperty(Object key,
Object value) |
void |
revalidateContentPane()
Convenience method that calls
revalidate() on the current content
pane if it is a JComponent. |
void |
setContentPane(Container contentPane)
Sets the
contentPane property for the wrapped component. |
void |
setGlassPane(Component glassPane)
Sets the
glassPane property for the wrapped component. |
void |
setLayeredPane(JLayeredPane layeredPane)
Sets the
layeredPane property for the wrapped component. |
void |
setMaximizationLayer(Integer layer)
Deprecated.
dead code last used in 0.2.0
|
void |
setMaximizedLayout(LayoutManager mgr)
Deprecated.
dead code last used in 0.2.0
|
protected void |
setRootContainer(Component root)
Sets the wrapped root container.
|
void |
toFront() |
void |
updateComponentTreeUI() |
public static final Integer DEFAULT_MAXED_LAYER
protected RootWindow(Component root)
RootSwingContainer wrapping the specified
component.public static RootWindow getRootContainer(Component c)
RootSwingContainer. If c is
null, a null reference is returned.c - the container whose root we wish to findRootSwingcontainerpublic static boolean isValidRootContainer(Component c)
Component is, in fact, a root
Swing container.c - the Component we wish to checkpublic static RootWindow[] getVisibleWindows()
public Container getContentPane()
contentPane object for the wrapped component.contentPane propertypublic Component getGlassPane()
glassPane object for the wrapped component.glassPane propertypublic JLayeredPane getLayeredPane()
layeredPane object for the wrapped component.layeredPane propertypublic Point getLocationOnScreen()
Point representing the top-left corner of
the component's bounds in the coordinate space of the screen.public Integer getMaximizationLayer()
Component maximization.Integer indicating the maximization layer propertypublic LayoutManager getMaximizedLayout()
LayoutManager associated with Component
maximization within the RootSwingContainer.LayoutManager indicating the maximization layout
propertypublic Component getRootContainer()
JFrame, JApplet,
etc...)public 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(Container contentPane)
contentPane property for the wrapped component.contentPane - the contentPane object for the wrapped componentpublic void setGlassPane(Component glassPane)
glassPane property for the wrapped component.glassPane - the glassPane object for the wrapped componentpublic void setLayeredPane(JLayeredPane layeredPane)
layeredPane property for the wrapped component.layeredPane - the layeredPane object for the wrapped componentpublic Window[] getOwnedWindows()
public void setMaximizationLayer(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(LayoutManager mgr)
LayoutManager associated with Component
maximization within the RootSwingContainer.mgr - the LayoutManager associated with Component
maximization within the RootSwingContainer.protected void setRootContainer(Component root)
root - the new wrapped root containerpublic void updateComponentTreeUI()
public void pack()
public void toFront()
public boolean isActive()
public Window getOwner()
public Rectangle getBounds()