Package com.adobe.xfa.text
Class TextDrawInfo
- java.lang.Object
-
- com.adobe.xfa.text.TextDrawInfo
-
public class TextDrawInfo extends java.lang.Object
Properties for rendering text.The number of properties available for the rendering of text has been growing as more features are added to AXTE. This class caches all of those properties. Instead ofusing forever growing parameter lists, the client creates an instance of this class, populates on the properties relevant to its usage, and then calls the appropriate rendering method.
Currently, the following properties are supported. All are optional, except for the graphics environment.
TextSelection
) object, describing a range of selected text along
with foreground and background colours, that may require different
rendering from the rest of the text. Default is the null pointer,
indicating there is no primary selection in effect. Note that, in
bidirectional text, selections may not be visually contiguous.
-
-
Field Summary
Fields Modifier and Type Field Description static int
INVALID_DEFAULT_AUGMENTED_SIZE
Use the computed size of the text object.static int
INVALID_DEFAULT_DECLARED_SIZE
Use the declared size of the text object.static int
INVALID_DEFAULT_RUNTIME_EXTENT
Use the text display's runtime extent.
-
Constructor Summary
Constructors Constructor Description TextDrawInfo(GFXEnv oGfxEnv)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description GFXEnv
getGfxEnv()
Retrieve the graphic environment.Rect
getInvalid()
Retrieve the invalidation rectangle.int
getInvalidDefault()
Retrieve the default invalidation rectangle setting.Rect
getPage()
Retrieve the page rectangle.TextSelection
getPrimary()
Retrieve the primary selection.TextSelection
getSecondary()
Retrieve the secondary selection.boolean
getTruncate()
Retrieve the truncate flag.void
setInvalid(Rect oInvalid)
Set the invalidation rectangle.void
setInvalidDefault(int eInvalidDefault)
Set the default invalidation rectangle setting.void
setPage(Rect oPage)
Set the page rectangle.void
setPrimary(TextSelection poPrimary)
Set the primary selection.void
setSecondary(TextSelection poSecondary)
Set the secondary selection.void
setTruncate(boolean bTruncate)
Set the truncate flag.
-
-
-
Field Detail
-
INVALID_DEFAULT_RUNTIME_EXTENT
public static final int INVALID_DEFAULT_RUNTIME_EXTENT
Use the text display's runtime extent. Note that some trailing spaces may not be included in the runtime extent.- See Also:
- Constant Field Values
-
INVALID_DEFAULT_DECLARED_SIZE
public static final int INVALID_DEFAULT_DECLARED_SIZE
Use the declared size of the text object. If text overflows the declared size, it may not be drawn.- See Also:
- Constant Field Values
-
INVALID_DEFAULT_AUGMENTED_SIZE
public static final int INVALID_DEFAULT_AUGMENTED_SIZE
Use the computed size of the text object. This will include any overflowing text and trailing spaces.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
TextDrawInfo
public TextDrawInfo(GFXEnv oGfxEnv)
Constructor. All properties except graphic environment are set to defaults as described above.- Parameters:
oGfxEnv
- - Graphic environment to use for rendering.
-
-
Method Detail
-
getGfxEnv
public GFXEnv getGfxEnv()
Retrieve the graphic environment.- Returns:
- Graphic environment reference cached in this object.
-
getInvalid
public Rect getInvalid()
Retrieve the invalidation rectangle.- Returns:
- Invalidation rectangle. For more information, please see above.
-
setInvalid
public void setInvalid(Rect oInvalid)
Set the invalidation rectangle.- Parameters:
oInvalid
- - Invalidation rectangle. For more information, please see above.
-
getPage
public Rect getPage()
Retrieve the page rectangle.- Returns:
- Page rectangle. For more information, please see above.
-
setPage
public void setPage(Rect oPage)
Set the page rectangle.- Parameters:
oPage
- - Page rectangle. For more information, please see above.
-
getPrimary
public TextSelection getPrimary()
Retrieve the primary selection.- Returns:
- Primary selection. For more information, please see above.
-
setPrimary
public void setPrimary(TextSelection poPrimary)
Set the primary selection.- Parameters:
poPrimary
- - Primary selection. For more information, please see above.
-
getSecondary
public TextSelection getSecondary()
Retrieve the secondary selection.- Returns:
- Secondary selection. For more information, please see above.
-
setSecondary
public void setSecondary(TextSelection poSecondary)
Set the secondary selection.- Parameters:
poSecondary
- - Secondary selection. For more information, please see above.
-
getInvalidDefault
public int getInvalidDefault()
Retrieve the default invalidation rectangle setting.- Returns:
- Default invalidation rectangle setting. For more information, please see above.
-
setInvalidDefault
public void setInvalidDefault(int eInvalidDefault)
Set the default invalidation rectangle setting.- Parameters:
eInvalidDefault
- - Default invalidation rectangle setting. For more information, please see above.
-
getTruncate
public boolean getTruncate()
Retrieve the truncate flag.- Returns:
- Truncate flag. For more information, please see above.
-
setTruncate
public void setTruncate(boolean bTruncate)
Set the truncate flag.- Parameters:
bTruncate
- - Truncate flag. For more information, please see above.
-
-