Esempio n. 1
0
  public ImagePanel(Image image) {
    try {
      this.fileImage = ImageIO.read(image.getImage());
    } catch (Exception ex) {
      this.fileImage = null;
    }

    this.image = image;
    this.cacheImage = null;
  }
Esempio n. 2
0
  public void setImage(Image image) {
    if (this.image != null && this.image.equals(image)) {
      clear();
      return;
    }

    try {
      this.fileImage = ImageIO.read(image.getImage());
    } catch (Exception ex) {
      this.fileImage = null;
    }

    this.image = image;
    clear();
    cacheImage = null;
  }