yext.graphml.graph2D
Class GraphicsSerializationToolkit

java.lang.Object
  extended byyext.graphml.graph2D.GraphicsSerializationToolkit

public class GraphicsSerializationToolkit
extends Object

Collection of utilities for handling XML files.


Method Summary
static void codeLocation(YPoint location, XmlWriter writer)
           
static void codeSize(YDimension size, XmlWriter writer)
           
static String getAttr(Node n, String name)
           
static String getID(Node n)
           
static String getREF(Node n)
           
static Arrow parseArrow(Node n, String name)
           
static boolean parseBool(Node root)
           
static Color parseColor(String colorString)
          Decodes a color string produced by writeColor(org.graphdrawing.graphml.writer.XmlWriter,String,java.awt.Color).
static void parseEdgeLabel(Node root, EdgeLabel label)
           
static EdgeLayout parseEdgeLayout(Node root)
           
static Insets parseInsets(Node root)
           
static void parseLabel(Node root, YLabel label)
          Deprecated. Use parseLabel(Node,YLabel,GraphMLParseContext) instead.
static void parseLabel(Node root, YLabel label, GraphMLParseContext context)
           
static LineType parseLineType(Node n)
           
static YPoint parseLocation(Node root)
           
static void parseNodeLabel(Node root, NodeLabel label)
           
static NodeLayout parseNodeLayout(Node root)
           
static void parseNodeLayout(Node root, NodeLayout nl)
           
static void parsePath(Node root, EdgeLayout el)
           
static YDimension parseSize(Node root)
           
static String parseText(Node text)
           
static void writeArrows(XmlWriter writer, String tag, Arrow sarrow, Arrow tarrow)
           
static void writeColor(XmlWriter writer, String tag, Color c)
          Writes a java Color into standard string representation.
static void writeEdgeLabel(XmlWriter writer, EdgeLabel label)
          Deprecated. Use writeEdgeLabel(org.graphdrawing.graphml.writer.XmlWriter,y.view.EdgeLabel,org.graphdrawing.graphml.writer.GraphMLWriteContext) instead
static void writeEdgeLabel(XmlWriter writer, EdgeLabel label, GraphMLWriteContext context)
           
static void writeInsets(XmlWriter writer, String title, Insets insets)
           
static void writeLabelContent(XmlWriter writer, YLabel label)
          Deprecated. Use writeLabelContent(org.graphdrawing.graphml.writer.XmlWriter,y.view.YLabel,org.graphdrawing.graphml.writer.GraphMLWriteContext) instead
static void writeLabelContent(XmlWriter writer, YLabel label, GraphMLWriteContext context)
           
static void writeLocation(XmlWriter writer, String name, YPoint location)
           
static void writeNodeLabel(XmlWriter writer, NodeLabel label)
          Deprecated. Use writeNodeLabel(org.graphdrawing.graphml.writer.XmlWriter,y.view.NodeLabel,org.graphdrawing.graphml.writer.GraphMLWriteContext) instead
static void writeNodeLabel(XmlWriter writer, NodeLabel label, GraphMLWriteContext context)
           
static void writeNodeLayout(XmlWriter writer, NodeLayout nl)
           
static void writePath(XmlWriter writer, EdgeLayout layout)
           
static void writeStyle(XmlWriter writer, String name, LineType lt, Color c)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

codeLocation

public static void codeLocation(YPoint location,
                                XmlWriter writer)

codeSize

public static void codeSize(YDimension size,
                            XmlWriter writer)

writeLocation

public static void writeLocation(XmlWriter writer,
                                 String name,
                                 YPoint location)

writePath

public static void writePath(XmlWriter writer,
                             EdgeLayout layout)

writeNodeLayout

public static void writeNodeLayout(XmlWriter writer,
                                   NodeLayout nl)

writeStyle

public static void writeStyle(XmlWriter writer,
                              String name,
                              LineType lt,
                              Color c)

writeArrows

public static void writeArrows(XmlWriter writer,
                               String tag,
                               Arrow sarrow,
                               Arrow tarrow)

writeColor

public static void writeColor(XmlWriter writer,
                              String tag,
                              Color c)
Writes a java Color into standard string representation.

Parameters:
writer -
c - the color

writeLabelContent

public static void writeLabelContent(XmlWriter writer,
                                     YLabel label)
Deprecated. Use writeLabelContent(org.graphdrawing.graphml.writer.XmlWriter,y.view.YLabel,org.graphdrawing.graphml.writer.GraphMLWriteContext) instead

Calls writeLabelContent(org.graphdrawing.graphml.writer.XmlWriter,y.view.YLabel,org.graphdrawing.graphml.writer.GraphMLWriteContext) with null as context. For labels written with this method not all information may be present in the resulting graphml file because of missing context information.

Parameters:
writer -
label -

writeLabelContent

public static void writeLabelContent(XmlWriter writer,
                                     YLabel label,
                                     GraphMLWriteContext context)

writeNodeLabel

public static void writeNodeLabel(XmlWriter writer,
                                  NodeLabel label)
Deprecated. Use writeNodeLabel(org.graphdrawing.graphml.writer.XmlWriter,y.view.NodeLabel,org.graphdrawing.graphml.writer.GraphMLWriteContext) instead

Calls writeNodeLabel(org.graphdrawing.graphml.writer.XmlWriter,y.view.NodeLabel,org.graphdrawing.graphml.writer.GraphMLWriteContext) with null as context. For labels written with this method not all information may be present in the resulting graphml file because of missing context information.

Parameters:
writer -
label -

writeNodeLabel

public static void writeNodeLabel(XmlWriter writer,
                                  NodeLabel label,
                                  GraphMLWriteContext context)

writeEdgeLabel

public static void writeEdgeLabel(XmlWriter writer,
                                  EdgeLabel label)
Deprecated. Use writeEdgeLabel(org.graphdrawing.graphml.writer.XmlWriter,y.view.EdgeLabel,org.graphdrawing.graphml.writer.GraphMLWriteContext) instead

Calls writeEdgeLabel(org.graphdrawing.graphml.writer.XmlWriter,y.view.EdgeLabel,org.graphdrawing.graphml.writer.GraphMLWriteContext) with null as context. For labels written with this method not all information may be present in the resulting graphml file because of missing context information.

Parameters:
writer -
label -

writeEdgeLabel

public static void writeEdgeLabel(XmlWriter writer,
                                  EdgeLabel label,
                                  GraphMLWriteContext context)

writeInsets

public static void writeInsets(XmlWriter writer,
                               String title,
                               Insets insets)

parseText

public static String parseText(Node text)

getID

public static String getID(Node n)

getREF

public static String getREF(Node n)

parseInsets

public static Insets parseInsets(Node root)

parseEdgeLayout

public static EdgeLayout parseEdgeLayout(Node root)

parseNodeLayout

public static NodeLayout parseNodeLayout(Node root)

parseNodeLayout

public static void parseNodeLayout(Node root,
                                   NodeLayout nl)

parsePath

public static void parsePath(Node root,
                             EdgeLayout el)

parseLocation

public static YPoint parseLocation(Node root)

parseSize

public static YDimension parseSize(Node root)

parseBool

public static boolean parseBool(Node root)

parseLineType

public static LineType parseLineType(Node n)

parseArrow

public static Arrow parseArrow(Node n,
                               String name)

parseLabel

public static void parseLabel(Node root,
                              YLabel label)
Deprecated. Use parseLabel(Node,YLabel,GraphMLParseContext) instead.

Parameters:
root -
label -

parseLabel

public static void parseLabel(Node root,
                              YLabel label,
                              GraphMLParseContext context)

parseNodeLabel

public static void parseNodeLabel(Node root,
                                  NodeLabel label)

parseEdgeLabel

public static void parseEdgeLabel(Node root,
                                  EdgeLabel label)

parseColor

public static Color parseColor(String colorString)
Decodes a color string produced by writeColor(org.graphdrawing.graphml.writer.XmlWriter,String,java.awt.Color).

Parameters:
colorString - the color string
Returns:
an opaque color if the color string is of the form #RRGGBB and a transparent color if the input string is of the form #RRGGBBAA, where AA denotes the alpha component of the color.

getAttr

public static String getAttr(Node n,
                             String name)


Copyright ©2000-2008, yWorks GmbH. All rights reserved.