S
- the kind of station represented by this wrapperpublic abstract class AbstractDockableCStation<S extends CommonDockStation<?,?>> extends AbstractCDockable implements CStation<S>
listenerCollection
ACTION_KEY_CLOSE, ACTION_KEY_EXTERNALIZE, ACTION_KEY_MAXIMIZE, ACTION_KEY_MINIMIZE, ACTION_KEY_MINIMIZE_HOLD, ACTION_KEY_NORMALIZE, ACTION_KEY_UNEXTERNALIZE, ACTION_KEY_UNMAXIMIZE_EXTERNALIZED
Modifier | Constructor and Description |
---|---|
protected |
AbstractDockableCStation()
Creates a new station but does not yet initialize its fields.
|
|
AbstractDockableCStation(S station,
String id,
CLocation location,
CommonDockable dockable)
Creates a new station.
|
Modifier and Type | Method and Description |
---|---|
CDockable |
asDockable()
|
CStation<?> |
asStation()
|
protected CommonDockable |
createCommonDockable()
Creates the
CommonDockable that is associated with this dockable, called the first
time the CommonDockable is required for an operation. |
CLocation |
getDropLocation()
|
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,
CommonDockable dockable)
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)
Sets the
CControl which is responsible for this CDockable . |
String |
toString() |
protected abstract void |
uninstall(CControlAccess access)
Called when this station is removed from a
CControl . |
addCDockableLocationListener, addCDockablePropertyListener, addCDockableStateListener, addDoubleClickListener, addFocusListener, addKeyboardListener, addVetoClosingListener, control, getAction, getAndClearResizeRequest, getAutoBaseLocation, getBaseLocation, getClose, getColors, getControl, getControlAccess, getDefaultLocation, getDockableUniqueId, getExtendedMode, getFocusComponent, getFonts, getGrouping, getMinimizedSize, getParentStation, getWorkingArea, hasParent, init, intern, isDockableVisible, isEnabled, isNormalizeable, isResizeLocked, isResizeLockedHorizontally, isResizeLockedVertically, isShowing, isSingleTabShown, isSticky, isStickySwitchable, isTitleShown, isVisible, propertyListeners, putAction, removeCDockableLocationListener, removeCDockablePropertyListener, removeCDockableStateListener, removeDoubleClickListener, removeFocusListener, removeKeyboardListener, removeVetoClosingListener, setDefaultLocation, setEnabled, setExtendedMode, setFocusComponent, setGrouping, setLocation, setLocationsAside, setLocationsAside, setLocationsAsideFocused, setMinimizedSize, setResizeLocked, setResizeLockedHorizontally, setResizeLockedVertically, setResizeRequest, setResizeRequest, setSingleTabShown, setSticky, setStickySwitchable, setTitleShown, setVisible, setWorkingArea, stateListeners, toFront
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
createPerspective, getTypeId
isCloseable, isExternalizable, isMaximizable, isMinimizable, isStackable
public AbstractDockableCStation(S station, String id, CLocation location, CommonDockable dockable)
station
- the internal representation of this stationid
- the unique id of this stationlocation
- a location that points directly to this stationdockable
- how this station appears as dockableprotected AbstractDockableCStation()
init(CommonDockStation, String, CLocation, CommonDockable)
.protected void init(S station, String id, CLocation location, CommonDockable dockable)
station
- the internal representation of this stationid
- the unique id of this stationlocation
- a location that points directly to this stationdockable
- how this station appears as dockablepublic String toString()
toString
in class AbstractCDockable
protected CommonDockable createCommonDockable()
AbstractCDockable
CommonDockable
that is associated with this dockable, called the first
time the CommonDockable
is required for an operation.createCommonDockable
in class AbstractCDockable
public CLocation getStationLocation()
CStation
CStation.getStation()
.getStationLocation
in interface CStation<S extends CommonDockStation<?,?>>
station
public CLocation getDropLocation()
CStation
CLocation
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)CDockable.setLocationsAside(CDockable)
,
CDockable.setLocationsAsideFocused()
public String getUniqueId()
CStation
getUniqueId
in interface CStation<S extends CommonDockStation<?,?>>
public S getStation()
CStation
CStation
.getStation
in interface CStation<S extends CommonDockStation<?,?>>
public void setControlAccess(CControlAccess access)
CDockable
CControl
which is responsible for this CDockable
. Subclasses
must call CControlAccess.link(CDockable, CDockableAccess)
to grant
the CControl
access to the internal properties of this
CDockable
. link
can also be used to revoke access.setControlAccess
in interface CStation<S extends CommonDockStation<?,?>>
setControlAccess
in interface CDockable
setControlAccess
in class AbstractCDockable
access
- the new control or null
public boolean isWorkingArea()
CStation
CControl.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()
CStation
CDockable
as well, then this method returns
the representation of this station as CDockable
.asDockable
in interface CStation<S extends CommonDockStation<?,?>>
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