Class AbstractDockableCStation<S extends CommonDockStation<?,?>>
java.lang.Object
bibliothek.gui.dock.common.intern.AbstractCDockable
bibliothek.gui.dock.common.intern.AbstractDockableCStation<S>
- Type Parameters:
S- the kind of station represented by this wrapper
- Direct Known Subclasses:
CGridArea
public abstract class AbstractDockableCStation<S extends CommonDockStation<?,?>>
extends AbstractCDockable
implements CStation<S>
- Author:
- Benjamin Sigg
-
Field Summary
Fields inherited from class bibliothek.gui.dock.common.intern.AbstractCDockable
listenerCollectionFields inherited from interface bibliothek.gui.dock.common.intern.CDockable
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 -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCreates a new station but does not yet initialize its fields.AbstractDockableCStation(S station, String id, CLocation location, CommonDockable dockable) Creates a new station. -
Method Summary
Modifier and TypeMethodDescriptionCStation<?>protected CommonDockableCreates theCommonDockablethat is associated with this dockable, called the first time theCommonDockableis required for an operation.Gets the internal representation of thisCStation.Gets a location which represents directlyCStation.getStation().Gets a unique and constant identifier for this stationprotected voidinit(S station, String id, CLocation location, CommonDockable dockable) Initializes the fields of this station.protected abstract voidinstall(CControlAccess access) Called when this station is added to aCControl.booleanTells whether this station is a special working area or not.voidsetControlAccess(CControlAccess access) Sets theCControlwhich is responsible for thisCDockable.toString()protected abstract voiduninstall(CControlAccess access) Called when this station is removed from aCControl.Methods inherited from class bibliothek.gui.dock.common.intern.AbstractCDockable
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, toFrontMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface bibliothek.gui.dock.common.intern.CDockable
isCloseable, isExternalizable, isMaximizable, isMinimizable, isStackableMethods inherited from interface bibliothek.gui.dock.common.CStation
createPerspective, getTypeId
-
Constructor Details
-
AbstractDockableCStation
Creates a new station.- Parameters:
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 dockable
-
AbstractDockableCStation
protected AbstractDockableCStation()Creates a new station but does not yet initialize its fields. Subclasses should callinit(CommonDockStation, String, CLocation, CommonDockable).
-
-
Method Details
-
init
Initializes the fields of this station.- Parameters:
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 dockable
-
toString
- Overrides:
toStringin classAbstractCDockable
-
createCommonDockable
Description copied from class:AbstractCDockableCreates theCommonDockablethat is associated with this dockable, called the first time theCommonDockableis required for an operation.- Specified by:
createCommonDockablein classAbstractCDockable- Returns:
- the new dockable
-
getStationLocation
Description copied from interface:CStationGets a location which represents directlyCStation.getStation().- Specified by:
getStationLocationin interfaceCStation<S extends CommonDockStation<?,?>> - Returns:
- the location that will always represent the
station
-
getDropLocation
Description copied from interface:CStationCreates aCLocationthat can be used to drop a newCDockableon 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 callCLocationModeManager.getDropLocation(CStation).- Specified by:
getDropLocationin interfaceCStation<S extends CommonDockStation<?,?>> - Returns:
- the optimal spot for dropping a new
CDockableornullif this station is not able to calculate the optimal spot (e.g. because the station is not visible) - See Also:
-
getUniqueId
Description copied from interface:CStationGets a unique and constant identifier for this station- Specified by:
getUniqueIdin interfaceCStation<S extends CommonDockStation<?,?>> - Returns:
- the unique identifier
-
getStation
Description copied from interface:CStationGets the internal representation of thisCStation.- Specified by:
getStationin interfaceCStation<S extends CommonDockStation<?,?>> - Returns:
- the internal representation
-
asStation
Description copied from interface:CDockable -
setControlAccess
Description copied from interface:CDockableSets theCControlwhich is responsible for thisCDockable. Subclasses must callCControlAccess.link(CDockable, CDockableAccess)to grant theCControlaccess to the internal properties of thisCDockable.linkcan also be used to revoke access.- Specified by:
setControlAccessin interfaceCDockable- Specified by:
setControlAccessin interfaceCStation<S extends CommonDockStation<?,?>> - Overrides:
setControlAccessin classAbstractCDockable- Parameters:
access- the new control ornull
-
isWorkingArea
public boolean isWorkingArea()Description copied from interface:CStationTells whether this station is a special working area or not. It is not possible drag a child from a working area if it is registered there, or to drop a child onto a working area if it is not registered there.
Working areas must either be registered as root-station (seeCControl.addStation(CStation, boolean)) or must be aSingleCDockable.- Specified by:
isWorkingAreain interfaceCStation<S extends CommonDockStation<?,?>> - Returns:
trueif this is a working area,falseotherwise
-
asDockable
Description copied from interface:CStationIf this station is aCDockableas well, then this method returns the representation of this station asCDockable.- Specified by:
asDockablein interfaceCStation<S extends CommonDockStation<?,?>> - Returns:
- this as dockable or
null
-
install
Called when this station is added to aCControl.- Parameters:
access- access to the internals of the new owner
-
uninstall
Called when this station is removed from aCControl.- Parameters:
access- access to the internals of the old owner
-