Package bibliothek.gui.dock.support.mode
Interface ModeSetting<A>
- Type Parameters:
A- format of data used by theModeManagerthisModeSettingis 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. Each of the read/write methods gets access to the ModeSettingsConverter that is
used by the ModeSettings to store data in memory. The methods are not required to use the converter,
but the implementation may be easier when using the converters read/write methods as well.- Author:
- Benjamin Sigg
-
Method Summary
Modifier and TypeMethodDescriptionGets the unique identifier of theModethis setting is associated with.<B> voidread(XElement element, ModeSettingsConverter<A, B> converter) Reads the contents of this setting fromelement.<B> voidread(DataInputStream in, ModeSettingsConverter<A, B> converter) Reads the contents of this setting fromin.<B> voidwrite(XElement element, ModeSettingsConverter<A, B> converter) Writes the contents of this setting intoelement.<B> voidwrite(DataOutputStream out, ModeSettingsConverter<A, B> converter) Writes the contents of this setting intoout.
-
Method Details
-
getModeId
Path getModeId()Gets the unique identifier of theModethis setting is associated with.- Returns:
- the identifier
-
write
Writes the contents of this setting intoout.- Parameters:
out- the stream to write intoconverter- converts data to and from persistent storage- Throws:
IOException- in case of an error
-
read
Reads the contents of this setting fromin.- Parameters:
in- the stream to read fromconverter- converts data to and from persistent storage- Throws:
IOException- in case of an error
-
write
Writes the contents of this setting intoelement. This method should add children toelement, but not change the attributes ofelement.- Parameters:
element- the item to write intoconverter- converts data to and from persistent storage
-
read
Reads the contents of this setting fromelement.- Parameters:
element- the item to read fromconverter- converts data to and from persistent storage
-