Class TextPosn
For more information, please see the extenral documentation and the base class.
-
Field Summary
Fields inherited from class com.adobe.xfa.text.TextPosnBase
AFFINITY_AFTER, AFFINITY_BEFORE, POSN_AFTER, POSN_BEFORE, WORD_MODE_ALGORITHMIC, WORD_MODE_LEGACY, WORD_MODE_LOCALE_SENSITIVE -
Constructor Summary
ConstructorsConstructorDescriptionTextPosn()Default constructor.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. -
Method Summary
Modifier and TypeMethodDescriptionvoidassociate(TextStream poNewStream) voidassociate(TextStream poNewStream, int eNewPosn) Overridden: Associate position with a new stream.voidassociate(TextStream poNewStream, int nNewIndex, int eNewPosn) Overridden: Associate position with a new stream and index.voidOverridden: Insert attribute change.voidAssignment operator.voidcopyFrom(TextPosnBase oSource) Assignment operator from base class.booleanEquality comparison.inthashCode()voidpara()Overridden: Insert a paragraph mark.voidOverridden: Insert text.Methods inherited from class com.adobe.xfa.text.TextPosnBase
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, wordStartMethods inherited from class com.adobe.xfa.text.TextMarkupBase
closeScopedBlock, issueFirstPara, openScopedBlock
-
Constructor Details
-
TextPosn
public TextPosn()Default constructor.The position is not initially associated with any stream.
-
TextPosn
Copy constructor.Copy all contents of the source position, including stream association, index and before/after state.
- Parameters:
oSource- Source position object to copy.
-
TextPosn
Copy (base class) constructor.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.
- Parameters:
oSource- Base class position object to copy.
-
TextPosn
Constructor with stream and optional position type.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.
- Parameters:
poNewStream- Stream to associate with. NULL creates a position object with no initial association.
-
TextPosn
Constructor with stream, index and optional position type.Construct a position object associated with the given stream and optional position type. The position is placed at the specified index.
- Parameters:
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.
-
TextPosn
-
-
Method Details
-
equals
Description copied from class:TextPosnBaseEquality comparison. Two text positions are considered equal if they are associated with the same stream, have the same index number. Note that the operation does not compare any other attributes (e.g., before/after, affinity, RTL etc.) This is so that equality comparison has a consistent behaviour with greater/less than comparisons.- Overrides:
equalsin classTextPosnBase- Parameters:
object- - Position to compare against.- Returns:
- TRUE if the positions are equal; FALSE if not.
-
hashCode
public int hashCode()- Overrides:
hashCodein classTextPosnBase
-
copyFrom
Assignment operator.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.
- Parameters:
oSource- Source position object to copy.
-
copyFrom
Assignment operator from base class.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.
- Overrides:
copyFromin classTextPosnBase- Parameters:
oSource- Source (base class) position object to copy.
-
associate
Overridden: Associate position with a new stream.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.
- Overrides:
associatein classTextPosnBase- Parameters:
poNewStream- 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.
-
associate
Overridden: Associate position with a new stream and index.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.
- Overrides:
associatein classTextPosnBase- Parameters:
poNewStream- 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.
-
associate
- Overrides:
associatein classTextPosnBase
-
para
public void para()Description copied from class:TextPosnBaseOverridden: Insert a paragraph mark. This method implements a virtual method declared in base class TextMkBase. It simply calls the InsertPara() method.- Overrides:
parain classTextPosnBase
-
text
Description copied from class:TextPosnBaseOverridden: Insert text. This method implements a virtual method declared in base class TextMkBase. It simply calls the appropriate Insert() overload.- Overrides:
textin classTextPosnBase- Parameters:
sText- - Text to be inserted.
-
attr
Description copied from class:TextPosnBaseOverridden: Insert attribute change. This method implements a virtual method declared in base class TextMkBase. It simply calls the appropriate Attribute() overload.- Overrides:
attrin classTextPosnBase- Parameters:
oAttr- - Attribute change to insert.
-