bibliothek.gui.dock.frontend
Class DefaultLayoutChangeStrategy.SettingAccess

java.lang.Object
  extended by bibliothek.gui.dock.frontend.DefaultLayoutChangeStrategy.SettingAccess
Direct Known Subclasses:
CLayoutChangeStrategy.CSettingAccess
Enclosing class:
DefaultLayoutChangeStrategy

protected class DefaultLayoutChangeStrategy.SettingAccess
extends java.lang.Object

A wrapper around a Setting, allows algorithms access to the settings but also allows to modify the data without changing the setting.

Author:
Benjamin Sigg

Constructor Summary
DefaultLayoutChangeStrategy.SettingAccess(Setting setting)
          Creates a new wrapper.
 
Method Summary
 void fillMissing(DockSituation situation)
          Using the factories given by situation, this method tries to fill any gaps in the layout.
 int getInvisibleCount()
          Gets the number of stored invisible elements.
 java.lang.String getInvisibleKey(int index)
          Gets the key of the index'th invisible element.
 DockLayoutComposition getInvisibleLayout(int index)
          Gets the layout of the index'th invisible element.
 DockableProperty getInvisibleLocation(int index)
          Gets the location of the index'th invisible element.
 java.lang.String getInvisibleRoot(int index)
          Gets the preferred root of the index'th invisible element.
 DockLayoutComposition getRoot(java.lang.String root)
          Gets the layout of a root.
 java.lang.String[] getRootKeys()
          Gets the keys of all known roots.
 Setting getSetting()
          Gets the setting that is hidden by this wrapper.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultLayoutChangeStrategy.SettingAccess

public DefaultLayoutChangeStrategy.SettingAccess(Setting setting)
Creates a new wrapper.

Parameters:
setting - the source for all data, not null
Method Detail

getSetting

public Setting getSetting()
Gets the setting that is hidden by this wrapper.

Returns:
the source of all data, not null

getRoot

public DockLayoutComposition getRoot(java.lang.String root)
Gets the layout of a root.

Parameters:
root - the root
Returns:
the layout or null

getRootKeys

public java.lang.String[] getRootKeys()
Gets the keys of all known roots.

Returns:
the keys of the roots

getInvisibleCount

public int getInvisibleCount()
Gets the number of stored invisible elements.

Returns:
the number of elements

getInvisibleKey

public java.lang.String getInvisibleKey(int index)
Gets the key of the index'th invisible element.

Parameters:
index - the index of the element
Returns:
the key

getInvisibleRoot

public java.lang.String getInvisibleRoot(int index)
Gets the preferred root of the index'th invisible element.

Parameters:
index - the index of the element
Returns:
the root

getInvisibleLocation

public DockableProperty getInvisibleLocation(int index)
Gets the location of the index'th invisible element.

Parameters:
index - the index of the element
Returns:
the location

getInvisibleLayout

public DockLayoutComposition getInvisibleLayout(int index)
Gets the layout of the index'th invisible element.

Parameters:
index - the index of the layout
Returns:
associated information, may be null

fillMissing

public void fillMissing(DockSituation situation)
Using the factories given by situation, this method tries to fill any gaps in the layout.

Parameters:
situation - a set of factories to use
Throws:
java.lang.IllegalArgumentException - if situation cannot handle the content of this setting