public class DecorationOverlayIcon
extends org.eclipse.jface.resource.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
Constructor and Description |
---|
DecorationOverlayIcon(org.eclipse.swt.graphics.Image baseImage,
org.eclipse.jface.resource.ImageDescriptor[] overlaysArray)
Create the decoration overlay for the base image using the array of
provided overlays.
|
DecorationOverlayIcon(org.eclipse.swt.graphics.Image baseImage,
org.eclipse.jface.resource.ImageDescriptor[] overlaysArray,
org.eclipse.swt.graphics.Point sizeValue)
Create the decoration overlay for the base image using the array of
provided overlays.
|
DecorationOverlayIcon(org.eclipse.swt.graphics.Image baseImage,
org.eclipse.jface.resource.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) |
boolean |
equals(java.lang.Object o) |
protected org.eclipse.swt.graphics.Point |
getSize() |
protected int |
getTransparentPixel() |
int |
hashCode() |
drawImage, getImageData, setImageData
public DecorationOverlayIcon(org.eclipse.swt.graphics.Image baseImage, org.eclipse.jface.resource.ImageDescriptor[] overlaysArray, org.eclipse.swt.graphics.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(org.eclipse.swt.graphics.Image baseImage, org.eclipse.jface.resource.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(org.eclipse.swt.graphics.Image baseImage, org.eclipse.jface.resource.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
)public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
protected void drawCompositeImage(int width, int height)
drawCompositeImage
in class org.eclipse.jface.resource.CompositeImageDescriptor
protected org.eclipse.swt.graphics.Point getSize()
getSize
in class org.eclipse.jface.resource.CompositeImageDescriptor
protected int getTransparentPixel()
getTransparentPixel
in class org.eclipse.jface.resource.CompositeImageDescriptor