public class FormLayout extends Layout
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 and Description |
|---|
FormLayout(AppModel oAppModel) |
FormLayout(FontService oFontService,
Service oImageService,
HrefService oHrefService,
AppModel oAppModel) |
| Modifier and Type | Method and Description |
|---|---|
void |
layout(boolean bFullLayout)
Perform a full or incremental layout as indicated.
|
boolean |
needsSecondPass()
Check if we need to perform a second pass layout of the remaining records
|
void |
setNeedsSecondPass()
Notifies layout that a second pass will occur
This is called by the $host document counting methods.
|
getAppModel, getLayoutEnv, getTemplateModel, ranOutOfPagespublic FormLayout(AppModel oAppModel)
public FormLayout(FontService oFontService, Service oImageService, HrefService oHrefService, AppModel oAppModel)
public void layout(boolean bFullLayout)
public boolean needsSecondPass()
public void setNeedsSecondPass()
Copyright © 2010 - 2020 Adobe. All Rights Reserved