jbcl.view Package
java.lang.Object +----com.borland.jbcl.view.ImageItemPainter +----com.borland.jbcl.view.ImageArrayItemPainter +----com.borland.jbcl.view.StateImageItemPainter
Variables Constructors Properties Methods
Implements ItemPainter, Serializable
A StateImageItemPainter
paints image items differently, depending upon the image's state. It uses a StateItemPainter
to paint the image item.
Each state/image pair is registered with the register()
method. The paint()
method calls the getImage()
method, which searches for the image that corresponds with the specified state. If no match is found, getValue()
returns null.
register()
calls the StateItemPainter.register()
method. To read how the state/image pairs are stored, see the StateItemPainter
class.
public StateImageItemPainter()
public StateImageItemPainter(Component component)Constructs a
StateImageItemPainter
. Specify the image as the value of the component
parameter.
public StateImageItemPainter(Component component, int alignment)Constructs a
StateImageItemPainter
with the specified image and the specified alignment.
Parameters:
component
alignment
util.Alignment
constants.
public void register(int state, Image image)
Searches for the apecified image to see if it is already registered. If it isn't, the state/image pair is registered by calling StateItemPainter.register()
.