Class TextRegion
-
Field Summary
Fields inherited from class com.adobe.xfa.text.TextStream
DEFAULT_STREAMFields inherited from class com.adobe.xfa.text.TextLegacy
LEVEL_CORRECT_SPACING, LEVEL_NORMAL, LEVEL_V6 -
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor.TextRegion(String sSource) Constructor with source text string. -
Method Summary
Modifier and TypeMethodDescriptionvoidcopyFrom(TextRegion oSource) Assign this text region's content from the given text region.booleanQuery whether the stream enforces text region size at data entry time.voidenforceSize(boolean bNewEnforce) Change the value of the EnforceSize flag.booleanCompare text regions for equality.Return the maximum height of the text region.Return the maximum width of the text region.Return the minimum height of the text region.Return the minimum width of the text region.inthashCode()booleannotEqual(TextRegion oCompare) Compare text streams for inequality.voidsetJustifyExtents(UnitSpan oJustifyWidth, UnitSpan oJustifyHeight) Set the justfiy extents of the text region.voidsetJustifyHeight(UnitSpan oJustifyHeight) Set the justfiy height of the text region.voidsetJustifyWidth(UnitSpan oJustifyWidth) Set the justfiy width of the text region.voidsetMaxHeight(UnitSpan oNewHeight) Set the maximum height of the text region.voidsetMaxWidth(UnitSpan oNewWidth) Set the maximum width of the text region.voidsetMinHeight(UnitSpan oNewHeight) Set the minimum height of the text region.voidsetMinWidth(UnitSpan oNewWidth) Set the minimum width of the text region.Methods inherited from class com.adobe.xfa.text.TextDispStr
allowOverflow, allowOverflow, combCells, combCells, enforceJustifyHeight, enforceJustifyWidth, extent, justifyHeight, justifyHPoint, justifyVPoint, justifyWidth, maxHeight, maxWidth, minHeight, minWidth, notEqual, onLoadFrame, runtimeExtent, unlimitedHeight, unlimitedWidthMethods inherited from class com.adobe.xfa.text.TextSparseStream
appendFrame, appendFrame, appendFrameRef, appendFrameRef, createDisplay, defaultDirection, defaultDirection, forceFrame, forceFrame, getContext, getFrame, getFrameCount, insertFrame, insertFrameRef, onFrameRemoved, onNewFrame, onRemoveFrame, removeFrame, removeFrame, setContext, setFrame, setFrameCount, setFrameRefMethods inherited from class com.adobe.xfa.text.TextStream
allowNewLines, allowNewLines, anyNewLines, append, append, append, append, append, append, cascadeLegacyLevel, coalesceMarker, contiguousText, copyFrom, currentSize, debug, display, enumEmbed, enumField, enumMarker, find, find, findRangeMarkerOver, fontService, fontService, gfxSource, gfxSource, isDescendentOf, isDescendentOf, legacyPositioning, markup, markup, markup, markup, markup, maxSize, maxSize, notEqual, position, posnCount, posnInsert, posnInsert, posnInsertPara, posnNext, posnNextAttr, posnNextChar, posnNextEmbed, posnNextField, posnNextType, posnNextType, posnPrev, posnPrevAttr, posnPrevChar, posnPrevEmbed, posnPrevField, posnPrevType, posnPrevType, posnUpdateStreamLoc, rangeEnumMarker, rangeMarker, rangeMarkerInternal, removeMarker, setText, spaceLeft, splitMarker, suppressFormat, text, text, updateNotificationMethods inherited from class com.adobe.xfa.text.TextLegacy
getLegacyLevel, hasCorrectPositioning, hasLegacyPositioning, hasNormalPositioning, setLegacyLevel
-
Constructor Details
-
TextRegion
public TextRegion()Default constructor.The text stream contains no content and has no pool/mapping assocotiation. The minimum and maximum width and height are all defaulted to one inch.
-
TextRegion
Constructor with source text string.Create a text stream whose initial content is copied from the given string. The minimum and maximum width and height are all defaulted to one inch. The text stream initially has no attribute pool association. The display is not automatically created.
- Parameters:
sSource- - String whose contents are to be copied to the text stream.
-
-
Method Details
-
getMinWidth
Return the minimum width of the text region.This provides the same information as the virtual MinWidth() method in the base class, TextDispStr.
- Returns:
- Minimum width of the text region. For information on special values, please see the base class (TextDispStr) documentation.
-
setMinWidth
Set the minimum width of the text region.This method allows the caller to change the minimum width of the text region, possibly triggering a redisplay.
- Parameters:
oNewWidth- - New minimum width of the text region. For information on special values, please see the base class (TextDispStr) documentation.
-
getMinHeight
Return the minimum height of the text region.This provides the same information as the virtual Minheight() method in the base class, TextDispStr.
- Returns:
- Minimum height of the text region. For information on special values, please see the base class (TextDispStr) documentation.
-
setMinHeight
Set the minimum height of the text region.This method allows the caller to change the minimum height of the text region, possibly triggering a redisplay.
- Parameters:
oNewHeight- - New minimum height of the text region. For information on special values, please see the base class (TextDispStr) documentation.
-
getMaxWidth
Return the maximum width of the text region.This provides the same information as the virtual MaxWidth() method in the base class, TextDispStr.
- Returns:
- Maximum width of the text region. For information on special values, please see the base class (TextDispStr) documentation.
-
setMaxWidth
Set the maximum width of the text region.This method allows the caller to change the maximum width of the text region, possibly triggering a redisplay.
- Parameters:
oNewWidth- - New maximum width of the text region. For information on special values, please see the base class (TextDispStr) documentation.
-
getMaxHeight
Return the maximum height of the text region.This provides the same information as the virtual Maxheight() method in the base class, TextDispStr.
- Returns:
- Maximum height of the text region. For information on special values, please see the base class (TextDispStr) documentation.
-
setMaxHeight
Set the maximum height of the text region.This method allows the caller to change the maximum height of the text region, possibly triggering a redisplay.
- Parameters:
oNewHeight- - New maximum height of the text region. For information on special values, please see the base class (TextDispStr) documentation.
-
setJustifyHeight
Set the justfiy height of the text region.This method sets the height to use during justification calculations
-
setJustifyWidth
Set the justfiy width of the text region.This method sets the height to use during justification calculations
-
setJustifyExtents
Set the justfiy extents of the text region.This method sets the height to use during justification calculations
-
enforceSize
public boolean enforceSize()Query whether the stream enforces text region size at data entry time.- Returns:
- TRUE if the graphical size is being enforced; FALSE if not. Note that the constructor defaults this to TRUE.
-
enforceSize
public void enforceSize(boolean bNewEnforce) Change the value of the EnforceSize flag.- Parameters:
bNewEnforce- - TRUE causes the text region to respect its maximum size; FALSE allows the text content to exceed the maximum size of the region. Note that the constructor defaults this to TRUE.
-
copyFrom
Assign this text region's content from the given text region.Replace this stream's content with a copy of the content of the given stream. The graphic source information is not copied. In other words, fonts will be re-mapped in this stream's font service and attributes will be re-pooled in any attribute pool associated with this stream. The minimum and maximum width and height of the source stream are also copied. The display pointer is not copied, as each stream has its own display; nor is a display automatically created.
- Parameters:
oSource- - Stream containing source content to copy.
-
equals
Compare text regions for equality.Compare this stream against the one passed on the parameter oCompare for equality. The graphics sources of the streams are not compared. To be equal, the streams' content must match in all aspects: raw text, attributes, embedded field content, and so on. The display does not participate in the comparison. In addition, the text regions' minimum and maximum width and height must match.
- Overrides:
equalsin classTextDispStr- Parameters:
object- - Stream to compare against- Returns:
- TRUE if the streams are equal; FALSE otherwise.
-
hashCode
public int hashCode()- Overrides:
hashCodein classTextDispStr
-
notEqual
Compare text streams for inequality.Compare this stream against the one passed on the parameter oCompare for inequality. The graphics sources of the streams are not compared. This is the exact opposite of the equality comparison. The display does not participate in the comparison.
- Parameters:
oCompare- - Stream to compare against- Returns:
- TRUE if the streams are unequal; FALSE otherwise.
-