Class mxGdCodec

java.lang.Object
com.mxgraph.io.mxGdCodec

public class mxGdCodec extends Object
Parses a GD .txt file and imports it in the given graph.
This class depends from the classes contained in com.mxgraph.io.gd.
  • Field Details

    • cellsMap

      protected static HashMap<String,Object> cellsMap
      Map with the vertex cells added in the addNode method.
  • Constructor Details

    • mxGdCodec

      public mxGdCodec()
  • Method Details

    • decode

      public static void decode(String input, mxGraph graph)
      Parses simple GD format and populate the specified graph
      Parameters:
      input - GD file to be parsed
      graph - Graph where the parsed graph is included.
    • encode

      public static 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.