public class AttributedPosition
extends org.eclipse.jface.text.Position
| Constructor and Description |
|---|
AttributedPosition(int offset,
int length,
org.eclipse.jface.text.TextAttribute attribute,
Object lock)
Initialize the position with the given offset, length and foreground color.
|
| Modifier and Type | Method and Description |
|---|---|
org.eclipse.swt.custom.StyleRange |
createStyleRange() |
void |
delete() |
org.eclipse.jface.text.TextAttribute |
getHighlighting() |
boolean |
isContained(int off,
int len)
Is this position contained in the given range (inclusive)? Synchronizes on position updater.
|
boolean |
isEqual(int off,
int len,
org.eclipse.jface.text.TextAttribute other)
Uses reference equality for the highlighting.
|
void |
setLength(int length) |
void |
setOffset(int offset) |
void |
undelete() |
void |
update(int off,
int len) |
public AttributedPosition(int offset,
int length,
org.eclipse.jface.text.TextAttribute attribute,
Object lock)
offset - The position offsetlength - The position lengthattribute - The highlighting TextAttributelock - The lock objectpublic org.eclipse.swt.custom.StyleRange createStyleRange()
public boolean isEqual(int off,
int len,
org.eclipse.jface.text.TextAttribute other)
off - The offsetlen - The lengthother - The highlighting TextAttribute to compare withtrue if the given offset, length and highlighting are equal to the internal ones.public boolean isContained(int off,
int len)
off - The range offsetlen - The range lengthtrue iff this position is not delete and contained in the given range.public void update(int off,
int len)
public void setLength(int length)
setLength in class org.eclipse.jface.text.Positionpublic void setOffset(int offset)
setOffset in class org.eclipse.jface.text.Positionpublic void delete()
delete in class org.eclipse.jface.text.Positionpublic void undelete()
undelete in class org.eclipse.jface.text.Positionpublic org.eclipse.jface.text.TextAttribute getHighlighting()
Copyright © 2016. All Rights Reserved.