Examples of GraphicsConfiguration


Examples of java.awt.GraphicsConfiguration

        if (preferredSize == null)
        {
            preferredSize = new Dimension();
            int is = getFont().getSize() * 4;
            BufferedImage image = null;
            GraphicsConfiguration graphicsConfiguration = getGraphicsConfiguration();
            if (graphicsConfiguration != null)
                image = graphicsConfiguration.createCompatibleImage(is, is);
            else
                image = new BufferedImage(is, is, BufferedImage.TYPE_4BYTE_ABGR);
            Graphics2D g = image.createGraphics();
            g.setFont(getFont());
            FontMetrics fm = g.getFontMetrics();
View Full Code Here

Examples of java.awt.GraphicsConfiguration

    {
        if (image == null)
        {
            GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();
            GraphicsDevice gd = ge.getDefaultScreenDevice();
            GraphicsConfiguration gc = gd.getDefaultConfiguration();
            BufferedImage bi = gc.createCompatibleImage(getIconWidth(), getIconHeight(),
                    Transparency.TRANSLUCENT);
            paintIcon(null, bi.getGraphics(), 0, 0);
        }
        return image;
    }
View Full Code Here

Examples of java.awt.GraphicsConfiguration

            (RenderingHintsKeyExt.KEY_BUFFERED_IMAGE);
        if (o != null)
            return (BufferedImage)(((Reference)o).get());

        // Check if this is a BufferedImage G2d if so throw an error...
        GraphicsConfiguration gc = g2d.getDeviceConfiguration();
        GraphicsDevice gd = gc.getDevice();
        if (WARN_DESTINATION &&
            (gd.getType() == GraphicsDevice.TYPE_IMAGE_BUFFER) &&
            (g2d.getRenderingHint(RenderingHintsKeyExt.KEY_TRANSCODING) !=
                RenderingHintsKeyExt.VALUE_TRANSCODING_PRINTING))
            // throw new IllegalArgumentException
View Full Code Here

Examples of org.jboss.aesh.graphics.GraphicsConfiguration

            return attached;
        }

        private void doGfx() {
            try {
                GraphicsConfiguration gc = new AeshGraphicsConfiguration(shell);
                g = gc.getGraphics();

                g.setColor(new TerminalColor(Color.BLUE, Color.DEFAULT));
                g.drawRect(20, 10, 20, 4);
                Thread.sleep(500);
                g.flush();
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.