bibliothek.gui.dock.frontend
Class SettingsBlop

java.lang.Object
  extended by bibliothek.gui.dock.frontend.SettingsBlop

public class SettingsBlop
extends Object

A set of Settings, represents the content of the file that is used by DockFrontend to store the layout. The SettingsBlop is not yet associated with DockElements, hence it is lightweight and an application can easily store more than one blop.

Author:
Benjamin Sigg

Constructor Summary
SettingsBlop()
           
 
Method Summary
 String getCurrentName()
          Gets the name of the current setting.
 Setting getCurrentSetting()
          Gets the current setting, the layout that is currently shown by the application.
 String[] getNames()
          Gets the names of all Settings that are stored in this blop.
 Setting getSetting(String name)
          Gets the Setting which was stored using the key name.
 void put(String name, Setting setting)
          Stores setting in a Map using name as key.
 void remove(String name)
          Removes the Setting name from this blop.
 void setCurrent(String name, Setting setting)
          Sets name and setting of the current layout.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SettingsBlop

public SettingsBlop()
Method Detail

put

public void put(String name,
                Setting setting)
Stores setting in a Map using name as key.

Parameters:
name - the key of setting
setting - the data to store

remove

public void remove(String name)
Removes the Setting name from this blop.

Parameters:
name - the name of the setting to remove

getNames

public String[] getNames()
Gets the names of all Settings that are stored in this blop.

Returns:
all the names

getSetting

public Setting getSetting(String name)
Gets the Setting which was stored using the key name.

Parameters:
name - the name of a setting
Returns:
the setting or null if name is not known

setCurrent

public void setCurrent(String name,
                       Setting setting)
Sets name and setting of the current layout. The current layout is the layout that is shown on the application (or would be shown if this SettingsBlop is not loaded).

Parameters:
name - the name of the current setting, can be null
setting - the current setting, should not be null

getCurrentName

public String getCurrentName()
Gets the name of the current setting.

Returns:
the name of the current setting, may be null

getCurrentSetting

public Setting getCurrentSetting()
Gets the current setting, the layout that is currently shown by the application.

Returns:
the current setting, may be null