public class Segment extends Position
A segment is the image of a master document fragment in a projection document.
Modifier and Type | Field and Description |
---|---|
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.
|
Constructor and Description |
---|
Segment(int offset,
int length)
Creates a new segment covering the given range.
|
Modifier and Type | Method and Description |
---|---|
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.
|
public Fragment fragment
public boolean isMarkedForStretch
public boolean isMarkedForShift
public Segment(int offset, int length)
offset
- the offset of the segmentlength
- the length of the segmentpublic void markForStretch()
public boolean isMarkedForStretch()
true
if the stretching flag is set, false
otherwise.true
if the stretching flag is set, false
otherwisepublic void markForShift()
public boolean isMarkedForShift()
true
if the shifting flag is set, false
otherwise.true
if the shifting flag is set, false
otherwisepublic void clearMark()
Copyright (c) 2000, 2015 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.