Methods Summary |
---|
public java.awt.Dimension | getMinimumSize()
return getPreferredSize();
|
public java.awt.Dimension | getPreferredSize()
Dimension dimension = new Dimension(0, 0);
if(image != null)
{
dimension.width = image.getWidth(this);
dimension.height = image.getHeight(this);
}
return dimension;
|
public synchronized boolean | imageUpdate(java.awt.Image image1, int i, int j, int k, int l, int i1)
if((i & 0x20) != 0)
{
loaded = true;
repaint();
return false;
} else
{
return true;
}
|
public void | paint(java.awt.Graphics g)
super.paint(g);
if(loaded)
{
int i = 0;
int j = 0;
int k = image.getWidth(this);
int l = image.getHeight(this);
Dimension dimension = getSize();
g.setClip(0, 0, dimension.width, dimension.height);
switch(hAlign)
{
case 1: // '\001'
i = super.insets.left;
break;
case 2: // '\002'
i = (dimension.width - (super.insets.left + super.insets.right) - k) / 2 + super.insets.left;
break;
case 3: // '\003'
i = dimension.width - k - super.insets.right;
break;
}
switch(vAlign)
{
case 1: // '\001'
j = super.insets.top;
break;
case 2: // '\002'
j = (dimension.height - (super.insets.top + super.insets.bottom) - l) / 2 + super.insets.top;
break;
case 3: // '\003'
j = dimension.height - l - super.insets.bottom;
break;
}
g.drawImage(image, i, j, this);
}
|
public void | setAlignment(int i, int j)
hAlign = i;
vAlign = j;
|
public void | setImage(java.awt.Image image1)
loaded = false;
image = image1;
prepareImage(image1, this);
|