public class SplitPlaceholderConverter extends AbstractSplitPlaceholderConverter<SplitDockStation,SplitNode,Dockable>
SplitDockStation
, provides the implementation of SplitDockStation.getPlaceholders()
and SplitDockStation.setPlaceholders(PlaceholderMap)
Constructor and Description |
---|
SplitPlaceholderConverter(SplitDockStation station)
Creates a new converter
|
Modifier and Type | Method and Description |
---|---|
protected SplitDockTree<Dockable> |
createTree()
Creates a new
SplitDockTree which will be used for AbstractSplitPlaceholderConverter.dropTree(Object, SplitDockTree) . |
protected void |
dropTree(SplitDockStation station,
SplitDockTree<Dockable> tree)
Updates
station such that its layout looks as described by tree . |
protected double |
getDivider(SplitNode node)
Gets the divider location of the
intermediate node node . |
protected Dockable |
getDockable(SplitNode leaf)
Gets the dockable of the
leaf node leaf . |
protected long |
getId(SplitNode node)
Gets the unique identifier that was assigned to
node . |
protected SplitNode |
getLeftChild(SplitNode node)
Gets the left child of the
intermediate node node . |
protected SplitDockStation.Orientation |
getOrientation(SplitNode node)
Gets the orientation of the
intermediate node node . |
protected Path |
getPlaceholderFor(Dockable dockable)
Gets a placeholder that is to be used for
dockable . |
protected PlaceholderMap |
getPlaceholderMap(SplitNode node)
Gets the
PlaceholderMap which is associated with node . |
protected Path[] |
getPlaceholders(SplitNode node)
Gets all placeholders that are associated with
node . |
protected PlaceholderStrategy |
getPlaceholderStrategy(SplitDockStation station)
Gets the
PlaceholderStrategy that is used by station to filter
its children. |
protected SplitNode |
getRightChild(SplitNode node)
Gets the right child of the
intermediate node node . |
protected SplitNode |
getRoot(SplitDockStation station)
Gets the root node of the tree that describes the layout of
station . |
protected SplitNode |
getRootChild(SplitNode root)
Gets the child of the
root node root . |
protected boolean |
isLeaf(SplitNode node)
Tells whether
node is a leaf node. |
protected boolean |
isNode(SplitNode node)
Tells whether
node is an intermediate node. |
protected boolean |
isPlaceholder(SplitNode node)
Tells whether
node is a placeholder node. |
protected boolean |
isRoot(SplitNode node)
Tells whether
node is a root node. |
getPlaceholders, getStation, setPlaceholders
public SplitPlaceholderConverter(SplitDockStation station)
station
- the station for which the converter will be usedprotected SplitNode getRoot(SplitDockStation station)
AbstractSplitPlaceholderConverter
station
.getRoot
in class AbstractSplitPlaceholderConverter<SplitDockStation,SplitNode,Dockable>
station
- the station whose root node is searchedprotected PlaceholderStrategy getPlaceholderStrategy(SplitDockStation station)
AbstractSplitPlaceholderConverter
PlaceholderStrategy
that is used by station
to filter
its children.getPlaceholderStrategy
in class AbstractSplitPlaceholderConverter<SplitDockStation,SplitNode,Dockable>
station
- the station whose PlaceholderStrategy
is searchedprotected SplitDockTree<Dockable> createTree()
AbstractSplitPlaceholderConverter
SplitDockTree
which will be used for AbstractSplitPlaceholderConverter.dropTree(Object, SplitDockTree)
.createTree
in class AbstractSplitPlaceholderConverter<SplitDockStation,SplitNode,Dockable>
null
protected void dropTree(SplitDockStation station, SplitDockTree<Dockable> tree)
AbstractSplitPlaceholderConverter
station
such that its layout looks as described by tree
.dropTree
in class AbstractSplitPlaceholderConverter<SplitDockStation,SplitNode,Dockable>
station
- the station whose layout gets updatedtree
- the new layoutprotected boolean isLeaf(SplitNode node)
AbstractSplitPlaceholderConverter
node
is a leaf node.isLeaf
in class AbstractSplitPlaceholderConverter<SplitDockStation,SplitNode,Dockable>
node
- the node to checktrue
if node
is a leaf nodeprotected boolean isNode(SplitNode node)
AbstractSplitPlaceholderConverter
node
is an intermediate node.isNode
in class AbstractSplitPlaceholderConverter<SplitDockStation,SplitNode,Dockable>
node
- the node to checktrue
if node
is an intermediate nodeprotected boolean isPlaceholder(SplitNode node)
AbstractSplitPlaceholderConverter
node
is a placeholder node.isPlaceholder
in class AbstractSplitPlaceholderConverter<SplitDockStation,SplitNode,Dockable>
node
- the node to checktrue
if node
is a placeholder nodeprotected boolean isRoot(SplitNode node)
AbstractSplitPlaceholderConverter
node
is a root node.isRoot
in class AbstractSplitPlaceholderConverter<SplitDockStation,SplitNode,Dockable>
node
- the node to checktrue
if node
is a root nodeprotected Path[] getPlaceholders(SplitNode node)
AbstractSplitPlaceholderConverter
node
.getPlaceholders
in class AbstractSplitPlaceholderConverter<SplitDockStation,SplitNode,Dockable>
node
- the node whose placeholders are searchedprotected PlaceholderMap getPlaceholderMap(SplitNode node)
AbstractSplitPlaceholderConverter
PlaceholderMap
which is associated with node
.getPlaceholderMap
in class AbstractSplitPlaceholderConverter<SplitDockStation,SplitNode,Dockable>
node
- the node whose PlaceholderMap
is searchednull
protected long getId(SplitNode node)
AbstractSplitPlaceholderConverter
node
.getId
in class AbstractSplitPlaceholderConverter<SplitDockStation,SplitNode,Dockable>
node
- some node whose id is searchedprotected double getDivider(SplitNode node)
AbstractSplitPlaceholderConverter
intermediate node
node
.getDivider
in class AbstractSplitPlaceholderConverter<SplitDockStation,SplitNode,Dockable>
node
- an intermediate nodenode
protected SplitDockStation.Orientation getOrientation(SplitNode node)
AbstractSplitPlaceholderConverter
intermediate node
node
.getOrientation
in class AbstractSplitPlaceholderConverter<SplitDockStation,SplitNode,Dockable>
node
- an intermediate nodenode
protected Dockable getDockable(SplitNode leaf)
AbstractSplitPlaceholderConverter
leaf node
leaf
.getDockable
in class AbstractSplitPlaceholderConverter<SplitDockStation,SplitNode,Dockable>
leaf
- a leaf nodeleaf
protected SplitNode getLeftChild(SplitNode node)
AbstractSplitPlaceholderConverter
intermediate node
node
.getLeftChild
in class AbstractSplitPlaceholderConverter<SplitDockStation,SplitNode,Dockable>
node
- an intermediate nodenode
protected SplitNode getRightChild(SplitNode node)
AbstractSplitPlaceholderConverter
intermediate node
node
.getRightChild
in class AbstractSplitPlaceholderConverter<SplitDockStation,SplitNode,Dockable>
node
- an intermediate nodenode
protected SplitNode getRootChild(SplitNode root)
AbstractSplitPlaceholderConverter
root node
root
.getRootChild
in class AbstractSplitPlaceholderConverter<SplitDockStation,SplitNode,Dockable>
root
- a root noderoot
protected Path getPlaceholderFor(Dockable dockable)
AbstractSplitPlaceholderConverter
dockable
.getPlaceholderFor
in class AbstractSplitPlaceholderConverter<SplitDockStation,SplitNode,Dockable>
dockable
- some item whose placeholder is searchednull