public abstract class WizardNodeMap
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
class |
WizardNodeMap.Cell
|
class |
WizardNodeMap.Column
A column is a set of
WizardNodeMap.Cell s. |
Constructor and Description |
---|
WizardNodeMap(WizardSplitDockStation station,
PersistentColumn[] persistentColumns)
Creates a new map using the current content of
station |
Modifier and Type | Method and Description |
---|---|
WizardNodeMap.Column |
getColumn(bibliothek.gui.Dockable dockable)
Gets the column which contains
dockable . |
WizardNodeMap.Column |
getColumn(int index)
Gets the
index 'th column. |
WizardNodeMap.Column |
getColumn(bibliothek.gui.dock.station.split.SplitNode node)
Searches the column which contains
node . |
WizardNodeMap.Column |
getColumn(bibliothek.gui.dock.station.split.SplitNode node,
boolean upwards)
Gets the
WizardNodeMap.Column which contains node . |
int |
getColumnCount()
Gets the number of columns.
|
java.util.Map<bibliothek.gui.dock.station.split.SplitNode,WizardNodeMap.Column> |
getColumns()
Gets all the columns of this map.
|
PersistentCell |
getHeadCell(bibliothek.gui.dock.station.split.SplitNode node)
Follows the tree downwards using the
right path until a Leaf
is found, the cell matching that leaf is returned. |
WizardNodeMap.Column |
getHeadColumn(bibliothek.gui.dock.station.split.SplitNode node)
Searches the
WizardNodeMap.Column which is nearest to the inside of the parent Container ,
e.g. |
bibliothek.gui.dock.station.split.Leaf[] |
getLastLeafOfColumns()
Goes through all
WizardNodeMap.Column s all collects the last cell of these columns. |
WizardNodeMap.Column |
getOutermostColumn()
Searches the
WizardNodeMap.Column which is closest to the inside of the parent Container . |
PersistentColumn |
getPersistentColumn(int index)
|
PersistentColumn[] |
getPersistentColumns() |
WizardNodeMap.Column[] |
getSortedColumns()
Gets all the columns sorted by their
index . |
protected abstract void |
handlePersistentColumnsAdapted(PersistentColumn[] persistentColumns)
Called if the current set of
PersistentColumn s has been changed. |
boolean |
isColumnRoot(bibliothek.gui.dock.station.split.SplitNode node)
Tells whether
node is the root node of a WizardNodeMap.Column . |
boolean |
isHeaderLevel(bibliothek.gui.dock.station.split.SplitNode node)
Tells whether
node is part of the header. |
boolean |
isHeaderLevel(bibliothek.gui.dock.station.split.SplitNode node,
boolean recursive)
Tells whether
node is part of the header. |
public WizardNodeMap(WizardSplitDockStation station, PersistentColumn[] persistentColumns)
station
station
- the station whose content is to be analyzedpersistentColumns
- the current columns and their current sizepublic java.util.Map<bibliothek.gui.dock.station.split.SplitNode,WizardNodeMap.Column> getColumns()
public int getColumnCount()
public WizardNodeMap.Column getColumn(int index)
index
'th column.index
- the index of the columnjava.lang.IndexOutOfBoundsException
- if index
does not point to a columnpublic WizardNodeMap.Column[] getSortedColumns()
index
.public boolean isColumnRoot(bibliothek.gui.dock.station.split.SplitNode node)
node
is the root node of a WizardNodeMap.Column
.node
- the node to checknode
is the root of a WizardNodeMap.Column
public boolean isHeaderLevel(bibliothek.gui.dock.station.split.SplitNode node)
node
is part of the header. The header includes all
nodes whose orientation is orthogonal to the orientation of the layout.node
- the node to checknode
belongs to the headerpublic boolean isHeaderLevel(bibliothek.gui.dock.station.split.SplitNode node, boolean recursive)
node
is part of the header. If recursive
is
true
, then this node is considered to be part of the header if the parent
node is part of the header (but the recursive
attribute does not apply to the parent).node
- the node to checkrecursive
- whether to check the parent node as wellnode
belongs to the headerpublic WizardNodeMap.Column getOutermostColumn()
WizardNodeMap.Column
which is closest to the inside of the parent Container
.public WizardNodeMap.Column getHeadColumn(bibliothek.gui.dock.station.split.SplitNode node)
WizardNodeMap.Column
which is nearest to the inside of the parent Container
,
e.g. is WizardSplitDockStation.Side
is WizardSplitDockStation.Side.RIGHT
, then this method would return the left most
WizardNodeMap.Column
.node
- the node in whose subtree the WizardNodeMap.Column
should be searchednull
if not foundpublic PersistentCell getHeadCell(bibliothek.gui.dock.station.split.SplitNode node)
right
path until a Leaf
is found, the cell matching that leaf is returned.node
- the starting point of the searchnull
public WizardNodeMap.Column getColumn(bibliothek.gui.dock.station.split.SplitNode node)
node
. If node
is part of
the header, then the result represents the column at the right side of the divider.node
- the node whose column index is searchednull
public WizardNodeMap.Column getColumn(bibliothek.gui.dock.station.split.SplitNode node, boolean upwards)
WizardNodeMap.Column
which contains node
.node
- the node whose column is searchedupwards
- if false
, then node
has to be a isColumnRoot(SplitNode)
, otherwise
it can be a child of a column root as well.null
public WizardNodeMap.Column getColumn(bibliothek.gui.Dockable dockable)
dockable
.dockable
- the element to searchdockable
public bibliothek.gui.dock.station.split.Leaf[] getLastLeafOfColumns()
WizardNodeMap.Column
s all collects the last cell of these columns.WizardNodeMap.Column
public PersistentColumn getPersistentColumn(int index)
index
- the index of the columnnull
if not foundpublic PersistentColumn[] getPersistentColumns()
protected abstract void handlePersistentColumnsAdapted(PersistentColumn[] persistentColumns)
PersistentColumn
s has been changed.persistentColumns
- the new set of persistent columns