|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object bibliothek.gui.dock.common.intern.AbstractCStation<S>
S
- the kind of station this CStation
is built uponpublic abstract class AbstractCStation<S extends DockStation>
A simple implementation of CStation
. This class adds a
install(CControlAccess)
and uninstall(CControlAccess)
method,
subclasses do not have to track or store the CControlAccess
that
is given in setControl(CControlAccess)
.
Constructor Summary | |
---|---|
protected |
AbstractCStation()
Creates a new station but does not yet initialize its fields. |
|
AbstractCStation(S station,
String id,
CLocation location)
Creates a new station. |
Method Summary | |
---|---|
CDockable |
asDockable()
If this station is a CDockable as well, then this method returns
the representation of this station as CDockable . |
protected CControlAccess |
getControl()
Gets the currently used CControlAccess . |
S |
getStation()
Gets the internal representation of this CStation . |
CLocation |
getStationLocation()
Gets a location which represents directly CStation.getStation() . |
String |
getUniqueId()
Gets a unique and constant identifier for this station |
protected void |
init(S station,
String id,
CLocation location)
Initializes the fields of this station. |
protected abstract void |
install(CControlAccess access)
Called when this station is added to a CControl . |
boolean |
isWorkingArea()
Tells whether this station is a special working area or not. |
void |
setControl(CControlAccess access)
Called by CControl when this CStation is added or removed. |
protected abstract void |
uninstall(CControlAccess access)
Called when this station is removed from a CControl . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AbstractCStation(S station, String id, CLocation location)
station
- the internal representation of this stationid
- the unique id of this stationlocation
- a location that points directly to this stationprotected AbstractCStation()
init(DockStation, String, CLocation)
.
Method Detail |
---|
protected void init(S station, String id, CLocation location)
station
- the internal representation of this stationid
- the unique id of this stationlocation
- a location that points directly to this stationpublic CLocation getStationLocation()
CStation
CStation.getStation()
.
getStationLocation
in interface CStation<S extends DockStation>
station
public String getUniqueId()
CStation
getUniqueId
in interface CStation<S extends DockStation>
public S getStation()
CStation
CStation
.
getStation
in interface CStation<S extends DockStation>
public void setControl(CControlAccess access)
CStation
CControl
when this CStation
is added or removed.
There are two actions which most stations might want to do:add
methods for ModeArea
s accessible through the CLocationModeManager
.
That will ensure that the station can be used as minimize/normalize/... area.ResizeRequestListener
to CControl
in order to be
informed when resize requests are to be handled.
setControl
in interface CStation<S extends DockStation>
access
- access to the internals of the CControl
that uses
this station or null
to remove all ties from a controlprotected CControlAccess getControl()
CControlAccess
.
CControl
, can be null
public boolean isWorkingArea()
CStation
isWorkingArea
in interface CStation<S extends DockStation>
true
if this is a working area, false
otherwisepublic CDockable asDockable()
CStation
CDockable
as well, then this method returns
the representation of this station as CDockable
.
asDockable
in interface CStation<S extends DockStation>
null
protected abstract void install(CControlAccess access)
CControl
.
access
- access to the internals of the new ownerprotected abstract void uninstall(CControlAccess access)
CControl
.
access
- access to the internals of the old owner
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |