bibliothek.gui.dock.facile.action
Class StateManager.LocationConverter

java.lang.Object
  extended by bibliothek.gui.dock.facile.action.StateManager.LocationConverter
All Implemented Interfaces:
ModeTransitionConverter<StateManager.Location,StateManager.Location>
Enclosing class:
StateManager

public static class StateManager.LocationConverter
extends Object
implements ModeTransitionConverter<StateManager.Location,StateManager.Location>

A transformer to read or write StateManager.Locations.

Author:
Benjamin Sigg

Constructor Summary
StateManager.LocationConverter()
           
 
Method Summary
 StateManager.Location convertToSetting(StateManager.Location a)
          Converts a property from the inside world into the world outside.
 StateManager.Location convertToWorld(StateManager.Location b)
          Converts a property from the outside world into the world of this setting.
 StateManager.Location readProperty(DataInputStream in)
          Reads a single property.
 StateManager.Location readPropertyXML(XElement element)
          Reads a single property.
 void writeProperty(StateManager.Location element, DataOutputStream out)
          Writes a single property of this setting.
 void writePropertyXML(StateManager.Location b, XElement element)
          Writes a single property as xml element.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StateManager.LocationConverter

public StateManager.LocationConverter()
Method Detail

convertToSetting

public StateManager.Location convertToSetting(StateManager.Location a)
Description copied from interface: ModeTransitionConverter
Converts a property from the inside world into the world outside.

Specified by:
convertToSetting in interface ModeTransitionConverter<StateManager.Location,StateManager.Location>
Parameters:
a - the property from inside
Returns:
a property from outside

convertToWorld

public StateManager.Location convertToWorld(StateManager.Location b)
Description copied from interface: ModeTransitionConverter
Converts a property from the outside world into the world of this setting.

Specified by:
convertToWorld in interface ModeTransitionConverter<StateManager.Location,StateManager.Location>
Parameters:
b - a property from outside
Returns:
a property from inside

writeProperty

public void writeProperty(StateManager.Location element,
                          DataOutputStream out)
                   throws IOException
Description copied from interface: ModeTransitionConverter
Writes a single property of this setting.

Specified by:
writeProperty in interface ModeTransitionConverter<StateManager.Location,StateManager.Location>
Parameters:
element - the property to write
out - the stream to write into
Throws:
IOException - if an I/O-error occurs

readProperty

public StateManager.Location readProperty(DataInputStream in)
                                   throws IOException
Description copied from interface: ModeTransitionConverter
Reads a single property.

Specified by:
readProperty in interface ModeTransitionConverter<StateManager.Location,StateManager.Location>
Parameters:
in - the stream to read from
Returns:
the property that has been read.
Throws:
IOException - if an I/O-error occurs

writePropertyXML

public void writePropertyXML(StateManager.Location b,
                             XElement element)
Description copied from interface: ModeTransitionConverter
Writes a single property as xml element.

Specified by:
writePropertyXML in interface ModeTransitionConverter<StateManager.Location,StateManager.Location>
Parameters:
b - the property to write
element - the element to write into, the attributes of the element must not be changed

readPropertyXML

public StateManager.Location readPropertyXML(XElement element)
Description copied from interface: ModeTransitionConverter
Reads a single property.

Specified by:
readPropertyXML in interface ModeTransitionConverter<StateManager.Location,StateManager.Location>
Parameters:
element - the element to read the property from
Returns:
the new property