public class ToolbarContainerDockStation extends AbstractDockableStation implements OrientingDockStation, OrientedDockStation
Dockable and a DockStation which stands for a group of
ToolbarGroupDockStation. As dockable it can be put in every
DockStation. As DockStation it accepts only
ToolbarElementInterfaces. When ToolbarElement are added, all the
ComponentDockable extracted from the element are merged together and wrapped
in a ToolbarGroupDockStation before to be added.| Modifier and Type | Class and Description |
|---|---|
protected class |
ToolbarContainerDockStation.OverpaintablePanelBase
This panel is used as base of the station.
|
| Modifier and Type | Field and Description |
|---|---|
static Orientation |
DEFAULT_ORIENTATION |
static String |
DISPLAYER_ID
This id is forwarded to
Extensions which load additional
DisplayerFactorys |
protected ToolbarContainerDockStation.OverpaintablePanelBase |
mainPanel
The graphical representation of this station: the pane which contains
toolbars
|
static String |
TITLE_ID
the id of the
DockTitleFactory used with this station |
listeners| Constructor and Description |
|---|
ToolbarContainerDockStation(Orientation orientation)
Constructs a new ContainerLineStation
|
ToolbarContainerDockStation(Orientation orientation,
int maxNumberOfDockables)
Creates a new station
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
accept(Dockable child) |
boolean |
accept(DockStation station) |
protected boolean |
add(Dockable dockable,
int index)
Add one dockable at the index position.
|
protected boolean |
add(Dockable dockable,
int index,
Path placeholder) |
void |
addOrientingDockStationListener(OrientingDockStationListener listener)
Adds the observer
listener to this station. |
void |
aside(AsideRequest request) |
protected void |
callDockUiUpdateTheme() |
boolean |
canDrag(Dockable dockable) |
boolean |
canReplace(Dockable old,
Dockable next) |
protected ToolbarContainerConverter |
createConverter()
Creates a
ToolbarContainerConverter which will be used for one
call. |
protected DockComponentRootHandler |
createRootHandler() |
protected void |
discard(DockableDisplayer displayer)
Replaces
displayer with a new DockableDisplayer. |
void |
drag(Dockable dockable) |
void |
drop(Dockable dockable)
Adds
dockable to this station. |
boolean |
drop(Dockable dockable,
DockableProperty property) |
protected void |
fireOrientingEvent()
Fires an
OrientingDockStationEvent. |
Component |
getComponent() |
JPanel |
getContainerPanel()
Gets the panel which contains dockables
|
Dockable |
getDockable(int index) |
int |
getDockableCount() |
DockableProperty |
getDockableProperty(Dockable child,
Dockable target) |
DockablePlaceholderList<StationChildHandle> |
getDockables()
Gets the dockables in the station
|
int |
getDockablesMaxNumber()
Gets the number of dockables that this station will accept.
|
String |
getFactoryID() |
Dockable |
getFrontDockable() |
DockStationDropLayer[] |
getLayers() |
Orientation |
getOrientation()
Gets the orientation of dockables in the station
|
Orientation |
getOrientationOf(Dockable child)
Tells what orientation
child has. |
DefaultStationPaintValue |
getPaint()
Gets a
StationPaint which is used to paint some lines onto this
station. |
PlaceholderMapping |
getPlaceholderMapping() |
PlaceholderMap |
getPlaceholders() |
PlaceholderMap |
getPlaceholders(Map<Dockable,Integer> children)
Gets the layout of this station encoded as
PlaceholderMap. |
PlaceholderStrategy |
getPlaceholderStrategy()
Gets the
PlaceholderStrategy that is currently in use. |
int |
getSideSnapSize()
Gets the number of pixels outside the station where a drag and drop
operation can still start
|
ToolbarStrategy |
getToolbarStrategy()
Gets the
ToolbarStrategy that is currently used by this station. |
void |
move(Dockable dockable,
DockableProperty property) |
StationDragOperation |
prepareDrag(Dockable dockable) |
StationDropOperation |
prepareDrop(StationDropItem item) |
void |
removeOrientingDockStationListener(OrientingDockStationListener listener)
Removes the observer
listener from this station. |
void |
replace(Dockable old,
Dockable next) |
void |
replace(DockStation old,
Dockable next) |
void |
setController(DockController controller) |
void |
setDockablesMaxNumber(int max)
Sets the number of dockables that this station will accept (max = -1
indicates that there's no limit).
|
void |
setDockParent(DockStation station) |
void |
setFrontDockable(Dockable dockable) |
void |
setOrientation(Orientation orientation)
Sets the orientation of dockables in the station
|
void |
setPlaceholders(PlaceholderMap placeholders) |
void |
setPlaceholders(PlaceholderMap placeholders,
Map<Integer,Dockable> children)
Sets the layout of this station using the encoded layout from
placeholders |
void |
setPlaceholderStrategy(PlaceholderStrategy strategy)
Sets the
PlaceholderStrategy to use, null will set
the default strategy. |
void |
setSideSnapSize(int sideSnapSize)
Sets the number of pixels outside the station where a drag and drop
operation can still start.
|
String |
toString() |
acceptable, acceptable, addDockStationListener, asDockStation, changed, createTitleIcon, delegate, fireDockablesRepositioned, fireDockablesRepositioned, getDirectActionOffers, getIndirectActionOffers, getTheme, isChildShowing, isStationShowing, isStationVisible, isVisible, removeDockStationListener, requestChildDisplayer, requestChildDockTitle, updateThemeaccept, 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, 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, setComponentConfigurationpublic static final String TITLE_ID
DockTitleFactory used with this stationpublic static final String DISPLAYER_ID
Extensions which load additional
DisplayerFactoryspublic static final Orientation DEFAULT_ORIENTATION
protected ToolbarContainerDockStation.OverpaintablePanelBase mainPanel
public ToolbarContainerDockStation(Orientation orientation)
public ToolbarContainerDockStation(Orientation orientation, int maxNumberOfDockables)
orientation - the orientation of the contentmaxNumberOfDockables - the maximum number of children or -1protected DockComponentRootHandler createRootHandler()
createRootHandler in class AbstractDockablepublic int getDockableCount()
getDockableCount in interface DockStationpublic Dockable getDockable(int index)
getDockable in interface DockStationpublic Dockable getFrontDockable()
getFrontDockable in interface DockStationpublic void setFrontDockable(Dockable dockable)
setFrontDockable in interface DockStationpublic PlaceholderMap getPlaceholders()
getPlaceholders in interface DockStationpublic PlaceholderMap getPlaceholders(Map<Dockable,Integer> children)
PlaceholderMap.children - identifiers for the childrennullpublic PlaceholderMapping getPlaceholderMapping()
getPlaceholderMapping in interface DockStationpublic void setPlaceholders(PlaceholderMap placeholders)
setPlaceholders in interface DockStationpublic void setPlaceholders(PlaceholderMap placeholders, Map<Integer,Dockable> children)
placeholdersplaceholders - the placeholders to readchildren - the children to addprotected ToolbarContainerConverter createConverter()
ToolbarContainerConverter which will be used for one
call.nullpublic PlaceholderStrategy getPlaceholderStrategy()
PlaceholderStrategy that is currently in use.nullpublic void setPlaceholderStrategy(PlaceholderStrategy strategy)
PlaceholderStrategy to use, null will set
the default strategy.strategy - the new strategy, can be nullpublic DockableProperty getDockableProperty(Dockable child, Dockable target)
getDockableProperty in interface DockStationpublic void aside(AsideRequest request)
aside in interface DockStationpublic StationDragOperation prepareDrag(Dockable dockable)
prepareDrag in interface DockStationpublic void setSideSnapSize(int sideSnapSize)
sideSnapSize - the size in pixelspublic int getSideSnapSize()
public DockStationDropLayer[] getLayers()
getLayers in interface DockStationgetLayers in class AbstractDockableStationpublic StationDropOperation prepareDrop(StationDropItem item)
prepareDrop in interface DockStationpublic void addOrientingDockStationListener(OrientingDockStationListener listener)
OrientingDockStationlistener to this station. The observer
receives an event if the orientation of a child of this station changed.
The observer may or may not receive an event upon dropping a new
Dockable onto this station.addOrientingDockStationListener in interface OrientingDockStationlistener - the new observer, not nullpublic void removeOrientingDockStationListener(OrientingDockStationListener listener)
OrientingDockStationlistener from this station.removeOrientingDockStationListener in interface OrientingDockStationlistener - the listener to removepublic Orientation getOrientationOf(Dockable child)
OrientingDockStationchild has.getOrientationOf in interface OrientingDockStationchild - a child of this stationnullpublic void setDockablesMaxNumber(int max)
max - the number of dockables acceptedpublic int getDockablesMaxNumber()
protected void fireOrientingEvent()
OrientingDockStationEvent.dockables - the items whose orientation changedpublic boolean drop(Dockable dockable, DockableProperty property)
drop in interface DockStationpublic void drop(Dockable dockable)
dockable to this station. The dockable must be a
ToolbarElementInterface : if not, do nothing. The dockable is
added at the last position.drop in interface DockStationdockable - a new childpublic void move(Dockable dockable, DockableProperty property)
move in interface DockStationpublic boolean canDrag(Dockable dockable)
canDrag in interface DockStationpublic void drag(Dockable dockable)
drag in interface DockStationpublic boolean canReplace(Dockable old, Dockable next)
canReplace in interface DockStationpublic void replace(Dockable old, Dockable next)
replace in interface DockStationpublic void replace(DockStation old, Dockable next)
replace in interface DockStationpublic String getFactoryID()
getFactoryID in interface DockElementpublic Component getComponent()
getComponent in interface DockElementRepresentativegetComponent in interface Dockableprotected void callDockUiUpdateTheme()
throws IOException
callDockUiUpdateTheme in class AbstractDockableStationIOExceptionpublic JPanel getContainerPanel()
public ToolbarStrategy getToolbarStrategy()
ToolbarStrategy that is currently used by this station.nullpublic boolean accept(Dockable child)
accept in interface DockStationaccept in class AbstractDockableStationpublic boolean accept(DockStation station)
accept in interface Dockableaccept in class AbstractDockablepublic DockablePlaceholderList<StationChildHandle> getDockables()
public Orientation getOrientation()
getOrientation in interface OrientedDockStationpublic void setOrientation(Orientation orientation)
setOrientation in interface OrientedDockStationorientation - the orientationprotected boolean add(Dockable dockable, int index)
ToolbarItemDockable, ToolbarDockStation or a
ToolbarGroupDockStation (see method accept()). All the
ComponentDockable extracted from the element are merged together and
wrapped in a ToolbarDockStation before to be added at index
positiondockable - Dockable to addindex - Index where add dockabletrue if dropping was successfulprotected void discard(DockableDisplayer displayer)
displayer with a new DockableDisplayer.displayer - the displayer to replace, must actually be shown on this
stationpublic DefaultStationPaintValue getPaint()
StationPaint which is used to paint some lines onto this
station. Use a delegate to exchange the paint.public void setDockParent(DockStation station)
setDockParent in interface DockablesetDockParent in class AbstractDockablepublic void setController(DockController controller)
setController in interface DockablesetController in interface DockStationsetController in class AbstractDockableCopyright © 2018. All rights reserved.