bibliothek.gui.dock.common.behavior
Class ExternalizingCGridAreaConfiguration

java.lang.Object
  extended by bibliothek.gui.dock.common.behavior.ExternalizingCGridAreaConfiguration

public class ExternalizingCGridAreaConfiguration
extends Object

The ExternalizingCGridAreaConfiguration is a piece of code responsible for changing the behavior of the framework such that externalized CDockable are not stacked, but put in a ExternalizingCGridArea.
Clients can use install(), installOn(CControl) and uninstall() to activate or deactivate this configuration.

Author:
Benjamin Sigg

Nested Class Summary
protected  class ExternalizingCGridAreaConfiguration.SplitInserter
          A listener that is added to a ScreenDockStation, every time some Dockable is added to said station, a new ExternalizingCGridArea is created and inserted.
 
Constructor Summary
ExternalizingCGridAreaConfiguration(CControl control)
          Creates a new configuration.
 
Method Summary
protected  ExternalizingCGridArea createGridArea()
          Creates a new ExternalizingCGridArea, the identifier of the new station is unique compared to all the CDockables that are currently registered at control.
protected  ExternalizingCGridAreaConfiguration.SplitInserter createSplitInserter()
          Creates a new instance of ExternalizingCGridAreaConfiguration.SplitInserter.
 CControl getControl()
          Gets the CControl for which this configuration is used.
protected  DockStation getScreenDockStation()
          Gets the DockStation which was registered with the name CControl.EXTERNALIZED_STATION_ID.
protected  ExternalizingCGridAreaConfiguration.SplitInserter getSplitInserter()
          Gets the listener that is responsible for inserting new ExternalizingCGridAreas.
 void install()
          Activates this configuration.
static ExternalizingCGridAreaConfiguration installOn(CControl control)
          Creates a new ExternalizingCGridAreaConfiguration and installs it.
 void uninstall()
          Deactivates this configuration, existing ExternalizingCGridAreas will not be cleaned up.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExternalizingCGridAreaConfiguration

public ExternalizingCGridAreaConfiguration(CControl control)
Creates a new configuration.

Parameters:
control - the control for which this configuration will be used, not null
Method Detail

installOn

public static ExternalizingCGridAreaConfiguration installOn(CControl control)
Creates a new ExternalizingCGridAreaConfiguration and installs it.

Parameters:
control - the control in whose realm this configuration is used
Returns:
the new configuration

getSplitInserter

protected ExternalizingCGridAreaConfiguration.SplitInserter getSplitInserter()
Gets the listener that is responsible for inserting new ExternalizingCGridAreas.

Returns:
the listener, never null

createSplitInserter

protected ExternalizingCGridAreaConfiguration.SplitInserter createSplitInserter()
Creates a new instance of ExternalizingCGridAreaConfiguration.SplitInserter.

Returns:
a new object, not null

getControl

public CControl getControl()
Gets the CControl for which this configuration is used.

Returns:
the CControl

createGridArea

protected ExternalizingCGridArea createGridArea()
Creates a new ExternalizingCGridArea, the identifier of the new station is unique compared to all the CDockables that are currently registered at control.

Returns:
the new area, not null

install

public void install()
Activates this configuration.


uninstall

public void uninstall()
Deactivates this configuration, existing ExternalizingCGridAreas will not be cleaned up.


getScreenDockStation

protected DockStation getScreenDockStation()
Gets the DockStation which was registered with the name CControl.EXTERNALIZED_STATION_ID.

Returns:
the station which will be the parent of all the new ExternalizingCGridAreas