Class LayoutNode

  • All Implemented Interfaces:

    public class LayoutNode
    extends Element
    A node component of the layout transformation hierarchy. It represents a new frame of reference and is internally organized using the box model paradigm. Instances of the LayoutNode class are assembled in parent/child relationships and is associated with a form node. Each instance represent a frame of reference that applies a coordinate space transformation to it's xfa node as well as any child layout nodes. Layout nodes may sometimes daisy-chained together (linked list) through getNextExistence()/getPRevExistence. Note that is completely separate from it's parent/child relationships in the layout hierarchy. Rather an existence represents a piece of a laid out xfa container. For instance, a field gets split across 4 pages as 4 different pieces. Each piece, or existence is represented by a different layout node and each of these 4 layout nodes is connected to the previous and next existence. The first piece will return a null 'previous' existence and the last piece has returns a null 'next' existence Coordinate conversions: model vs layout APIs are provided to convert between coordinates in model space to layout space and vice versa. Consider an object, i.e. a field that is defined in that template as 15in high. Assume when paginated this field is split across 3 pages, each piece being 5in high. Model space is that of the contiguous, unsplit 15in high field. Model-content/model-caption space simply refers to the contiguous unsplit content/caption subregions of the model space. Layout space is local coordinate space of any one of the three layout nodes that represents a piece of the model field. Layout-content/layout-caption space refers to the content/caption subregions of the layoutnode space. Example: The model coordinate (0,7.5in) represents a point exactly halfway down the field. So x=0 y=7.5in Model space ---> x=0, y=2.5in of the second layout node (middle piece) for this field. The layout coordinate (0,0) relative of the third layout node (last piece) represents the top left of that layout node. So x=0 y=0 of Layoutnode[2] ----> x=0 y=10in model space
    • Constructor Detail

      • LayoutNode

        public LayoutNode​(Element oFormModelNode)
      • LayoutNode

        public LayoutNode​(Element oFormModelNode,
                          BoxModelLayout oBoxModel)
        Principle Constructor - initialize given a box model layout
    • Method Detail

      • getFormNode

        public Element getFormNode()
        getFormNode. Return the form node associated with this layout node.