Package com.mxgraph.io.gml

Examples of com.mxgraph.io.gml.mxGmlData


   * @param gmlNode Gml node where the data add.
   * @param v mxCell where data are obtained.
   */
  public static void addNodeData(mxGmlNode gmlNode, mxCell v)
  {
    mxGmlData data = new mxGmlData();
    mxGmlShapeNode dataShapeNode = new mxGmlShapeNode();

    data.setDataKey(mxGmlConstants.KEY_NODE_ID);
    dataShapeNode
        .setDataHeight(String.valueOf(v.getGeometry().getHeight()));
    dataShapeNode.setDataWidth(String.valueOf(v.getGeometry().getWidth()));
    dataShapeNode.setDataX(String.valueOf(v.getGeometry().getX()));
    dataShapeNode.setDataY(String.valueOf(v.getGeometry().getY()));
    dataShapeNode.setDataLabel(v.getValue() != null ? v.getValue()
        .toString() : "");
    dataShapeNode.setDataStyle(v.getStyle() != null ? v.getStyle() : "");

    data.setDataShapeNode(dataShapeNode);
    gmlNode.setNodeData(data);
  }
View Full Code Here


   * @param gmlEdge Gml edge where the data add.
   * @param v mxCell where data are obtained.
   */
  public static void addEdgeData(mxGmlEdge gmlEdge, mxCell v)
  {
    mxGmlData data = new mxGmlData();
    mxGmlShapeEdge dataShapeEdge = new mxGmlShapeEdge();

    data.setDataKey(mxGmlConstants.KEY_EDGE_ID);
    dataShapeEdge.setText(v.getValue() != null ? v.getValue().toString()
        : "");
    dataShapeEdge.setStyle(v.getStyle() != null ? v.getStyle() : "");

    data.setDataShapeEdge(dataShapeEdge);
    gmlEdge.setEdgeData(data);
  }
View Full Code Here

   * @param gmlNode Gml node where the data add.
   * @param v mxCell where data are obtained.
   */
  public static void addNodeData(mxGmlNode gmlNode, mxCell v)
  {
    mxGmlData data = new mxGmlData();
    mxGmlShapeNode dataShapeNode = new mxGmlShapeNode();

    data.setDataKey(mxGmlConstants.KEY_NODE_ID);
    dataShapeNode
        .setDataHeight(String.valueOf(v.getGeometry().getHeight()));
    dataShapeNode.setDataWidth(String.valueOf(v.getGeometry().getWidth()));
    dataShapeNode.setDataX(String.valueOf(v.getGeometry().getX()));
    dataShapeNode.setDataY(String.valueOf(v.getGeometry().getY()));
    dataShapeNode.setDataLabel(v.getValue() != null ? v.getValue()
        .toString() : "");
    dataShapeNode.setDataStyle(v.getStyle() != null ? v.getStyle() : "");

    data.setDataShapeNode(dataShapeNode);
    gmlNode.setNodeData(data);
  }
View Full Code Here

   * @param gmlEdge Gml edge where the data add.
   * @param v mxCell where data are obtained.
   */
  public static void addEdgeData(mxGmlEdge gmlEdge, mxCell v)
  {
    mxGmlData data = new mxGmlData();
    mxGmlShapeEdge dataShapeEdge = new mxGmlShapeEdge();

    data.setDataKey(mxGmlConstants.KEY_EDGE_ID);
    dataShapeEdge.setText(v.getValue() != null ? v.getValue().toString()
        : "");
    dataShapeEdge.setStyle(v.getStyle() != null ? v.getStyle() : "");

    data.setDataShapeEdge(dataShapeEdge);
    gmlEdge.setEdgeData(data);
  }
View Full Code Here

TOP

Related Classes of com.mxgraph.io.gml.mxGmlData

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.