Package java.awt

Examples of java.awt.Rectangle.grow()


    if (column == -1) {
      return null;
    }
    int row = table.rowAtPoint(p);
    Rectangle r = table.getCellRect(row, column, true);
    r.grow(-3, 0);
    if (r.contains(p)) {
      return null;
    }
    int midPoint = r.x + r.width / 2;
    int columnIndex;
View Full Code Here


                for (int locationVar = -10; locationVar < 20; locationVar += 10)
                {
                    for (int sizeVar = -10; sizeVar < 20; sizeVar += 10) {
                        Rectangle srcRect = (Rectangle)IMAGE_BOUNDS.clone();
                        srcRect.translate(locationVar, locationVar);
                        srcRect.grow(sizeVar, sizeVar);

                        Rectangle dstRect =
                                new Rectangle(sizeVar, sizeVar,
                                srcRect.width, srcRect.height);
                        System.out.println("testing blit rect src: " + srcRect);
View Full Code Here

      // initialize area with current viewport
      Rectangle b = Main.map.mapView.getBounds();
      // on some platforms viewport bounds seem to be offset from the
      // left,
      // over-grow it just to be sure
      b.grow(100, 100);
      Area a = new Area(b);

      // now succesively subtract downloaded areas
      for (DataSource src : data.dataSources) {
        if (src.bounds != null
View Full Code Here

          // Determine if mouse was clicked between column heads
          Rectangle headerRect = filter.getTable().getTableHeader().getHeaderRect(vColumnIndex);
          if (vColumnIndex == 0) {
              headerRect.width -= 2;
          } else {
              headerRect.grow(-2, 0);
          }

          // Mouse was clicked between column heads
          if (!headerRect.contains(e.getX(), e.getY())) return;
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")); //$NON-NLS-1$
            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

    private static void drawFocus(Graphics g, ChoiceState s) {
        if (s.isFocused()) {
            Rectangle r = new Rectangle(new Point(), s.getSize());
            r.width -= DefaultScrollbar.BUTTON_SIZE + 2;
            r.grow(- 2 * BORDER_SIZE, -2 * BORDER_SIZE);
            drawFocusRect(g, r.x, r.y, r.width, r.height);
            r.grow(-1, -1);
            g.setColor(SystemColor.textHighlight);
            g.fillRect(r.x, r.y, r.width, r.height);
        }
View Full Code Here

        if (s.isFocused()) {
            Rectangle r = new Rectangle(new Point(), s.getSize());
            r.width -= DefaultScrollbar.BUTTON_SIZE + 2;
            r.grow(- 2 * BORDER_SIZE, -2 * BORDER_SIZE);
            drawFocusRect(g, r.x, r.y, r.width, r.height);
            r.grow(-1, -1);
            g.setColor(SystemColor.textHighlight);
            g.fillRect(r.x, r.y, r.width, r.height);
        }
    }

View Full Code Here

    }

    public void paint(final Graphics g, final Shape allocation) {
        Rectangle r = allocation.getBounds();
        int totalWidth = r.width;
        r.grow(0, -INSET);
        r.width = getWidthAttr();
        calculatePosition(r, totalWidth);

        if (getNoshadeAttr()) {
            g.setColor(SHADOW);
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.