|
||||||||||
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.ToolbarDockStation
public class ToolbarDockStation
A Dockable
and a DockStation
which stands for a group of
ToolbarItemDockable
. As dockable it can be put in DockStation
which implements marker interface ToolbarInterface
. As DockStation it
accept a ToolbarItemDockable
or a ToolbarDockStation
Nested Class Summary | |
---|---|
protected class |
ToolbarDockStation.OverpaintablePanelBase
This panel is used as base of the station. |
protected class |
ToolbarDockStation.SizeFixedPanel
A panel with a fixed size (minimum, maximum and preferred size have same values). |
Field Summary | |
---|---|
static String |
DISPLAYER_ID
This id is forwarded to Extension s which load additional
DisplayerFactory s |
protected bibliothek.gui.dock.station.support.DockablePlaceholderList<bibliothek.gui.dock.station.StationChildHandle> |
dockables
A list of all children |
static bibliothek.gui.dock.util.PropertyKey<Integer> |
GAP
Key for setting the size of the gap between the children of a ToolbarDockStation . |
static bibliothek.gui.dock.util.PropertyKey<Integer> |
SIDE_GAP
Key for setting the size of the gap between the children of a station and the border of the station |
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 | |
---|---|
ToolbarDockStation()
Creates a new ToolbarDockStation . |
Method Summary | |
---|---|
boolean |
accept(bibliothek.gui.Dockable child)
|
boolean |
accept(bibliothek.gui.DockStation station)
|
boolean |
accept(bibliothek.gui.DockStation base,
bibliothek.gui.Dockable neighbor)
|
protected void |
add(bibliothek.gui.Dockable dockable,
int index)
|
protected void |
add(bibliothek.gui.Dockable dockable,
int index,
bibliothek.util.Path placeholder)
|
void |
aside(bibliothek.gui.dock.layout.location.AsideRequest request)
|
protected void |
callDockUiUpdateTheme()
|
void |
configureDisplayerHints(bibliothek.gui.dock.displayer.DockableDisplayerHints hints)
|
protected JPanel |
createBackgroundPanel()
Creates the parent JComponent of the Dockable s that are shown in this
station. |
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 index)
Drops dockable at location index . |
protected boolean |
drop(bibliothek.gui.Dockable dockable,
int index,
boolean force)
|
Component |
getComponent()
|
protected String |
getDisplayerId()
Gets a unique identifier used to get the DisplayerFactory for this station. |
bibliothek.gui.Dockable |
getDockable(int index)
|
int |
getDockableCount()
|
bibliothek.gui.dock.layout.DockableProperty |
getDockableProperty(bibliothek.gui.Dockable child,
bibliothek.gui.Dockable target)
|
protected bibliothek.gui.dock.layout.DockableProperty |
getDockableProperty(bibliothek.gui.Dockable child,
bibliothek.gui.Dockable target,
int index,
bibliothek.util.Path placeholder)
Creates a new DockableProperty describing the location of
child on this station. |
protected bibliothek.gui.dock.station.support.PlaceholderList.Filter<bibliothek.gui.dock.station.StationChildHandle> |
getDockables()
Grants direct access to the list of Dockable s, subclasses should
not modify the list unless the fire the appropriate events. |
String |
getFactoryID()
|
protected int |
getIndex(bibliothek.gui.dock.layout.DockableProperty property)
Gets the location of a Dockable on this station. |
int |
getLateralNodropZoneSize()
Gets the size of the two lateral zones where no drop action can be done (Measured in pixel). |
bibliothek.gui.dock.station.layer.DockStationDropLayer[] |
getLayers()
|
protected bibliothek.util.Path |
getPlaceholder(bibliothek.gui.dock.layout.DockableProperty property)
|
bibliothek.gui.dock.station.support.PlaceholderMap |
getPlaceholders()
|
bibliothek.gui.dock.station.support.PlaceholderMap |
getPlaceholders(Map<bibliothek.gui.Dockable,Integer> children)
Gets the placeholders of this station using a PlaceholderListItemConverter to encode the children. |
bibliothek.gui.dock.station.support.PlaceholderStrategy |
getPlaceholderStrategy()
Gets the PlaceholderStrategy that is currently in use. |
protected void |
init()
|
protected void |
insertAt(bibliothek.gui.dock.station.StationChildHandle handle,
int index)
|
protected boolean |
isValidProperty(bibliothek.gui.dock.layout.DockableProperty property)
Tells whether the subclass knows how to handle property . |
void |
move(bibliothek.gui.Dockable dockable,
bibliothek.gui.dock.layout.DockableProperty property)
|
protected void |
move(bibliothek.gui.Dockable dockable,
int index)
Adds dockable at the specified index. |
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. |
protected void |
remove(int index)
Removes the child with the given index from this station.Note: clients may need to invoke DockController.freezeLayout()
and DockController.meltLayout() to ensure noone else adds or
removes Dockable s. |
void |
replace(bibliothek.gui.Dockable old,
bibliothek.gui.Dockable next)
|
void |
setController(bibliothek.gui.DockController controller)
|
void |
setDockParent(bibliothek.gui.DockStation station)
|
void |
setLateralNodropZoneSize(int lateralNodropZoneSize)
Sets the size of the two lateral zones where no drop action can be done (Measured in pixel). |
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 map,
Map<Integer,bibliothek.gui.Dockable> children)
Sets a new layout on this station, this method assumes that map was created by the method getPlaceholders(Map) . |
void |
setPlaceholderStrategy(bibliothek.gui.dock.station.support.PlaceholderStrategy strategy)
Sets the PlaceholderStrategy to use, null will set
the default strategy. |
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, 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, 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, getController, getDockParent, getGlobalActionOffers, getLocalActionOffers, getTitleIcon, getTitleText, getTitleToolTip, isDockableShowing, isDockableVisible, listBoundTitles, removeDockableListener, removeDockableStateListener, removeDockHierarchyListener, removeMouseInputListener, requestDisplayer, requestDockTitle, 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<Integer> GAP
ToolbarDockStation
.
public static final bibliothek.gui.dock.util.PropertyKey<Integer> SIDE_GAP
protected bibliothek.gui.dock.station.support.DockablePlaceholderList<bibliothek.gui.dock.station.StationChildHandle> dockables
Constructor Detail |
---|
public ToolbarDockStation()
ToolbarDockStation
.
Method Detail |
---|
protected void init()
public Component getComponent()
public void configureDisplayerHints(bibliothek.gui.dock.displayer.DockableDisplayerHints hints)
configureDisplayerHints
in interface bibliothek.gui.Dockable
configureDisplayerHints
in class bibliothek.gui.dock.dockable.AbstractDockable
public int getDockableCount()
public bibliothek.gui.Dockable getDockable(int index)
public String getFactoryID()
public void setLateralNodropZoneSize(int lateralNodropZoneSize)
lateralNodropZoneSize
- the size of the rectangular lateral zones (in pixel)
IllegalArgumentException
- if the size is smaller than 0public int getLateralNodropZoneSize()
public void setDockParent(bibliothek.gui.DockStation station)
setDockParent
in interface bibliothek.gui.Dockable
setDockParent
in class bibliothek.gui.dock.dockable.AbstractDockable
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 void drop(bibliothek.gui.Dockable dockable)
public boolean drop(bibliothek.gui.Dockable dockable, int index)
dockable
at location index
.
dockable
- the element to addindex
- the location of dockable
protected boolean drop(bibliothek.gui.Dockable dockable, int index, boolean force)
protected void move(bibliothek.gui.Dockable dockable, int index)
dockable
- the dockable to insertindex
- the index where insert the dockableprotected void add(bibliothek.gui.Dockable dockable, int index)
protected void add(bibliothek.gui.Dockable dockable, int index, bibliothek.util.Path placeholder)
protected void insertAt(bibliothek.gui.dock.station.StationChildHandle handle, int index)
public void drag(bibliothek.gui.Dockable dockable)
protected void remove(bibliothek.gui.Dockable dockable)
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 removeprotected void remove(int index)
index
from this station.DockController.freezeLayout()
and DockController.meltLayout()
to ensure noone else adds or
removes Dockable
s.
index
- the index of the child that will be removedpublic void replace(bibliothek.gui.Dockable old, bibliothek.gui.Dockable next)
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 String getDisplayerId()
DisplayerFactory
for this station.
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 stationprotected JPanel createBackgroundPanel()
JComponent
of the Dockable
s that are shown in this
station. The default behavior is to create a new ToolbarDockStation.SizeFixedPanel
, using
AbstractToolbarDockStation.getBackgroundAlgorithm()
for managing painting.
createBackgroundPanel
in class AbstractToolbarDockStation
protected bibliothek.gui.dock.layout.DockableProperty getDockableProperty(bibliothek.gui.Dockable child, bibliothek.gui.Dockable target, int index, bibliothek.util.Path placeholder)
DockableProperty
describing the location of
child
on this station. This method is called by
getDockableProperty(Dockable, Dockable)
once the location and
placeholder of child
or target
have been
calculated
child
- a child of this stationtarget
- the item whose position is searchedindex
- the location of child
placeholder
- the placeholder for target
or child
DockableProperty
that stores index
,
placeholder
and any other information a subclass
deems necessary to storeprotected boolean isValidProperty(bibliothek.gui.dock.layout.DockableProperty property)
property
.
This means that the type of property
is the same type as the
result of getDockableProperty(Dockable, Dockable, int, Path)
property
- the property to check
true
if this sublcass knows how to handle the type
of property
protected int getIndex(bibliothek.gui.dock.layout.DockableProperty property)
Dockable
on this station. Called only if
property
passed isValidProperty(DockableProperty)
.
property
- some property created by
getDockableProperty(Dockable, Dockable, int, Path)
protected bibliothek.util.Path getPlaceholder(bibliothek.gui.dock.layout.DockableProperty property)
protected bibliothek.gui.dock.station.support.PlaceholderList.Filter<bibliothek.gui.dock.station.StationChildHandle> getDockables()
Dockable
s, subclasses should
not modify the list unless the fire the appropriate events.
public bibliothek.gui.dock.station.support.PlaceholderMap getPlaceholders(Map<bibliothek.gui.Dockable,Integer> children)
PlaceholderListItemConverter
to encode the children. The
converter puts the following parameters for each Dockable
into
the map:
children
children
- a unique identifier for each child of this station
public void setPlaceholders(bibliothek.gui.dock.station.support.PlaceholderMap map, Map<Integer,bibliothek.gui.Dockable> children)
map
was created by the method getPlaceholders(Map)
.
map
- the map to readchildren
- the new children of this station
IllegalStateException
- if there are children left on this stationpublic bibliothek.gui.dock.station.support.PlaceholderMap getPlaceholders()
public void setPlaceholders(bibliothek.gui.dock.station.support.PlaceholderMap placeholders)
public bibliothek.gui.dock.station.support.PlaceholderStrategy getPlaceholderStrategy()
PlaceholderStrategy
that is currently in use.
null
public void setPlaceholderStrategy(bibliothek.gui.dock.station.support.PlaceholderStrategy strategy)
PlaceholderStrategy
to use, null
will set
the default strategy.
strategy
- the new strategy, can be null
public bibliothek.gui.dock.layout.DockableProperty getDockableProperty(bibliothek.gui.Dockable child, bibliothek.gui.Dockable target)
public void aside(bibliothek.gui.dock.layout.location.AsideRequest request)
public boolean drop(bibliothek.gui.Dockable dockable, bibliothek.gui.dock.layout.DockableProperty property)
public 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 |