bibliothek.gui.dock.facile.mode
Class CLocationModeSettings<B>

java.lang.Object
  extended by bibliothek.gui.dock.support.mode.ModeSettings<Location,B>
      extended by bibliothek.gui.dock.facile.mode.CLocationModeSettings<B>
Type Parameters:
B - the intermediate format used for properties by the ModeSettingsConverter

@FrameworkOnly
public class CLocationModeSettings<B>
extends ModeSettings<Location,B>

This ModeSettings provides operations to load settings that were stored with version 1.0.7, no additional settings were added.

Author:
Benjamin Sigg

Constructor Summary
CLocationModeSettings(ModeSettingsConverter<Location,B> converter)
          Creates a new setting.
 
Method Summary
 void rescue(CMaximizedMode maximizedMode)
          If there were settings rescued from an older version, then these settings are transfered to maximizedMode.
protected  void rescueSettings(java.io.DataInputStream in, Version version)
          Called if some setting with version < 1.0.8 is found.
protected  void rescueSettings(XElement element)
          Called if some setting does not have the "modes" entry, the assumption is that only old settings are missing this entry.
protected  Path resuceMode(java.lang.String mode)
          Called if a single identifier of a mode is found as was used in version 1.0.7 and below.
 
Methods inherited from class bibliothek.gui.dock.support.mode.ModeSettings
add, add, add, addFactory, getConverter, getCurrent, getHistory, getId, getProperties, getSettings, indexOf, read, readXML, size, write, writeXML
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CLocationModeSettings

public CLocationModeSettings(ModeSettingsConverter<Location,B> converter)
Creates a new setting.

Parameters:
converter - conversion tool for meta data
Method Detail

rescue

public void rescue(CMaximizedMode maximizedMode)
If there were settings rescued from an older version, then these settings are transfered to maximizedMode.

Parameters:
maximizedMode - the mode to store settings in

resuceMode

protected Path resuceMode(java.lang.String mode)
Description copied from class: ModeSettings
Called if a single identifier of a mode is found as was used in version 1.0.7 and below.

Overrides:
resuceMode in class ModeSettings<Location,B>
Parameters:
mode - the single identifier
Returns:
the identifier of the matching mode, can be null

rescueSettings

protected void rescueSettings(java.io.DataInputStream in,
                              Version version)
                       throws java.io.IOException
Description copied from class: ModeSettings
Called if some setting with version < 1.0.8 is found. Subclasses may override this method to read and interpret the old settings. The default implementation does nothing.

Overrides:
rescueSettings in class ModeSettings<Location,B>
Parameters:
in - the stream to read from
version - the version that was found
Throws:
java.io.IOException - in case of an error

rescueSettings

protected void rescueSettings(XElement element)
Description copied from class: ModeSettings
Called if some setting does not have the "modes" entry, the assumption is that only old settings are missing this entry.

Overrides:
rescueSettings in class ModeSettings<Location,B>
Parameters:
element - the entry that has to be rescued