bibliothek.gui.dock.facile.mode
Class MaximizedModeSetting

java.lang.Object
  extended by bibliothek.gui.dock.facile.mode.MaximizedModeSetting
All Implemented Interfaces:
ModeSetting<Location>

public class MaximizedModeSetting
extends java.lang.Object
implements ModeSetting<Location>

Settings associated with a MaximizedMode.

Author:
Benjamin Sigg

Field Summary
static ModeSettingFactory<Location> FACTORY
          factory creating new MaximizedModeSettings
 
Constructor Summary
MaximizedModeSetting()
           
 
Method Summary
 java.util.Map<java.lang.String,Location> getLastMaximizedLocation()
          Gets the location of Dockables that are currently maximized.
 java.util.Map<java.lang.String,Path> getLastMaximizedMode()
          Gets the modes of Dockables that are currently maximized.
 Path getModeId()
          Gets the unique identifier of the Mode this setting is associated with.
<B> void
read(java.io.DataInputStream in, ModeSettingsConverter<Location,B> converter)
          Reads the contents of this setting from in.
<B> void
read(XElement element, ModeSettingsConverter<Location,B> converter)
          Reads the contents of this setting from element.
 void setLastMaximizedLocation(java.util.Map<java.lang.String,Location> lastMaximizedLocation)
          Sets the location of Dockables that are maximized.
 void setLastMaximizedMode(java.util.Map<java.lang.String,Path> lastMaximizedMode)
          Sets the mode of Dockables that are maximized.
<B> void
write(java.io.DataOutputStream out, ModeSettingsConverter<Location,B> converter)
          Writes the contents of this setting into out.
<B> void
write(XElement element, ModeSettingsConverter<Location,B> converter)
          Writes the contents of this setting into element.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

FACTORY

public static ModeSettingFactory<Location> FACTORY
factory creating new MaximizedModeSettings

Constructor Detail

MaximizedModeSetting

public MaximizedModeSetting()
Method Detail

getModeId

public Path getModeId()
Description copied from interface: ModeSetting
Gets the unique identifier of the Mode this setting is associated with.

Specified by:
getModeId in interface ModeSetting<Location>
Returns:
the identifier

setLastMaximizedLocation

public void setLastMaximizedLocation(java.util.Map<java.lang.String,Location> lastMaximizedLocation)
Sets the location of Dockables that are maximized. This method makes a copy of the map.

Parameters:
lastMaximizedLocation - the map that is going to be copied

setLastMaximizedMode

public void setLastMaximizedMode(java.util.Map<java.lang.String,Path> lastMaximizedMode)
Sets the mode of Dockables that are maximized. This method makes a copy of the map.

Parameters:
lastMaximizedMode - the map that is going to be copied

getLastMaximizedLocation

public java.util.Map<java.lang.String,Location> getLastMaximizedLocation()
Gets the location of Dockables that are currently maximized.

Returns:
an unmodifiable map

getLastMaximizedMode

public java.util.Map<java.lang.String,Path> getLastMaximizedMode()
Gets the modes of Dockables that are currently maximized.

Returns:
an unmodifiable map

write

public <B> void write(java.io.DataOutputStream out,
                      ModeSettingsConverter<Location,B> converter)
           throws java.io.IOException
Description copied from interface: ModeSetting
Writes the contents of this setting into out.

Specified by:
write in interface ModeSetting<Location>
Parameters:
out - the stream to write into
converter - converts data to and from persistent storage
Throws:
java.io.IOException - in case of an error

read

public <B> void read(java.io.DataInputStream in,
                     ModeSettingsConverter<Location,B> converter)
          throws java.io.IOException
Description copied from interface: ModeSetting
Reads the contents of this setting from in.

Specified by:
read in interface ModeSetting<Location>
Parameters:
in - the stream to read from
converter - converts data to and from persistent storage
Throws:
java.io.IOException - in case of an error

write

public <B> void write(XElement element,
                      ModeSettingsConverter<Location,B> converter)
Description copied from interface: ModeSetting
Writes the contents of this setting into element. This method should add children to element, but not change the attributes of element.

Specified by:
write in interface ModeSetting<Location>
Parameters:
element - the item to write into
converter - converts data to and from persistent storage

read

public <B> void read(XElement element,
                     ModeSettingsConverter<Location,B> converter)
Description copied from interface: ModeSetting
Reads the contents of this setting from element.

Specified by:
read in interface ModeSetting<Location>
Parameters:
element - the item to read from
converter - converts data to and from persistent storage