bibliothek.gui.dock.support.mode
Interface ModeSetting<A>

Type Parameters:
A - format of data used by the ModeManager this ModeSetting is associated with
All Known Implementing Classes:
MaximizedModeSetting

public interface ModeSetting<A>

A set of properties that belong to some Mode but are stored independent from that mode.

Author:
Benjamin Sigg

Method Summary
 Path getModeId()
          Gets the unique identifier of the Mode this setting is associated with.
<B> void
read(DataInputStream in, ModeSettingsConverter<A,B> converter)
          Reads the contents of this setting from in.
<B> void
read(XElement element, ModeSettingsConverter<A,B> converter)
          Reads the contents of this setting from element.
<B> void
write(DataOutputStream out, ModeSettingsConverter<A,B> converter)
          Writes the contents of this setting into out.
<B> void
write(XElement element, ModeSettingsConverter<A,B> converter)
          Writes the contents of this setting into element.
 

Method Detail

getModeId

Path getModeId()
Gets the unique identifier of the Mode this setting is associated with.

Returns:
the identifier

write

<B> void write(DataOutputStream out,
               ModeSettingsConverter<A,B> converter)
           throws IOException
Writes the contents of this setting into out.

Parameters:
out - the stream to write into
converter - converts data to and from persistent storage
Throws:
IOException - in case of an error

read

<B> void read(DataInputStream in,
              ModeSettingsConverter<A,B> converter)
          throws IOException
Reads the contents of this setting from in.

Parameters:
in - the stream to read from
converter - converts data to and from persistent storage
Throws:
IOException - in case of an error

write

<B> void write(XElement element,
               ModeSettingsConverter<A,B> converter)
Writes the contents of this setting into element. This method should add children to element, but not change the attributes of element.

Parameters:
element - the item to write into
converter - converts data to and from persistent storage

read

<B> void read(XElement element,
              ModeSettingsConverter<A,B> converter)
Reads the contents of this setting from element.

Parameters:
element - the item to read from
converter - converts data to and from persistent storage