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

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 Segment

java.lang.Object
  extended by 

org.eclipse.jface.text.Position
      extended by 
org.eclipse.jface.text.projection.Segment

public class Segment
extends Position

Internal class. Do not use. Only public for testing purposes.

A segment is the image of a master document fragment in a projection document.

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
  Fragment fragment
          The corresponding fragment for this segment.
 boolean isMarkedForShift
          A flag indicating that the segment updater should shift this segment when a change happens at its boundaries.
 boolean isMarkedForStretch
          A flag indicating that the segment updater should stretch this segment when a change happens at its boundaries.
 
Fields inherited from class org.eclipse.jface.text. Position
isDeleted, length, offset
 
Constructor Summary
Segment (int offset, int length)
          Creates a new segment covering the given range.
 
Method Summary
 void clearMark ()
          Clears the shifting and the stretching flag.
 boolean isMarkedForShift ()
          Returns true if the shifting flag is set, false otherwise.
 boolean isMarkedForStretch ()
          Returns true if the stretching flag is set, false otherwise.
 void markForShift ()
          Sets the shifting flag.
 void markForStretch ()
          Sets the stretching flag.
 
Methods inherited from class org.eclipse.jface.text. Position
delete, equals, getLength, getOffset, hashCode, includes, isDeleted, overlapsWith, setLength, setOffset, toString, undelete
 
Methods inherited from class java.lang. Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

fragment

public 
Fragment fragment
The corresponding fragment for this segment.


isMarkedForStretch

public boolean isMarkedForStretch
A flag indicating that the segment updater should stretch this segment when a change happens at its boundaries.


isMarkedForShift

public boolean isMarkedForShift
A flag indicating that the segment updater should shift this segment when a change happens at its boundaries.

Constructor Detail

Segment

public Segment(int offset,
               int length)
Creates a new segment covering the given range.

Parameters:
offset - the offset of the segment
length - the length of the segment
Method Detail

markForStretch

public void markForStretch()
Sets the stretching flag.


isMarkedForStretch

public boolean isMarkedForStretch()
Returns true if the stretching flag is set, false otherwise.

Returns:
true if the stretching flag is set, false otherwise

markForShift

public void markForShift()
Sets the shifting flag.


isMarkedForShift

public boolean isMarkedForShift()
Returns true if the shifting flag is set, false otherwise.

Returns:
true if the shifting flag is set, false otherwise

clearMark

public void clearMark()
Clears the shifting and the stretching flag.


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