Examples of mxICell


Examples of com.mxgraph.model.mxICell

      }

      // Reads the cells into the graph model. All cells
      // are children of the root element in the node.
      Node root = elt.getElementsByTagName("root").item(0);
      mxICell rootCell = null;

      if (root != null)
      {
        Node tmp = root.getFirstChild();

        while (tmp != null)
        {
          mxICell cell = dec.decodeCell(tmp, true);

          if (cell != null && cell.getParent() == null)
          {
            rootCell = cell;
          }

          tmp = tmp.getNextSibling();
View Full Code Here

Examples of com.mxgraph.model.mxICell

   * Creates a new instance of mxShape for previewing the edge.
   */
  protected Object createCell(mxCellState startState, String style)
  {
    mxGraph graph = graphComponent.getGraph();
    mxICell cell = ((mxICell) graph
        .createEdge(null, null, "",
            (startState != null) ? startState.getCell() : null,
            null, style));
    ((mxICell) startState.getCell()).insertEdge(cell, true);

View Full Code Here

Examples of com.mxgraph.model.mxICell

   *
   */
  public void update(MouseEvent e, mxCellState targetState, double x, double y)
  {
    mxGraph graph = graphComponent.getGraph();
    mxICell cell = (mxICell) previewState.getCell();

    mxRectangle dirty = graphComponent.getGraph().getPaintBounds(
        new Object[] { previewState.getCell() });

    if (cell.getTerminal(false) != null)
    {
      cell.getTerminal(false).removeEdge(cell, false);
    }

    if (targetState != null)
    {
      ((mxICell) targetState.getCell()).insertEdge(cell, false);
View Full Code Here

Examples of com.mxgraph.model.mxICell

      mxGraph graph = graphComponent.getGraph();

      graph.getModel().beginUpdate();
      try
      {
        mxICell cell = (mxICell) previewState.getCell();
        Object src = cell.getTerminal(true);
        Object trg = cell.getTerminal(false);

        if (src != null)
        {
          ((mxICell) src).removeEdge(cell, true);
        }
View Full Code Here

Examples of com.mxgraph.model.mxICell

      {
        target = getCellAt(location.x, location.y);

        if (target instanceof mxICell && cells[0] instanceof mxICell)
        {
          mxICell targetCell = (mxICell) target;
          mxICell dropCell = (mxICell) cells[0];

          if (targetCell.isVertex() == dropCell.isVertex()
              || targetCell.isEdge() == dropCell.isEdge())
          {
            mxIGraphModel model = graph.getModel();
            model.setStyle(target, model.getStyle(cells[0]));
            graph.setSelectionCell(target);
View Full Code Here

Examples of com.mxgraph.model.mxICell

   * Creates a new instance of mxShape for previewing the edge.
   */
  protected Object createCell(mxCellState startState, String style)
  {
    mxGraph graph = graphComponent.getGraph();
    mxICell cell = ((mxICell) graph
        .createEdge(null, null, "",
            (startState != null) ? startState.getCell() : null,
            null, style));
    ((mxICell) startState.getCell()).insertEdge(cell, true);

View Full Code Here

Examples of com.mxgraph.model.mxICell

   *
   */
  public void update(MouseEvent e, mxCellState targetState, double x, double y)
  {
    mxGraph graph = graphComponent.getGraph();
    mxICell cell = (mxICell) previewState.getCell();

    mxRectangle dirty = graphComponent.getGraph().getPaintBounds(
        new Object[] { previewState.getCell() });

    if (cell.getTerminal(false) != null)
    {
      cell.getTerminal(false).removeEdge(cell, false);
    }

    if (targetState != null)
    {
      ((mxICell) targetState.getCell()).insertEdge(cell, false);
View Full Code Here

Examples of com.mxgraph.model.mxICell

      mxGraph graph = graphComponent.getGraph();

      graph.getModel().beginUpdate();
      try
      {
        mxICell cell = (mxICell) previewState.getCell();
        Object src = cell.getTerminal(true);
        Object trg = cell.getTerminal(false);

        if (src != null)
        {
          ((mxICell) src).removeEdge(cell, true);
        }
View Full Code Here

Examples of com.mxgraph.model.mxICell

      {
        target = getCellAt(location.x, location.y);

        if (target instanceof mxICell && cells[0] instanceof mxICell)
        {
          mxICell targetCell = (mxICell) target;
          mxICell dropCell = (mxICell) cells[0];

          if (targetCell.isVertex() == dropCell.isVertex()
              || targetCell.isEdge() == dropCell.isEdge())
          {
            mxIGraphModel model = graph.getModel();
            model.setStyle(target, model.getStyle(cells[0]));
            graph.setSelectionCell(target);
View Full Code Here

Examples of com.mxgraph.model.mxICell

      }

      // Reads the cells into the graph model. All cells
      // are children of the root element in the node.
      Node root = elt.getElementsByTagName("root").item(0);
      mxICell rootCell = null;

      if (root != null)
      {
        Node tmp = root.getFirstChild();

        while (tmp != null)
        {
          mxICell cell = dec.decodeCell(tmp, true);

          if (cell != null && cell.getParent() == null)
          {
            rootCell = cell;
          }

          tmp = tmp.getNextSibling();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.