Package java.awt

Examples of java.awt.Rectangle.grow()


            // the point is outside of the frame;
            // this can occur when the mouse button is released
            return RESIZE_NONE;
        }

        inner.grow(-FRAME_CORNER_SIZE, -FRAME_CORNER_SIZE);
        if (inner.width < 0) {
            inner.width = 1;
        }
        if (inner.height < 0) {
            inner.height = 1;
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

            // the point is outside of the frame;
            // this can occur when the mouse button is released
            return RESIZE_NONE;
        }

        inner.grow(-FRAME_CORNER_SIZE, -FRAME_CORNER_SIZE);
        if (inner.width < 0) {
            inner.width = 1;
        }
        if (inner.height < 0) {
            inner.height = 1;
View Full Code Here

 
  private void createExecButtons() { 
   
    Rectangle bounds = this.getBounds().getBounds();
    int padding = Math.min(bounds.width, bounds.height) / 20;
    bounds.grow(-padding, -padding);
   
    component = getManifestedComponent();
    execButtonModel = ExecutableButtonComponent.class.cast(getManifestedComponent()).getModel();
    execCmd = execButtonModel.getData().getExecCmd();
   
View Full Code Here

    if (hasTitle) super.paint(g);
     
    /* Pad for border, or other stuff */
    Rectangle bounds = getBounds().getBounds();
    int padding = Math.min(bounds.width, bounds.height) / 20;
    bounds.grow(-padding, -padding);
   
    /* Paint all layers in order */
    for (Brush b : layers) {
      b.draw(shape, g, bounds);
   
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.