public class DecorationOverlayIcon extends CompositeImageDescriptor
DecorationOverlayIcon
is an image descriptor that can be used
to overlay decoration images on to the 4 corner quadrants of a base image.
The four quadrants are IDecoration.TOP_LEFT
, IDecoration.TOP_RIGHT
,
IDecoration.BOTTOM_LEFT
and IDecoration.BOTTOM_RIGHT
. Additionally,
the overlay can be used to provide an underlay corresponding to IDecoration.UNDERLAY
.IDecoration
DEFAULT_IMAGE_DATA
Constructor and Description |
---|
DecorationOverlayIcon(Image baseImage,
ImageDescriptor[] overlaysArray)
Create the decoration overlay for the base image using the array of
provided overlays.
|
DecorationOverlayIcon(Image baseImage,
ImageDescriptor[] overlaysArray,
Point sizeValue)
Create the decoration overlay for the base image using the array of
provided overlays.
|
DecorationOverlayIcon(Image baseImage,
ImageDescriptor overlayImage,
int quadrant)
Create a decoration overlay icon that will place the given overlay icon in
the given quadrant of the base image.
|
Modifier and Type | Method and Description |
---|---|
protected void |
drawCompositeImage(int width,
int height)
Draw the composite images.
|
boolean |
equals(Object o) |
protected Point |
getSize()
Return the size of this composite image.
|
protected int |
getTransparentPixel()
Return the transparent pixel for the receiver.
|
int |
hashCode() |
drawImage, getImageData, setImageData
createFromFile, createFromImage, createFromImage, createFromImageData, createFromURL, createImage, createImage, createImage, createImage, createResource, createWithFlags, destroyResource, getMissingImageDescriptor
public DecorationOverlayIcon(Image baseImage, ImageDescriptor[] overlaysArray, Point sizeValue)
IDecoration
(IDecoration.TOP_LEFT
, IDecoration.TOP_RIGHT
,
IDecoration.BOTTOM_LEFT
, IDecoration.BOTTOM_RIGHT
andIDecoration.UNDERLAY
).baseImage
- the base imageoverlaysArray
- the overlay imagessizeValue
- the size of the resulting imagepublic DecorationOverlayIcon(Image baseImage, ImageDescriptor[] overlaysArray)
IDecoration
(IDecoration.TOP_LEFT
, IDecoration.TOP_RIGHT
,
IDecoration.BOTTOM_LEFT
, IDecoration.BOTTOM_RIGHT
and IDecoration.UNDERLAY
).baseImage
- the base imageoverlaysArray
- the overlay imagespublic DecorationOverlayIcon(Image baseImage, ImageDescriptor overlayImage, int quadrant)
baseImage
- the base imageoverlayImage
- the overlay imagequadrant
- the quadrant (one of IDecoration
(IDecoration.TOP_LEFT
, IDecoration.TOP_RIGHT
,
IDecoration.BOTTOM_LEFT
, IDecoration.BOTTOM_RIGHT
or IDecoration.UNDERLAY
)protected void drawCompositeImage(int width, int height)
CompositeImageDescriptor
Subclasses must implement this framework method to paint images within
the given bounds using one or more calls to the drawImage
framework method.
drawCompositeImage
in class CompositeImageDescriptor
width
- the widthheight
- the heightprotected Point getSize()
CompositeImageDescriptor
Subclasses must implement this framework method.
getSize
in class CompositeImageDescriptor
protected int getTransparentPixel()
CompositeImageDescriptor
getTransparentPixel
in class CompositeImageDescriptor
Copyright (c) 2000, 2014 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.