Package org.eclipse.draw2d.geometry

Examples of org.eclipse.draw2d.geometry.Rectangle.expand()


    @Override
    public Rectangle getClientArea(Rectangle rect) {
        Rectangle r = super.getClientArea(rect);
        Rectangle borderRect = r.getCopy();
        if (!bpmnNotation) {
            borderRect.expand(-GRID_SIZE / 2, 0);
        }
        return borderRect;
    }

}
View Full Code Here


            g.fillRectangle(r.x, r.y, r.width, r.height);
            g.setForegroundColor(getBorderColor());
            g.drawRectangle(r.x, r.y, r.width, r.height);
        } finally {
            //We don't really own rect 'r', so fix it.
            r.expand(1, 1);
        }
    }

}
View Full Code Here

        List cells = _tableInfo.getCells();
        for (int i = 0, size = cells.size(); i < size; i++) {
          TableCellInfo cellInfo = (TableCellInfo) cells.get(i);
          IFigure cellfigure = cellInfo.getFigure();
          Rectangle rect = cellfigure.getBounds().getCopy();
          rect = rect.expand(1, 1);
          g.setLineStyle(Graphics.LINE_SOLID);
          g.setLineWidth(1);
          g.setForegroundColor(ColorConstants.lightGray);
          g.drawRectangle(rect);
        }
View Full Code Here

   * TODO: This method is not being called.
   */
  public void postValidate() {
    Rectangle r = new Rectangle(_blockBox._x, _blockBox._y, _blockBox
        .getWidth(), _blockBox.getHeight());
    r = r.expand(getCSSFigure().getInsets());
    _pageSize.width = r.width;
    _pageSize.height = r.height;

    List list = getCSSFigure().getChildren();
    for (int i = 0; i < list.size(); i++) {
View Full Code Here

        ((ChsRootEditPart)this.main.getViewer().getRootEditPart().
          getChildren().get(0)).getModel();
      Rectangle r = root.calculateBounds();

      // Graph Margins are added
      r.expand(LGraph.getGraphMargin(), LGraph.getGraphMargin());

      // Zoom to rectangle to fit in window
      ((ChsScalableRootEditPart) this.main.getViewer().getRootEditPart()).
        getZoomManager().zoomTo(r);
    }
View Full Code Here

      g.setForegroundColor(ColorConstants.cyan);
      g.drawRectangle(r.x, r.y, r.width, r.height);
    }
    finally
    {   //We don't really own rect 'r', so fix it.
      r.expand(1, 1);
    }
  }
}
View Full Code Here

      g.drawRectangle(r.x, r.y, r.width, r.height);
    }
    finally
    {
      //We don't really own rect 'r', so fix it.
      r.expand(1, 1);
    }
  }
}
View Full Code Here

    }

    protected void paintFigure(Graphics graphics)
    {
      Rectangle r = figure.getBounds().getCopy();
      r.expand(highlightBorder - 1, highlightBorder - 1);
      setBounds(r);

      if (ChisioMain.runningOnWindows)
      {
        graphics.setAlpha(150);
View Full Code Here

      g.drawRectangle(r.x, r.y, r.width, r.height);
    }
    finally
    {
      //We don't really own rect 'r', so fix it.
      r.expand(1, 1);
    }
  }
}
View Full Code Here

    if (overlappingContainmentRectangles.size() > 0) { // always true
      Rectangle unionRectangle = overlappingContainmentRectangles.get(0).getCopy();
      for (Rectangle containmentRectangle : overlappingContainmentRectangles) {
        unionRectangle.union(containmentRectangle);
      }
      unionRectangle.expand(2, 2); // expand slightly to avoid rounding problems
      setBounds(unionRectangle);
    }
  }

  /**
 
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.