bibliothek.gui.dock.common.mode.station
Class CSplitDockStationHandle

java.lang.Object
  extended by bibliothek.gui.dock.common.mode.station.CSplitDockStationHandle
Direct Known Subclasses:
ExternalizedCSplitDockStationHandler

public class CSplitDockStationHandle
extends Object

Combination of CMaximizedModeArea, CNormalModeArea and a SplitDockStation.

Author:
Benjamin Sigg

Nested Class Summary
protected  class CSplitDockStationHandle.Maximal
          Represents a SplitDockStation as a CMaximizedModeArea.
protected static class CSplitDockStationHandle.ModeAreaListenerWrapper
          A wrapper for a ModeAreaListener.
protected  class CSplitDockStationHandle.Normal
          Represents the SplitDockStation as CNormalModeArea.
 
Constructor Summary
CSplitDockStationHandle(CStation<CSplitDockStation> station, CLocationModeManager manager)
          Creates a new handle.
 
Method Summary
protected  void add(CSplitDockStationHandle.ModeAreaListenerWrapper listener)
          Adds listener to this handle, the listener will be invoked if the current fullscreen-Dockable of the SplitDockStation changed.
 CMaximizedModeArea asMaximziedModeArea()
          Returns this as MaximizedModeArea
 CNormalModeArea asNormalModeArea()
          Returns this as NormalModeArea
 void dropAside(Dockable dockable)
          Ensures that dockable is a child of this station.
 CStation<CSplitDockStation> getCStation()
          Gets the CStation which is managed by this handle.
protected  LocationMode getNormalMode()
          Gets the mode which should be used to unmaximize children.
 SplitDockStation getStation()
          Gets the station which is managed by this handle.
protected  void remove(CSplitDockStationHandle.ModeAreaListenerWrapper listener)
          Removes listener from this handle.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CSplitDockStationHandle

public CSplitDockStationHandle(CStation<CSplitDockStation> station,
                               CLocationModeManager manager)
Creates a new handle.

Parameters:
station - the station to handle
manager - the manager in whose realm this handle is used
Method Detail

add

protected void add(CSplitDockStationHandle.ModeAreaListenerWrapper listener)
Adds listener to this handle, the listener will be invoked if the current fullscreen-Dockable of the SplitDockStation changed.

Parameters:
listener - the new listener

remove

protected void remove(CSplitDockStationHandle.ModeAreaListenerWrapper listener)
Removes listener from this handle.

Parameters:
listener - the listener to remove

getStation

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

Returns:
the station

getCStation

public CStation<CSplitDockStation> getCStation()
Gets the CStation which is managed by this handle.

Returns:
the station

asNormalModeArea

public CNormalModeArea asNormalModeArea()
Returns this as NormalModeArea

Returns:
a representation of this

asMaximziedModeArea

public CMaximizedModeArea asMaximziedModeArea()
Returns this as MaximizedModeArea

Returns:
a representation of this

getNormalMode

protected LocationMode getNormalMode()
Gets the mode which should be used to unmaximize children.

Returns:
the mode to unmaximize children

dropAside

public void dropAside(Dockable dockable)
Ensures that dockable is a child of this station.

Parameters:
dockable - the element to drop, must not yet be a child of this station
Throws:
IllegalStateException - if dockable already is a child of this station.