Package java.awt

Examples of java.awt.Rectangle.translate()


                bord = Color.darkGray;
            }
            graph.setFont(font);
            graph.setColor(bord);
            graph.fillRect(tempRect.x, tempRect.y, tempRect.width, tempRect.height);
            tempRect.translate(-1, -1);
            graph.setColor(bkgd);
            graph.fillRect(tempRect.x, tempRect.y, tempRect.width, tempRect.height);
            graph.setColor(text);
            graph.drawString(shortName, tempRect.x + 1, tempRect.y + tempRect.height - 1);
View Full Code Here


            graph.setFont(font);
            graph.setColor(bord);
            graph.fillRect(tempRect.x, tempRect.y, tempRect.width,
                    tempRect.height);
            tempRect.translate(-1, -1);
            graph.setColor(bkgd);
            graph.fillRect(tempRect.x, tempRect.y, tempRect.width,
                    tempRect.height);
            graph.setColor(text);
            graph.drawString(shortName, tempRect.x + 1, tempRect.y
View Full Code Here

            }
            graph.setFont(font);
            graph.setColor(bord);
            graph.fillRect(tempRect.x, tempRect.y, tempRect.width,
                    tempRect.height);
            tempRect.translate(-1, -1);
            graph.setColor(bkgd);
            graph.fillRect(tempRect.x, tempRect.y, tempRect.width,
                    tempRect.height);
            graph.setColor(text);
            graph.drawString(shortName, tempRect.x + 1, tempRect.y
View Full Code Here

            Color bord = Color.black;

            graph.setFont(font);
            graph.setColor(bord);
            graph.fillRect(tempRect.x, tempRect.y, tempRect.width, tempRect.height);
            tempRect.translate(-1, -1);
            graph.setColor(bkgd);
            graph.fillRect(tempRect.x, tempRect.y, tempRect.width, tempRect.height);
            graph.setColor(text);
            graph.drawString(shortName, tempRect.x + 1, tempRect.y + tempRect.height - 1);
View Full Code Here

            }

            Insets insets = getSelectedTabPadInsets(tabPlacement);
            Rectangle rect = rects[selectedIndex];

            rect.translate(-insets.left, -insets.top);
            rect.width += insets.left + insets.right;
            rect.height += insets.top + insets.bottom;
        }

        /**
 
View Full Code Here

            Rectangle b = rightScrollButton.getBounds();

            if (tabPlacement == TOP) {
                b.setLocation(c.x + c.width - b.width, c.y - b.height);
                rightScrollButton.setBounds(b);
                b.translate(-b.width, 0);
                leftScrollButton.setBounds(b);
            } else if (tabPlacement == BOTTOM) {
                b.setLocation(c.x + c.width - b.width, c.y + c.height);
                rightScrollButton.setBounds(b);
                b.translate(-b.width, 0);
View Full Code Here

                b.translate(-b.width, 0);
                leftScrollButton.setBounds(b);
            } else if (tabPlacement == BOTTOM) {
                b.setLocation(c.x + c.width - b.width, c.y + c.height);
                rightScrollButton.setBounds(b);
                b.translate(-b.width, 0);
                leftScrollButton.setBounds(b);
            } else if (tabPlacement == LEFT) {
                b.setLocation(c.x - b.width, c.y + c.height - b.height);
                rightScrollButton.setBounds(b);
                b.translate(0, -b.height);
View Full Code Here

                b.translate(-b.width, 0);
                leftScrollButton.setBounds(b);
            } else if (tabPlacement == LEFT) {
                b.setLocation(c.x - b.width, c.y + c.height - b.height);
                rightScrollButton.setBounds(b);
                b.translate(0, -b.height);
                leftScrollButton.setBounds(b);
            } else if (tabPlacement == RIGHT) {
                b.setLocation(c.x + c.width, c.y + c.height - b.height);
                rightScrollButton.setBounds(b);
                b.translate(0, -b.height);
View Full Code Here

                b.translate(0, -b.height);
                leftScrollButton.setBounds(b);
            } else if (tabPlacement == RIGHT) {
                b.setLocation(c.x + c.width, c.y + c.height - b.height);
                rightScrollButton.setBounds(b);
                b.translate(0, -b.height);
                leftScrollButton.setBounds(b);
            }
        }

        void calculateTabAreaClipRect(final int tabPlacement) {
View Full Code Here

                                       r.getMinY()+deltaY);
    }

    public Raster getData(Rectangle rect) {
        Rectangle r = (Rectangle)rect.clone();
        r.translate(-deltaX, -deltaY);
        Raster ret = getSource().getData(r);
        return ret.createTranslatedChild(ret.getMinX()+deltaX,
                                         ret.getMinY()+deltaY);
    }
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.