Package org.eclipse.draw2d

Examples of org.eclipse.draw2d.Figure


   * Layout all children.
   */
  protected void layoutChildren() {
    List children = getFlowFigure().getChildren();
    for (int i = 0; i < children.size(); i++) {
      Figure f = (Figure) children.get(i);
      f.invalidate();
      f.validate();
    }
  }
View Full Code Here


   * Layout all children.
   */
  protected void layoutChildren() {
    List children = getFlowFigure().getChildren();
    for (int i = 0; i < children.size(); i++) {
      Figure f = (Figure) children.get(i);
      f.invalidate();
      f.validate();
    }
  }
View Full Code Here

  }

  public void run()
  {
    final Shell shell = main.getShell();
    Figure rootFigure;
    Rectangle bounds;

    if (main.getViewer() == null) return;

    rootFigure = (Figure) ((ChsScalableRootEditPart) main.getViewer().
      getRootEditPart()).getFigure().getChildren().get(0);
    ScalableLayeredPane layer =
      (ScalableLayeredPane) rootFigure.getChildren().get(0);
    double scale = layer.getScale();
    layer.setScale(1.0);
    bounds = getBounds(main.getViewer(), rootFigure);

    final Image image = new Image(shell.getDisplay(), bounds);

    GC gc = new GC(image);
   
    if (ChisioMain.runningOnWindows)
    {
      gc.setAntialias(SWT.ON);
      gc.setTextAntialias(SWT.ON);
    }
    else
    {
      gc.setAntialias(SWT.OFF);
      gc.setTextAntialias(SWT.OFF);
    }
   
    Graphics graphics = new SWTGraphics(gc);
    rootFigure.paint(graphics);
    graphics.dispose();

    ImageLoader loader = new ImageLoader();
    loader.data = new ImageData[]{image.getImageData()};
View Full Code Here

  }

  public void run()
  {
    final Shell shell = main.getShell();
    Figure rootFigure;
    Rectangle bounds;

    if (main.getViewer() == null) return;

    rootFigure = (Figure) ((ChsScalableRootEditPart) main.getViewer().
      getRootEditPart()).getFigure().getChildren().get(0);
    ScalableLayeredPane layer =
      (ScalableLayeredPane) rootFigure.getChildren().get(0);
    double scale = layer.getScale();
    layer.setScale(1.0);
    bounds = getBounds(main.getViewer(), rootFigure);

    final Image image = new Image(shell.getDisplay(), bounds);

    GC gc = new GC(image);
   
    if (ChisioMain.runningOnWindows)
    {
      gc.setAntialias(SWT.ON);
      gc.setTextAntialias(SWT.ON);
    }
    else
    {
      gc.setAntialias(SWT.OFF);
      gc.setTextAntialias(SWT.OFF);
    }
   
    Graphics graphics = new SWTGraphics(gc);
    rootFigure.paint(graphics);
    graphics.dispose();

    ImageLoader loader = new ImageLoader();
    loader.data = new ImageData[]{image.getImageData()};
View Full Code Here

  /**
   * @generated
   */
  protected IFigure createFocusFeedbackFigure() {
    return new Figure() {

      protected void paintFigure(Graphics graphics) {
        graphics.drawFocus(getBounds().getResized(-1, -1));
      }
    };
View Full Code Here

  /**
   * @generated
   */
  protected IFigure createFocusFeedbackFigure() {
    return new Figure() {

      protected void paintFigure(Graphics graphics) {
        graphics.drawFocus(getBounds().getResized(-1, -1));
      }
    };
View Full Code Here

  /**
   * @generated
   */
  protected IFigure createFocusFeedbackFigure() {
    return new Figure() {

      protected void paintFigure(Graphics graphics) {
        graphics.drawFocus(getBounds().getResized(-1, -1));
      }
    };
View Full Code Here

  /**
   * @generated
   */
  protected IFigure createFocusFeedbackFigure() {
    return new Figure() {

      protected void paintFigure(Graphics graphics) {
        graphics.drawFocus(getBounds().getResized(-1, -1));
      }
    };
View Full Code Here

  /**
   * @generated
   */
  protected IFigure createFocusFeedbackFigure() {
    return new Figure() {

      protected void paintFigure(Graphics graphics) {
        graphics.drawFocus(getBounds().getResized(-1, -1));
      }
    };
View Full Code Here

  /**
   * @generated
   */
  protected IFigure createFocusFeedbackFigure() {
    return new Figure() {

      protected void paintFigure(Graphics graphics) {
        graphics.drawFocus(getBounds().getResized(-1, -1));
      }
    };
View Full Code Here

TOP

Related Classes of org.eclipse.draw2d.Figure

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.