public class WizardSpanStrategy
extends java.lang.Object
WizardSpanStrategy
keeps track of the required Span
s for a WizardSplitDockStation
and adds or removes Span
s when necessary.Constructor and Description |
---|
WizardSpanStrategy(WizardSplitDockStation station) |
Modifier and Type | Method and Description |
---|---|
int |
getGap()
Gets the size of the currently selected
Span according to
setPut(PutInfo) . |
int |
getGap(int column)
Gets the size of the gap left of
column . |
int |
getGap(int column,
int cell)
Gets the size of the gap between
cell and its predecessor. |
int |
getGap(bibliothek.gui.dock.station.split.Node node,
WizardNodeMap map)
Gets the size of the gap that is currently to be used by
node |
protected int |
getSize(bibliothek.gui.dock.station.span.Span span)
Gets the current size of
span . |
void |
reset()
Deletes and recreates all spans.
|
void |
setController(bibliothek.gui.DockController controller)
Updates the current
SpanFactory if necessary. |
void |
setPut(bibliothek.gui.dock.station.split.PutInfo info)
Mutates the
Span s such that info shows up. |
void |
unsetPut()
Immediately resets all
Span s to have a size of 0 . |
public WizardSpanStrategy(WizardSplitDockStation station)
public void setController(bibliothek.gui.DockController controller)
SpanFactory
if necessary.controller
- the realm in which this strategy should workpublic void reset()
public void setPut(bibliothek.gui.dock.station.split.PutInfo info)
Span
s such that info
shows up.info
- the current drop information or null
public void unsetPut()
Span
s to have a size of 0
.public int getGap()
Span
according to
setPut(PutInfo)
. If there is no Span
selected, then
this method returns the standard size of a gap.public int getGap(int column)
column
.column
- the column whose gap to its predecessor is requestedpublic int getGap(int column, int cell)
cell
and its predecessor.column
- the column in which to searchcell
- the cell to searchcell
protected int getSize(bibliothek.gui.dock.station.span.Span span)
span
. May be overridden by subclasses to influence the
size of a span.span
- the size of span
public int getGap(bibliothek.gui.dock.station.split.Node node, WizardNodeMap map)
node
node
- the node whose inner gap is requestedmap
- detailed information about the layout of this station