com.yworks.yfiles.server.graphml.support
Class FlexGraphicsSerializationToolkit

java.lang.Object
  extended bycom.yworks.yfiles.server.graphml.support.FlexGraphicsSerializationToolkit

public class FlexGraphicsSerializationToolkit
extends java.lang.Object

Utility class for static methods that had previously been provided by GraphicsSerializationToolkit


Method Summary
static void codeLocation(YPoint location, XmlWriter writer)
          Writes the location as two attributes with name 'x' and 'y'.
static void codeSize(YDimension size, XmlWriter writer)
          Writes the size as two attributes with name 'width' and 'height'.
static YPoint parseLocation(org.w3c.dom.Node root)
          Parses the values of attributes with name 'x' and 'y' of the passed node to a YPoint.
static void writeLocation(XmlWriter writer, java.lang.String name, YPoint location)
          Writes an element with the given name and the namespace NamespaceConstants.YFILES_JAVA_NS containing the given location as attributes with name 'x' and 'y'.
static void writeNodeLayout(XmlWriter writer, NodeLayout nl)
          Writes an element with the name 'Geometry' in the namespace NamespaceConstants.YFILES_JAVA_NS containing the given node layout as attributes with name 'x', 'y', 'width' and 'height'.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

writeNodeLayout

public static void writeNodeLayout(XmlWriter writer,
                                   NodeLayout nl)
Writes an element with the name 'Geometry' in the namespace NamespaceConstants.YFILES_JAVA_NS containing the given node layout as attributes with name 'x', 'y', 'width' and 'height'.

Parameters:
writer - The writer to use.
nl - The node layout to write.

writeLocation

public static void writeLocation(XmlWriter writer,
                                 java.lang.String name,
                                 YPoint location)
Writes an element with the given name and the namespace NamespaceConstants.YFILES_JAVA_NS containing the given location as attributes with name 'x' and 'y'.

Parameters:
writer - The writer to use.
name - The name of the xml element.
location - The location to write.

parseLocation

public static YPoint parseLocation(org.w3c.dom.Node root)
Parses the values of attributes with name 'x' and 'y' of the passed node to a YPoint.

Parameters:
root - The Node containing the location attributes.
Returns:
The parsed location.

codeLocation

public static void codeLocation(YPoint location,
                                XmlWriter writer)
Writes the location as two attributes with name 'x' and 'y'.

Parameters:
location - The location to write.
writer - The writer to use.

codeSize

public static void codeSize(YDimension size,
                            XmlWriter writer)
Writes the size as two attributes with name 'width' and 'height'.

Parameters:
size - The size to write.
writer - The writer to use.


Copyright © 2000-2013 yWorks GmbH. All rights reserved