示例#1
0
 public Dimension getPreferredSize() {
   return new Dimension(fIcon.getWidth(), fIcon.getHeight());
 }
示例#2
0
 public Dimension getMaximumSize() {
   return new Dimension(fIcon.getWidth(), fIcon.getHeight());
 }
示例#3
0
  /*
  	public void paintBackground(Graphics g) { }

  	public void paintNormal(Graphics g) {
  		if (fIcon.normal() != null)
  			g.drawImage(fIcon.normal(), 0, 0, this);
  	}

  	public void paintPressed(Graphics g) {
  		if (fIcon.pressed() != null)
  			g.drawImage(fIcon.pressed(), 0, 0, this);
  	}
  */
  public void paintSelected(Graphics g) {
    if (fIcon.selected() != null) {
      g.drawImage(fIcon.selected(), 0, 0, this);
    }
  }