Examples of clipRect()


Examples of java.awt.Graphics2D.clipRect()

        dataRenderer.setSize(Math.max(width - (padding.left + padding.right + 2), 0),
            Math.max(getHeight() - (padding.top + padding.bottom + 2), 0));

        Graphics2D contentGraphics = (Graphics2D) graphics.create();
        contentGraphics.translate(padding.left + 1, padding.top + 1);
        contentGraphics.clipRect(0, 0, dataRenderer.getWidth(), dataRenderer.getHeight());
        dataRenderer.paint(contentGraphics);
        contentGraphics.dispose();

        // Paint the focus state
        if (pushButton.isFocused()
View Full Code Here

Examples of java.awt.Graphics2D.clipRect()

                    contentGraphics.translate(-dataRenderer.getWidth(), 0);
                    break;
                }
            }

            contentGraphics.clipRect(0, 0, dataRenderer.getWidth(), dataRenderer.getHeight());
            dataRenderer.paint(contentGraphics);

            contentGraphics.dispose();
        }
View Full Code Here

Examples of java.awt.Graphics2D.clipRect()

        dataRenderer.setSize(Math.max(contentBounds.width - (padding.left + padding.right + 2) + 1, 0),
            Math.max(contentBounds.height - (padding.top + padding.bottom + 2) + 1, 0));

        Graphics2D contentGraphics = (Graphics2D)graphics.create();
        contentGraphics.translate(padding.left + 1, padding.top + 1);
        contentGraphics.clipRect(0, 0, dataRenderer.getWidth(), dataRenderer.getHeight());
        dataRenderer.paint(contentGraphics);
        contentGraphics.dispose();

        // Paint the focus state
        if (listButton.isFocused()) {
View Full Code Here

Examples of java.awt.Graphics2D.clipRect()

                    decoratedGraphics = decorator.prepare(component, decoratedGraphics);
                }

                // Paint the component
                Graphics2D componentGraphics = (Graphics2D)decoratedGraphics.create();
                componentGraphics.clipRect(0, 0, componentBounds.width, componentBounds.height);
                component.paint(componentGraphics);
                componentGraphics.dispose();

                // Update the decorators
                for (int j = 0; j < n; j++) {
View Full Code Here

Examples of java.awt.Graphics2D.clipRect()

            if (scale != 1) {
                graphics.scale(scale, scale);
            }

            graphics.translate(x, y);
            graphics.clipRect(0, 0, getWidth(), getHeight());
        }

        return graphics;
    }
View Full Code Here

Examples of java.awt.Graphics2D.clipRect()

        dataRenderer.render(buttonData, checkbox, false);
        dataRenderer.setSize(Math.max(width - (CHECKBOX_SIZE + spacing * 2), 0), height);

        Graphics2D contentGraphics = (Graphics2D)graphics.create();
        contentGraphics.translate(CHECKBOX_SIZE + spacing, 0);
        contentGraphics.clipRect(0, 0, dataRenderer.getWidth(), dataRenderer.getHeight());
        dataRenderer.paint(contentGraphics);
        contentGraphics.dispose();

        // Paint the focus state
        if (checkbox.isFocused()) {
View Full Code Here

Examples of java.awt.Graphics2D.clipRect()

        dataRenderer.render(menuButton.getButtonData(), menuButton, highlighted);
        dataRenderer.setSize(contentBounds.width, contentBounds.height);

        Graphics2D contentGraphics = (Graphics2D)graphics.create();
        contentGraphics.translate(contentBounds.x, contentBounds.y);
        contentGraphics.clipRect(0, 0, contentBounds.width, contentBounds.height);
        dataRenderer.paint(contentGraphics);
        contentGraphics.dispose();

        graphics.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
            RenderingHints.VALUE_ANTIALIAS_ON);
View Full Code Here

Examples of java.awt.Graphics2D.clipRect()

        dataRenderer.setSize(Math.max(contentBounds.width - (padding.left + padding.right + 2) + 1, 0),
            Math.max(contentBounds.height - (padding.top + padding.bottom + 2) + 1, 0));

        Graphics2D contentGraphics = (Graphics2D)graphics.create();
        contentGraphics.translate(padding.left + 1, padding.top + 1);
        contentGraphics.clipRect(0, 0, dataRenderer.getWidth(), dataRenderer.getHeight());
        dataRenderer.paint(contentGraphics);
        contentGraphics.dispose();

        graphics.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
            RenderingHints.VALUE_ANTIALIAS_ON);
View Full Code Here

Examples of java.awt.Graphics2D.clipRect()

        double sinTheta = Math.sin(theta);
        double cosTheta = Math.cos(theta);

        Graphics2D watermarkGraphics = (Graphics2D)graphics.create();
        watermarkGraphics.clipRect(0, 0, component.getWidth(), component.getHeight());
        watermarkGraphics.setComposite(AlphaComposite.getInstance
            (AlphaComposite.SRC_OVER, opacity));
        watermarkGraphics.rotate(theta);

        // Calculate the separation in between each repetition of the watermark
View Full Code Here

Examples of java.awt.Graphics2D.clipRect()

                default: {
                    break;
                }
            }

            contentGraphics.clipRect(0, 0, dataRenderer.getWidth(), dataRenderer.getHeight());
            dataRenderer.paint(contentGraphics);

            contentGraphics.dispose();

            // Draw the close trigger
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.