bibliothek.gui.dock.common.intern
Class AbstractDockableCStation

java.lang.Object
  extended by bibliothek.gui.dock.common.intern.AbstractCDockable
      extended by bibliothek.gui.dock.common.intern.AbstractDockableCStation
All Implemented Interfaces:
CStation, CDockable
Direct Known Subclasses:
CGridArea

public abstract class AbstractDockableCStation
extends AbstractCDockable
implements CStation

An abstract implementation of CStation that can be docked like a CDockable.

Author:
Benjamin Sigg

Nested Class Summary
 
Nested classes/interfaces inherited from interface bibliothek.gui.dock.common.intern.CDockable
CDockable.ExtendedMode
 
Field Summary
 
Fields inherited from class bibliothek.gui.dock.common.intern.AbstractCDockable
listenerCollection
 
Fields inherited from interface bibliothek.gui.dock.common.intern.CDockable
ACTION_KEY_CLOSE, ACTION_KEY_EXTERNALIZE, ACTION_KEY_MAXIMIZE, ACTION_KEY_MINIMIZE, ACTION_KEY_NORMALIZE
 
Constructor Summary
protected AbstractDockableCStation()
          Creates a new station but does not yet initialize its fields.
  AbstractDockableCStation(DockStation station, String id, CLocation location, CommonDockable dockable)
          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.
 DockStation 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(DockStation 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 setControl(CControlAccess access)
          Sets the CControl which is responsible for this dockable.
protected abstract  void uninstall(CControlAccess access)
          Called when this station is removed from a CControl.
 
Methods inherited from class bibliothek.gui.dock.common.intern.AbstractCDockable
addCDockablePropertyListener, addCDockableStateListener, addDoubleClickListener, addFocusListener, addKeyboardListener, control, getAction, getAndClearResizeRequest, getBaseLocation, getClose, getColors, getControl, getDefaultLocation, getExtendedMode, getFonts, getMinimizedSize, getWorkingArea, init, intern, isMinimizedHold, isResizeLocked, isResizeLockedHorizontally, isResizeLockedVertically, isTitleShown, isVisible, propertyListeners, putAction, removeCDockablePropertyListener, removeCDockableStateListener, removeDoubleClickListener, removeFocusListener, removeKeyboardListener, setDefaultLocation, setExtendedMode, setLocation, setMinimizedHold, setMinimizedSize, setResizeLocked, setResizeLockedHorizontally, setResizeLockedVertically, setResizeRequest, setResizeRequest, setTitleShown, setVisible, setWorkingArea, stateListeners, toFront
 
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.intern.CDockable
isCloseable, isExternalizable, isMaximizable, isMinimizable, isStackable
 

Constructor Detail

AbstractDockableCStation

public AbstractDockableCStation(DockStation station,
                                String id,
                                CLocation location,
                                CommonDockable dockable)
Creates a new station.

Parameters:
station - the internal representation of this station
id - the unique id of this station
location - a location that points directly to this station
dockable - how this station appears as dockable

AbstractDockableCStation

protected AbstractDockableCStation()
Creates a new station but does not yet initialize its fields. Subclasses should call #init(DockStation, String, CLocation).

Method Detail

init

protected void init(DockStation station,
                    String id,
                    CLocation location,
                    CommonDockable dockable)
Initializes the fields of this station.

Parameters:
station - the internal representation of this station
id - the unique id of this station
location - a location that points directly to this station
dockable - how this station appears as dockable

getStationLocation

public CLocation getStationLocation()
Description copied from interface: CStation
Gets a location which represents directly CStation.getStation().

Specified by:
getStationLocation in interface CStation
Returns:
the location that will always represent the station

getUniqueId

public String getUniqueId()
Description copied from interface: CStation
Gets a unique and constant identifier for this station

Specified by:
getUniqueId in interface CStation
Returns:
the unique identifier

getStation

public DockStation getStation()
Description copied from interface: CStation
Gets the internal representation of this CStation.

Specified by:
getStation in interface CStation
Returns:
the interal representation

setControl

public void setControl(CControlAccess access)
Description copied from class: AbstractCDockable
Sets the CControl which is responsible for this dockable.

Specified by:
setControl in interface CStation
Specified by:
setControl in interface CDockable
Overrides:
setControl in class AbstractCDockable
Parameters:
access - the new control

isWorkingArea

public boolean isWorkingArea()
Description copied from interface: CStation
Tells 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.

Specified by:
isWorkingArea in interface CStation
Returns:
true if this is a working area, false otherwise

asDockable

public CDockable asDockable()
Description copied from interface: CStation
If this station is a CDockable as well, then this method returns the representation of this station as CDockable.

Specified by:
asDockable in interface CStation
Returns:
this as dockable or null

install

protected abstract void install(CControlAccess access)
Called when this station is added to a CControl.

Parameters:
access - access to the internals of the new owner

uninstall

protected abstract void uninstall(CControlAccess access)
Called when this station is removed from a CControl.

Parameters:
access - access to the internals of the old owner