Package com.mxgraph.view

Examples of com.mxgraph.view.mxGraphView.revalidate()


      mxGraphics2DCanvas canvas = createCanvas();
      canvas.setGraphics((Graphics2D) g);
      canvas.setScale(1 / pageScale);

      view.revalidate();

      mxRectangle graphBounds = graph.getGraphBounds();
      Dimension pSize = new Dimension((int) Math.ceil(graphBounds.getX()
          + graphBounds.getWidth()) + 1, (int) Math.ceil(graphBounds
          .getY() + graphBounds.getHeight()) + 1);
View Full Code Here


    logger.info("TRANSLATE TO "+translate.getX()+"; "+translate.getY()+ " TEST");
//    translate = new mxPoint(p.getX() + x, p.getY() + y);
//    logger.info("TRANSLATE TO "+translate.getX()+"; "+translate.getY());
   
    graphView.setTranslate(translate);
    graphView.revalidate();
    graphView.setEventsEnabled(true);
  };
 
  mxCell addShape(AbstractView<?> graphCell) {
    mxGraphics2DCanvas.putShape(graphCell.getShapeName(), graphCell);
View Full Code Here

    view.scaleAndTranslate(oldScale * newScale, view.getTranslate().getX(),
        view.getTranslate().getY());
    centerViewport(newScale);

    view.revalidate();
  }

  @Override
  protected mxGraphHandler createGraphHandler() {
    this.graphEventListener = new GraphEventListener(this);
View Full Code Here

      /**
       * Workaround for the StackOverflow Exception
       */
      graphView.setEventsEnabled(false);
      graphView.setTranslate(new mxPoint(p.getX() + x, p.getY() + y));
      graphView.revalidate();
      graphView.setEventsEnabled(true);

      return preferredSize;
    }
  }
View Full Code Here

      mxGraphics2DCanvas canvas = createCanvas();
      canvas.setGraphics((Graphics2D) g);
      canvas.setScale(1 / pageScale);

      view.revalidate();

      mxRectangle graphBounds = graph.getGraphBounds();
      Dimension pSize = new Dimension((int) Math.ceil(graphBounds.getX()
          + graphBounds.getWidth()) + 1, (int) Math.ceil(graphBounds
          .getY() + graphBounds.getHeight()) + 1);
View Full Code Here

      view.setTranslate(new mxPoint(0, 0));

      mxGraphics2DCanvas canvas = createCanvas();
      canvas.setGraphics((Graphics2D) g);

      view.revalidate();

      mxRectangle graphBounds = graph.getGraphBounds();
      Dimension pSize = new Dimension((int) Math.ceil(graphBounds.getX()
          + graphBounds.getWidth()) + 1, (int) Math.ceil(graphBounds
          .getY() + graphBounds.getHeight()) + 1);
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.