public abstract class CompositeImageDescriptor extends ImageDescriptor
Subclasses must implement the getSize
and fill
methods. Little or no work happens until the image descriptor's image is
actually requested by a call to createImage
(or to
getImageData
directly).
DEFAULT_IMAGE_DATA
Modifier | Constructor and Description |
---|---|
protected |
CompositeImageDescriptor()
Constructs an uninitialized composite image.
|
Modifier and Type | Method and Description |
---|---|
protected abstract void |
drawCompositeImage(int width,
int height)
Draw the composite images.
|
protected void |
drawImage(ImageData src,
int ox,
int oy)
Draws the given source image data into this composite image at the given
position.
|
ImageData |
getImageData()
Creates and returns a new SWT
ImageData object
for this image descriptor. |
protected abstract Point |
getSize()
Return the size of this composite image.
|
protected int |
getTransparentPixel()
Return the transparent pixel for the receiver.
|
protected void |
setImageData(ImageData imageData) |
createFromFile, createFromImage, createFromImage, createFromImageData, createFromURL, createImage, createImage, createImage, createImage, createResource, createWithFlags, destroyResource, getMissingImageDescriptor
protected CompositeImageDescriptor()
protected abstract void drawCompositeImage(int width, int height)
Subclasses must implement this framework method to paint images within
the given bounds using one or more calls to the drawImage
framework method.
width
- the widthheight
- the heightprotected final void drawImage(ImageData src, int ox, int oy)
Call this internal framework method to superimpose another image atop this composite image.
src
- the source image dataox
- the x positionoy
- the y positionpublic ImageData getImageData()
ImageDescriptor
ImageData
object
for this image descriptor.
Note that each call returns a new SWT image data object.
This framework method is declared public so that it is possible to request an image descriptor's image data without creating an SWT image object.
Returns null
if the image data could not be created.
getImageData
in class ImageDescriptor
null
protected int getTransparentPixel()
protected abstract Point getSize()
Subclasses must implement this framework method.
protected void setImageData(ImageData imageData)
imageData
- The imageData to set.
Copyright (c) 2000, 2014 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.