Package java.awt

Examples of java.awt.Image


    if (!active) {
      return;
    }

    if (updateRunning) {
      Image image = loadImageFromClasspath("net/sf/regain/ui/desktop/regain_icon_scan_16.gif");
      trayIcon.setImage(image);
      trayIcon.setToolTip("regain - " + localizer.msg("indexUpdate", "Updating index"));

    } else {
      Image image = loadImageFromClasspath("net/sf/regain/ui/desktop/regain_icon_16.gif");
      trayIcon.setImage(image);
      trayIcon.setToolTip("regain");
    }
  }
View Full Code Here


      if (url == null) {
        url = loader.getResource("/" + name);
      }
      if (url != null) {
        Toolkit tk = Toolkit.getDefaultToolkit();
        Image img = tk.getImage(url);
        return img;
      }
    }

    return null;
View Full Code Here

            this.resource = resource;
        }

        public Object createValue(UIDefaults table) {
            if (nativeImage != null) {
                final Image image = (Image) ShellFolder.get(nativeImage);
                return (image != null) ? new ImageIcon(image) : LookAndFeel.makeIcon(WindowsLookAndFeel.class, resource);
            } else {
                return LookAndFeel.makeIcon(WindowsLookAndFeel.class, resource);
            }
        }
View Full Code Here

    /**
     * Create a disabled icon using a gray filter.
     */
    public static Icon createDisabledIcon(ImageIcon imageIcon) {
        Image i =
            GrayFilter.createDisabledImage(
                imageIcon.getImage() );

        return new ImageIcon(i);
    }
View Full Code Here

  } catch (InterruptedException ie) {
  }
    }

    public static Image loadImage ( String strFileName ) {
        Image           image = null;
        URL           url;
        Toolkit           toolkit;
        Class           classObject;
        Object                 objImageProducer;
        ImageProducer         imageProducer;
View Full Code Here

    /**
     * Create a disabled icon using a gray filter.
     */
    public static Icon createDisabledIcon(ImageIcon imageIcon) {
        Image i =
            GrayFilter.createDisabledImage(
                imageIcon.getImage() );

        return new ImageIcon(i);
    }
View Full Code Here

      if (bti == null) {
    VideoFormat vf = (VideoFormat) cbuffer.getFormat();
    bti = new BufferToImage(vf);
      }
      if (bti != null && component != null) {
    Image im = bti.createImage(cbuffer);
    Graphics g = component.getGraphics();
    Dimension size = component.getSize();
    if (g != null)
        g.drawImage(im, 0, 0, component);
      }
View Full Code Here

   
    Graphics2D g2d = (Graphics2D) g;
   
    int orientation = slider.getOrientation();
   
    Image image;
   
    switch (orientation) {
      case SwingConstants.VERTICAL:
        image = vertIcon.getImage();
        break;
View Full Code Here

  /**
   *
   */
  public Image readImage(byte[] bytes) throws JRException
  {
    Image image = Toolkit.getDefaultToolkit().createImage(bytes);

    MediaTracker tracker = new MediaTracker(new Panel());
    tracker.addImage(image, 0);
    try
    {
View Full Code Here

      return false;
    }
  }
 
  private static BufferedImage scaleTo(BufferedImage image, Size scaledSize) {
    Image img = image.getScaledInstance(scaledSize.getWidth(), scaledSize.getHeight(), Image.SCALE_SMOOTH);
    return toBufferedImage(img, scaledSize.getWidth(), scaledSize.getHeight(), BufferedImage.TYPE_INT_RGB);
  }
View Full Code Here

TOP

Related Classes of java.awt.Image

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.