Methods Summary |
---|
public int | getCurrentAmount()
return current;
|
public java.awt.Dimension | getMinimumSize()
return new Dimension(Width, Height);
|
public java.awt.Dimension | getPreferredSize()
return new Dimension(Width, Height);
|
public int | getTotalAmount()
return total;
|
public void | paint(java.awt.Graphics g)
int barWidth = (int) (((float)current/(float)total) * getSize().width);
g.setColor(getBackground());
g.fill3DRect(0, 0, barWidth, getSize().height-2, true);
|
public void | setCurrentAmount(int Amount)
current = Amount;
// make sure we don't go over total
if(current > 100)
current = 100;
repaint();
|