public class ToolbarGroupDockStation extends AbstractToolbarDockStation
Dockable
and a DockStation
which stands a group of
ToolbarDockStation
. As Dockable
it can be put in
DockStation
which implements marker interface
ToolbarInterface
or in ScreenDockStation
, so that a
ToolbarDockStation
can be floattable. As
DockStation
, it accepts a ToolbarElementInterface
. If
the element is not a ToolbarElementInterface
, it is wrapped in a
ToolbarDockStation
before to be added.Modifier and Type | Class and Description |
---|---|
protected class |
ToolbarGroupDockStation.OverpaintablePanelBase
This panel is used as base of the station.
|
Modifier and Type | Field and Description |
---|---|
static String |
DISPLAYER_ID
This id is forwarded to
Extension s which load additional
DisplayerFactory s |
static bibliothek.gui.dock.util.PropertyKey<ToolbarGroupDividerStrategyFactory> |
DIVIDER_STRATEGY_FACTORY
Key for a strategy for painting borders between the
Dockable s |
static bibliothek.gui.dock.util.PropertyKey<ToolbarGroupHeaderFactory> |
HEADER_FACTORY
Key for a factory that creates new
ToolbarGroupHeader s |
static bibliothek.gui.dock.util.PropertyKey<ColumnScrollBarFactory> |
SCROLLBAR_FACTORY
Key for the factory that creates new
ColumnScrollBar s |
static String |
TITLE_ID
the id of the
DockTitleFactory which is used by this station |
displayerFactory, displayers, ON_CONFLICT_ENABLE, orientation, paint, title
Constructor and Description |
---|
ToolbarGroupDockStation()
Creates a new
ToolbarGroupDockStation . |
Modifier and Type | Method and Description |
---|---|
boolean |
accept(bibliothek.gui.Dockable child) |
boolean |
accept(bibliothek.gui.DockStation station) |
boolean |
accept(bibliothek.gui.DockStation base,
bibliothek.gui.Dockable neighbor) |
void |
aside(bibliothek.gui.dock.layout.location.AsideRequest request) |
protected void |
callDockUiUpdateTheme() |
boolean |
canReplace(bibliothek.gui.Dockable old,
bibliothek.gui.Dockable next) |
int |
column(bibliothek.gui.Dockable dockable)
Gets the column location of the
dockable . |
int |
columnCount()
Gets the number of column of
this . |
protected bibliothek.gui.dock.themes.DefaultDisplayerFactoryValue |
createDisplayerFactory()
Creates a new
DefaultDisplayerFactoryValue , a factory used to
create new DockableDisplayer s. |
protected bibliothek.gui.dock.component.DockComponentRootHandler |
createRootHandler() |
protected void |
discard(bibliothek.gui.dock.station.DockableDisplayer displayer)
Replaces
displayer with a new DockableDisplayer . |
void |
drag(bibliothek.gui.Dockable dockable) |
void |
drop(bibliothek.gui.Dockable dockable) |
boolean |
drop(bibliothek.gui.Dockable dockable,
bibliothek.gui.dock.layout.DockableProperty property) |
boolean |
drop(bibliothek.gui.Dockable dockable,
int column)
Drops the
dockable in a new column. |
boolean |
drop(bibliothek.gui.Dockable dockable,
int column,
boolean force) |
boolean |
drop(bibliothek.gui.Dockable dockable,
int column,
int line)
Drops the
dockable at the specified line and column. |
boolean |
drop(bibliothek.gui.Dockable dockable,
int column,
int line,
boolean force) |
boolean |
drop(bibliothek.gui.Dockable dockable,
ToolbarGroupProperty property)
Tries to drop
dockable at property . |
protected void |
drop(ToolbarGroupDropInfo dropInfoGroup)
Drops thanks to information collect by dropInfo.
|
protected void |
fireColumnRepositioned(int column,
boolean all)
Fires
DockStationListener.dockablesRepositioned(DockStation, Dockable[])
for all Dockable s in the given column . |
protected void |
fireDockablesRepositioned(bibliothek.gui.Dockable dockable)
Fires
DockStationListener.dockablesRepositioned(DockStation, Dockable[])
for all Dockable s that are in the same column as
dockable , including dockable . |
protected void |
fireDockablesRepositioned(bibliothek.gui.Dockable dockable,
boolean all)
Fires
DockStationListener.dockablesRepositioned(DockStation, Dockable[])
for all Dockable s that are in the same column as
dockable , including dockable . |
int |
getBorderSideSnapSize()
Gets the size of the invisible border around the station where a dockable
can be dropped.
|
int |
getColumnAt(Point location)
Tells which column covers the point
location . |
ToolbarColumnModel<bibliothek.gui.Dockable,bibliothek.gui.dock.station.StationChildHandle> |
getColumnModel()
Gets access to a simplified view of the contents of this station.
|
Component |
getComponent() |
protected String |
getDisplayerId()
Gets a unique identifier used to get the
DisplayerFactory for this station. |
bibliothek.gui.Dockable |
getDockable(int index) |
bibliothek.gui.Dockable |
getDockable(int columnIndex,
int line)
Gets the dockable at the specified
column and
line . |
int |
getDockableCount() |
bibliothek.gui.dock.layout.DockableProperty |
getDockableProperty(bibliothek.gui.Dockable child,
bibliothek.gui.Dockable target) |
Rectangle |
getDropGapBoundaries() |
ColumnDockActionSource |
getExpandActionSource()
Gets a
ColumnDockActionSource which allows to modify the
ExpandedState of the children of this station. |
String |
getFactoryID() |
bibliothek.gui.dock.station.StationChildHandle |
getHandle(bibliothek.gui.Dockable dockable)
Gets the
StationChildHandle which displays dockable . |
bibliothek.gui.dock.station.StationChildHandle |
getHandle(int columnIndex,
int line)
Gets the
StationChildHandle which is used at the given position. |
ToolbarGroupHeader |
getHeaderComponent()
Gets the
Component which is currently shown at the top of this station. |
ToolbarGroupHeaderFactory |
getHeaderComponentFactory()
Gets the factory for the
header component which is currently
in use. |
bibliothek.gui.dock.station.layer.DockStationDropLayer[] |
getLayers() |
ToolbarGridLayoutManager<bibliothek.gui.dock.station.StationChildHandle> |
getLayoutManager() |
bibliothek.gui.dock.station.PlaceholderMapping |
getPlaceholderMapping() |
bibliothek.gui.dock.station.support.PlaceholderMap |
getPlaceholders() |
bibliothek.gui.dock.station.support.PlaceholderMap |
getPlaceholders(Map<bibliothek.gui.Dockable,Integer> identifiers)
Converts this station into a
PlaceholderMap using
identifiers to remember which Dockable was at which
location. |
ToolbarStrategy |
getToolbarStrategy()
Gets the
ToolbarStrategy that is currently used by this station. |
protected void |
init() |
boolean |
isAllowSideSnap()
Tells whether the station can grab Dockables which are dragged near the
station.
|
boolean |
isLastOfColumn(bibliothek.gui.Dockable dockable)
Tells if
dockable is the last dockable in its column. |
int |
line(bibliothek.gui.Dockable dockable)
Gets the line location of the
dockable . |
int |
lineCount(int column)
Gets the number of lines in
column . |
void |
move(bibliothek.gui.Dockable dockable,
bibliothek.gui.dock.layout.DockableProperty property) |
bibliothek.gui.dock.station.StationDropOperation |
prepareDrop(bibliothek.gui.dock.station.StationDropItem item) |
protected bibliothek.gui.dock.title.DockTitleVersion |
registerTitle(bibliothek.gui.DockController controller)
Registers the default
DockTitleFactory of this station at
controller and returns the associated
DockTitleVersion . |
protected void |
remove(bibliothek.gui.Dockable dockable)
Removes
dockable from this station.Note: clients may need to invoke DockController.freezeLayout()
and DockController.meltLayout() to ensure none else adds or
removes Dockable s. |
void |
replace(bibliothek.gui.Dockable old,
bibliothek.gui.Dockable next) |
void |
setAllowSideSnap(boolean allowSideSnap)
Sets whether
Dockables which are dragged near the
station are captured and added to this station. |
void |
setBorderSideSnapSize(int borderSideSnapSize)
There is an invisible border around the station.
|
void |
setController(bibliothek.gui.DockController controller) |
void |
setHeaderComponentFactory(ToolbarGroupHeaderFactory factory)
Sets the factory for the
header component . |
void |
setOrientation(Orientation orientation)
Sets the orientation of dockables in this station.
|
void |
setPlaceholders(bibliothek.gui.dock.station.support.PlaceholderMap placeholders) |
void |
setPlaceholders(bibliothek.gui.dock.station.support.PlaceholderMap placeholders,
Map<Integer,bibliothek.gui.Dockable> children) |
addExpandableListener, addOrientingDockStationListener, canDrag, createBackgroundPanel, expandableListeners, fireOrientingEvent, getBackgroundAlgorithm, getExpandedState, getFrontDockable, getOrientation, getOrientationOf, getPaint, getRemoval, indexOf, init, isEnabled, prepareDrag, removeExpandableListener, removeOrientingDockStationListener, replace, setExpandedState, setExpandedState, setFrontDockable, shrink, stretch, toString
acceptable, acceptable, addDockStationListener, asDockStation, changed, createTitleIcon, delegate, fireDockablesRepositioned, fireDockablesRepositioned, getDirectActionOffers, getIndirectActionOffers, getTheme, isChildShowing, isStationShowing, isStationVisible, isVisible, removeDockStationListener, requestChildDisplayer, requestChildDockTitle, updateTheme
addDockableListener, addDockableStateListener, addDockHierarchyListener, addKeyListener, addMouseInputListener, asDockable, bind, configureDisplayerHints, fireTitleBound, fireTitleExchanged, fireTitleExchanged, fireTitleIconChanged, fireTitleTextChanged, fireTitleTooltipChanged, fireTitleUnbound, getComponentConfiguration, getConfigurableDisplayerHints, getController, getDockableStateListeners, getDockElementObserver, getDockParent, getElement, getGlobalActionOffers, getLocalActionOffers, getPopupLocation, getRootHandler, getTitleIcon, getTitleIconHandling, getTitleText, getTitleToolTip, isDockableShowing, isDockableVisible, isUsedAsTitle, listBoundTitles, removeDockableListener, removeDockableStateListener, removeDockHierarchyListener, removeKeyListener, removeMouseInputListener, requestDisplayer, requestDockTitle, resetTitleIcon, setActionOffers, setComponentConfiguration, setDockParent, setTitleIcon, setTitleIconHandling, setTitleText, setTitleToolTip, shouldFocus, shouldTransfersFocus, unbind
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
addDockStationListener, changed, getController, getDirectActionOffers, getIndirectActionOffers, getTheme, isChildShowing, isStationShowing, isStationVisible, isVisible, removeDockStationListener, requestChildDisplayer, requestChildDockTitle, updateTheme
getComponentConfiguration, setComponentConfiguration
addDockableListener, addDockableStateListener, addDockHierarchyListener, addMouseInputListener, bind, configureDisplayerHints, getController, getDockParent, getGlobalActionOffers, getLocalActionOffers, getTitleIcon, getTitleText, getTitleToolTip, isDockableShowing, isDockableVisible, listBoundTitles, removeDockableListener, removeDockableStateListener, removeDockHierarchyListener, removeMouseInputListener, requestDisplayer, requestDockTitle, setDockParent, unbind
public static final String TITLE_ID
DockTitleFactory
which is used by this stationpublic static final String DISPLAYER_ID
Extension
s which load additional
DisplayerFactory
spublic static final bibliothek.gui.dock.util.PropertyKey<ColumnScrollBarFactory> SCROLLBAR_FACTORY
ColumnScrollBar
spublic static final bibliothek.gui.dock.util.PropertyKey<ToolbarGroupHeaderFactory> HEADER_FACTORY
ToolbarGroupHeader
spublic static final bibliothek.gui.dock.util.PropertyKey<ToolbarGroupDividerStrategyFactory> DIVIDER_STRATEGY_FACTORY
Dockable
spublic ToolbarGroupDockStation()
ToolbarGroupDockStation
.public ToolbarGridLayoutManager<bibliothek.gui.dock.station.StationChildHandle> getLayoutManager()
protected void init()
protected bibliothek.gui.dock.component.DockComponentRootHandler createRootHandler()
createRootHandler
in class bibliothek.gui.dock.dockable.AbstractDockable
public ToolbarColumnModel<bibliothek.gui.Dockable,bibliothek.gui.dock.station.StationChildHandle> getColumnModel()
public int column(bibliothek.gui.Dockable dockable)
dockable
.dockable
- the Dockable
to searchpublic int line(bibliothek.gui.Dockable dockable)
dockable
.dockable
- the Dockable
to searchpublic int columnCount()
this
.public int lineCount(int column)
column
.column
- the columncolumn
public bibliothek.gui.Dockable getDockable(int columnIndex, int line)
column
and
line
.columnIndex
- the column indexline
- the line indexnull
if there's no dockable at the
specified indexes.public bibliothek.gui.dock.station.StationChildHandle getHandle(int columnIndex, int line)
StationChildHandle
which is used at the given position.columnIndex
- the column in which to searchline
- the line in the columnnull
if the indices are out of boundspublic bibliothek.gui.dock.station.StationChildHandle getHandle(bibliothek.gui.Dockable dockable)
StationChildHandle
which displays dockable
.dockable
- the item to searchdockable
or null
if not foundpublic boolean isLastOfColumn(bibliothek.gui.Dockable dockable)
dockable
is the last dockable in its column.dockable
- the dockablethis
dockstation.public ToolbarStrategy getToolbarStrategy()
ToolbarStrategy
that is currently used by this station.getToolbarStrategy
in class AbstractToolbarDockStation
null
public Component getComponent()
public int getDockableCount()
public bibliothek.gui.Dockable getDockable(int index)
public String getFactoryID()
protected String getDisplayerId()
DisplayerFactory
for this station.null
public void setAllowSideSnap(boolean allowSideSnap)
Dockables
which are dragged near the
station are captured and added to this station.allowSideSnap
- true
if the station can snap Dockables which are
near.setBorderSideSnapSize(int)
public boolean isAllowSideSnap()
true
if grabbing is allowedsetAllowSideSnap(boolean)
public void setBorderSideSnapSize(int borderSideSnapSize)
Dockable
is
dragged inside this border, its considered to be on the station and will
be dropped into.borderSideSnapSize
- the size of the border in pixelIllegalArgumentException
- if the size is smaller than 0public int getBorderSideSnapSize()
setBorderSideSnapSize(int)
public void setController(bibliothek.gui.DockController controller)
setController
in interface bibliothek.gui.Dockable
setController
in interface bibliothek.gui.DockStation
setController
in class AbstractToolbarDockStation
public void setOrientation(Orientation orientation)
OrientedDockStation
public bibliothek.gui.dock.station.layer.DockStationDropLayer[] getLayers()
getLayers
in interface bibliothek.gui.DockStation
getLayers
in class bibliothek.gui.dock.station.AbstractDockableStation
public boolean accept(bibliothek.gui.Dockable child)
accept
in interface bibliothek.gui.DockStation
accept
in class bibliothek.gui.dock.station.AbstractDockableStation
public boolean accept(bibliothek.gui.DockStation station)
accept
in interface bibliothek.gui.Dockable
accept
in class bibliothek.gui.dock.dockable.AbstractDockable
public boolean accept(bibliothek.gui.DockStation base, bibliothek.gui.Dockable neighbor)
accept
in interface bibliothek.gui.Dockable
accept
in class bibliothek.gui.dock.dockable.AbstractDockable
public bibliothek.gui.dock.station.StationDropOperation prepareDrop(bibliothek.gui.dock.station.StationDropItem item)
public int getColumnAt(Point location)
location
. If location
is outside
this station, then a non-existing column -1
or columnCount()
is returned.location
- some point on this Component
location
, can be -1
or columnCount()
protected void drop(ToolbarGroupDropInfo dropInfoGroup)
dropInfoGroup
- public void drop(bibliothek.gui.Dockable dockable)
public boolean drop(bibliothek.gui.Dockable dockable, int column, int line)
dockable
at the specified line and column.dockable
- the dockable to insertcolumn
- the column where insertline
- the line where insertpublic boolean drop(bibliothek.gui.Dockable dockable, int column, int line, boolean force)
public boolean drop(bibliothek.gui.Dockable dockable, int column)
dockable
in a new column.dockable
- the dockable to insertcolumn
- the column index to createpublic boolean drop(bibliothek.gui.Dockable dockable, int column, boolean force)
public void drag(bibliothek.gui.Dockable dockable)
protected void remove(bibliothek.gui.Dockable dockable)
AbstractToolbarDockStation
dockable
from this station.DockController.freezeLayout()
and DockController.meltLayout()
to ensure none else adds or
removes Dockable
s.remove
in class AbstractToolbarDockStation
dockable
- the child to removepublic void replace(bibliothek.gui.Dockable old, bibliothek.gui.Dockable next)
public boolean canReplace(bibliothek.gui.Dockable old, bibliothek.gui.Dockable next)
canReplace
in interface bibliothek.gui.DockStation
canReplace
in class AbstractToolbarDockStation
protected void fireDockablesRepositioned(bibliothek.gui.Dockable dockable)
DockStationListener.dockablesRepositioned(DockStation, Dockable[])
for all Dockable
s that are in the same column as
dockable
, including dockable
.dockable
- some item from a column that changedall
- whether there should be an event for all the columns after
dockable
as wellprotected void fireDockablesRepositioned(bibliothek.gui.Dockable dockable, boolean all)
DockStationListener.dockablesRepositioned(DockStation, Dockable[])
for all Dockable
s that are in the same column as
dockable
, including dockable
.dockable
- some item from a column that changedall
- whether there should be an event for all the columns after the
column of the dockable as wellprotected void fireColumnRepositioned(int column, boolean all)
DockStationListener.dockablesRepositioned(DockStation, Dockable[])
for all Dockable
s in the given column
.column
- the column for which to fire an eventall
- whether there should be an event for all the columns after
column
as wellpublic ColumnDockActionSource getExpandActionSource()
ColumnDockActionSource
which allows to modify the
ExpandedState
of the children of this station.null
public ToolbarGroupHeaderFactory getHeaderComponentFactory()
header component
which is currently
in use.null
HEADER_FACTORY
public void setHeaderComponentFactory(ToolbarGroupHeaderFactory factory)
header component
. A value of null
will be interpreted as a request to reinstall the default factory.factory
- the new factory, can be null
in order to reinstall the default factoryHEADER_FACTORY
public ToolbarGroupHeader getHeaderComponent()
Component
which is currently shown at the top of this station.null
HEADER_FACTORY
protected void callDockUiUpdateTheme() throws IOException
callDockUiUpdateTheme
in class bibliothek.gui.dock.station.AbstractDockableStation
IOException
protected bibliothek.gui.dock.themes.DefaultDisplayerFactoryValue createDisplayerFactory()
AbstractToolbarDockStation
DefaultDisplayerFactoryValue
, a factory used to
create new DockableDisplayer
s.createDisplayerFactory
in class AbstractToolbarDockStation
null
protected bibliothek.gui.dock.title.DockTitleVersion registerTitle(bibliothek.gui.DockController controller)
AbstractToolbarDockStation
DockTitleFactory
of this station at
controller
and returns the associated
DockTitleVersion
.registerTitle
in class AbstractToolbarDockStation
controller
- the controller at which the default title factory has to be
registeredprotected void discard(bibliothek.gui.dock.station.DockableDisplayer displayer)
displayer
with a new DockableDisplayer
.discard
in class AbstractToolbarDockStation
displayer
- the displayer to replaceIllegalArgumentException
- if displayer
is not a child of this stationpublic Rectangle getDropGapBoundaries()
public bibliothek.gui.dock.station.support.PlaceholderMap getPlaceholders()
public bibliothek.gui.dock.station.support.PlaceholderMap getPlaceholders(Map<bibliothek.gui.Dockable,Integer> identifiers)
PlaceholderMap
using
identifiers
to remember which Dockable
was at which
location.identifiers
- the identifiers to applythis
as mappublic bibliothek.gui.dock.station.PlaceholderMapping getPlaceholderMapping()
public void setPlaceholders(bibliothek.gui.dock.station.support.PlaceholderMap placeholders)
public void setPlaceholders(bibliothek.gui.dock.station.support.PlaceholderMap placeholders, Map<Integer,bibliothek.gui.Dockable> children)
public bibliothek.gui.dock.layout.DockableProperty getDockableProperty(bibliothek.gui.Dockable child, bibliothek.gui.Dockable target)
@Todo(compatibility=COMPATIBLE, priority=ENHANCEMENT, target=VERSION_1_1_2, description="Implement this feature") public void aside(bibliothek.gui.dock.layout.location.AsideRequest request)
public boolean drop(bibliothek.gui.Dockable dockable, bibliothek.gui.dock.layout.DockableProperty property)
public boolean drop(bibliothek.gui.Dockable dockable, ToolbarGroupProperty property)
dockable
at property
.dockable
- the element to dropproperty
- the location of dockable
true
if dropping was successful, false
otherwisepublic void move(bibliothek.gui.Dockable dockable, bibliothek.gui.dock.layout.DockableProperty property)