Package com.mxgraph.io
Class mxGdCodec
java.lang.Object
com.mxgraph.io.mxGdCodec
Parses a GD .txt file and imports it in the given graph.
This class depends from the classes contained in com.mxgraph.io.gd.
This class depends from the classes contained in com.mxgraph.io.gd.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enum
Represents the different states in the parse of a file. -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
cellsMap
Map with the vertex cells added in the addNode method.
-
-
Constructor Details
-
mxGdCodec
public mxGdCodec()
-
-
Method Details
-
decode
Parses simple GD format and populate the specified graph- Parameters:
input
- GD file to be parsedgraph
- Graph where the parsed graph is included.
-
encode
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.
-