|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectbibliothek.gui.dock.station.toolbar.group.ToolbarGroupSpanStrategy<P>
public abstract class ToolbarGroupSpanStrategy<P extends bibliothek.gui.dock.station.support.PlaceholderListItem<bibliothek.gui.Dockable>>
This class keeps track of the currently used Span
s of a ToolbarGroupDockStation
. To
be exact: the class offers a Span
for each gap between columns or lines, and is able to update
the size of the spans when knowing the current drag and drop operation.
Constructor Summary | |
---|---|
ToolbarGroupSpanStrategy(DockablePlaceholderToolbarGrid<P> grid,
ToolbarGroupDockStation station)
Creates a new strategy |
Method Summary | |
---|---|
int |
getColumn(int index)
Gets the size of the gap left of the column index . |
int |
getLine(int column,
int index)
Gets the size of the gap top of the cell index of column . |
protected abstract void |
handleResized()
Called if the size of a Span changed and the station must be resized. |
void |
mutate(int column)
Mutates the Span s to present an insertion into column column . |
void |
mutate(int column,
int line)
Mutates the Span s to present an insertation into column at line . |
void |
reset(boolean force)
Tests which columns and cells currently exist, and may create or delete Span
if necessary. |
void |
setController(bibliothek.gui.DockController controller)
Sets the DockController in whose realm this strategy works, allows to access
the current SpanFactory . |
void |
setDividers(ToolbarGroupDividerStrategy dividers)
Sets the strategy for painting between the Dockable s. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ToolbarGroupSpanStrategy(DockablePlaceholderToolbarGrid<P> grid, ToolbarGroupDockStation station)
grid
- all the columns and theirs cellsstation
- the station that is using this strategyMethod Detail |
---|
public void setDividers(ToolbarGroupDividerStrategy dividers)
Dockable
s. The strategy is required
to find the minimum size of all gaps.
dividers
- the new strategy, can be null
protected abstract void handleResized()
Span
changed and the station must be resized.
public void setController(bibliothek.gui.DockController controller)
DockController
in whose realm this strategy works, allows to access
the current SpanFactory
.
controller
- the new controller, can be null
public void reset(boolean force)
Span
if necessary.
force
- if true
, then the Span
s get recreated even if the number of
columns and lines did not changepublic int getColumn(int index)
index
. If there are n
columns, index=n
will return the size of the right most gap.
index
- the index of a column
public int getLine(int column, int index)
index
of column
. If there
are n
cells, then index=n
will return the size of the bottom most gap.
column
- the column in which to searchindex
- the index of the cell
public void mutate(int column)
Span
s to present an insertion into column column
.
column
- the column where an item is insertedpublic void mutate(int column, int line)
Span
s to present an insertation into column
at line
.
column
- the column where the insertion is happeningline
- the line into which an item is inserted
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |