org.eclipse.cdt.ui
Class CElementImageDescriptor

java.lang.Object
  extended by org.eclipse.jface.resource.DeviceResourceDescriptor
      extended by org.eclipse.jface.resource.ImageDescriptor
          extended by org.eclipse.jface.resource.CompositeImageDescriptor
              extended by org.eclipse.cdt.ui.CElementImageDescriptor

public class CElementImageDescriptor
extends org.eclipse.jface.resource.CompositeImageDescriptor

A CImageDescriptor 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.

It is guaranteed that objects that conform to this interface are also instances of type ImageDescriptor

Note: This class/interface is part of an interim API that is still under development and expected to change before reaching stability.

Since:
2.0

Field Summary
static int CONSTANT
          Flag to render the const adornment
static int DEFINES
          Flag to render the 'defines' adornment in the type hierarchy
static int ERROR
          Flag to render the error adornment
static int IMPLEMENTS
          Deprecated. flag never had an effect
static int INACTIVE
          Flag to render the 'inactive' adornment for include directives
static int OVERRIDES
          Deprecated. flag never had an effect
static int RECURSIVE_RELATION
          Flag to render the 'recursive relation' adornment (for trees, an arrow pointing back)
static int REFERENCED_BY
          Flag to render the 'referenced by' adornment (for trees, an arrow up)
static int RELATES_TO
          Flag to render the 'relates to' adornment (for trees, an arrow down)
static int RELATES_TO_MULTIPLE
          Flag to render the 'relates to' adornment (for trees, two arrows down)
static int RUNNABLE
          Deprecated. flag never had an effect
static int STATIC
          Flag to render the static adornment
static int SYSTEM_INCLUDE
          Flag to render the 'system include' adornment
static int TEMPLATE
          Flag to render the abstract adornment
static int VOLATILE
          Flag to render the volatile adornment
static int WARNING
          Flag to render the waring adornment
 
Constructor Summary
CElementImageDescriptor(org.eclipse.jface.resource.ImageDescriptor baseImage, int flags, org.eclipse.swt.graphics.Point size)
          Create a new CElementImageDescriptor.
 
Method Summary
 boolean equals(java.lang.Object object)
           
 int getAdronments()
          Returns the current adornments.
 org.eclipse.swt.graphics.Point getImageSize()
          Returns the size of the image created by calling createImage().
 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 calling createImage().
 
Methods inherited from class org.eclipse.jface.resource.CompositeImageDescriptor
getImageData
 
Methods inherited from class org.eclipse.jface.resource.ImageDescriptor
createFromFile, createFromImage, createFromImage, createFromImageData, createFromURL, createImage, createImage, createImage, createImage, createResource, createWithFlags, destroyResource, getMissingImageDescriptor
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TEMPLATE

public static final int TEMPLATE
Flag to render the abstract adornment

See Also:
Constant Field Values

CONSTANT

public static final int CONSTANT
Flag to render the const adornment

See Also:
Constant Field Values

VOLATILE

public static final int VOLATILE
Flag to render the volatile adornment

See Also:
Constant Field Values

STATIC

public static final int STATIC
Flag to render the static adornment

See Also:
Constant Field Values

RUNNABLE

public static final int RUNNABLE
Deprecated. flag never had an effect
See Also:
Constant Field Values

WARNING

public static final int WARNING
Flag to render the waring adornment

See Also:
Constant Field Values

ERROR

public static final int ERROR
Flag to render the error adornment

See Also:
Constant Field Values

OVERRIDES

public static final int OVERRIDES
Deprecated. flag never had an effect
See Also:
Constant Field Values

IMPLEMENTS

public static final int IMPLEMENTS
Deprecated. flag never had an effect
See Also:
Constant Field Values

RELATES_TO

public static final int RELATES_TO
Flag to render the 'relates to' adornment (for trees, an arrow down)

See Also:
Constant Field Values

RELATES_TO_MULTIPLE

public static final int RELATES_TO_MULTIPLE
Flag to render the 'relates to' adornment (for trees, two arrows down)

See Also:
Constant Field Values

REFERENCED_BY

public static final int REFERENCED_BY
Flag to render the 'referenced by' adornment (for trees, an arrow up)

See Also:
Constant Field Values

RECURSIVE_RELATION

public static final int RECURSIVE_RELATION
Flag to render the 'recursive relation' adornment (for trees, an arrow pointing back)

See Also:
Constant Field Values

SYSTEM_INCLUDE

public static final int SYSTEM_INCLUDE
Flag to render the 'system include' adornment

See Also:
Constant Field Values

DEFINES

public static final int DEFINES
Flag to render the 'defines' adornment in the type hierarchy

See Also:
Constant Field Values

INACTIVE

public static final int INACTIVE
Flag to render the 'inactive' adornment for include directives

See Also:
Constant Field Values
Constructor Detail

CElementImageDescriptor

public CElementImageDescriptor(org.eclipse.jface.resource.ImageDescriptor baseImage,
                               int flags,
                               org.eclipse.swt.graphics.Point size)
Create a new CElementImageDescriptor.

Parameters:
baseImage - an image descriptor used as the base image
flags - flags indicating which adornments are to be rendered. See setAdornments for valid values.
size - the size of the resulting image
See Also:
setAdornments(int)
Method Detail

setAdornments

public void setAdornments(int adornments)
Sets the descriptors adornments. Valid values are: ABSTRACT, FINAL, STATIC, WARNING, ERROR, or any combination of those.

Parameters:
adornments - the image descritpors 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 calling createImage().

Parameters:
size - the size of the image returned from calling createImage()

getImageSize

public org.eclipse.swt.graphics.Point getImageSize()
Returns the size of the image created by calling createImage().

Returns:
the size of the image created by calling createImage

equals

public boolean equals(java.lang.Object object)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object