borland Packages Class Hierarchy jbcl.view Package Index
java.lang.Object +----borland.jbcl.view.ImageItemPainter +----borland.jbcl.view.ImageArrayItemPainter +----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(java.awt.Component component)Constructs a StateImageItemPainter. Specify the image as the value of the component parameter.
public StateImageItemPainter(java.awt.Component component, int alignment)Constructs a StateImageItemPainter with the specified image and the specified alignment.
Parameters:
public void register(int state, java.awt.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().