ImageList Class

ImageList Class

This Package | All Packages

Component
  |
  +--ImageList
public class ImageList
extends Component

ImageList common control.

Constructors
Name Description
ImageList() Topic under construction.
ImageList(Point size) Topic under construction.
ImageList(Bitmap image, Point size, Color maskColor) Topic under construction.

Methods
Name Description
addImage(Bitmap image) Adds the given image to the ImageList.
addImage(Bitmap image, Color maskColor) Adds the given image to the ImageList using the given color to generate the mask.
addImage(Bitmap image, Bitmap mask) Adds the given image and mask to the ImageList.
addImage(Icon icon) Adds the given icon to the ImageList.
destroyHandle() Releases all resources held by the ImageList control.
draw(Graphics g, Point pt, int index) Draws the image at the specified index.
draw(Graphics g, int x, int y, int index) Draws the image indicated by the given index.
finalize() throws Throwable Topic under construction.
getBackColor() Retrieves the ImageList background color.
getBlendColor() Retrieves the color used for blended drawing modes.
getDrawMode() Retrieves the current drawing mode.
getHandle() Topic under construction.
getHandleCreated() Topic under construction.
getIcon(int index) Creates an icon based on the image and mask at the given index.
getImage() Retrieves the single wide bitmap that contains all images managed by the ImageList.
getImage(int index) Retrieves the image at the specified index.
getImageCount() Retrieves the count of images in the ImageList.
getImages() Retrieves all images managed by the ImageList.
getMask() Retrieves the single wide monocrome bitmap that contains all image masks managed by the ImageList.
getMask(int index) Topic under construction.
getMaskColor() Retrieves the color used to generate masks for images when added to the ImageList.
getMasks() Retrieves an array of all masks managed by the ImageList.
getOverlayImage() Retrieves the current overlay image.
getSize() Retrieves the size of the images in the ImageList.
getUseMask() Indicates whether the ImageList uses a mask.
removeAll() Removes all images and masks from the ImageList.
removeImage(int index) Removes the image at the specified index.
replaceImage(int index, Bitmap image) Replaces the image at the specified index.
replaceImage(int index, Bitmap image, Bitmap mask) Replaces the image and mask sat the pecified index.
replaceImage(int index, Icon icon) Replaces the image at the specified index with the given icon.
setBackColor(Color value) Sets the background color of the ImageList.
setBlendColor(Color value) Sets the color used for blended drawing modes.
setDrawMode(int value) Sets the drawing mode.
setImage(Bitmap value) Assigns a single wide bitmap of images to the ImageList.
setMaskColor(Color value) Topic under construction.
setOverlayImage(Bitmap value) Topic under construction.
setSize(Point value) Topic under construction.
setUseMask(boolean value) Topic under construction.

Constructors

ImageList.ImageList

Syntax 1
public ImageList();
Description

Topic under construction.



Syntax 2
public ImageList( Point size );
Description

Topic under construction.



Syntax 3
public ImageList( Bitmap image, Point size, Color maskColor );
Description

Topic under construction.

Methods

ImageList.addImage

Syntax 1
public int addImage( Bitmap image );
Parameters
image
The image to be added.
Return Value

Returns the zero-based index of the first image added.

Description

Adds the given image to the ImageList. The number of images to add is determined by the width of the image.



Syntax 2
public int addImage( Bitmap image, Color maskColor );
Parameters
image
The image to be added.
maskColor
The color of the mask.
Return Value

Returns the zero-based index of the first image added.

Description

Adds the given image to the ImageList using the given color to generate the mask. The number of images to add is determined by the width of the image. If UseMask is false, the maskColor parameter will be ignored.



Syntax 3
public int addImage( Bitmap image, Bitmap mask );
Parameters
image
The image to be added.
mask
The mask to be used.
Return Value

Returns the zero-based index of the first image added.

Description

Adds the given image and mask to the ImageList. The number of images to add is determined by the width of the given image. If UseMask is false, the mask parameter is ignored.



Syntax 4
public int addImage( Icon icon );
Return Value

Returns the zero-based index of the new image.

Description

Adds the given icon to the ImageList.

ImageList.destroyHandle

Syntax
protected void destroyHandle();
Description

Releases all resources held by the ImageList control.

ImageList.draw

Syntax 1
public void draw( Graphics g, Point pt, int index );
Parameters
g
The Graphics object to draw to.
pt
The coordinates at which to draw the image.
index
The index of the image to be drawn.
Description

Draws the image at the specified index.



Syntax 2
public void draw( Graphics g, int x, int y, int index );
Parameters
g
The Graphics object to draw to.
x
The x-coordinate at which to draw the image.
y
The y-coordinate at which to draw the image.
index
The index of the image to be drawn.
Description

Draws the image indicated by the given index.

ImageList.finalize

Syntax
public void finalize() throws Throwable;
Description

Topic under construction.

ImageList.getBackColor

Syntax
public Color getBackColor();
Return Value

Returns the background color.

Description

Retrieves the ImageList background color.

ImageList.getBlendColor

Syntax
public Color getBlendColor();
Return Value

Returns the color used for blended drawing modes.

Description

Retrieves the color used for blended drawing modes.

ImageList.getDrawMode

Syntax
public int getDrawMode();
Return Value

Returns the drawing mode.

Description

Retrieves the current drawing mode.

ImageList.getHandle

Syntax
public int getHandle();
Description

Topic under construction.

ImageList.getHandleCreated

Syntax
public boolean getHandleCreated();
Description

Topic under construction.

ImageList.getIcon

Syntax
public Icon getIcon( int index );
Parameters
index
The index at which to create the icon.
Return Value

Returns the icon that was created.

Description

Creates an icon based on the image and mask at the given index. The icon is created using the current drawing mode.

ImageList.getImage

Syntax 1
public Bitmap getImage();
Return Value

Returns the bitmap containing all images.

Description

Retrieves the single wide bitmap that contains all images managed by the ImageList.



Syntax 2
public Bitmap getImage( int index );
Parameters
index
The index of the image to be retrieved.
Return Value

Returns the image at the specified index.

Description

Retrieves the image at the specified index.

ImageList.getImageCount

Syntax
public int getImageCount();
Return Value

Returns the number of images.

Description

Retrieves the count of images in the ImageList.

ImageList.getImages

Syntax
public Bitmap[] getImages();
Return Value

Returns an array of images.

Description

Retrieves all images managed by the ImageList.

ImageList.getMask

Syntax 1
public Bitmap getMask();
Return Value

Returns the bitmap containing the image masks.

Description

Retrieves the single wide monocrome bitmap that contains all image masks managed by the ImageList. Returns null if the ImageList has no mask.



Syntax 2
public Bitmap getMask( int index );
Description

Topic under construction.

ImageList.getMaskColor

Syntax
public Color getMaskColor();
Return Value

Returns the mask color.

Description

Retrieves the color used to generate masks for images when added to the ImageList.

ImageList.getMasks

Syntax
public Bitmap[] getMasks();
Return Value

Returns an array of masks.

Description

Retrieves an array of all masks managed by the ImageList.

ImageList.getOverlayImage

Syntax
public Bitmap getOverlayImage();
Return Value

Returns the overlay image.

Description

Retrieves the current overlay image.

ImageList.getSize

Syntax
public Point getSize();
Return Value

Returns the image size.

Description

Retrieves the size of the images in the ImageList.

ImageList.getUseMask

Syntax
public boolean getUseMask();
Return Value

Returns true if a mask is used; otherwise, returns false.

Description

Indicates whether the ImageList uses a mask.

ImageList.removeAll

Syntax
public void removeAll();
Description

Removes all images and masks from the ImageList.

ImageList.removeImage

Syntax
public void removeImage( int index );
Parameters
index
The index of the image to be removed.
Description

Removes the image at the specified index.

ImageList.replaceImage

Syntax 1
public void replaceImage( int index, Bitmap image );
Parameters
index
The index of the image to be replaced.
image
The replacement image.
Description

Replaces the image at the specified index.



Syntax 2
public void replaceImage( int index, Bitmap image, Bitmap mask );
Parameters
index
The index of the image and mask to be replaced.
image
The replacement image.
mask
The replacement mask.
Description

Replaces the image and mask sat the pecified index.



Syntax 3
public void replaceImage( int index, Icon icon );
Parameters
index
The index of the image to be replaced.
icon
The replacement icon.
Description

Replaces the image at the specified index with the given icon.

ImageList.setBackColor

Syntax
public void setBackColor( Color value );
Parameters
value
The new background color.
Description

Sets the background color of the ImageList.

ImageList.setBlendColor

Syntax
public void setBlendColor( Color value );
Parameters
value
The color to be used.
Description

Sets the color used for blended drawing modes.

ImageList.setDrawMode

Syntax
public void setDrawMode( int value );
Parameters
value
The drawing mode.
Description

Sets the drawing mode.

ImageList.setImage

Syntax
public void setImage( Bitmap value );
Parameters
value
The bitmap containing the images.
Description

Assigns a single wide bitmap of images to the ImageList.

ImageList.setMaskColor

Syntax
public void setMaskColor( Color value );
Description

Topic under construction.

ImageList.setOverlayImage

Syntax
public void setOverlayImage( Bitmap value );
Description

Topic under construction.

ImageList.setSize

Syntax
public void setSize( Point value );
Description

Topic under construction.

ImageList.setUseMask

Syntax
public void setUseMask( boolean value );
Description

Topic under construction.