|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface CompositeDock
This is a Dock
that can contain other child docks.
Information on using composite docks is in How to Use Composite Docks in The Sanaware Developer Guide.
Child docks can be added. They can not be removed explicitly. When a child dock is empty, the method
emptyChild(Dock)
of the composite parent dock has to be called. The parent dock can then remove the child.
Dockables can also be added with the method Dock.addDockable(com.javadocking.dockable.Dockable, java.awt.Point, java.awt.Point)
.
When this dockable is added, a child dock is created with the child dock factory, retrieved by
getChildDockFactory()
. The dockable is added to this child dock, and the child dock is added to this composite dock.
Field Summary | |
---|---|
static java.lang.String |
CHILD_DOCK_PREFIX
The name childDock that will be used to create property names for specifying properties of child docks. |
Method Summary | |
---|---|
void |
addChildDock(Dock dock,
Position position)
Adds the given dock as child dock at the given position. |
void |
clearGhosts()
Clears the ghost child docks from this dock. |
void |
emptyChild(Dock childDock)
Is called when the specified child dock is empty. |
Dock |
getChildDock(int index)
Gets the child dock with the specified index. |
int |
getChildDockCount()
Gets the number of child docks of this dock. |
DockFactory |
getChildDockFactory()
Gets the factory that creates the child docks for this composite dock. |
Position |
getChildDockPosition(Dock childDock)
Gets the position, where the child dock is docked in this dock. |
void |
ghostChild(Dock childDock)
Makes the given empty child dock invisible. |
void |
setChildDockFactory(DockFactory dockFactory)
Sets the factory that creates the child docks for this composite dock. |
Methods inherited from interface com.javadocking.dock.Dock |
---|
addDockable, addDockingListener, getDockPriority, getParentDock, isEmpty, isFull, loadProperties, removeDockingListener, retrieveDockingRectangle, saveProperties, setParentDock |
Field Detail |
---|
static final java.lang.String CHILD_DOCK_PREFIX
Method Detail |
---|
void addChildDock(Dock dock, Position position) throws java.lang.IllegalStateException
Adds the given dock as child dock at the given position.
If there is already a dock at the given position, the child is added at the first free position. If the given position is illegal, then the dock is added at the first free position.
dock
- The new child dock for this dock.position
- The position for the child dock.
java.lang.IllegalStateException
- If the dock is full.void emptyChild(Dock childDock)
childDock
- The child dock that is empty.void ghostChild(Dock childDock)
childDock
- The child dock that is empty, but not may be removed.void clearGhosts()
int getChildDockCount()
Dock getChildDock(int index) throws java.lang.IndexOutOfBoundsException
index
- The index of the child dock.
java.lang.IndexOutOfBoundsException
- If the index is out of range (index < 0 || index >= getChildDockCount()).Position getChildDockPosition(Dock childDock) throws java.lang.IllegalArgumentException
childDock
- The dockable that is docked in this dock.
java.lang.IllegalArgumentException
- If the given dock is not docked in this dock.DockFactory getChildDockFactory()
void setChildDockFactory(DockFactory dockFactory)
dockFactory
- The factory that creates the child docks for this composite dock.
java.lang.IllegalArgumentException
- When the child dock factory is null.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |