de.cau.cs.kieler.kwebs
Class GraphLayoutOption

java.lang.Object
  extended by de.cau.cs.kieler.kwebs.GraphLayoutOption

public class GraphLayoutOption
extends Object

Utility class for transferring layout options to the layout server.

Rating proposed yellow
(2011-08-02) reviewed by ckru, mri, msp

Constructor Summary
GraphLayoutOption()
          Public default constructor needed for binding.
GraphLayoutOption(String theid, String thevalue)
          Constructs a new instance with the given id and value.
 
Method Summary
static String arrayToString(GraphLayoutOption[] options)
          Returns a string representation of an array of options.
static GraphLayoutOption fromString(String serialOption)
          Parses a serialized option.
 String getId()
          Returns the id of this option.
 String getValue()
          Returns the value of this option.
static String listToString(List<GraphLayoutOption> options)
          Returns a string representation of a list of options.
 void setId(String theid)
          Sets the id of this option.
 void setValue(String thevalue)
          Sets the value of this option.
static GraphLayoutOption[] stringToArray(String options)
          Returns an array of options which is created from its string representation.
static List<GraphLayoutOption> stringToList(String options)
          Returns a List of options which is created from its string representation.
 String toString()
          Returns a string representation of this option.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

GraphLayoutOption

public GraphLayoutOption()
Public default constructor needed for binding.


GraphLayoutOption

public GraphLayoutOption(String theid,
                         String thevalue)
Constructs a new instance with the given id and value.

Parameters:
theid - the id
thevalue - the value
Method Detail

getId

public final String getId()
Returns the id of this option.

Returns:
String the id

setId

public final void setId(String theid)
Sets the id of this option.

Parameters:
theid - the new id

getValue

public final String getValue()
Returns the value of this option.

Returns:
String the value

setValue

public final void setValue(String thevalue)
Sets the value of this option.

Parameters:
thevalue - the new value

fromString

public static GraphLayoutOption fromString(String serialOption)
Parses a serialized option.

Parameters:
serialOption - the serialized option
Returns:
the option or null if a parse error occurred

toString

public String toString()
Returns a string representation of this option.

Overrides:
toString in class Object
Returns:
a string representation of this option

listToString

public static String listToString(List<GraphLayoutOption> options)
Returns a string representation of a list of options.

Parameters:
options - a list of options
Returns:
string representation of the list

arrayToString

public static String arrayToString(GraphLayoutOption[] options)
Returns a string representation of an array of options.

Parameters:
options - an array of options
Returns:
string representation of the array

stringToList

public static List<GraphLayoutOption> stringToList(String options)
Returns a List of options which is created from its string representation.

Parameters:
options - string containing serialized array of options
Returns:
a list of options

stringToArray

public static GraphLayoutOption[] stringToArray(String options)
Returns an array of options which is created from its string representation.

Parameters:
options - string containing serialized array of options
Returns:
an array of options