|
Eclipse Platform 2.0 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.eclipse.jface.text.source.Annotation | +--org.eclipse.ui.texteditor.MarkerAnnotation
Annotation representing a marker on a resource in the workspace. This class may be instantiated or be subclassed.
IMarker
Field Summary | |
static int |
PROBLEM_LAYER
The layer in which markers representing problem are located. |
Constructor Summary | |
MarkerAnnotation(IMarker marker)
Creates a new annotation for the given marker. |
Method Summary | |
boolean |
equals(Object o)
The MarkerAnnotation implementation of this
Object method returns true iff the other
object is also a MarkerAnnotation and the marker handles are
equal. |
protected Image |
getImage(Display display)
Returns an image for this annotation. |
protected static Image |
getImage(Display display,
ImageDescriptor descriptor)
Returns an image for the given display as specified by the given image descriptor. |
protected Image |
getImage(String name)
Returns the image of the given name. |
protected static Map |
getImageRegistry(Display display)
Returns an image registry for the given display. |
IMarker |
getMarker()
Returns this annotation's underlying marker. |
protected String |
getUnknownImageName(IMarker marker)
Returns the name of an image used to visually represent markers of unknown type. |
int |
hashCode()
|
protected void |
initialize()
Initializes the annotation's icon representation and its drawing layer based upon the properties of the underlying marker. |
void |
paint(GC gc,
Canvas canvas,
Rectangle r)
Implement this method to draw a graphical representation of this annotation within the given bounds. |
protected void |
setImage(Image image)
Sets the marker image to the given image. |
void |
update()
Informs this annotation about changes applied to its underlying marker and adapts to those changes. |
Methods inherited from class org.eclipse.jface.text.source.Annotation |
drawImage, drawImage, getLayer, setLayer |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int PROBLEM_LAYER
Constructor Detail |
public MarkerAnnotation(IMarker marker)
marker
- the markerMethod Detail |
protected static Image getImage(Display display, ImageDescriptor descriptor)
display
- the displaydescriptor
- the image descriptor
protected static Map getImageRegistry(Display display)
display
- the display
protected void setImage(Image image)
image
- the new marker imagepublic boolean equals(Object o)
MarkerAnnotation
implementation of this
Object
method returns true
iff the other
object is also a MarkerAnnotation
and the marker handles are
equal.
equals
in class Object
public int hashCode()
hashCode
in class Object
public IMarker getMarker()
protected void initialize()
public void paint(GC gc, Canvas canvas, Rectangle r)
Annotation
paint
in class Annotation
canvas
- the canvas to draw onr
- the bounds inside the canvas to draw onpublic void update()
protected String getUnknownImageName(IMarker marker)
null
.
Subclasses may replace this method.
marker
- the marker of unkown type
protected Image getImage(String name)
name
- the name of the requested image
null
if there is no such imageprotected Image getImage(Display display)
display
- the display for which the image is requested
|
Eclipse Platform 2.0 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |