Package java.awt

Examples of java.awt.Rectangle.grow()


          public void run() {
            selectionScrollUpdated = false;
            Rectangle2D selectionBounds = getSelectionBounds(true);
            if (selectionBounds != null) {
              Rectangle pixelBounds = getShapePixelBounds(selectionBounds);
              pixelBounds.grow(5, 5);
              scrollRectToVisible(pixelBounds);
            }
          }
        });
    }
View Full Code Here


        if (selection != null) {
            DataModelCell cell = selection.getCell();
            Rectangle cellRectangle = table.getCellRect(cell);
            table.repaint(cellRectangle);
            cellRectangle.grow(100, 100);
            table.scrollRectToVisible(cellRectangle);
        }
    }

    public void updateResult(final DataFindModel findModel) {
View Full Code Here

        Rectangle sliderRect = s.getSliderRect();
        if ((sliderRect == null) || sliderRect.isEmpty()) {
            return;
        }
        Rectangle focusRect = new Rectangle(sliderRect);
        focusRect.grow(-2, -2);
        wgr.fillHatchedSysColorRect(focusRect,
                WindowsDefs.COLOR_3DDKSHADOW, WindowsDefs.COLOR_BTNFACE);
    }
}
View Full Code Here

            wgr.drawXpBackground(size,
                    WindowsConsts.EP_EDITTEXT, WindowsConsts.ETS_NORMAL);

            wgr.setTheme(t.getXpTheme("Combobox"));
            Rectangle r = s.getButtonBounds();
            r.grow(1, 1);
            wgr.drawXpBackground(r,
                    WindowsConsts.CP_DROPDOWNBUTTON, getXpButtonState(s));


        } else {
View Full Code Here

                    getClassicButtonState(s));
        }

        if (s.isFocused()) {
            Rectangle r = s.getTextBounds();
            r.grow(1, 0);
            g.setColor(SystemColor.textHighlight);
            g.fillRect(r.x, r.y, r.width, r.height);
            wgr.drawFocusRect(r, 0);
        }
View Full Code Here

      this.center = center;
    }
    @Override
    public Rectangle getValidArea() {
      Rectangle shapeBounds = shapeBounds(last);
      shapeBounds.grow(10, 10);
      return shapeBounds;
    }
    private Rectangle shapeBounds(int size) {
      return new Rectangle(center.x-(size/2),center.y-(size/2),size,size);
    }
View Full Code Here

   * @param harness  the test harness (<code>null</code> not permitted).
   */
  public void test(TestHarness harness)  
  {
    Rectangle r = new Rectangle(0, 0, 0, 0);
    r.grow(5, 7);
    harness.check(r.x == -5);
    harness.check(r.y == -7);
    harness.check(r.width == 10);
    harness.check(r.height == 14);
  }
View Full Code Here

        return;
      }
      // make sure mouseclick was not in resize area
      Rectangle r = table.getTableHeader().getHeaderRect(columnView);
      // working with a magic value of 3 here, as it is in TableHeaderUI
      r.grow(-3, 0);
      if (!r.contains(e.getPoint())) {
        return;
      }

      int column = table.convertColumnIndexToModel(columnView);
View Full Code Here

        private TableColumn getResizingColumn(Point p, int column) {
            if (column == -1) {
                return null;
            }
            Rectangle r = table.getTableHeader().getHeaderRect(column);
            r.grow(-3, 0);
            if (r.contains(p)) {
                return null;
            }
            int midPoint = r.x + r.width / 2;
            int columnIndex = (p.x < midPoint) ? column - 1 : column;
View Full Code Here

  public void mark()
  {
    if (markedState != null)
    {
      Rectangle bounds = markedState.getRectangle();
      bounds.grow(3, 3);
      bounds.width += 1;
      bounds.height += 1;
      setBounds(bounds);

      if (getParent() == null)
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.