Package com.aelitis.azureus.ui.swt.imageloader

Examples of com.aelitis.azureus.ui.swt.imageloader.ImageLoader


    customImage = false;
    customImageID = url;

    Utils.execSWTThread(new AERunnable() {
      public void runSupport() {
        final ImageLoader imageLoader = skin.getImageLoader(properties);
        imageLoader.getUrlImage(url, new ImageDownloaderListener() {
          public void imageDownloaded(Image image, boolean returnedImmediately) {
            setCanvasImage(url, null);
            imageLoader.releaseImage(url);
          }
        });
      }
    });
  }
View Full Code Here


    }
    this.swtItem = treeItem;
    setDisposed(false);

    if (treeItem != null) {
      ImageLoader imageLoader = ImageLoader.getInstance();
      imgClose = imageLoader.getImage("image.sidebar.closeitem");
      imgCloseSelected = imageLoader.getImage("image.sidebar.closeitem-selected");

      treeItem.addDisposeListener(this);

      treeItem.getParent().addTreeListener(new TreeListener() {
        public void treeExpanded(TreeEvent e) {
View Full Code Here

    }
  }
 
  public void setImageFromName(String imageName) {
    this.imageName = imageName;
    ImageLoader imageLoader = ImageLoader.getInstance();
    images = imageLoader.getImages(imageName);
  }
View Full Code Here

    this.images = images;
  }

  private void disposeImages() {
    if(images != null) {
      ImageLoader imageLoader = ImageLoader.getInstance();
      imageLoader.releaseImage(imageName);
      images = null;
    }
  }
View Full Code Here

    VuzeActivitiesEntry entry = (VuzeActivitiesEntry) cell.getDataSource();

    Image imgIcon = null;
    String iconID = entry.getIconID();
    if (iconID != null) {
      ImageLoader imageLoader = ImageLoader.getInstance();
      if (iconID.startsWith("http")) {
        imgIcon = imageLoader.getUrlImage(iconID,
            new ImageDownloaderListener() {
              public void imageDownloaded(Image image,
                  boolean returnedImmediately) {
                if (returnedImmediately) {
                  return;
                }
                cell.invalidate();
              }
            });
        if (imgIcon == null) {
          return;
        }
      } else {
        imgIcon = imageLoader.getImage(iconID);
      }

      if (ImageLoader.isRealImage(imgIcon)) {
        Rectangle cellBounds = cell.getBounds();
        Rectangle imgBounds = imgIcon.getBounds();
        gc.drawImage(imgIcon, cellBounds.x
            + ((cellBounds.width - imgBounds.width) / 2), cellBounds.y
            + ((cellBounds.height - imgBounds.height) / 2));
      }
      imageLoader.releaseImage(iconID);
    }
  }
View Full Code Here

  }
 
  public void cellPaint(GC gc, TableCellSWT cell) {
    Rectangle bounds = cell.getBounds();
   
    ImageLoader imageLoader = ImageLoader.getInstance();
    Image viewImage = imageLoader.getImage("ic_view");
    if(imageWidth == -1 || imageHeight == -1) {
      imageWidth = viewImage.getBounds().width;
      imageHeight = viewImage.getBounds().height;
    }
   
    bounds.width -= (imageWidth + 5);
   
    GCStringPrinter.printString(gc, cell.getSortValue().toString(), bounds,true,false,SWT.LEFT);
   
    Subscription sub = (Subscription) cell.getDataSource();
   
    if ( sub != null && !sub.isSearchTemplate()){

      gc.drawImage(viewImage, bounds.x + bounds.width, bounds.y + bounds.height / 2 - imageHeight / 2);
    }
   
    imageLoader.releaseImage("ic_view");
   
      //gc.drawText(cell.getText(), bounds.x,bounds.y);
  }
View Full Code Here

      l.contentImageLoaded(null, true);
      return null;
    }
   
    if (imageLoaderThumb == null) {
      imageLoaderThumb = new ImageLoader(null, null);
    }
   
    String thumbnailUrl = PlatformTorrentUtils.getContentThumbnailUrl(torrent);

    //System.out.println("thumburl= " + thumbnailUrl);
View Full Code Here

    if (cText == null) {
      cText = Colors.black;
    }
    cTextDrop = skinProperties.getColor("color.progress.text.drop");

    ImageLoader imageLoader = ImageLoader.getInstance();
    imgArrowButton = imageLoader.getImage("image.fileprogress.arrowbtn");
    imgPriHi = imageLoader.getImage("image.fileprogress.pri.hi");
    imgPriNormal = imageLoader.getImage("image.fileprogress.pri.normal");
    imgPriStopped = imageLoader.getImage("image.fileprogress.pri.stopped");
    imgBGTorrent = imageLoader.getImage("image.progress.bg.torrent");
    imgBGfile = imageLoader.getImage("image.progress.bg.file");
  }
View Full Code Here

    }
    String sETALine = null;

    // Draw Progress bar
    if (percentDone < 1000) {
      ImageLoader imageLoader = ImageLoader.getInstance();

      Rectangle boundsImgBG;

      if (!ImageLoader.isRealImage(imgBGTorrent)) {
        boundsImgBG = new Rectangle(0, 0, 0, 13);
View Full Code Here

    int percentDone = getPerThouDone(od);

    mapCellLastPercentDone.put(cell, new Integer(percentDone));
   
    ImageLoader imageLoader = ImageLoader.getInstance();
    Image imgEnd = imageLoader.getImage("tc_bar_end");
    Image img0 = imageLoader.getImage("tc_bar_0");
    Image img1 = imageLoader.getImage("tc_bar_1");

    //draw begining and end
    if (!imgEnd.isDisposed()) {
      gcImage.drawImage(imgEnd, bounds.x , bounds.y + yOfs);
      gcImage.drawImage(imgEnd, bounds.x + x1 + 1, bounds.y + yOfs);
    }
   
   
   
    int limit = (x1 * percentDone) / 1000;
   
    if (!img1.isDisposed() && limit > 0) {
      Rectangle imgBounds = img1.getBounds();
      gcImage.drawImage(img1, 0, 0, imgBounds.width, imgBounds.height,
          bounds.x + 1, bounds.y + yOfs, limit, imgBounds.height);
    }
    if (percentDone < 1000 && !img0.isDisposed()) {
      Rectangle imgBounds = img0.getBounds();
      gcImage.drawImage(img0, 0, 0, imgBounds.width, imgBounds.height, bounds.x
          + limit + 1, bounds.y + yOfs, x1 - limit, imgBounds.height);
    }

    imageLoader.releaseImage("tc_bar_end");
    imageLoader.releaseImage("tc_bar_0");
    imageLoader.releaseImage("tc_bar_1");
   
    if(textColor == null) {
      textColor = ColorCache.getColor(gcImage.getDevice(), "#006600" );
    }

View Full Code Here

TOP

Related Classes of com.aelitis.azureus.ui.swt.imageloader.ImageLoader

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.