示例#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;
  }
示例#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;
  }