|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object bibliothek.gui.dock.station.AbstractDockStation
public abstract class AbstractDockStation
An abstract implementation of DockStation
. This station
has the ability to send events to registered
DockStationListeners
.
Field Summary | |
---|---|
protected DockStationListenerManager |
listeners
The list of DockStationListeners which
can be used to send events to all listeners. |
Constructor Summary | |
---|---|
AbstractDockStation()
|
Method Summary | |
---|---|
boolean |
accept(Dockable child)
Tells whether this station accepts child as a new child,
or refuses child . |
void |
addDockStationListener(DockStationListener listener)
Adds a listener to this station. |
protected abstract void |
callDockUiUpdateTheme()
Calls the method DockUI .DockUI.updateTheme(DockStation, DockFactory)
with this as the first argument, and an appropriate factory
as the second argument. |
boolean |
canCompare(DockStation station)
|
void |
changed(Dockable dockable,
DockTitle title,
boolean active)
Called by the DockController of this station to indicate that
the active-state of title has been changed. |
int |
compare(DockStation station)
|
protected abstract DockComponentRootHandler |
createRootHandler()
Creates a new DockComponentRootHandler which will be responsible for keeping track of
all the Component s of this station. |
protected DockStationDelegate |
delegate()
Creates a set of algorithms which may depend on this DockStation , and which perform
various tasks that are handled the same way in many implementations of DockStation . |
DockComponentConfiguration |
getComponentConfiguration()
Gets the currently applied configuration. |
DockController |
getController()
Gets the controller of this station. |
protected DockComponentRootHandler |
getRootHandler()
Gets the DockComponentRootHandler which is responsible for keeping track of all the
Component s of this station. |
DockTheme |
getTheme()
Gets the current theme of this station. |
boolean |
isVisible(Dockable dockable)
Tells whether the child dockable is visible or not. |
void |
removeDockStationListener(DockStationListener listener)
Removes a listener from this station. |
void |
requestChildDisplayer(DisplayerRequest request)
Provides a DockableDisplayer for a child of this station. |
void |
requestChildDockTitle(DockTitleRequest request)
Provides a DockTitle for a child of this station. |
void |
setComponentConfiguration(DockComponentConfiguration configuration)
Sets a configuration which is to be applied to all Component s (and maybe their children) of this DockComponentRoot . |
void |
setController(DockController controller)
Sets the controller of this station. |
void |
updateTheme()
Updates the DockTheme of this station. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface bibliothek.gui.DockStation |
---|
aside, canDrag, canReplace, drag, drop, drop, getDirectActionOffers, getDockable, getDockableCount, getDockableProperty, getFrontDockable, getIndirectActionOffers, getLayers, getPlaceholderMapping, getPlaceholders, isChildShowing, isStationShowing, isStationVisible, move, prepareDrag, prepareDrop, replace, replace, setFrontDockable, setPlaceholders |
Methods inherited from interface bibliothek.gui.dock.DockElement |
---|
asDockable, asDockStation, getFactoryID |
Field Detail |
---|
protected DockStationListenerManager listeners
DockStationListeners
which
can be used to send events to all listeners.
Constructor Detail |
---|
public AbstractDockStation()
Method Detail |
---|
protected DockComponentRootHandler getRootHandler()
DockComponentRootHandler
which is responsible for keeping track of all the
Component
s of this station.
null
protected abstract DockComponentRootHandler createRootHandler()
DockComponentRootHandler
which will be responsible for keeping track of
all the Component
s of this station.
public void setController(DockController controller)
DockStation
DockTitle
, then the titles have to be replaced
by new instances (assuming the controller is really new). The
title has to get new DockTitleVersions
through
the DockTitleManager
of controller
.null
means that this station is currently
not shown.
setController
in interface DockStation
controller
- the owner of this station, can be null
public DockController getController()
DockStation
getController
in interface DockElement
getController
in interface DockStation
null
if no controller is setDockStation.setController(DockController)
public DockComponentConfiguration getComponentConfiguration()
DockComponentRoot
getComponentConfiguration
in interface DockComponentRoot
null
public void setComponentConfiguration(DockComponentConfiguration configuration)
DockComponentRoot
Component
s (and maybe their children) of this DockComponentRoot
.
setComponentConfiguration
in interface DockComponentRoot
configuration
- the new configuration or null
.public DockTheme getTheme()
DockStation
null
,
but that means that the station is not fully initialized, and might not
work correct.
getTheme
in interface DockStation
null
.public void updateTheme()
DockStation
DockTheme
of this station. The new theme
has to be read from the controller
of
this station. If the controller is null
, this method
should return immediately.DockUI.updateTheme(DockStation, DockFactory)
to implement this method.
updateTheme
in interface DockStation
protected abstract void callDockUiUpdateTheme() throws IOException
DockUI
.DockUI.updateTheme(DockStation, DockFactory)
with this
as the first argument, and an appropriate factory
as the second argument.
IOException
- if the DockUI throws an exceptionpublic void addDockStationListener(DockStationListener listener)
DockStation
addDockStationListener
in interface DockStation
listener
- the listener to addpublic void removeDockStationListener(DockStationListener listener)
DockStation
removeDockStationListener
in interface DockStation
listener
- the listener to removepublic boolean isVisible(Dockable dockable)
DockStation
dockable
is visible or not. Visible
means that the component
of dockable
can be seen by the user. The result must be false
if
this station is not visible.
isVisible
in interface DockStation
dockable
- the child whose visibility-state is questioned
dockable
is visible or notDockStation.isStationVisible()
public boolean accept(Dockable child)
DockStation
child
as a new child,
or refuses child
. The user will not be able to drop
a Dockable
onto this station if this method returns
false
.
accept
in interface DockStation
child
- a Dockable
which may become a child
true
if child
is acceptedpublic boolean canCompare(DockStation station)
public int compare(DockStation station)
public void changed(Dockable dockable, DockTitle title, boolean active)
DockStation
DockController
of this station to indicate that
the active-state of title
has been changed. This station
should call the method title.changed
with an appropriate event. The station may add some additional information
to this call.
changed
in interface DockStation
dockable
- the child whose title is changedtitle
- the changed title, may not be boundactive
- the new state of the titlepublic void requestChildDockTitle(DockTitleRequest request)
DockStation
DockTitle
for a child of this station. This method
must call DockTitleRequest.answer(DockTitle)
to set the result.DockStation
s won't have the need to implement this method,
leaving it empty will advice the framework to use another source for
new DockTitle
s.
requestChildDockTitle
in interface DockStation
request
- the request to answer, not null
public void requestChildDisplayer(DisplayerRequest request)
DockStation
DockableDisplayer
for a child of this station. This method
must call DisplayerRequest.answer(DockableDisplayer)
to set the result.
requestChildDisplayer
in interface DockStation
request
- the request to answer, not null
protected DockStationDelegate delegate()
DockStation
, and which perform
various tasks that are handled the same way in many implementations of DockStation
.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |