|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object bibliothek.gui.dock.station.split.SplitDockTree
public class SplitDockTree
Represents the internal tree of a SplitDockStation
. Can be used
to exchange the tree of a SplitDockStation
. Every node or leaf is
represented through a SplitDockTree.Key
. Client code may use these keys to read
data, or create new branches of the tree.
Each node in a SplitDockStation
has a unique identifier. This SplitDockTree
class allows to set this identifier either through SplitDockTree.Key.setNodeId(long)
or
through the non-complex methods (the methods that create only one new key).
Nested Class Summary | |
---|---|
class |
SplitDockTree.Key
A key that represents either a node or a leaf. |
Constructor Summary | |
---|---|
SplitDockTree()
|
Method Summary | |
---|---|
SplitDockTree.Key |
getBottom(SplitDockTree.Key key)
Gets the bottom element of the node key . |
double |
getDivider(SplitDockTree.Key key)
Gets the divider of the node key . |
Dockable[] |
getDockables()
Gets a list of all Dockable s that are known to this tree. |
Dockable[] |
getDockables(SplitDockTree.Key key)
Gets the elements that are represented by the leaf key . |
SplitDockTree.Key |
getLeft(SplitDockTree.Key key)
Gets the left element of the node key . |
PlaceholderMap |
getPlaceholderMap(SplitDockTree.Key key)
Gets the placeholder information of the child DockStation of key . |
Path[] |
getPlaceholders(SplitDockTree.Key key)
Gets the placeholders which are associated with key |
SplitDockTree.Key |
getRight(SplitDockTree.Key key)
Gets the right element of the node key . |
SplitDockTree.Key |
getRoot()
Gets the root of the tree. |
Dockable |
getSelected(SplitDockTree.Key key)
Gets the element that is selected in this leaf. |
SplitDockTree.Key |
getTop(SplitDockTree.Key key)
Gets the top element of the node key . |
SplitDockTree.Key |
horizontal(Dockable left,
Dockable right)
Adds two elements horizontally. |
SplitDockTree.Key |
horizontal(Dockable left,
Dockable right,
double divider)
Adds two elements horizontally. |
SplitDockTree.Key |
horizontal(SplitDockTree.Key left,
SplitDockTree.Key right)
Adds two elements horizontally. |
SplitDockTree.Key |
horizontal(SplitDockTree.Key left,
SplitDockTree.Key right,
double divider)
Adds two elements horizontally. |
SplitDockTree.Key |
horizontal(SplitDockTree.Key left,
SplitDockTree.Key right,
double divider,
long nodeId)
Adds two elements horizontally. |
SplitDockTree.Key |
horizontal(SplitDockTree.Key left,
SplitDockTree.Key right,
double divider,
Path[] placeholders,
PlaceholderMap placeholderMap,
long nodeId)
Adds two elements horizontally. |
boolean |
isDockable(SplitDockTree.Key key)
Tells whether key represents a leaf or not. |
boolean |
isHorizontal(SplitDockTree.Key key)
Tells whether the node key represents a horizontal
or a vertical node. |
boolean |
isNode(SplitDockTree.Key key)
Tells whether key represents a node or not. |
boolean |
isPlaceholder(SplitDockTree.Key key)
Tells whether key contains placeholders |
SplitDockTree.Key |
put(Dockable... dockables)
Creates a key for the set dockables . |
SplitDockTree.Key |
put(Dockable[] dockables,
Dockable selected)
Creates a key for the set dockables . |
SplitDockTree.Key |
put(Dockable[] dockables,
Dockable selected,
long nodeId)
Creates a key for the set dockables . |
SplitDockTree.Key |
put(Dockable[] dockables,
Dockable selected,
Path[] placeholders,
PlaceholderMap placeholderMap,
long nodeId)
Creates a key for the set of dockables or the set of
placeholders . |
SplitDockTree.Key |
put(Dockable dockable,
long nodeId)
Creates a key for the leaf dockable . |
SplitDockTree.Key |
put(Path[] placeholders,
PlaceholderMap placeholderMap)
Creates a key for a placeholder leaf. |
SplitDockTree.Key |
put(Path[] placeholders,
PlaceholderMap placeholderMap,
long nodeId)
Creates a key for a placeholder leaf. |
SplitDockTree.Key |
root(Dockable dockable)
Sets dockable as root, and returns a key to the root. |
SplitDockTree |
root(SplitDockTree.Key key)
Sets key as the root of the tree. |
SplitDockTree.Key |
unroot()
Removes the root of this tree. |
SplitDockTree.Key |
vertical(Dockable top,
Dockable bottom)
Adds two elements vertically. |
SplitDockTree.Key |
vertical(Dockable top,
Dockable bottom,
double divider)
Adds two elements vertically. |
SplitDockTree.Key |
vertical(SplitDockTree.Key top,
SplitDockTree.Key bottom)
Adds two elements vertically. |
SplitDockTree.Key |
vertical(SplitDockTree.Key top,
SplitDockTree.Key bottom,
double divider)
Adds two elements vertically. |
SplitDockTree.Key |
vertical(SplitDockTree.Key top,
SplitDockTree.Key bottom,
double divider,
long nodeId)
Adds two elements vertically. |
SplitDockTree.Key |
vertical(SplitDockTree.Key top,
SplitDockTree.Key bottom,
double divider,
Path[] placeholders,
PlaceholderMap placeholderMap,
long nodeId)
Adds two elements vertically. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SplitDockTree()
Method Detail |
---|
public SplitDockTree.Key root(Dockable dockable)
dockable
as root, and returns a key to the root.
dockable
- the new root
public SplitDockTree.Key unroot()
public SplitDockTree root(SplitDockTree.Key key)
key
as the root of the tree. The root must not have
a parent.
key
- the key which will be the root, null
is not allowed.
this
public SplitDockTree.Key put(Dockable dockable, long nodeId)
dockable
.
dockable
- the element for which a key is requestednodeId
- the unique identifier for this node, can be -1
public SplitDockTree.Key put(Dockable... dockables)
dockables
.
dockables
- the elements for which a key is requested
public SplitDockTree.Key put(Dockable[] dockables, Dockable selected)
dockables
.
dockables
- the elements for which a key is requestedselected
- the element that should be selected, can be null
public SplitDockTree.Key put(Dockable[] dockables, Dockable selected, long nodeId)
dockables
.
dockables
- the elements for which a key is requestedselected
- the element that should be selected, can be null
nodeId
- a unique identifier for this node, may be -1
public SplitDockTree.Key put(Path[] placeholders, PlaceholderMap placeholderMap)
placeholders
- the placeholders to storeplaceholderMap
- placeholder information of a child DockStation
public SplitDockTree.Key put(Path[] placeholders, PlaceholderMap placeholderMap, long nodeId)
placeholders
- the placeholders to storeplaceholderMap
- placeholder information of a child DockStation
nodeId
- the unique identifier of the new node, can be -1
public SplitDockTree.Key put(Dockable[] dockables, Dockable selected, Path[] placeholders, PlaceholderMap placeholderMap, long nodeId)
dockables
or the set of
placeholders
.
dockables
- the elements for which a key is requestedselected
- the element that should be selected, can be null
placeholders
- the placeholders for which a key is requestedplaceholderMap
- placeholder information of a child DockStation
nodeId
- a unique identifier for this node, may be -1
public SplitDockTree.Key horizontal(Dockable left, Dockable right)
left
- the left elementright
- the right element
public SplitDockTree.Key horizontal(Dockable left, Dockable right, double divider)
left
- the left elementright
- the right elementdivider
- how much space the first element gets in respect
to the second element. Must be between 0 and 1.
public SplitDockTree.Key horizontal(SplitDockTree.Key left, SplitDockTree.Key right)
left
- the left elementright
- the right element
public SplitDockTree.Key horizontal(SplitDockTree.Key left, SplitDockTree.Key right, double divider)
left
- the left elementright
- the right elementdivider
- how much space the first element gets in respect
to the second element. Must be between 0 and 1.
public SplitDockTree.Key horizontal(SplitDockTree.Key left, SplitDockTree.Key right, double divider, long nodeId)
left
- the left elementright
- the right elementdivider
- how much space the first element gets in respect
to the second element. Must be between 0 and 1.nodeId
- a unique identifier for this node, may be -1
public SplitDockTree.Key horizontal(SplitDockTree.Key left, SplitDockTree.Key right, double divider, Path[] placeholders, PlaceholderMap placeholderMap, long nodeId)
left
- the left elementright
- the right elementdivider
- how much space the first element gets in respect
to the second element. Must be between 0 and 1.placeholders
- placeholders that are associated with this nodesplaceholderMap
- placeholder information of a child DockStation
nodeId
- a unique identifier for this node, may be -1
public SplitDockTree.Key vertical(Dockable top, Dockable bottom)
top
- the top elementbottom
- the bottom element
public SplitDockTree.Key vertical(Dockable top, Dockable bottom, double divider)
top
- the top elementbottom
- the bottom elementdivider
- how much space the first element gets in respect
to the second element. Must be between 0 and 1.
public SplitDockTree.Key vertical(SplitDockTree.Key top, SplitDockTree.Key bottom)
top
- the top elementbottom
- the bottom element
public SplitDockTree.Key vertical(SplitDockTree.Key top, SplitDockTree.Key bottom, double divider)
top
- the top elementbottom
- the bottom elementdivider
- how much space the first element gets in respect
to the second element. Must be between 0 and 1.
public SplitDockTree.Key vertical(SplitDockTree.Key top, SplitDockTree.Key bottom, double divider, long nodeId)
top
- the top elementbottom
- the bottom elementdivider
- how much space the first element gets in respect
to the second element. Must be between 0 and 1.nodeId
- a unique identifier for this node, may be -1
public SplitDockTree.Key vertical(SplitDockTree.Key top, SplitDockTree.Key bottom, double divider, Path[] placeholders, PlaceholderMap placeholderMap, long nodeId)
top
- the top elementbottom
- the bottom elementdivider
- how much space the first element gets in respect
to the second element. Must be between 0 and 1.placeholders
- placeholders that are associated with this nodeplaceholderMap
- placeholder information of a child DockStation
nodeId
- a unique identifier for this node, may be -1
public SplitDockTree.Key getRoot()
null
public boolean isDockable(SplitDockTree.Key key)
key
represents a leaf or not.
key
- the key to test
true
if key
is a leafpublic boolean isNode(SplitDockTree.Key key)
key
represents a node or not.
key
- the key to test
true
if key
is a nodepublic boolean isPlaceholder(SplitDockTree.Key key)
key
contains placeholders
key
- some node or leaf
true
if there are placeholderspublic Path[] getPlaceholders(SplitDockTree.Key key)
key
key
- some node or leaf
null
public PlaceholderMap getPlaceholderMap(SplitDockTree.Key key)
DockStation
of key
.
key
- some node or leaf
null
public Dockable[] getDockables()
Dockable
s that are known to this tree.
public Dockable[] getDockables(SplitDockTree.Key key)
key
.
key
- the leaf
null
public Dockable getSelected(SplitDockTree.Key key)
key
- the leaf
null
public boolean isHorizontal(SplitDockTree.Key key)
key
represents a horizontal
or a vertical node.
key
- the node
true
if the elements are laid out horizontally,
false
if the are verticallypublic SplitDockTree.Key getLeft(SplitDockTree.Key key)
key
.
key
- the node
public SplitDockTree.Key getRight(SplitDockTree.Key key)
key
.
key
- the node
public SplitDockTree.Key getTop(SplitDockTree.Key key)
key
.
key
- the node
public SplitDockTree.Key getBottom(SplitDockTree.Key key)
key
.
key
- the node
public double getDivider(SplitDockTree.Key key)
key
.
key
- the node
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |