Exemplo n.º 1
0
 public void setResourceAvailable(int i, int newAvailable) {
   Label label = (Label) resourceAvailableLabelVector.elementAt(i);
   Dimension oldSize = label.getSize();
   label.setText(Integer.toString(newAvailable));
   Dimension newSize = label.getMinimumSize();
   if (newSize.width > oldSize.width) label.invalidate();
 }
Exemplo n.º 2
0
  /**
   * Return the minimum size of the header panel. The height is either the height of the tallest
   * function in the image, or the height of the header label.
   *
   * @return the minimum size
   */
  public Dimension getMinimumSize() {
    int height = (fpDimensions != null) ? fpDimensions.height : label.getMinimumSize().height;

    return new Dimension(Short.MAX_VALUE, height);
  }