borland Packages  Class Hierarchy  jbcl.view Package  Index 

StateImageItemPainter component

java.lang.Object
   +----borland.jbcl.view.ImageItemPainter
           +----borland.jbcl.view.ImageArrayItemPainter
                   +----borland.jbcl.view.StateImageItemPainter

About the StateImageItemPainter component

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.


StateImageItemPainter variables

Variables implemented in borland.jbcl.view.ImageArrayItemPainter

Variables implemented in borland.jbcl.view.ImageItemPainter

StateImageItemPainter constructors

StateImageItemPainter properties

*Read-only properties **Write-only properties

Properties implemented in borland.jbcl.view.ImageItemPainter

Properties implemented in java.lang.Object

StateImageItemPainter methods

Methods implemented in this class

Methods implemented in borland.jbcl.view.ImageArrayItemPainter

Methods implemented in borland.jbcl.view.ImageItemPainter

Methods implemented in java.lang.Object


StateImageItemPainter constructors

StateImageItemPainter()

  public StateImageItemPainter()

StateImageItemPainter(java.awt.Component)

  public StateImageItemPainter(java.awt.Component component)
Constructs a StateImageItemPainter. Specify the image as the value of the component parameter.

StateImageItemPainter(java.awt.Component, int)

  public StateImageItemPainter(java.awt.Component component, int alignment)
Constructs a StateImageItemPainter with the specified image and the specified alignment.

Parameters:

component
The image to be painted.
alignment
Specifies the image is aligned in the painter. Use the util.Alignment constants.

StateImageItemPainter methods

register(int, java.awt.Image)

  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().