Package org.eclipse.jdt.ui
Class JavaElementImageDescriptor
java.lang.Object
org.eclipse.jface.resource.DeviceResourceDescriptor<org.eclipse.swt.graphics.Image>
org.eclipse.jface.resource.ImageDescriptor
org.eclipse.jface.resource.CompositeImageDescriptor
org.eclipse.jdt.ui.JavaElementImageDescriptor
public class JavaElementImageDescriptor
extends org.eclipse.jface.resource.CompositeImageDescriptor
A
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.
- Since:
- 2.0
- Restriction:
- This class is not intended to be subclassed by clients.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.eclipse.jface.resource.CompositeImageDescriptor
org.eclipse.jface.resource.CompositeImageDescriptor.CachedImageDataProvider
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
Flag to render the abstract adornment.static final int
Flag to render the 'default' annotation adornment.static final int
Flag to render the build path error adornment.static final int
Flag to render the 'constructor' adornment.static final int
Flag to render the 'default' method adornment.static final int
Flag to render the 'deprecated' adornment.static final int
Flag to render the error adornment.static final int
Flag to render the final adornment.static final int
Flag to render the 'ignore optional compile problems' adornment.static final int
Flag to render the 'implements' adornment.static final int
Flag to render the info adornment.static final int
Flag to render the 'native' adornment.static final int
Flag to render the sealed adornment.static final int
Flag to render the 'override' adornment.static final int
Flag to render the runnable adornment.static final int
Flag to render the sealed adornment.static final int
Flag to render the static adornment.static final int
Flag to render the synchronized adornment.static final int
Flag to render the 'transient' adornment.static final int
Flag to render the 'volatile' adornment.static final int
Flag to render the warning adornment.Fields inherited from class org.eclipse.jface.resource.ImageDescriptor
DEFAULT_IMAGE_DATA
-
Constructor Summary
ConstructorDescriptionJavaElementImageDescriptor
(org.eclipse.jface.resource.ImageDescriptor baseImage, int flags, org.eclipse.swt.graphics.Point size) Creates a new JavaElementImageDescriptor. -
Method Summary
Modifier and TypeMethodDescriptionprotected void
drawCompositeImage
(int width, int height) boolean
int
Returns the current adornments.org.eclipse.swt.graphics.Point
Returns the size of the image created by callingImageDescriptor.createImage()
.protected org.eclipse.swt.graphics.Point
getSize()
int
hashCode()
void
setAdornments
(int adornments) Sets the descriptors adornments.void
setImageSize
(org.eclipse.swt.graphics.Point size) Sets the size of the image created by callingImageDescriptor.createImage()
.Methods inherited from class org.eclipse.jface.resource.CompositeImageDescriptor
autoScaleDown, autoScaleUp, createCachedImageDataProvider, createCachedImageDataProvider, drawImage, drawImage, getImageData, getImageData, getTransparentPixel, getZoomLevel, setImageData, supportsZoomLevel
Methods inherited from class org.eclipse.jface.resource.ImageDescriptor
createFromFile, createFromImage, createFromImage, createFromImageData, createFromImageDataProvider, createFromURL, createFromURLSupplier, createImage, createImage, createImage, createImage, createResource, createWithFlags, destroyResource, getMissingImageDescriptor, imageDescriptorFromURI
-
Field Details
-
ABSTRACT
public static final int ABSTRACTFlag to render the abstract adornment.- See Also:
-
FINAL
public static final int FINALFlag to render the final adornment.- See Also:
-
SYNCHRONIZED
public static final int SYNCHRONIZEDFlag to render the synchronized adornment.- See Also:
-
STATIC
public static final int STATICFlag to render the static adornment.- See Also:
-
RUNNABLE
public static final int RUNNABLEFlag to render the runnable adornment.- See Also:
-
WARNING
public static final int WARNINGFlag to render the warning adornment.- See Also:
-
ERROR
public static final int ERRORFlag to render the error adornment.- See Also:
-
OVERRIDES
public static final int OVERRIDESFlag to render the 'override' adornment.- See Also:
-
IMPLEMENTS
public static final int IMPLEMENTSFlag to render the 'implements' adornment.- See Also:
-
CONSTRUCTOR
public static final int CONSTRUCTORFlag to render the 'constructor' adornment.- See Also:
-
DEPRECATED
public static final int DEPRECATEDFlag to render the 'deprecated' adornment.- Since:
- 3.0
- See Also:
-
VOLATILE
public static final int VOLATILEFlag to render the 'volatile' adornment.- Since:
- 3.3
- See Also:
-
TRANSIENT
public static final int TRANSIENTFlag to render the 'transient' adornment.- Since:
- 3.3
- See Also:
-
BUILDPATH_ERROR
public static final int BUILDPATH_ERRORFlag to render the build path error adornment.- Since:
- 3.7
- See Also:
-
NATIVE
public static final int NATIVEFlag to render the 'native' adornment.- Since:
- 3.7
- See Also:
-
IGNORE_OPTIONAL_PROBLEMS
public static final int IGNORE_OPTIONAL_PROBLEMSFlag to render the 'ignore optional compile problems' adornment.- Since:
- 3.8
- See Also:
-
DEFAULT_METHOD
public static final int DEFAULT_METHODFlag to render the 'default' method adornment.- Since:
- 3.10
- See Also:
-
ANNOTATION_DEFAULT
public static final int ANNOTATION_DEFAULTFlag to render the 'default' annotation adornment.- Since:
- 3.10
- See Also:
-
INFO
public static final int INFOFlag to render the info adornment.- Since:
- 3.12
- See Also:
-
SEALED
public static final int SEALEDFlag to render the sealed adornment.- Since:
- 3.22
- See Also:
- Restriction:
- This field is not intended to be referenced by clients.
-
NON_SEALED
public static final int NON_SEALEDFlag to render the sealed adornment.- Since:
- 3.22
- See Also:
- Restriction:
- This field is not intended to be referenced by clients.
-
-
Constructor Details
-
JavaElementImageDescriptor
public JavaElementImageDescriptor(org.eclipse.jface.resource.ImageDescriptor baseImage, int flags, org.eclipse.swt.graphics.Point size) Creates a new JavaElementImageDescriptor.- Parameters:
baseImage
- an image descriptor used as the base imageflags
- flags indicating which adornments are to be rendered. SeesetAdornments(int)
for valid values.size
- the size of the resulting image
-
-
Method Details
-
setAdornments
public void setAdornments(int adornments) Sets the descriptors adornments. Valid values are:ABSTRACT
,FINAL
,SYNCHRONIZED
,STATIC
,RUNNABLE
,INFO
,WARNING
,ERROR
,OVERRIDES
,IMPLEMENTS
,CONSTRUCTOR
,DEPRECATED
,VOLATILE
,TRANSIENT
,BUILDPATH_ERROR
,NATIVE
, or any combination of those.- Parameters:
adornments
- the image descriptors adornments
-
getAdronments
public int getAdronments()Returns the current adornments.- Returns:
- the current adornments
-
setImageSize
public void setImageSize(org.eclipse.swt.graphics.Point size) Sets the size of the image created by callingImageDescriptor.createImage()
.- Parameters:
size
- the size of the image returned from callingImageDescriptor.createImage()
-
getImageSize
public org.eclipse.swt.graphics.Point getImageSize()Returns the size of the image created by callingImageDescriptor.createImage()
.- Returns:
- the size of the image created by calling
ImageDescriptor.createImage()
-
getSize
protected org.eclipse.swt.graphics.Point getSize()- Specified by:
getSize
in classorg.eclipse.jface.resource.CompositeImageDescriptor
-
equals
-
hashCode
public int hashCode() -
drawCompositeImage
protected void drawCompositeImage(int width, int height) - Specified by:
drawCompositeImage
in classorg.eclipse.jface.resource.CompositeImageDescriptor
-