public class LocationSettingConverter extends java.lang.Object implements ModeSettingsConverter<Location,Location>
ModeSettingsConverter
for the LocationModeManager
.Constructor and Description |
---|
LocationSettingConverter(DockController controller)
Creates a new converter.
|
LocationSettingConverter(PropertyTransformer transformer)
Creates a new converter.
|
Modifier and Type | Method and Description |
---|---|
void |
addFactory(DockablePropertyFactory factory)
Adds an additional factory to this converter, needed to read and write
DockableProperty s. |
Location |
convertToSetting(Location a)
Converts a property from the inside world into the world outside.
|
Location |
convertToWorld(Location b)
Converts a property from the outside world into the world of
this setting.
|
Location |
readProperty(java.io.DataInputStream in)
Reads a single property.
|
Location |
readPropertyXML(XElement element)
Reads a single property.
|
void |
writeProperty(Location element,
java.io.DataOutputStream out)
Writes a single property of this setting.
|
void |
writePropertyXML(Location b,
XElement element)
Writes a single property as xml element.
|
public LocationSettingConverter(DockController controller)
controller
- the controller in whose realm settings need to be convertedpublic LocationSettingConverter(PropertyTransformer transformer)
transformer
- transformer used to read DockableProperty
s.public void addFactory(DockablePropertyFactory factory)
DockableProperty
s.factory
- the additional factorypublic Location convertToSetting(Location a)
ModeSettingsConverter
convertToSetting
in interface ModeSettingsConverter<Location,Location>
a
- the property from insidepublic Location convertToWorld(Location b)
ModeSettingsConverter
convertToWorld
in interface ModeSettingsConverter<Location,Location>
b
- a property from outsidepublic void writeProperty(Location element, java.io.DataOutputStream out) throws java.io.IOException
ModeSettingsConverter
writeProperty
in interface ModeSettingsConverter<Location,Location>
element
- the property to writeout
- the stream to write intojava.io.IOException
- if an I/O-error occurspublic Location readProperty(java.io.DataInputStream in) throws java.io.IOException
ModeSettingsConverter
readProperty
in interface ModeSettingsConverter<Location,Location>
in
- the stream to read fromjava.io.IOException
- if an I/O-error occurspublic void writePropertyXML(Location b, XElement element)
ModeSettingsConverter
writePropertyXML
in interface ModeSettingsConverter<Location,Location>
b
- the property to writeelement
- the element to write into, the attributes of the
element must not be changedpublic Location readPropertyXML(XElement element)
ModeSettingsConverter
readPropertyXML
in interface ModeSettingsConverter<Location,Location>
element
- the element to read the property from