|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectbibliothek.gui.dock.dockable.AbstractDockable
bibliothek.gui.dock.station.AbstractDockableStation
bibliothek.gui.dock.AbstractToolbarDockStation
bibliothek.gui.dock.ToolbarGroupDockStation
public class ToolbarGroupDockStation
A 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.
Nested Class Summary | |
---|---|
protected class |
ToolbarGroupDockStation.OverpaintablePanelBase
This panel is used as base of the station. |
Field Summary | |
---|---|
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 |
Fields inherited from class bibliothek.gui.dock.AbstractToolbarDockStation |
---|
displayerFactory, displayers, ON_CONFLICT_ENABLE, orientation, paint, title |
Fields inherited from class bibliothek.gui.dock.station.AbstractDockableStation |
---|
listeners |
Constructor Summary | |
---|---|
ToolbarGroupDockStation()
Creates a new ToolbarGroupDockStation . |
Method Summary | |
---|---|
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 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 displayes 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.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)
|
Methods inherited from class bibliothek.gui.dock.station.AbstractDockableStation |
---|
acceptable, acceptable, addDockStationListener, asDockStation, changed, createTitleIcon, delegate, fireDockablesRepositioned, fireDockablesRepositioned, getDirectActionOffers, getIndirectActionOffers, getTheme, isChildShowing, isStationShowing, isStationVisible, isVisible, removeDockStationListener, requestChildDisplayer, requestChildDockTitle, updateTheme |
Methods inherited from class bibliothek.gui.dock.dockable.AbstractDockable |
---|
addDockableListener, addDockableStateListener, addDockHierarchyListener, addKeyListener, addMouseInputListener, asDockable, bind, configureDisplayerHints, fireTitleBound, fireTitleExchanged, fireTitleExchanged, fireTitleIconChanged, fireTitleTextChanged, fireTitleTooltipChanged, fireTitleUnbound, getConfigurableDisplayerHints, getController, getDockableStateListeners, getDockElementObserver, getDockParent, getElement, getGlobalActionOffers, getLocalActionOffers, getPopupLocation, getTitleIcon, getTitleIconHandling, getTitleText, getTitleToolTip, isDockableShowing, isDockableVisible, isUsedAsTitle, listBoundTitles, removeDockableListener, removeDockableStateListener, removeDockHierarchyListener, removeKeyListener, removeMouseInputListener, requestDisplayer, requestDockTitle, resetTitleIcon, setActionOffers, setDockParent, setTitleIcon, setTitleIconHandling, setTitleText, setTitleToolTip, shouldFocus, shouldTransfersFocus, unbind |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface bibliothek.gui.DockStation |
---|
addDockStationListener, changed, getController, getDirectActionOffers, getIndirectActionOffers, getTheme, isChildShowing, isStationShowing, isStationVisible, isVisible, removeDockStationListener, requestChildDisplayer, requestChildDockTitle, updateTheme |
Methods inherited from interface bibliothek.gui.dock.DockElement |
---|
asDockable, asDockStation |
Methods inherited from interface bibliothek.gui.Dockable |
---|
addDockableListener, addDockableStateListener, addDockHierarchyListener, addMouseInputListener, bind, configureDisplayerHints, getController, getDockParent, getGlobalActionOffers, getLocalActionOffers, getTitleIcon, getTitleText, getTitleToolTip, isDockableShowing, isDockableVisible, listBoundTitles, removeDockableListener, removeDockableStateListener, removeDockHierarchyListener, removeMouseInputListener, requestDisplayer, requestDockTitle, setDockParent, unbind |
Methods inherited from interface bibliothek.gui.dock.DockElementRepresentative |
---|
getElement, getPopupLocation, isUsedAsTitle, shouldFocus, shouldTransfersFocus |
Methods inherited from interface bibliothek.gui.dock.station.support.PlaceholderListItem |
---|
asDockable |
Field Detail |
---|
public static final String TITLE_ID
DockTitleFactory
which is used by this station
public static final String DISPLAYER_ID
Extension
s which load additional
DisplayerFactory
s
public static final bibliothek.gui.dock.util.PropertyKey<ColumnScrollBarFactory> SCROLLBAR_FACTORY
ColumnScrollBar
s
public static final bibliothek.gui.dock.util.PropertyKey<ToolbarGroupHeaderFactory> HEADER_FACTORY
ToolbarGroupHeader
s
public static final bibliothek.gui.dock.util.PropertyKey<ToolbarGroupDividerStrategyFactory> DIVIDER_STRATEGY_FACTORY
Dockable
s
Constructor Detail |
---|
public ToolbarGroupDockStation()
ToolbarGroupDockStation
.
Method Detail |
---|
public ToolbarGridLayoutManager<bibliothek.gui.dock.station.StationChildHandle> getLayoutManager()
protected void init()
public ToolbarColumnModel<bibliothek.gui.Dockable,bibliothek.gui.dock.station.StationChildHandle> getColumnModel()
public int column(bibliothek.gui.Dockable dockable)
dockable
.
dockable
- the Dockable
to search
public int line(bibliothek.gui.Dockable dockable)
dockable
.
dockable
- the Dockable
to search
public int columnCount()
this
.
public int lineCount(int column)
column
.
column
- the column
column
public bibliothek.gui.Dockable getDockable(int columnIndex, int line)
column
and
line
.
columnIndex
- the column indexline
- the line index
null
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 column
null
if the indices are out of boundspublic bibliothek.gui.dock.station.StationChildHandle getHandle(bibliothek.gui.Dockable dockable)
StationChildHandle
which displayes dockable
.
dockable
- the item to search
dockable
or null
if not foundpublic boolean isLastOfColumn(bibliothek.gui.Dockable dockable)
dockable
is the last dockable in its column.
dockable
- the dockable
this
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 pixel
IllegalArgumentException
- 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 insert
public 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 create
public 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
registered
protected void discard(bibliothek.gui.dock.station.DockableDisplayer displayer)
displayer
with a new DockableDisplayer
.
discard
in class AbstractToolbarDockStation
displayer
- the displayer to replace
IllegalArgumentException
- 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 apply
this
as mappublic 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 successfull, false
otherwisepublic void move(bibliothek.gui.Dockable dockable, bibliothek.gui.dock.layout.DockableProperty property)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |