bibliothek.gui.dock
Interface DockableProperty

All Known Implementing Classes:
AbstractDockableProperty, FlapDockProperty, ScreenDockProperty, SplitDockProperty, StackDockProperty

public interface DockableProperty

Describes the location of a Dockable on a DockStation. The properties can be nested, that describes the fact that DockStations can be Dockables itself.
A DockableProperty should not have any reference to its Dockable or its DockStation.

Author:
Benjamin Sigg

Method Summary
 String getFactoryID()
          Gest the unique name of the DockablePropertyFactory which can create this type of DockableProperty.
 DockableProperty getSuccessor()
          Gets the property which should be used for the child of this dockable DockStation.
 void load(DataInputStream in)
          Reads the contents of this DockableProperty from a stream.
 void setSuccessor(DockableProperty properties)
          Sets the property which will be used if this property was used and there is not yet a leaf in the tree of DockStations and Dockables reached.
 void store(DataOutputStream out)
          Stores the contents of this DockableProperty in a stream.
 

Method Detail

getSuccessor

DockableProperty getSuccessor()
Gets the property which should be used for the child of this dockable DockStation.

Returns:
the property for the child, or null
See Also:
setSuccessor(DockableProperty)

setSuccessor

void setSuccessor(DockableProperty properties)
Sets the property which will be used if this property was used and there is not yet a leaf in the tree of DockStations and Dockables reached.
For example: there is a DockStation root, a dockable DockStation node which is a child of root and a Dockable leaf which is a child of node.
A DockableProperty called one would describe the relationship between root and node. Another DockableProperty called two would describe the relationship between node and leaf. In this case, the successor of one would be two.

Parameters:
properties - the location of a child

getFactoryID

String getFactoryID()
Gest the unique name of the DockablePropertyFactory which can create this type of DockableProperty.

Returns:
the id
See Also:
DockablePropertyFactory

store

void store(DataOutputStream out)
           throws IOException
Stores the contents of this DockableProperty in a stream. The successor (if there is one) must not be saved.

Parameters:
out - the stream to write in
Throws:
IOException - if anything unexpected happens

load

void load(DataInputStream in)
          throws IOException
Reads the contents of this DockableProperty from a stream. The property can assume that a property with the same type has written into the stream.

Parameters:
in - the stream to read
Throws:
IOException - if anything unexpected happens