|
||||||||||
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
public abstract class AbstractToolbarDockStation
Base class of a DockStation
behaving like a typical toolbar: the
children are ordered in a list, an optional title and border may be shown.
Field Summary | |
---|---|
protected bibliothek.gui.dock.themes.DefaultDisplayerFactoryValue |
displayerFactory
a factory used by displayers to create new
DockableDisplayer s |
protected bibliothek.gui.dock.station.DisplayerCollection |
displayers
a helper class ensuring that all properties of the DockableDisplayer s are set correctly |
static bibliothek.gui.dock.util.PropertyKey<Boolean> |
ON_CONFLICT_ENABLE
If it is not clear whether an ExpandedState is enabled, because the involved Dockable s offer different
enabled-states, then the value of this boolean is the result of the operation. |
protected Orientation |
orientation
Alignment of the content of this station |
protected bibliothek.gui.dock.themes.DefaultStationPaintValue |
paint
A paint to draw lines |
protected bibliothek.gui.dock.title.DockTitleVersion |
title
a factory creating new DockTitle s |
Fields inherited from class bibliothek.gui.dock.station.AbstractDockableStation |
---|
listeners |
Constructor Summary | |
---|---|
AbstractToolbarDockStation()
Constructs a new ToolbarDockStation. |
Method Summary | |
---|---|
void |
addExpandableListener(ExpandableToolbarItemListener listener)
Adds the observer listener to this item. |
void |
addOrientingDockStationListener(OrientingDockStationListener listener)
Adds the observer listener to this station. |
boolean |
canDrag(bibliothek.gui.Dockable dockable)
|
boolean |
canReplace(bibliothek.gui.Dockable old,
bibliothek.gui.Dockable next)
|
protected JPanel |
createBackgroundPanel()
Creates a new JPanel which uses the background algorithm to
paint its content. |
protected abstract bibliothek.gui.dock.themes.DefaultDisplayerFactoryValue |
createDisplayerFactory()
Creates a new DefaultDisplayerFactoryValue , a factory used to
create new DockableDisplayer s. |
protected abstract void |
discard(bibliothek.gui.dock.station.DockableDisplayer displayer)
Replaces displayer with a new DockableDisplayer . |
protected ExpandableToolbarItemListener[] |
expandableListeners()
Gets all the ExpandableToolbarItemListener s that are currently
registered. |
protected void |
fireOrientingEvent()
Fires an OrientingDockStationEvent . |
protected bibliothek.gui.dock.util.BackgroundAlgorithm |
getBackgroundAlgorithm()
Gets the algorithm which should be used to paint this station. |
ExpandedState |
getExpandedState()
Gets the current state of this item. |
bibliothek.gui.Dockable |
getFrontDockable()
|
Orientation |
getOrientation()
Gets the orientation of dockables in this station. |
Orientation |
getOrientationOf(bibliothek.gui.Dockable child)
Tells what orientation child has. |
bibliothek.gui.dock.themes.DefaultStationPaintValue |
getPaint()
Gets a StationPaint which is used to paint some lines onto this
station. |
protected bibliothek.gui.Dockable |
getRemoval()
Gets the child of this station that is about to be removed. |
ToolbarStrategy |
getToolbarStrategy()
Gets the ToolbarStrategy that is currently used by this station. |
int |
indexOf(bibliothek.gui.Dockable dockable)
Gets the location of dockable in the component-panel. |
protected void |
init(String backgroundId)
Initializes the properties that depend on the subclasses |
boolean |
isEnabled(ExpandedState state)
Tells whether this ExpandableToolbarItem likes to be in state state . |
bibliothek.gui.dock.station.StationDragOperation |
prepareDrag(bibliothek.gui.Dockable dockable)
|
protected abstract 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 abstract 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 |
removeExpandableListener(ExpandableToolbarItemListener listener)
Removes the observer listener from this item. |
void |
removeOrientingDockStationListener(OrientingDockStationListener listener)
Removes the observer listener from this station. |
void |
replace(bibliothek.gui.DockStation old,
bibliothek.gui.Dockable next)
|
void |
setController(bibliothek.gui.DockController controller)
|
void |
setExpandedState(ExpandedState state)
Changes the state of this item to state . |
void |
setExpandedState(ExpandedState state,
boolean action)
Sets the ExpandedState of this station. |
void |
setFrontDockable(bibliothek.gui.Dockable dockable)
|
void |
shrink()
|
void |
stretch()
|
String |
toString()
|
Methods inherited from class bibliothek.gui.dock.station.AbstractDockableStation |
---|
accept, acceptable, acceptable, addDockStationListener, asDockStation, callDockUiUpdateTheme, changed, createTitleIcon, delegate, fireDockablesRepositioned, fireDockablesRepositioned, getDirectActionOffers, getIndirectActionOffers, getLayers, getTheme, isChildShowing, isStationShowing, isStationVisible, isVisible, removeDockStationListener, requestChildDisplayer, requestChildDockTitle, updateTheme |
Methods inherited from class bibliothek.gui.dock.dockable.AbstractDockable |
---|
accept, accept, addDockableListener, addDockableStateListener, addDockHierarchyListener, addKeyListener, addMouseInputListener, asDockable, bind, configureDisplayerHints, createRootHandler, 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 |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface bibliothek.gui.dock.station.OrientedDockStation |
---|
setOrientation |
Methods inherited from interface bibliothek.gui.DockStation |
---|
accept, addDockStationListener, aside, changed, drag, drop, drop, getController, getDirectActionOffers, getDockable, getDockableCount, getDockableProperty, getIndirectActionOffers, getLayers, getPlaceholderMapping, getPlaceholders, getTheme, isChildShowing, isStationShowing, isStationVisible, isVisible, move, prepareDrop, removeDockStationListener, replace, requestChildDisplayer, requestChildDockTitle, setPlaceholders, updateTheme |
Methods inherited from interface bibliothek.gui.dock.DockElement |
---|
asDockable, asDockStation, getFactoryID |
Methods inherited from interface bibliothek.gui.dock.component.DockComponentRoot |
---|
getComponentConfiguration, setComponentConfiguration |
Methods inherited from interface bibliothek.gui.Dockable |
---|
accept, accept, addDockableListener, addDockableStateListener, addDockHierarchyListener, addMouseInputListener, bind, configureDisplayerHints, getComponent, 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 bibliothek.gui.dock.util.PropertyKey<Boolean> ON_CONFLICT_ENABLE
ExpandedState
is enabled, because the involved Dockable
s offer different
enabled-states, then the value of this boolean
is the result of the operation.
protected bibliothek.gui.dock.station.DisplayerCollection displayers
DockableDisplayer
s are set correctly
protected bibliothek.gui.dock.themes.DefaultDisplayerFactoryValue displayerFactory
displayers
to create new
DockableDisplayer
s
protected bibliothek.gui.dock.title.DockTitleVersion title
DockTitle
s
protected bibliothek.gui.dock.themes.DefaultStationPaintValue paint
protected Orientation orientation
Constructor Detail |
---|
public AbstractToolbarDockStation()
#init()
once the constructor has been executed.
Method Detail |
---|
public void setController(bibliothek.gui.DockController controller)
setController
in interface bibliothek.gui.Dockable
setController
in interface bibliothek.gui.DockStation
setController
in class bibliothek.gui.dock.dockable.AbstractDockable
protected void init(String backgroundId)
backgroundId
- the identifier used for registering a BackgroundComponent
protected JPanel createBackgroundPanel()
JPanel
which uses the background algorithm
to
paint its content.
protected bibliothek.gui.dock.util.BackgroundAlgorithm getBackgroundAlgorithm()
null
until init(String)
was calledpublic bibliothek.gui.Dockable getFrontDockable()
getFrontDockable
in interface bibliothek.gui.DockStation
public void setFrontDockable(bibliothek.gui.Dockable dockable)
setFrontDockable
in interface bibliothek.gui.DockStation
public String toString()
toString
in class Object
public int indexOf(bibliothek.gui.Dockable dockable)
dockable
in the component-panel.
dockable
- the Dockable
to search
public Orientation getOrientation()
OrientedDockStation
getOrientation
in interface OrientedDockStation
public void addOrientingDockStationListener(OrientingDockStationListener listener)
OrientingDockStation
listener
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 OrientingDockStation
listener
- the new observer, not null
public void removeOrientingDockStationListener(OrientingDockStationListener listener)
OrientingDockStation
listener
from this station.
removeOrientingDockStationListener
in interface OrientingDockStation
listener
- the listener to removepublic Orientation getOrientationOf(bibliothek.gui.Dockable child)
OrientingDockStation
child
has.
getOrientationOf
in interface OrientingDockStation
child
- a child of this station
null
protected void fireOrientingEvent()
OrientingDockStationEvent
.
public ExpandedState getExpandedState()
ExpandableToolbarItem
getExpandedState
in interface ExpandableToolbarItem
@FrameworkOnly public void setExpandedState(ExpandedState state, boolean action)
ExpandedState
of this station.
state
- the new state, not null
action
- if true
, then
setExpandedState(ExpandedState)
is called. Otherwise
the property is changed without actually performing any
actions. The later option should only be used while loading a
layout.public void setExpandedState(ExpandedState state)
ExpandableToolbarItem
state
. Note that state
can be any state, including those for which ExpandableToolbarItem.isEnabled(ExpandedState)
returned
false
.
setExpandedState
in interface ExpandableToolbarItem
state
- the new statepublic boolean isEnabled(ExpandedState state)
ExpandableToolbarItem
ExpandableToolbarItem
likes to be in state state
.
isEnabled
in interface ExpandableToolbarItem
state
- a possible state
this
item likes to be in state
public void stretch()
public void shrink()
public void addExpandableListener(ExpandableToolbarItemListener listener)
ExpandableToolbarItem
listener
to this item.
addExpandableListener
in interface ExpandableToolbarItem
listener
- the new listener, not null
public void removeExpandableListener(ExpandableToolbarItemListener listener)
ExpandableToolbarItem
listener
from this item.
removeExpandableListener
in interface ExpandableToolbarItem
listener
- the listener to removeprotected ExpandableToolbarItemListener[] expandableListeners()
ExpandableToolbarItemListener
s that are currently
registered.
public ToolbarStrategy getToolbarStrategy()
ToolbarStrategy
that is currently used by this station.
null
public boolean canDrag(bibliothek.gui.Dockable dockable)
canDrag
in interface bibliothek.gui.DockStation
protected abstract void remove(bibliothek.gui.Dockable dockable)
dockable
from this station.DockController.freezeLayout()
and DockController.meltLayout()
to ensure none else adds or
removes Dockable
s.
dockable
- the child to removepublic boolean canReplace(bibliothek.gui.Dockable old, bibliothek.gui.Dockable next)
canReplace
in interface bibliothek.gui.DockStation
public void replace(bibliothek.gui.DockStation old, bibliothek.gui.Dockable next)
replace
in interface bibliothek.gui.DockStation
public bibliothek.gui.dock.station.StationDragOperation prepareDrag(bibliothek.gui.Dockable dockable)
prepareDrag
in interface bibliothek.gui.DockStation
protected bibliothek.gui.Dockable getRemoval()
null
protected abstract bibliothek.gui.dock.themes.DefaultDisplayerFactoryValue createDisplayerFactory()
DefaultDisplayerFactoryValue
, a factory used to
create new DockableDisplayer
s.
null
public bibliothek.gui.dock.themes.DefaultStationPaintValue getPaint()
StationPaint
which is used to paint some lines onto this
station. Use a delegate
to exchange the paint.
protected abstract bibliothek.gui.dock.title.DockTitleVersion registerTitle(bibliothek.gui.DockController controller)
DockTitleFactory
of this station at
controller
and returns the associated
DockTitleVersion
.
controller
- the controller at which the default title factory has to be
registered
protected abstract void discard(bibliothek.gui.dock.station.DockableDisplayer displayer)
displayer
with a new DockableDisplayer
.
displayer
- the displayer to replace
IllegalArgumentException
- if displayer
is not a child of this station
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |