Package pivot.wtk

Examples of pivot.wtk.Bounds


    public void update() {
        // No-op
    }

    public Bounds getBounds(Component component) {
        return new Bounds(x, y, width, height);
    }
View Full Code Here


        graphics.drawImage(bufferedImage, 0, 0, null);
    }

    public Bounds getBounds(Component component) {
        return new Bounds(0, 0, component.getWidth(), component.getHeight());
    }
View Full Code Here

        graphics.setColor(color);
        graphics.fillRect(0, 0, component.getWidth(), component.getHeight());
    }

    public Bounds getBounds(Component component) {
        return new Bounds(0, 0, component.getWidth(), component.getHeight());
    }
View Full Code Here

            tag.paint(graphics);
        }
    }

    public Bounds getBounds(Component component) {
        Bounds bounds;

        if (tag == null) {
            bounds = null;
        } else {
            int x, y;

            switch (horizontalAlignment) {
                case LEFT: {
                    x = xOffset;
                    break;
                }

                case RIGHT: {
                    x = component.getWidth() - tag.getWidth() + xOffset;
                    break;
                }

                case CENTER: {
                    x = (component.getWidth() - tag.getWidth()) / 2 + xOffset;
                    break;
                }

                default: {
                    throw new UnsupportedOperationException();
                }
            }

            switch (verticalAlignment) {
                case TOP: {
                    y = yOffset;
                    break;
                }

                case BOTTOM: {
                    y = component.getHeight() - tag.getHeight() + yOffset;
                    break;
                }

                case CENTER: {
                    y = (component.getHeight() - tag.getHeight()) / 2 + yOffset;
                    break;
                }

                default: {
                    throw new UnsupportedOperationException();
                }
            }

            bounds = new Bounds(x, y, tag.getWidth(), tag.getHeight());
        }

        return bounds;
    }
View Full Code Here

    public void update() {
        // No-op
    }

    public Bounds getBounds(Component component) {
        return new Bounds(xOffset - blurRadius, yOffset - blurRadius,
            component.getWidth() + blurRadius * 2,
            component.getHeight() + blurRadius * 2);
    }
View Full Code Here

    public void update() {
        // No-op
    }

    public Bounds getBounds(Component component) {
        Bounds bounds = new Bounds(x, y, component.getWidth(), component.getHeight());

        if (clip) {
            bounds = bounds.intersect(component.getBounds());
        }

        return bounds;
    }
View Full Code Here

     * @param y
     * @param width
     * @param height
     */
    protected void setBounds(int x, int y, int width, int height) {
        bounds = new Bounds(x, y, width, height);
    }
View Full Code Here

        update(x, y, width, height, true);
    }

    private void update(int x, int y, int width, int height, boolean transform) {
        if (transform) {
            Bounds bounds = transform(x, y, width, height);
            x = bounds.x;
            y = bounds.y;
            width = bounds.width;
            height = bounds.height;
        }
View Full Code Here

        Rectangle2D boundingRectangle = new Rectangle2D.Double(x, y, width, height);

        java.awt.Shape transformedShape = affineTransform.createTransformedShape(boundingRectangle);
        Rectangle2D transformedBoundingRectangle = transformedShape.getBounds2D();

        Bounds transformedBounds = new Bounds((int)transformedBoundingRectangle.getX(),
            (int)transformedBoundingRectangle.getY(),
            (int)transformedBoundingRectangle.getWidth(),
            (int)transformedBoundingRectangle.getHeight());

        return transformedBounds;
View Full Code Here

        watermarkGraphics.dispose();
    }

    public Bounds getBounds(Component component) {
        return new Bounds(0, 0, component.getWidth(), component.getHeight());
    }
View Full Code Here

TOP

Related Classes of pivot.wtk.Bounds

Copyright © 2018 www.massapicom. 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.