jbcl.view Package
java.lang.Object +----com.borland.jbcl.view.ImageItemPainter +----com.borland.jbcl.view.ImageArrayItemPainter
Variables Constructors Properties Methods
Implements ItemPainter, Serializable
The ImageItemPainter
class paints an image as an item in a control. For example, to represent a file system in a tree control, this class provides the functionality to paint an image for a folder.
protected int alignment
protected Component component
protected boolean genDisabledImage
protected boolean paintBackground
protected boolean streamResetError
public ImageItemPainter()Creates an
ImageItemPainter
component.
public ImageItemPainter(Component component)Constructs an
ImageItemPainter
with the specified image to be painted. The alignment used is Alignment.VSTRETCH | Alignment.HSTRETCH.
Parameters:
component
public ImageItemPainter(Component component, int alignment)Constructs an
ImageItemPainter
with the specified image to be painted and the specified alignment.
Parameters:
component
alignment
util.Alignment
constants to align the image.
public ImageItemPainter(Component component, int alignment, boolean paintBackground)Constructs an
ImageItemPainter
with the specified image to be painted and the specified alignment. The value of the paintBackground
parameter determines the background is painted first.
Parameters:
component
alignment
util.Alignment
constants to align the image.
paintBackground
public int getAlignment() public void setAlignment(int alignment)Determines the alignment of the
ImageItemPainter
. Use the util.Alignment
constants to specify an alignment value.
public boolean isGenDisabledImage() public void setGenDisabledImage(boolean genDisabledImage)The
genDisabledImage
property determines whether a disabled image is automatically generated when the ItemPainter.DISABLED state is set.
public boolean isPaintBackground() public void setPaintBackground(boolean paintBackground)Determines whether the background is filled before drawing the image in the
paint()
method.
protected Image getImage(Object data, int state)An internal method.