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.projection
Class ProjectionDocumentEvent


java.lang.Object
  extended by 

org.eclipse.jface.text.DocumentEvent
      extended by 

org.eclipse.jface.text.SlaveDocumentEvent
          extended by 
org.eclipse.jface.text.projection.ProjectionDocumentEvent

public class ProjectionDocumentEvent
extends SlaveDocumentEvent

This event is sent out by an ProjectionDocumentwhen it is manipulated. The manipulation is either a content manipulation or a change of the projection between the master and the slave. Clients can determine the type of change by asking the projection document event for its change type (see getChangeType()) and comparing it with the predefined types PROJECTION_CHANGEand CONTENT_CHANGE.

Clients are not supposed to create instances of this class. Instances are created by ProjectionDocument instances. This class is not intended to be subclassed.

Since:
3.0
Restriction:
This class is not intended to be subclassed by clients.
Restriction:
This class is not intended to be instantiated by clients.

Field Summary
static  Object CONTENT_CHANGE
          The change type indicating a content change
static  Object PROJECTION_CHANGE
          The change type indicating a projection change
 
Fields inherited from class org.eclipse.jface.text. DocumentEvent
fDocument, fLength, fModificationStamp, fOffset, fText
 
Constructor Summary
ProjectionDocumentEvent ( IDocument doc, int offset, int length, String text, DocumentEvent masterEvent)
          Creates a new content change event caused by the given master document change.
ProjectionDocumentEvent ( IDocument doc, int offset, int length, String text, int masterOffset, int masterLength)
          Creates a new projection change event for the given properties.
ProjectionDocumentEvent ( IDocument doc, int offset, int length, String text, int masterOffset, int masterLength, DocumentEvent masterEvent)
          Creates a new projection document event for the given properties.
 
Method Summary
  Object getChangeType ()
          Returns the change type of this event.
 int getMasterLength ()
          Returns the length of the master document range that has been added or removed in case this event describes a projection changed, otherwise -1.
 int getMasterOffset ()
          Returns the offset of the master document range that has been added or removed in case this event describes a projection change, otherwise it returns -1.
 
Methods inherited from class org.eclipse.jface.text. SlaveDocumentEvent
getMasterEvent
 
Methods inherited from class org.eclipse.jface.text. DocumentEvent
getDocument, getLength, getModificationStamp, getOffset, getText, toString
 
Methods inherited from class java.lang. Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

PROJECTION_CHANGE

public static final 
Object PROJECTION_CHANGE
The change type indicating a projection change


CONTENT_CHANGE

public static final 
Object CONTENT_CHANGE
The change type indicating a content change

Constructor Detail

ProjectionDocumentEvent

public ProjectionDocumentEvent(
IDocument doc,
                               int offset,
                               int length,
                               
String text,
                               
DocumentEvent masterEvent)
Creates a new content change event caused by the given master document change. Instances created using this constructor return -1 when calling getMasterOffset or getMasterLength. This information can be obtained by accessing the master event.

Parameters:
doc - the changed projection document
offset - the offset in the projection document
length - the length in the projection document
text - the replacement text
masterEvent - the original master event

ProjectionDocumentEvent

public ProjectionDocumentEvent(
IDocument doc,
                               int offset,
                               int length,
                               
String text,
                               int masterOffset,
                               int masterLength)
Creates a new projection change event for the given properties. Instances created with this constructor return the given master document offset and length but do not have an associated master document event.

Parameters:
doc - the projection document
offset - the offset in the projection document
length - the length in the projection document
text - the replacement text
masterOffset - the offset in the master document
masterLength - the length in the master document

ProjectionDocumentEvent

public ProjectionDocumentEvent(
IDocument doc,
                               int offset,
                               int length,
                               
String text,
                               int masterOffset,
                               int masterLength,
                               
DocumentEvent masterEvent)
Creates a new projection document event for the given properties. The projection change is caused by a manipulation of the master document. In order to accommodate the master document change, the projection document had to change the projection. Instances created with this constructor return the given master document offset and length and also have an associated master document event.

Parameters:
doc - the projection document
offset - the offset in the projection document
length - the length in the projection document
text - the replacement text
masterOffset - the offset in the master document
masterLength - the length in the master document
masterEvent - the master document event
Method Detail

getChangeType

public 
Object getChangeType()
Returns the change type of this event. This is either PROJECTION_CHANGE or CONTENT_CHANGE.

Returns:
the change type of this event

getMasterOffset

public int getMasterOffset()
Returns the offset of the master document range that has been added or removed in case this event describes a projection change, otherwise it returns -1.

Returns:
the master document offset of the projection change or -1

getMasterLength

public int getMasterLength()
Returns the length of the master document range that has been added or removed in case this event describes a projection changed, otherwise -1.

Returns:
the master document length of the projection change or -1

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