|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface DockingPath
Implementations of this interface keep the information about one path in a
tree structure of Dock
s and Dockable
s.
Information on using docking paths is in How to Use Docking Paths in The Sanaware Developer Guide.
This path can be an existing path in a DockModel
. It can be also a path that describes how a dockable that is
removed from the model was docked before. With this information the structure can be rebuild as
good as possible, when the dockable will be added again.
A dock model can contain several docking trees. This docking path contains also information to identify a root dock of such a tree.
A dockable that is docked in a LeafDock
has a specific position
in that dock. A dock that is docked in another
CompositeDock
has also a position.
This docking path contains also this information.
Method Summary | |
---|---|
Dock |
getDock(int index)
Gets the dock with the given index in the path. |
int |
getDockCount()
Gets the number of docks in the path. |
java.lang.String |
getID()
Gets the ID of this docking path. |
Position |
getPositionInDock(int index)
Gets the position of the dockable or child dock in the dock with the given index in the path. |
java.lang.String |
getRootDockKey()
Gets the key of the root dock of this path in the DockModel . |
void |
loadProperties(java.lang.String prefix,
java.util.Properties properties,
java.util.Map docks)
Loads the properties for this docking path. |
void |
saveProperties(java.lang.String prefix,
java.util.Properties properties,
java.util.Map dockKeys)
Saves the properties of this docking path in the given properties object. |
Method Detail |
---|
java.lang.String getID()
Dockable
in a DockModel
. The ID of this docking path can be the ID of this dockable, but this is not obligatory.
java.lang.String getRootDockKey()
DockModel
.
The path belongs to a dock tree. This key defines the root of this tree in the dock model.
int getDockCount()
Dock getDock(int index)
Gets the dock with the given index in the path.
The root dock has index 0. The dock with index getDockCount() - 1
can be a
LeafDock
, but this is not obligatory. The other docks are
CompositeDock
s.
index
- The index of the dock in the path.
java.lang.IndexOutOfBoundsException
- If the index is out of range (index < 0 || index >= getDockCount()).Position getPositionInDock(int index)
index
- The index of the dock in the path.
index + 1
in the dock with index
index
if the given index is smaller than getDockCount() - 1
.
The last position is usually the position of the dockable in the deepest dock of the path, if this
deepest dock is a leaf dock. Not null.
java.lang.IndexOutOfBoundsException
- If the index is out of range (index < 0 || index >= getDockCount()).void saveProperties(java.lang.String prefix, java.util.Properties properties, java.util.Map dockKeys)
Saves the properties of this docking path in the given properties object.
The property names for this docking path should start with the given prefix.
prefix
- The prefix for the property names.properties
- The properties object to which the properties should be added.dockKeys
- A mapping between the docks that are already saved and the keys that are used for the save.
Dock
).void loadProperties(java.lang.String prefix, java.util.Properties properties, java.util.Map docks)
Loads the properties for this docking path. The properties can be found in the given properties object and the property names start with the given prefix.
The docks that should be used inside this docking path can be found in the given docks mapping.
This method should be called after the empty constructor to create the content of the docking path. Don't call this method for a docking path that already has a content.
prefix
- The prefix of the names of the properties that have been intended for this docking path.properties
- The properties object that contains the properties for this docking path. It can contain also
properties for other objects, but they will have another prefix.docks
- A mapping between the dock keys of the docks that are already loaded and the docks.
Dock
).
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |