Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 


Eclipse Platform
Release 3.5

org.eclipse.jface.text.source.projection
Class ProjectionAnnotation


java.lang.Object
  extended by 

org.eclipse.jface.text.source.Annotation
      extended by 
org.eclipse.jface.text.source.projection.ProjectionAnnotation
All Implemented Interfaces:
IAnnotationPresentation

public class ProjectionAnnotation
extends Annotation
implements IAnnotationPresentation

Annotation used to represent the projection of a master document onto a ProjectionDocument. A projection annotation can be either expanded or collapsed. If expanded it corresponds to a segment of the projection document. If collapsed, it represents a region of the master document that does not have a corresponding segment in the projection document.

Clients may subclass or use as is.

Since:
3.0

Field Summary
static  String TYPE
          The type of projection annotations.
 
Fields inherited from class org.eclipse.jface.text.source. Annotation
TYPE_UNKNOWN
 
Fields inherited from interface org.eclipse.jface.text.source. IAnnotationPresentation
DEFAULT_LAYER
 
Constructor Summary
ProjectionAnnotation ()
          Creates a new expanded projection annotation.
ProjectionAnnotation (boolean isCollapsed)
          Creates a new projection annotation.
 
Method Summary
 int getLayer ()
          Returns the annotations drawing layer.
 boolean isCollapsed ()
          Returns the state of this annotation.
 void markCollapsed ()
          Marks this annotation as being collapsed.
 void markExpanded ()
          Marks this annotation as being unfolded.
 void paint ( GC gc, Canvas canvas, Rectangle rectangle)
          Implement this method to draw a graphical representation of this annotation within the given bounds.
 void setRangeIndication (boolean rangeIndication)
          Enables and disables the range indication for this annotation.
 
Methods inherited from class org.eclipse.jface.text.source. Annotation
getText, getType, isMarkedDeleted, isPersistent, markDeleted, setText, setType
 
Methods inherited from class java.lang. Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TYPE

public static final 
String TYPE
The type of projection annotations.

See Also:
Constant Field Values
Constructor Detail

ProjectionAnnotation

public ProjectionAnnotation()
Creates a new expanded projection annotation.


ProjectionAnnotation

public ProjectionAnnotation(boolean isCollapsed)
Creates a new projection annotation. When isCollapsed is true the annotation is initially collapsed.

Parameters:
isCollapsed - true if the annotation should initially be collapsed, false otherwise
Method Detail

setRangeIndication

public void setRangeIndication(boolean rangeIndication)
Enables and disables the range indication for this annotation.

Parameters:
rangeIndication - the enable state for the range indication

paint

public void paint(
GC gc,
                  
Canvas canvas,
                  
Rectangle rectangle)
Description copied from interface: IAnnotationPresentation
Implement this method to draw a graphical representation of this annotation within the given bounds.

Note that this method is not used when drawing annotations on the editor's text widget. This is handled trough a AnnotationPainter.IDrawingStrategy.

Specified by:
paint in interface IAnnotationPresentation
Parameters:
gc - the drawing GC
canvas - the canvas to draw on
rectangle - the bounds inside the canvas to draw on

getLayer

public int getLayer()
Description copied from interface: IAnnotationPresentation
Returns the annotations drawing layer.

Specified by:
getLayer in interface IAnnotationPresentation
Returns:
the annotations drawing layer

isCollapsed

public boolean isCollapsed()
Returns the state of this annotation.

Returns:
true if collapsed

markCollapsed

public void markCollapsed()
Marks this annotation as being collapsed.


markExpanded

public void markExpanded()
Marks this annotation as being unfolded.


Eclipse Platform
Release 3.5

Guidelines for using Eclipse APIs.

Copyright (c) Eclipse contributors and others 2000, 2008. All rights reserved.


 
 
  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire