public class LocationSettingConverter extends 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
DockablePropertys. |
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(DataInputStream in)
Reads a single property.
|
Location |
readPropertyXML(XElement element)
Reads a single property.
|
void |
writeProperty(Location element,
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 DockablePropertys.public void addFactory(DockablePropertyFactory factory)
DockablePropertys.factory - the additional factorypublic Location convertToSetting(Location a)
ModeSettingsConverterconvertToSetting in interface ModeSettingsConverter<Location,Location>a - the property from insidepublic Location convertToWorld(Location b)
ModeSettingsConverterconvertToWorld in interface ModeSettingsConverter<Location,Location>b - a property from outsidepublic void writeProperty(Location element, DataOutputStream out) throws IOException
ModeSettingsConverterwriteProperty in interface ModeSettingsConverter<Location,Location>element - the property to writeout - the stream to write intoIOException - if an I/O-error occurspublic Location readProperty(DataInputStream in) throws IOException
ModeSettingsConverterreadProperty in interface ModeSettingsConverter<Location,Location>in - the stream to read fromIOException - if an I/O-error occurspublic void writePropertyXML(Location b, XElement element)
ModeSettingsConverterwritePropertyXML 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)
ModeSettingsConverterreadPropertyXML in interface ModeSettingsConverter<Location,Location>element - the element to read the property fromCopyright © 2018. All rights reserved.