|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.javadocking.util.DockingUtil
public class DockingUtil
This class contains a collection of static utility methods for docking.
Method Summary | |
---|---|
static boolean |
contains(LeafDock leafDock,
Dockable dockabe)
Determines if the given dockable is docked in the given leaf dock. |
static boolean |
containsDock(Dock rootDock,
Dock dock)
Tries to find the dock in the dock tree with the given dock as root. |
static Dockable |
createDockable(Dock dock)
Creates one dockable with the dockables of a dock. |
static java.awt.Dimension |
getCompositeDockablePreferredSize(CompositeDockable compositeDockable,
int dockingMode)
Computes the preferred size of a composite dockable. |
static Dock |
getFloatChildDock(Dock dock)
Searches the ancestor of the given dock that is the child of the root FloatDock . |
static java.lang.String |
getFloatRootDockKey(java.awt.Window owner)
Gets the key of the root dock that is a FloatDock of the given owner window in the dock model. |
static Dock |
getRootDock(Dock dock)
Gets the root dock of the dock tree that contains the given dock. |
static java.lang.String |
getRootDockKey(Dock rootDock)
Gets the key of the given root dock in the dock model of the docking manager. |
static java.awt.Window |
getWindowOwner(java.lang.String rootDockKey)
Gets the owner window that owns the root dock with the specified key. |
static void |
removeEmptyChildren(CompositeDock compositeDock)
Removes the empty child docks from the tree with the given dock as root. |
static Dockable |
retrieveDockableOfDockModel(java.lang.String dockableID)
Gets the dockable with the given ID, that is docked in a dock of the DockModel
or that is visualized in a visualizer of the dock model. |
static void |
retrieveDockables(Dockable rootDockable,
java.util.List dockables)
Retrieves all the leaf dockables of the dockable tree with the given dockable as root dockable. |
static void |
retrieveDockables(Dock rootDock,
java.util.List dockables)
Retrieves the dockables that are contained by all the docks that are in the dock tree with the given dock as root dock. |
static Dock |
searchDock(Dock rootDock,
Dockable dockable)
Tries to find the dock that contains the given dockable in the dock tree with the given dock as root. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static boolean contains(LeafDock leafDock, Dockable dockabe)
leafDock
- The leaf dock.dockabe
- The dockable. May be a CompositeDockable
, even a deeper nested.
public static java.lang.String getFloatRootDockKey(java.awt.Window owner)
FloatDock
of the given owner window in the dock model.
owner
- The owner of the float dock in the dock model model.
public static Dockable retrieveDockableOfDockModel(java.lang.String dockableID)
DockModel
or that is visualized in a visualizer of the dock model.
dockableID
- The ID of the dockable.
public static void removeEmptyChildren(CompositeDock compositeDock)
CompositeDock
.
compositeDock
- The dock from which the empty children will be removed.public static Dock searchDock(Dock rootDock, Dockable dockable)
rootDock
- The root dock of the tree of docks where the dockable will be searched.dockable
- The dockable that is searched.
public static void retrieveDockables(Dock rootDock, java.util.List dockables)
rootDock
- The root dock of the dock tree.dockables
- The list to which all the dockables are added.public static void retrieveDockables(Dockable rootDockable, java.util.List dockables)
rootDockable
- The root dockable of the dockable tree.dockables
- The list to which all the leaf dockables are added.public static Dock getRootDock(Dock dock)
dock
- The given dock.
public static Dock getFloatChildDock(Dock dock)
FloatDock
.
If the root dock of the given dock is not a float dock, null is returned.
dock
- The given dock.
public static Dockable createDockable(Dock dock)
Creates one dockable with the dockables of a dock.
there are the following possible results:
LeafDock
with no children, null is returned.LeafDock
with 1 child, this child is returned.LeafDock
with more than 1 child, a CompositeDockable
is created
with the given dock as parent.CompositeDock
, a CompositeDockable
is created. If all
the dockables have the same parent dock, this composite dockable will have this parent.
Otherwise the parent will be set to null. CompositeDock
, but there is no child dock that has dockables,
in that case null is returned.
dock
- The dock for which a dockable is created.
public static java.awt.Dimension getCompositeDockablePreferredSize(CompositeDockable compositeDockable, int dockingMode)
compositeDockable
- The composite dockable whose preferred size is computed.dockingMode
- This should be DockingMode.TAB, DockingMode.GRID, DockingMode.HORIZONTAL_LINE or DockingMode.VERTICAL_LINE.
public static java.lang.String getRootDockKey(Dock rootDock)
rootDock
- A root dock of the dock model for which the key is searched.
java.lang.IllegalArgumentException
- If the given dock is not a root dock.public static java.awt.Window getWindowOwner(java.lang.String rootDockKey)
rootDockKey
- The key of the root dock for which the owner is retrieved.
public static boolean containsDock(Dock rootDock, Dock dock)
rootDock
- The root dock of the tree of docks where the dock will be searched.dock
- The dock that is searched.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |