Class TextPanel
- java.lang.Object
-
- com.adobe.xfa.text.TextFrame
-
- com.adobe.xfa.text.TextPanel
-
- All Implemented Interfaces:
GFXContext
,GFXModelContext
public class TextPanel extends TextFrame
The text panel class represents the geometry and eventually layout of a single panel.The client creates all panel instances, either to pass to the sparse stream API or as a result of its implementation of the sparse stream event handling methods. The client must populate its created panels with geometry information. A future implementation may allow the client to set text attributes for a panel as well.
Once the client passes a panel instance to the sparse stream, AXTE takes over and populates its layout. The layout may come from a client-supplied layout object, or it may be generated by AXTE as the result of a reflow operation.
Panels are reference counted objects, allowing the client to retain handles to objects that are managed by AXTE.
While panels have width and height geometry, it is up to the client to decide how to map panels into its rendering space. AXTE treats the top-left corner of each panel as its origin.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TextFrame
cloneFrame()
Create a copy (deep clone) of this frame object.void
copyFrom(TextPanel oSource)
Assignment operator.UnitSpan
getHeight()
Return the height of the panel.UnitSpan
getWidth()
Return the width of the panel.UnitSpan
maxHeight()
Return the frame's maximum height.UnitSpan
maxWidth()
Return the frame's maximum width.UnitSpan
minHeight()
Return the frame's minimum height.UnitSpan
minWidth()
Return the frame's minimum width.void
setDimensions(UnitSpan oWidth, UnitSpan oHeight)
Set the dimensions of this panel.void
setHeight(UnitSpan oHeight)
Set the height of this panel.void
setWidth(UnitSpan oWidth)
Set the width of this panel.-
Methods inherited from class com.adobe.xfa.text.TextFrame
alignHPoint, alignVPoint, combCells, copyFrom, format, getLayoutOrientation, getLineCount, gfxDraw, gfxDraw, gfxDraw, gfxDraw, gfxDraw, isDirty, releaseDisposableMaps, setDirty, unlimitedHeight, unlimitedWidth
-
-
-
-
Constructor Detail
-
TextPanel
public TextPanel()
Default constructor.Construct a panel with default dimensions of 1" by 1".
-
TextPanel
public TextPanel(TextPanel oSource)
Copy constructor.- Parameters:
oSource
- - Source panel to copy.
-
-
Method Detail
-
setWidth
public void setWidth(UnitSpan oWidth)
Set the width of this panel.If the width changes for a panel in a sparse stream, it causes reflow of text from that panel on.
- Parameters:
oWidth
- - New width for the panel.
-
getWidth
public UnitSpan getWidth()
Return the width of the panel.- Returns:
- Width of the panel.
-
setHeight
public void setHeight(UnitSpan oHeight)
Set the height of this panel.If the height changes for a panel in a sparse stream, it causes reflow of text from that panel on.
- Parameters:
oHeight
- - New height for the panel.
-
getHeight
public UnitSpan getHeight()
Return the height of the panel.- Returns:
- Height of the panel.
-
setDimensions
public void setDimensions(UnitSpan oWidth, UnitSpan oHeight)
Set the dimensions of this panel.This allows the caller to change both settings in a single call. If either dimension changes for a panel in a sparse stream, it causes reflow of text from that panel on.
- Parameters:
oWidth
- - New width for the panel.oHeight
- - New Height for the panel.
-
copyFrom
public void copyFrom(TextPanel oSource)
Assignment operator.- Parameters:
oSource
- - Source panel to copy.
-
minWidth
public UnitSpan minWidth()
Description copied from class:TextFrame
Return the frame's minimum width.All frames have both a minimum and maximum width, which may or may not be the same. This method returns the minimum width.
-
minHeight
public UnitSpan minHeight()
Description copied from class:TextFrame
Return the frame's minimum height.All frames have both a minimum and maximum height, which may or may not be the same. This method returns the minimum height.
-
maxWidth
public UnitSpan maxWidth()
Description copied from class:TextFrame
Return the frame's maximum width.All frames have both a minimum and maximum width, which may or may not be the same. This method returns the maximum width.
-
maxHeight
public UnitSpan maxHeight()
Description copied from class:TextFrame
Return the frame's maximum height.All frames have both a minimum and maximum height, which may or may not be the same. This method returns the maximum height.
-
cloneFrame
public TextFrame cloneFrame()
Description copied from class:TextFrame
Create a copy (deep clone) of this frame object.The copy must have the same geometry as this object. It is up to AXTE to subsequently manage the clones layout and relationship to content.
- Specified by:
cloneFrame
in classTextFrame
- Returns:
- Cloned copy of the frame. The lifetime of this object will be managed with reference counting.
-
-