Package org.eclipse.draw2d.geometry

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


     *
     * @param g The graphics used to paint the figure.
     */
    public void paintFigure(Graphics g) {
        Rectangle r = getBounds();
        r.shrink(1, 1);
        try {
            g.setBackgroundColor(getFillColor());
            g.setAlpha(getAlpha());
            g.fillRectangle(r.x, r.y, r.width, r.height);
            g.setForegroundColor(getBorderColor());
View Full Code Here


   * @param g
   */
  public void paintFigure(Graphics g)
  {
    Rectangle r = getBounds();
    r.shrink(1, 1);
    try
    {
      g.setBackgroundColor(ColorConstants.cyan);
      g.fillRectangle(r.x, r.y, r.width, r.height);
      g.setForegroundColor(ColorConstants.cyan);
View Full Code Here

   * Draws the selection points with Blue Color
   */
  public void paintFigure(Graphics g)
  {
    Rectangle r = getBounds();
    r.shrink(1, 1);

    try
    {
      g.setBackgroundColor(ColorConstants.cyan);
      g.fillRectangle(r.x, r.y, r.width, r.height);
View Full Code Here

  }

  public void paintFigure(Graphics g)
  {
    Rectangle r = getBounds();
    r.shrink(1, 1);

    try
    {
      if(isResizable)
        g.setBackgroundColor(ColorConstants.cyan);
View Full Code Here

    public IFigure createFigure() {
        RoundedRectangle figure = new RoundedRectangle() {
            public Rectangle getClientArea(Rectangle rect) {
                this.setBackgroundColor(ColorConstants.lightGray);
                Rectangle clientArea = super.getClientArea(rect);
                clientArea.shrink(ShapeConstants.CLIENT_AREA_INSETS);
                return clientArea;
            }
        };

        label = new Label();
View Full Code Here

    public IFigure createFigure() {
        RoundedRectangle figure = new RoundedRectangle() {
            public Rectangle getClientArea(Rectangle rect) {
                this.setBackgroundColor(ColorConstants.red);
                Rectangle clientArea = super.getClientArea(rect);
                clientArea.shrink(ShapeConstants.CLIENT_AREA_INSETS);
                return clientArea;
            }
        };

        label = new Label();
View Full Code Here

    public IFigure createFigure() {
        RoundedRectangle figure = new RoundedRectangle() {
            public Rectangle getClientArea(Rectangle rect) {
                this.setBackgroundColor(ColorConstants.lightGreen);
                Rectangle clientArea = super.getClientArea(rect);
                clientArea.shrink(ShapeConstants.CLIENT_AREA_INSETS);
                return clientArea;
            }
        };

        label = new Label();
View Full Code Here

    public IFigure createFigure() {
        RoundedRectangle figure = new RoundedRectangle() {
            public Rectangle getClientArea(Rectangle rect) {
                this.setBackgroundColor(ColorConstants.lightBlue);
                Rectangle clientArea = super.getClientArea(rect);
                clientArea.shrink(ShapeConstants.CLIENT_AREA_INSETS);
                return clientArea;
            }
        };

        label.setText((String) getPropertyValue(ShapeConstants.NAME));
View Full Code Here

  }
 
  protected void paintSelectionBorder(Graphics graphics) {
    if (shouldPaintSelectionBorder) {
      Rectangle rect = getBounds().getCopy();
      rect.shrink(1, 1);
      graphics.drawRectangle(rect);
    }
  }
 
  public void setPaintSelectionBorder(boolean paint) {
View Full Code Here

    final Color background = CommonUIPlugin.getDefault().getColorRegistry().get(IDetailsColors.COLOR_TRAY_BACKGROUND);
    Button result = new ArrowButton() {
      protected void paintBorder(Graphics graphics) {
        graphics.setForegroundColor(foreground);
        Rectangle r = getBounds().getCopy();
        r.shrink(0, 2);
        r.width -= 1;
        graphics.drawRectangle(r);
      }
    };
    result.setBackgroundColor(background);
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.