bibliothek.gui.dock.facile.mode.station
Class ScreenDockStationHandle

java.lang.Object
  extended by bibliothek.gui.dock.facile.mode.station.ScreenDockStationHandle
All Implemented Interfaces:
ExternalizedModeArea, ModeArea, StationModeArea
Direct Known Subclasses:
CScreenDockStationHandle

public class ScreenDockStationHandle
extends Object
implements ExternalizedModeArea

A link between a ScreenDockStation and the ExternalizedModeArea interface.

Author:
Benjamin Sigg

Constructor Summary
ScreenDockStationHandle(String id, ScreenDockStation station)
          Creates a new handle.
 
Method Summary
 void addModeAreaListener(ModeAreaListener listener)
          Adds a listener to this area.
 DockableProperty getLocation(Dockable child)
          Gets the location of dockable which is a child of this station.
 ScreenDockStation getStation()
          Gets the station which is managed by this handle.
 String getUniqueId()
          Gets a unique identifier for this area.
 boolean isChild(Dockable dockable)
          Tells whether dockable is a direct child of this station.
 void removeModeAreaListener(ModeAreaListener listener)
          Removes a listener from this area.
 boolean respectWorkingAreas()
          Tells whether children of this area have to respect the settings for CWorkingAreas.
 void setController(DockController controller)
          Connects this area with a controller.
 void setLocation(Dockable dockable, DockableProperty location, AffectedSet set)
          Sets the location of dockable to location and ensures that dockable is a child of this station.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ScreenDockStationHandle

public ScreenDockStationHandle(String id,
                               ScreenDockStation station)
Creates a new handle.

Parameters:
id - the unique identifier of this handle
station - the wrapped station
Method Detail

addModeAreaListener

public void addModeAreaListener(ModeAreaListener listener)
Description copied from interface: ModeArea
Adds a listener to this area.

Specified by:
addModeAreaListener in interface ModeArea
Parameters:
listener - the new listener

removeModeAreaListener

public void removeModeAreaListener(ModeAreaListener listener)
Description copied from interface: ModeArea
Removes a listener from this area.

Specified by:
removeModeAreaListener in interface ModeArea
Parameters:
listener - the listener to remove

setController

public void setController(DockController controller)
Description copied from interface: ModeArea
Connects this area with a controller. It's up to the area to add or remove listeners if necessary.

Specified by:
setController in interface ModeArea
Parameters:
controller - the controller or null

getStation

public ScreenDockStation getStation()
Gets the station which is managed by this handle.

Specified by:
getStation in interface ModeArea
Returns:
the station

respectWorkingAreas

public boolean respectWorkingAreas()
Description copied from interface: ModeArea
Tells whether children of this area have to respect the settings for CWorkingAreas.

Specified by:
respectWorkingAreas in interface ModeArea
Returns:
whether the settings are to be respected

getLocation

public DockableProperty getLocation(Dockable child)
Description copied from interface: StationModeArea
Gets the location of dockable which is a child of this station.

Specified by:
getLocation in interface StationModeArea
Parameters:
child - the child
Returns:
the location, may be null

setLocation

public void setLocation(Dockable dockable,
                        DockableProperty location,
                        AffectedSet set)
Description copied from interface: StationModeArea
Sets the location of dockable to location and ensures that dockable is a child of this station.

Specified by:
setLocation in interface StationModeArea
Parameters:
dockable - the new or old child
location - the new location, may be null
set - this method has to store all Dockables which might have changed their mode in the set.

getUniqueId

public String getUniqueId()
Description copied from interface: ModeArea
Gets a unique identifier for this area.

Specified by:
getUniqueId in interface ModeArea
Returns:
the unique identifier
See Also:
CStation.getUniqueId()

isChild

public boolean isChild(Dockable dockable)
Description copied from interface: ModeArea
Tells whether dockable is a direct child of this station.

Specified by:
isChild in interface ModeArea
Parameters:
dockable - some element
Returns:
true if and only if the parent of dockable is identical to this station