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
Extensions which load additional
DisplayerFactorys |
static PropertyKey<ToolbarGroupDividerStrategyFactory> |
DIVIDER_STRATEGY_FACTORY
Key for a strategy for painting borders between the
Dockables |
static PropertyKey<ToolbarGroupHeaderFactory> |
HEADER_FACTORY
Key for a factory that creates new
ToolbarGroupHeaders |
static PropertyKey<ColumnScrollBarFactory> |
SCROLLBAR_FACTORY
Key for the factory that creates new
ColumnScrollBars |
static String |
TITLE_ID
the id of the
DockTitleFactory which is used by this station |
displayerFactory, displayers, ON_CONFLICT_ENABLE, orientation, paint, titlelisteners| Constructor and Description |
|---|
ToolbarGroupDockStation()
Creates a new
ToolbarGroupDockStation. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
accept(Dockable child) |
boolean |
accept(DockStation station) |
boolean |
accept(DockStation base,
Dockable neighbor) |
void |
aside(AsideRequest request) |
protected void |
callDockUiUpdateTheme() |
boolean |
canReplace(Dockable old,
Dockable next) |
int |
column(Dockable dockable)
Gets the column location of the
dockable. |
int |
columnCount()
Gets the number of column of
this. |
protected DefaultDisplayerFactoryValue |
createDisplayerFactory()
Creates a new
DefaultDisplayerFactoryValue, a factory used to
create new DockableDisplayers. |
protected DockComponentRootHandler |
createRootHandler() |
protected void |
discard(DockableDisplayer displayer)
Replaces
displayer with a new DockableDisplayer. |
void |
drag(Dockable dockable) |
void |
drop(Dockable dockable) |
boolean |
drop(Dockable dockable,
DockableProperty property) |
boolean |
drop(Dockable dockable,
int column)
Drops the
dockable in a new column. |
boolean |
drop(Dockable dockable,
int column,
boolean force) |
boolean |
drop(Dockable dockable,
int column,
int line)
Drops the
dockable at the specified line and column. |
boolean |
drop(Dockable dockable,
int column,
int line,
boolean force) |
boolean |
drop(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 Dockables in the given column. |
protected void |
fireDockablesRepositioned(Dockable dockable)
Fires
DockStationListener.dockablesRepositioned(DockStation, Dockable[])
for all Dockables that are in the same column as
dockable, including dockable. |
protected void |
fireDockablesRepositioned(Dockable dockable,
boolean all)
Fires
DockStationListener.dockablesRepositioned(DockStation, Dockable[])
for all Dockables 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<Dockable,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. |
Dockable |
getDockable(int index) |
Dockable |
getDockable(int columnIndex,
int line)
Gets the dockable at the specified
column and
line. |
int |
getDockableCount() |
DockableProperty |
getDockableProperty(Dockable child,
Dockable target) |
Rectangle |
getDropGapBoundaries() |
ColumnDockActionSource |
getExpandActionSource()
Gets a
ColumnDockActionSource which allows to modify the
ExpandedState of the children of this station. |
String |
getFactoryID() |
StationChildHandle |
getHandle(Dockable dockable)
Gets the
StationChildHandle which displays dockable. |
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. |
DockStationDropLayer[] |
getLayers() |
ToolbarGridLayoutManager<StationChildHandle> |
getLayoutManager() |
PlaceholderMapping |
getPlaceholderMapping() |
PlaceholderMap |
getPlaceholders() |
PlaceholderMap |
getPlaceholders(Map<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(Dockable dockable)
Tells if
dockable is the last dockable in its column. |
int |
line(Dockable dockable)
Gets the line location of the
dockable. |
int |
lineCount(int column)
Gets the number of lines in
column. |
void |
move(Dockable dockable,
DockableProperty property) |
StationDropOperation |
prepareDrop(StationDropItem item) |
protected DockTitleVersion |
registerTitle(DockController controller)
Registers the default
DockTitleFactory of this station at
controller and returns the associated
DockTitleVersion. |
protected void |
remove(Dockable dockable)
Removes
dockable from this station. |
void |
replace(Dockable old,
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(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(PlaceholderMap placeholders) |
void |
setPlaceholders(PlaceholderMap placeholders,
Map<Integer,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, toStringacceptable, acceptable, addDockStationListener, asDockStation, changed, createTitleIcon, delegate, fireDockablesRepositioned, fireDockablesRepositioned, getDirectActionOffers, getIndirectActionOffers, getTheme, isChildShowing, isStationShowing, isStationVisible, isVisible, removeDockStationListener, requestChildDisplayer, requestChildDockTitle, updateThemeaddDockableListener, 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, unbindclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitaddDockStationListener, changed, getController, getDirectActionOffers, getIndirectActionOffers, getTheme, isChildShowing, isStationShowing, isStationVisible, isVisible, removeDockStationListener, requestChildDisplayer, requestChildDockTitle, updateThemeasDockable, asDockStationgetComponentConfiguration, setComponentConfigurationaddDockableListener, addDockableStateListener, addDockHierarchyListener, addMouseInputListener, bind, configureDisplayerHints, getController, getDockParent, getGlobalActionOffers, getLocalActionOffers, getTitleIcon, getTitleText, getTitleToolTip, isDockableShowing, isDockableVisible, listBoundTitles, removeDockableListener, removeDockableStateListener, removeDockHierarchyListener, removeMouseInputListener, requestDisplayer, requestDockTitle, setDockParent, unbindgetElement, getPopupLocation, isUsedAsTitle, shouldFocus, shouldTransfersFocusasDockablepublic static final String TITLE_ID
DockTitleFactory which is used by this stationpublic static final String DISPLAYER_ID
Extensions which load additional
DisplayerFactoryspublic static final PropertyKey<ColumnScrollBarFactory> SCROLLBAR_FACTORY
ColumnScrollBarspublic static final PropertyKey<ToolbarGroupHeaderFactory> HEADER_FACTORY
ToolbarGroupHeaderspublic static final PropertyKey<ToolbarGroupDividerStrategyFactory> DIVIDER_STRATEGY_FACTORY
Dockablespublic ToolbarGroupDockStation()
ToolbarGroupDockStation.public ToolbarGridLayoutManager<StationChildHandle> getLayoutManager()
protected void init()
protected DockComponentRootHandler createRootHandler()
createRootHandler in class AbstractDockablepublic ToolbarColumnModel<Dockable,StationChildHandle> getColumnModel()
public int column(Dockable dockable)
dockable.dockable - the Dockable to searchpublic int line(Dockable dockable)
dockable.dockable - the Dockable to searchpublic int columnCount()
this.public int lineCount(int column)
column.column - the columncolumnpublic 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 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 StationChildHandle getHandle(Dockable dockable)
StationChildHandle which displays dockable.dockable - the item to searchdockable or null if not foundpublic boolean isLastOfColumn(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 AbstractToolbarDockStationnullpublic Component getComponent()
public int getDockableCount()
public Dockable getDockable(int index)
public String getFactoryID()
protected String getDisplayerId()
DisplayerFactory for this station.nullpublic 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(DockController controller)
setController in interface DockablesetController in interface DockStationsetController in class AbstractToolbarDockStationpublic void setOrientation(Orientation orientation)
OrientedDockStationpublic DockStationDropLayer[] getLayers()
getLayers in interface DockStationgetLayers in class AbstractDockableStationpublic boolean accept(Dockable child)
accept in interface DockStationaccept in class AbstractDockableStationpublic boolean accept(DockStation station)
accept in interface Dockableaccept in class AbstractDockablepublic boolean accept(DockStation base, Dockable neighbor)
accept in interface Dockableaccept in class AbstractDockablepublic StationDropOperation prepareDrop(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 Componentlocation, can be -1 or columnCount()protected void drop(ToolbarGroupDropInfo dropInfoGroup)
dropInfoGroup - public void drop(Dockable dockable)
public boolean drop(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(Dockable dockable, int column, int line, boolean force)
public boolean drop(Dockable dockable, int column)
dockable in a new column.dockable - the dockable to insertcolumn - the column index to createpublic boolean drop(Dockable dockable, int column, boolean force)
public void drag(Dockable dockable)
protected void remove(Dockable dockable)
AbstractToolbarDockStationdockable from this station.DockController.freezeLayout()
and DockController.meltLayout() to ensure none else adds or
removes Dockables.remove in class AbstractToolbarDockStationdockable - the child to removepublic boolean canReplace(Dockable old, Dockable next)
canReplace in interface DockStationcanReplace in class AbstractToolbarDockStationprotected void fireDockablesRepositioned(Dockable dockable)
DockStationListener.dockablesRepositioned(DockStation, Dockable[])
for all Dockables 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(Dockable dockable, boolean all)
DockStationListener.dockablesRepositioned(DockStation, Dockable[])
for all Dockables 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 Dockables 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.nullpublic ToolbarGroupHeaderFactory getHeaderComponentFactory()
header component which is currently
in use.nullHEADER_FACTORYpublic 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_FACTORYpublic ToolbarGroupHeader getHeaderComponent()
Component which is currently shown at the top of this station.nullHEADER_FACTORYprotected void callDockUiUpdateTheme()
throws IOException
callDockUiUpdateTheme in class AbstractDockableStationIOExceptionprotected DefaultDisplayerFactoryValue createDisplayerFactory()
AbstractToolbarDockStationDefaultDisplayerFactoryValue, a factory used to
create new DockableDisplayers.createDisplayerFactory in class AbstractToolbarDockStationnullprotected DockTitleVersion registerTitle(DockController controller)
AbstractToolbarDockStationDockTitleFactory of this station at
controller and returns the associated
DockTitleVersion.registerTitle in class AbstractToolbarDockStationcontroller - the controller at which the default title factory has to be
registeredprotected void discard(DockableDisplayer displayer)
displayer with a new DockableDisplayer.discard in class AbstractToolbarDockStationdisplayer - the displayer to replaceIllegalArgumentException - if displayer is not a child of this stationpublic Rectangle getDropGapBoundaries()
public PlaceholderMap getPlaceholders()
public PlaceholderMap getPlaceholders(Map<Dockable,Integer> identifiers)
PlaceholderMap using
identifiers to remember which Dockable was at which
location.identifiers - the identifiers to applythis as mappublic PlaceholderMapping getPlaceholderMapping()
public void setPlaceholders(PlaceholderMap placeholders)
public void setPlaceholders(PlaceholderMap placeholders, Map<Integer,Dockable> children)
public DockableProperty getDockableProperty(Dockable child, Dockable target)
@Todo(compatibility=COMPATIBLE, priority=ENHANCEMENT, target=VERSION_1_1_2, description="Implement this feature") public void aside(AsideRequest request)
public boolean drop(Dockable dockable, DockableProperty property)
public boolean drop(Dockable dockable, ToolbarGroupProperty property)
dockable at property.dockable - the element to dropproperty - the location of dockabletrue if dropping was successful, false
otherwisepublic void move(Dockable dockable, DockableProperty property)
Copyright © 2018. All rights reserved.