public class JavaElementImageDescriptor extends CompositeImageDescriptor
JavaElementImageDescriptor
consists of a base image and several adornments. The adornments
are computed according to the flags either passed during creation or set via the method
setAdornments(int)
.
This class may be instantiated; it is not intended to be subclassed.
Modifier and Type | Field and Description |
---|---|
static int |
ABSTRACT
Flag to render the abstract adornment.
|
static int |
ANNOTATION_DEFAULT
Flag to render the 'default' annotation adornment.
|
static int |
BUILDPATH_ERROR
Flag to render the build path error adornment.
|
static int |
CONSTRUCTOR
Flag to render the 'constructor' adornment.
|
static int |
DEFAULT_METHOD
Flag to render the 'default' method adornment.
|
static int |
DEPRECATED
Flag to render the 'deprecated' adornment.
|
static int |
ERROR
Flag to render the error adornment.
|
static int |
FINAL
Flag to render the final adornment.
|
static int |
IGNORE_OPTIONAL_PROBLEMS
Flag to render the 'ignore optional compile problems' adornment.
|
static int |
IMPLEMENTS
Flag to render the 'implements' adornment.
|
static int |
NATIVE
Flag to render the 'native' adornment.
|
static int |
OVERRIDES
Flag to render the 'override' adornment.
|
static int |
RUNNABLE
Flag to render the runnable adornment.
|
static int |
STATIC
Flag to render the static adornment.
|
static int |
SYNCHRONIZED
Flag to render the synchronized adornment.
|
static int |
TRANSIENT
Flag to render the 'transient' adornment.
|
static int |
VOLATILE
Flag to render the 'volatile' adornment.
|
static int |
WARNING
Flag to render the warning adornment.
|
DEFAULT_IMAGE_DATA
Constructor and Description |
---|
JavaElementImageDescriptor(ImageDescriptor baseImage,
int flags,
Point size)
Creates a new JavaElementImageDescriptor.
|
Modifier and Type | Method and Description |
---|---|
protected void |
drawCompositeImage(int width,
int height) |
boolean |
equals(Object object) |
int |
getAdronments()
Returns the current adornments.
|
Point |
getImageSize()
Returns the size of the image created by calling
ImageDescriptor.createImage() . |
protected Point |
getSize() |
int |
hashCode() |
void |
setAdornments(int adornments)
Sets the descriptors adornments.
|
void |
setImageSize(Point size)
Sets the size of the image created by calling
ImageDescriptor.createImage() . |
drawImage, getImageData, getTransparentPixel, setImageData
createFromFile, createFromImage, createFromImage, createFromImageData, createFromURL, createImage, createImage, createImage, createImage, createResource, createWithFlags, destroyResource, getMissingImageDescriptor
public static final int ABSTRACT
public static final int FINAL
public static final int SYNCHRONIZED
public static final int STATIC
public static final int RUNNABLE
public static final int WARNING
public static final int ERROR
public static final int OVERRIDES
public static final int IMPLEMENTS
public static final int CONSTRUCTOR
public static final int DEPRECATED
public static final int VOLATILE
public static final int TRANSIENT
public static final int BUILDPATH_ERROR
public static final int NATIVE
public static final int IGNORE_OPTIONAL_PROBLEMS
public static final int DEFAULT_METHOD
public static final int ANNOTATION_DEFAULT
public JavaElementImageDescriptor(ImageDescriptor baseImage, int flags, Point size)
baseImage
- an image descriptor used as the base imageflags
- flags indicating which adornments are to be rendered. See setAdornments(int)
for valid values.size
- the size of the resulting imagepublic void setAdornments(int adornments)
ABSTRACT
, FINAL
,
SYNCHRONIZED
, STATIC
, RUNNABLE
, WARNING
,
ERROR
, OVERRIDES
, IMPLEMENTS
, CONSTRUCTOR
,
DEPRECATED
, VOLATILE
, TRANSIENT
, BUILDPATH_ERROR
,
NATIVE
, or any combination of those.adornments
- the image descriptors adornmentspublic int getAdronments()
public void setImageSize(Point size)
ImageDescriptor.createImage()
.size
- the size of the image returned from calling ImageDescriptor.createImage()
public Point getImageSize()
ImageDescriptor.createImage()
.ImageDescriptor.createImage()
protected Point getSize()
getSize
in class CompositeImageDescriptor
protected void drawCompositeImage(int width, int height)
drawCompositeImage
in class CompositeImageDescriptor
Copyright (c) 2000, 2015 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.