borland Packages  Class Hierarchy  jbcl.view Package  Index 

ImageArrayItemPainter component

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

About the ImageArrayItemPainter component

Variables  Constructors  Properties  Methods  

Implements ItemPainter, Serializable

The ImageArrayItemPainter class paints an image as an item in a list for display in a model-view control. It includes the functionality to insert and remove images from the array of images ImageArrayItemPainter maintains.


ImageArrayItemPainter variables

Variables implemented in this class

Variables implemented in borland.jbcl.view.ImageItemPainter

ImageArrayItemPainter constructors

ImageArrayItemPainter properties

*Read-only properties **Write-only properties

Properties implemented in borland.jbcl.view.ImageItemPainter

Properties implemented in java.lang.Object

ImageArrayItemPainter methods

Methods implemented in this class

Methods implemented in borland.jbcl.view.ImageItemPainter

Methods implemented in java.lang.Object


ImageArrayItemPainter variables

imageCount

  protected transient int imageCount
The number of images held in the array.

images

  protected transient Image[] images
The array of images maintained by this class.

ImageArrayItemPainter constructors

ImageArrayItemPainter()

  public ImageArrayItemPainter()
Creates an ImageArrayItemPainter class.

ImageArrayItemPainter(java.awt.Component, int, java.awt.Image[])

  public ImageArrayItemPainter(java.awt.Component component, int alignment, java.awt.Image[] images)
Creates an ImageArrayItemPainter class with the specified component, alignment, and images.

Parameters:

component
The component containing the item.
alignment
The alignment of the item. Specify one of the Alignment variables.
images
An array containing the images to paint.

ImageArrayItemPainter(java.awt.Image[])

  public ImageArrayItemPainter(java.awt.Image[] images)
Creates an ImageArrayItemPainter class with the specified array of images.

Parameters:

images
An array of images to paint.

ImageArrayItemPainter methods

add(java.awt.Image)

  public int add(java.awt.Image image)
Adds an image to the array of images and returns the new number of images in the array.

Parameters:

image
The new java.awt.Image to add to the array of images.

assureSpace(int)

  protected void assureSpace(int count)
If the number specified with the count paramter is greater than the length of the array, the assureSpace() method increases the size of the array. assureSpace() is used by the add() method.

Parameters:

count
The number of images the array must be able to hold.

find(java.awt.Image)

  public int find(java.awt.Image image)
Returns the location in the array of images of the specified image. The array is zero-based, so the first image in the array has a position of zero.

Parameters:

image
The java.awt.Image to locate within the array.

insert(java.awt.Image, int)

  public int insert(java.awt.Image image, int index)
Inserts the specified image in the array of images at the specified position within the array.

Parameters:

image
The image to insert in the array of images.
index
The position to insert the image in the array of images. A position of zero (0) places the image at the beginning of the array.

remove(int)

  public boolean remove(int index)
Removes the image at the specified position in the array and returns true if the image is successfully removed.

Parameters:

index
The position of the image within the array of images to remove. An index value of zero (0) specifies the first image in the array.

remove(java.awt.Image)

  public boolean remove(java.awt.Image image)
Removes the specified image from the array of images. If the image is successfully removed, remove() returns true.

Parameters:

image
The java.awt.Image to be removed.