Class FormLayout
- Direct Known Subclasses:
AcroFormLayout
The FormLayout object encapsulates the following information: i) what type of object to render (form node) ii) what page the object resides iii) object's (x,y) position on a given page It does so by storing an array of layout node trees, with each tree representing the layout of a new page. The layout hierarchy is comprised of LayoutNode objects. Instances of the LayoutNode class are assembled in parent/child relationships, each having an association with a single Form Model node. A LayoutNode represent a frame of reference that applies a coordinate space transformation to it's form node as well as any child layout nodes. The FormLayout isructed by calling FormLayout::layout() member function Upon return it completely describes where all page breaks have occurred and where every object has been positioned. Consider the form outlined below:
<subform name="SFr">
<pageSet>
<pageArea name="P1">
<draw name="D0" />
<contentArea name="CA1" />
<contentArea name="CA2" />
</pageArea>
</pageSet>
<subform name="SF1">
<field name="F1" />
<field name="F2" />
<field name="F3" />
</subform>
</subform>
Assume for this example that both fields F1,F2 fit on page 1, content area 1, but they fill content area 1
completely. F3 then starts on page 1, content area 2, and assume it overflows to page 2, content
area 1.
The corresponding FormLayout structure would look
as follows:
FormLayout
Pages[0]: LN (P1)
|
|-LN (D0)
|-LN (CA1)
| |-LN (SFr)
| |-LN (SF1)
| |-LN (F1)
| |-LN (F2)
|-LN (CA2)
|-LN (SFr)
|-LN (SF1)
|-LN (F3)
Pages[1]: LN (P1)
|
|-LN (D0)
|-LN (CA1)
|-LN (SFr)
|-LN (SF1)
|-LN (F3)
Legend
LN(x) layout node associated with form node 'x'
-
Constructor Summary
ConstructorsConstructorDescriptionFormLayout(AppModel oAppModel) FormLayout(FontService oFontService, Service oImageService, HrefService oHrefService, AppModel oAppModel) -
Method Summary
Modifier and TypeMethodDescriptionvoidlayout(boolean bFullLayout) Perform a full or incremental layout as indicated.booleanCheck if we need to perform a second pass layout of the remaining recordsvoidNotifies layout that a second pass will occur This is called by the $host document counting methods.Methods inherited from class com.adobe.xfa.layout.Layout
getAppModel, getLayoutEnv, getTemplateModel, ranOutOfPages
-
Constructor Details
-
FormLayout
-
FormLayout
public FormLayout(FontService oFontService, Service oImageService, HrefService oHrefService, AppModel oAppModel)
-
-
Method Details
-
layout
public void layout(boolean bFullLayout) Perform a full or incremental layout as indicated. -
needsSecondPass
public boolean needsSecondPass()Check if we need to perform a second pass layout of the remaining records- Returns:
- true if a second pass is need, else false Inclusive of the current record
-
setNeedsSecondPass
public void setNeedsSecondPass()Notifies layout that a second pass will occur This is called by the $host document counting methods.
-