Package java.awt

Examples of java.awt.Image


 
  public static Icon
  getIcon(
    String    name )
  {
    Image  image = getImage( name );
   
    return( image==null?null:new ImageIcon( image ));
  }
View Full Code Here


 
  public static Icon
  getIcon(
    InputStream    is )
  {
    Image  image = getImage( is );
   
    return( image==null?null:new ImageIcon( image ));
  }
View Full Code Here

   */
  public void done(BufferedImage image) {
    if (image == null) {
      return;
    }
    Image preferedSizeImage = image.getScaledInstance(90, 90, 0);
    thumbnail = new ImageIcon(preferedSizeImage);
    repaint();
  }
View Full Code Here

   * This method returns the file found in the resource bundle using the given key
   * @param name - The unique key to find the file.
   * @return The file that correspond to the key, or null if can't be found.
   */
  public Image getImage(String name){
      Image res =null;
      res = Toolkit.getDefaultToolkit().getImage(getURL("name"));
      return res;
  }
View Full Code Here

  public HTMLSheetInformation(ShapesContainer sheet, DiagramComponent d) throws IOException{
   
    // Create current sheet snapshot with points for links
    _imageFile = new File(resources.getString("imageFileName")).getCanonicalFile();
    // Clear cache for image (bug in JTextPane)
    Image oldImage = Toolkit.getDefaultToolkit().getImage(_imageFile.toURL());
    if (oldImage!=null){
      oldImage.flush();
    }
    sheetInformationTitle = resources.getString("htmlFileTitle");
   
    Rectangle r=d.getBounds();
    r.width=(int)((double)r.width/d.getZoom());
View Full Code Here

         this.fileDumper = new FileDumper(_xmlBlaster.getGlobal());

      // set the application icon
      java.net.URL oUrl;
      oUrl = this.getClass().getResource("AppIcon.gif");
      Image img = null;
      if (oUrl != null)
         img = java.awt.Toolkit.getDefaultToolkit().getImage(oUrl);
      if(img != null) {
        this.setIconImage(img);
        // System.out.println(img.toString());
View Full Code Here


   public void loadImage() {
      try {
         String filename = "red.gif";
         Image img = Toolkit.getDefaultToolkit().createImage(getClass().getResource(filename));
         image = new ImageIcon( img );
      }
      catch (Exception ex) {
         System.err.println("error-error-error-error >>>"+ex.toString());
         System.out.println(ME + " " + ex.getMessage());
View Full Code Here

             return null;
        }
        if (imgb == null) return null;
       
        // read image
        final Image image = ImageParser.parse("cytag.png", imgb);

        return image;
    }
View Full Code Here

        paintDefault(g2);
       
        if(d.width > getBounds().getWidth() ||
           d.height > getBounds().getHeight()) {
           // Scale Image
           Image scale = im.getScaledInstance((int)getBounds().getWidth(),
                                              (int)getBounds().getHeight(),
                                              Image.SCALE_SMOOTH);
          
           g.drawImage(scale,
                       (int)getBounds().getX(),
View Full Code Here

    }

    // NOTE: The SystemTray must be created get before the TrayIconHandler is created.
    //       Otherwise a UnsatisfiedLinkError will raise on linux systems
    SystemTray tray = SystemTray.getSystemTray();
    Image icon = loadImageFromClasspath("net/sf/regain/ui/desktop/regain_icon_16.gif");

    PopupMenu menu = new PopupMenu();
    MenuItem item;

    item = new MenuItem(localizer.msg("search", "Search"));
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.