Package com.mxgraph.io
Class mxGdCodec
- java.lang.Object
-
- com.mxgraph.io.mxGdCodec
-
public class mxGdCodec extends java.lang.ObjectParses a GD .txt file and imports it in the given graph.
This class depends from the classes contained in com.mxgraph.io.gd.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classmxGdCodec.mxGDParseStateRepresents the different states in the parse of a file.
-
Field Summary
Fields Modifier and Type Field Description protected static java.util.HashMap<java.lang.String,java.lang.Object>cellsMapMap with the vertex cells added in the addNode method.
-
Constructor Summary
Constructors Constructor Description mxGdCodec()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voiddecode(java.lang.String input, mxGraph graph)Parses simple GD format and populate the specified graphstatic java.lang.Stringencode(mxGraph graph)Generates a GD text output with the cells in the graph.
-
-
-
Method Detail
-
decode
public static void decode(java.lang.String input, mxGraph graph)Parses simple GD format and populate the specified graph- Parameters:
input- GD file to be parsedgraph- Graph where the parsed graph is included.
-
encode
public static java.lang.String encode(mxGraph graph)
Generates a GD text output with the cells in the graph. The implementation only uses the cells located in the default parent.- Parameters:
graph- Graph with the cells.- Returns:
- The GD document generated.
-
-