public class TextPosn extends TextPosnBase
For more information, please see the extenral documentation and the base class.
AFFINITY_AFTER, AFFINITY_BEFORE, POSN_AFTER, POSN_BEFORE, WORD_MODE_ALGORITHMIC, WORD_MODE_LEGACY, WORD_MODE_LOCALE_SENSITIVE| Constructor and Description |
|---|
TextPosn()
Default constructor.
|
TextPosn(TextPosn oSource)
Copy constructor.
|
TextPosn(TextPosnBase oSource)
Copy (base class) constructor.
|
TextPosn(TextStream poNewStream)
Constructor with stream and optional position type.
|
TextPosn(TextStream poNewStream,
int nNewIndex) |
TextPosn(TextStream poNewStream,
int nNewIndex,
int eNewPosn)
Constructor with stream, index and optional position type.
|
| Modifier and Type | Method and Description |
|---|---|
void |
associate(TextStream poNewStream) |
void |
associate(TextStream poNewStream,
int eNewPosn)
Overridden: Associate position with a new stream.
|
void |
associate(TextStream poNewStream,
int nNewIndex,
int eNewPosn)
Overridden: Associate position with a new stream and index.
|
void |
attr(TextAttr oAttr)
Overridden: Insert attribute change.
|
void |
copyFrom(TextPosn oSource)
Assignment operator.
|
void |
copyFrom(TextPosnBase oSource)
Assignment operator from base class.
|
boolean |
equals(Object object)
Equality comparison.
|
int |
hashCode() |
void |
para()
Overridden: Insert a paragraph mark.
|
void |
text(String sText)
Overridden: Insert text.
|
affinity, affinity, attribute, attribute, attribute, attributePtr, charPosition, charPosition, charRange, deleteAhead, deleteAhead, deleteAhead, deleteBack, deleteBack, deleteBack, down, end, end, enumerateMarkers, field, first, first, gt, gte, index, index, insert, insert, insert, insert, insert, insert, insertPara, isAtStart, isAtStart, isRTL, last, last, legacyPositioning, lt, lte, marker, markerEnd, markerStart, next, next, next, next, nextAttr, nextAttr, nextChar, nextChar, nextData, nextEmbed, nextEmbed, nextField, nextField, nextLine, nextPara, nextUserPosn, nextUserPosn, nextUserPosnType, nextUserPosnType, nextUserPosnType, nextUserPosnType, nextUserPosnTypeData, nextWord, nextWord, nextWord, notEqual, paraEnd, paraStart, position, position, prev, prev, prev, prev, prevAttr, prevAttr, prevChar, prevChar, prevData, prevEmbed, prevEmbed, prevField, prevField, prevLine, prevPara, prevUserPosn, prevUserPosn, prevUserPosnType, prevUserPosnType, prevUserPosnType, prevUserPosnType, prevUserPosnTypeData, prevWord, prevWord, prevWord, setKeyboard, setRTL, start, start, stream, tighten, up, wordEnd, wordEnd, wordStart, wordStartcloseScopedBlock, issueFirstPara, openScopedBlockpublic TextPosn()
The position is not initially associated with any stream.
public TextPosn(TextPosn oSource)
Copy all contents of the source position, including stream association, index and before/after state.
oSource - Source position object to copy.public TextPosn(TextPosnBase oSource)
This method creates the position objecgt by copying the stream association, index and before/after type from an object in the base class, TextPosnBase. Note: even though this copies the base class, the new position object will be tracked by the stream.
oSource - Base class position object to copy.public TextPosn(TextStream poNewStream)
Construct a position object associated with the given stream and optional position type. The position is placed before the first non-attribute item in the stream.
poNewStream - Stream to associate with. NULL creates a
position object with no initial association.public TextPosn(TextStream poNewStream, int nNewIndex, int eNewPosn)
Construct a position object associated with the given stream and optional position type. The position is placed at the specified index.
poNewStream - Stream to associate with. NULL creates a
position object with no initial association.nNewIndex - Index number for the position. Will be truncated if too
large.eNewPosn - (optional) Position type to use for the object.
Default is POSN_AFTER.public TextPosn(TextStream poNewStream, int nNewIndex)
public boolean equals(Object object)
TextPosnBaseequals in class TextPosnBaseobject - - Position to compare against.public int hashCode()
hashCode in class TextPosnBasepublic void copyFrom(TextPosn oSource)
Copy the entire content of the source position object including stream association, index and before/after type. The position object will be tracked by the new stream (if not NULL) and will no longer be tracked by its old stream.
oSource - Source position object to copy.public void copyFrom(TextPosnBase oSource)
Copy the entire content of the source position object including stream association, index and before/after type. The position object will be tracked by the new stream (if not NULL) and will no longer be tracked by its old stream.
copyFrom in class TextPosnBaseoSource - Source (base class) position object to copy.public void associate(TextStream poNewStream, int eNewPosn)
This method overrides the base class implementation. It associates the position object with the specified stream, immediately before the first non-attribute item. The position object will be tracked by the new stream (if not NULL) and will no longer be tracked by its old stream.
associate in class TextPosnBasepoNewStream - Stream to associate with. NULL leaves the
position object unassociated (and untracked).eNewPosn - (optional) Position type to use for the object.
Default is POSN_AFTER.public void associate(TextStream poNewStream, int nNewIndex, int eNewPosn)
This method overrides the base class implementation. It associates the position object with the specified stream, at the specified index position. The position object will be tracked by the new stream (if not NULL) and will no longer be tracked by its old stream.
associate in class TextPosnBasepoNewStream - Stream to associate with. NULL leaves the
position object unassociated (and untracked).nNewIndex - Index of this position in the new stream. If the
value is too large, it is truncated.eNewPosn - (optional) Position type to use for the object.
Default is POSN_AFTER.public void associate(TextStream poNewStream)
associate in class TextPosnBasepublic void para()
TextPosnBasepara in class TextPosnBasepublic void text(String sText)
TextPosnBasetext in class TextPosnBasesText - - Text to be inserted.public void attr(TextAttr oAttr)
TextPosnBaseattr in class TextPosnBaseoAttr - - Attribute change to insert.Copyright © 2010 - 2020 Adobe. All Rights Reserved