|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectbibliothek.gui.dock.common.intern.AbstractCStation<S>
S - the kind of station this CStation is built uponpublic abstract class AbstractCStation<S extends CommonDockStation<?,?>>
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 setControlAccess(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. |
CLocation |
getDropLocation()
Creates a CLocation that can be used to drop a new CDockable on this station
or one of its children stations. |
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 |
setControlAccess(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 |
| Methods inherited from interface bibliothek.gui.dock.common.CStation |
|---|
createPerspective, getTypeId |
| 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(CommonDockStation, 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()
CStationCStation.getStation().
getStationLocation in interface CStation<S extends CommonDockStation<?,?>>stationpublic CLocation getDropLocation()
CStationCLocation that can be used to drop a new CDockable on this station
or one of its children stations. This method returns the "optimal spot", where the definition
of "optimal spot" is up to the station itself. The default implementations however call
CLocationModeManager.getDropLocation(CStation).
getDropLocation in interface CStation<S extends CommonDockStation<?,?>>CDockable or null if this
station is not able to calculate the optimal spot (e.g. because the station is not visible)public String getUniqueId()
CStation
getUniqueId in interface CStation<S extends CommonDockStation<?,?>>public S getStation()
CStationCStation.
getStation in interface CStation<S extends CommonDockStation<?,?>>public void setControlAccess(CControlAccess access)
CStationCControl when this CStation is added or removed.
There are two actions which most stations might want to do:add methods for ModeAreas 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.
setControlAccess in interface CStation<S extends CommonDockStation<?,?>>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 nullpublic boolean isWorkingArea()
CStationCControl.addStation(CStation, boolean))
or must be a SingleCDockable.
isWorkingArea in interface CStation<S extends CommonDockStation<?,?>>true if this is a working area, false
otherwisepublic CDockable asDockable()
CStationCDockable as well, then this method returns
the representation of this station as CDockable.
asDockable in interface CStation<S extends CommonDockStation<?,?>>nullprotected 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 | |||||||||