Package java.awt

Examples of java.awt.Toolkit.createImage()


  /**
   * Build a DevintUnoDeck
   */
  public DevintUnoDeck() {
    Toolkit tk = Toolkit.getDefaultToolkit();
    Image img = tk.createImage("Texture/cursor.png");
    Cursor cursor = tk.createCustomCursor(img,new Point(8, 8),"/Texture/cursor.png");
    this.setCursor(cursor);
  }
 
 
View Full Code Here


        }
       
        buffer = bos.toByteArray();

        Toolkit tk = Toolkit.getDefaultToolkit();
        final Image img = tk.createImage(buffer);
        if (img == null)
            return null;

        RenderedImage ri = loadImage(img);
        if (ri == null)
View Full Code Here

        } catch (MalformedURLException mue) {
            return null;
        }

        Toolkit tk = Toolkit.getDefaultToolkit();
        final Image img = tk.createImage(url);
        if (img == null)
            return null;

        RenderedImage ri = loadImage(img);
        if (ri == null)
View Full Code Here

        PngImage.setProgressiveDisplay(true);

            // Read PNG image from file
        PngImage png = new PngImage(args[0]);
        Toolkit tk = Toolkit.getDefaultToolkit();
        Image img = tk.createImage(png);
        int w = png.getWidth();
        int h = png.getHeight();

        // Call prepareImage using an instance of this class
        // as the ImageObserver; triggers imageUpdate (below)
View Full Code Here

            /// Creates an invisble pointer by giving it bogus image
            /// Possibly find a workaround for this...
            Toolkit tk = Toolkit.getDefaultToolkit();
            byte bogus[] = { (byte) 0 };
            blankCursor =
              tk.createCustomCursor( tk.createImage( bogus ), new Point(0, 0), "" );

            zoomWindow = new JWindow( parent ) {
                public void paint( Graphics g ) {
                    g.drawImage( zoomImage, 0, 0, zoomWindow );
                }
View Full Code Here

    // If direction is RTL, flip the source image
    if (_isRightToLeft(context))
      producer = new FilteredImageSource(producer, new MirrorImageFilter());

    Image flippedIcon =
      toolkit.createImage(producer);

    // Be sure that the image is fully loaded
    ImageUtils.loadImage(flippedIcon);

    // Get the width/height.  We use an ImageLoader object the ImageObserver
View Full Code Here

    // If direction is RTL, flip the source image
    if (_isRightToLeft(context))
      producer = new FilteredImageSource(producer, new MirrorImageFilter());

    Image colorizedIcon =
      toolkit.createImage(new FilteredImageSource(producer, filter));

    // Be sure that the image is fully loaded
    ImageUtils.loadImage(colorizedIcon);

    // Get the width/height.  We use an ImageLoader object the ImageObserver
View Full Code Here

        Thread t = new Thread() {
                public void run() {
                    Filter filt = null;
                    try {
                        Toolkit tk = Toolkit.getDefaultToolkit();
                        Image img = tk.createImage(url);

                        if (img != null) {
                            RenderedImage ri = loadImage(img, dr);
                            if (ri != null) {
                                filt = new RedRable(GraphicsUtil.wrap(ri));
View Full Code Here

        Thread t = new Thread() {
                public void run() {
                    Filter filt = null;

                    Toolkit tk = Toolkit.getDefaultToolkit();
                    Image img = tk.createImage(url);

                    if (img != null) {
                        RenderedImage ri = loadImage(img, dr);
                        if (ri != null) {
                            filt = new RedRable(GraphicsUtil.wrap(ri));
View Full Code Here

        URL imageURL = this.getClass().getClassLoader().
            getResource("org/apache/commons/scxml/env/stopwatch.gif");
        URL iconURL = this.getClass().getClassLoader().
            getResource("org/apache/commons/scxml/env/stopwatchicon.gif");
        Toolkit kit = Toolkit.getDefaultToolkit();
        watchImage = kit.createImage(imageURL);
        watchIcon = kit.createImage(iconURL);
        WatchPanel panel = new WatchPanel();
        panel.setLayout(new BorderLayout());
        setContentPane(panel);
        display = new JLabel(stopWatch.getDisplay());
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.