V - the kind of preference this factory storespublic interface PreferenceFactory<V>
PreferenceFactories are used
by the PreferenceStorage.| Modifier and Type | Field and Description |
|---|---|
static PreferenceFactory<Boolean> |
FACTORY_BOOLEAN
a factory for handling
Boolean |
static PreferenceFactory<Integer> |
FACTORY_INT
a factory for handling
Integer |
static PreferenceFactory<KeyStroke> |
FACTORY_KEYSTROKE
a factory for handling
KeyStroke |
static PreferenceFactory<ModifierMask> |
FACTORY_MODIFIER_MASK
a factory for
ModifierMasks |
static PreferenceFactory<String> |
FACTORY_STRING
A factory for handling
String |
| Modifier and Type | Method and Description |
|---|---|
V |
read(DataInputStream in)
Reads a value from
in. |
V |
readXML(XElement element)
Reads some value from
element. |
void |
write(V value,
DataOutputStream out)
Writes
value into out. |
void |
writeXML(V value,
XElement element)
Writes
value into element. |
static final PreferenceFactory<Boolean> FACTORY_BOOLEAN
Booleanstatic final PreferenceFactory<Integer> FACTORY_INT
Integerstatic final PreferenceFactory<String> FACTORY_STRING
Stringstatic final PreferenceFactory<KeyStroke> FACTORY_KEYSTROKE
KeyStrokestatic final PreferenceFactory<ModifierMask> FACTORY_MODIFIER_MASK
ModifierMasksvoid write(V value, DataOutputStream out) throws IOException
value into out.value - the value to write, never nullout - the stream to write intoIOException - if this factory can't write into outvoid writeXML(V value, XElement element)
value into element. This method
may add children and attributes to element. The attribute
"type" shall not be changed by this method.value - some value, not nullelement - to write into, the attribute "type" shall not be changed
by this methodXException - if the value can't be transformedV read(DataInputStream in) throws IOException
in. This method must read the same
number of bytes as write(Object, DataOutputStream) had written.in - the stream to read fromIOException - if in is not readable or the data
is corruptedV readXML(XElement element)
element.element - the element to read fromXException - if element is not validCopyright © 2017 Docking Frames. All rights reserved.