### org.jfree.layouting.renderer.model.page

# Class LogicalPageBox

- `java.lang.Object`
- - `org.jfree.layouting.renderer.model.RenderNode`
  - - `org.jfree.layouting.renderer.model.RenderBox`
    - - `org.jfree.layouting.renderer.model.BlockRenderBox`
      - - `org.jfree.layouting.renderer.model.page.LogicalPageBox`

Implemented Interfaces:
  Cloneable

`public class LogicalPageBox`
`extends BlockRenderBox`

The logical page box does not have a layout at all. It has collection of flows, one for each logical page area.

Each logical page has a header (for the repeating group headers, not to be mistaken as PageHeader!), content and footer area. The footer area contains the foot-notes at the very bottom, the repeatable footer area and finally the flow:bottom area.

The flow- and repeatable areas behave like stacks, and are filled from the content area (so for headers, new content goes after any previous content, and for footers, new content goes before any previous content.)

The footNotes section is always filled in the normal-order, so new content gets added at the bottom of that area.

The logical page also holds the absolutely and static positioned elements. These elements may overlap the repeating headers, but will never overlap the physical page header or footer.

The logical page is also the container for all physical pages. (The sizes of the physical pages influence the available space on the logical pages.)

Layout notes: The logical page, as it is implemented now, consists of three areas. The header and footer areas are plain banded areas and correspond to the @top and @bottom page-areas. These areas are layouted zero-based. The header's y=0 corresponds to the beginning of the page, while the footer's y=0 depends on the total height of the footer and must fullfill the following constraint: Page_bottom_edge = (footer_y + footer_height).

The content window is positioned relative to the content-flow and is placed between the header and the footer. The mapping of the content into the header is defined by the pageOffset. The content-window's y=0 corresponds to the normal-flow's y=pageOffset.

Repeatable headers and footers are *not* inserted into the content-flow.

Author:
  Thomas Morgner

  ## Field Summary

  ### Fields inherited from class org.jfree.layouting.renderer.model.RenderBox

  `LOG_PRUNE`

  ### Fields inherited from class org.jfree.layouting.renderer.model.RenderNode

  `HORIZONTAL_AXIS`, `VERTICAL_AXIS`

  ## Constructor Summary

  `LogicalPageBox(PageGrid pageGrid)`

  ## Method Summary

  `void`

  `appyStyle(LayoutContext context, OutputProcessorMetaData metaData)`

  `Object`

  `clone()`
    Clones this node.

  `RenderNode`

  `derive(boolean deepDerive)`
    Derive creates a disconnected node that shares all the properties of the original node.

  `RenderNode`

  `deriveFrozen(boolean deepDerive)`
    Derive creates a disconnected node that shares all the properties of the original node.

  `RenderNode`

  `findNodeById(Object instanceId)`

  `NormalFlowRenderBox`

  `getContentArea()`

  `PageAreaRenderBox`

  `getFooterArea()`

  `PageAreaRenderBox`

  `getHeaderArea()`

  `RenderBox`

  `getInsertationPoint()`

  `LogicalPageBox`

  `getLogicalPage()`

  `NormalFlowRenderBox`

  `getNormalFlow()`

  `PageGrid`

  `getPageGrid()`

  `long`

  `getPageHeight()`

  `long`

  `getPageOffset()`

  `long`

  `getPageWidth()`

  `long[]`

  `getPhysicalBreaks(int axis)`

  `RenderNode`

  `hibernate()`
    Derives an hibernation copy.

  `void`

  `insertFirst(RenderNode node)`

  `void`

  `insertLast(RenderNode node)`

  `boolean`

  `isNormalFlowActive()`

  `boolean`

  `isOverflow()`

  `void`

  `setNormalFlowActive(boolean normalFlowActive)`

  `void`

  `setPageOffset(long pageOffset)`

  `void`

  `updatePageArea(PageGrid pageGrid)`

  ### Methods inherited from class org.jfree.layouting.renderer.model.RenderBox

  `addChild`, `addChilds`, `addGeneratedChild`, `appyStyle`, `clear`, `clone`, `close`, `derive`, `deriveFrozen`, `findNodeById`, `freeze`, `getBaselineInfo`, `getBorder`, `getBoxDefinition`, `getBoxLayoutProperties`, `getContentAreaX1`, `getContentAreaX2`, `getDominantBaseline`, `getEffectiveMarginBottom`, `getEffectiveMarginTop`, `getFirstChild`, `getInsertationPoint`, `getLastChild`, `getLineCount`, `getNominalBaselineInfo`, `getOrphans`, `getOrphansSize`, `getPageContext`, `getStaticBoxLayoutProperties`, `getVisibleFirst`, `getVisibleLast`, `getWidows`, `getWidowsSize`, `hibernate`, `insertAfter`, `insertBefore`, `isAppendable`, `isAvoidPagebreakInside`, `isDiscardable`, `isEmpty`, `isOpen`, `isPreserveSpace`, `remove`, `replaceChild`, `replaceChilds`, `setBaselineInfo`, `setContentAreaX1`, `setContentAreaX2`, `setFirstChild`, `setLastChild`, `setLineCount`, `setOrphansSize`, `setPageContext`, `setWidowsSize`, `split`

  ### Methods inherited from class org.jfree.layouting.renderer.model.RenderNode

  `appyStyle`, `clone`, `derive`, `deriveFrozen`, `findNodeById`, `freeze`, `getAlignmentAdjust`, `getAlignmentAdjustResolved`, `getAlignmentBaseline`, `getBaselineShift`, `getBaselineShiftResolved`, `getChangeTracker`, `getComputedLayoutProperties`, `getDimension`, `getEffectiveMarginBottom`, `getEffectiveMarginTop`, `getHeight`, `getInstanceId`, `getLayoutContext`, `getLogicalPage`, `getMajorAxis`, `getMaximumBoxWidth`, `getMinimumChunkWidth`, `getMinorAxis`, `getNamespace`, `getNext`, `getNodeLayoutProperties`, `getNormalFlow`, `getPageContext`, `getParent`, `getParentBlockContext`, `getPosition`, `getPrev`, `getStickyMarker`, `getTagName`, `getVerticalAlignment`, `getVisibleNext`, `getVisiblePrev`, `getWidth`, `getX`, `getY`, `hibernate`, `isDirectionLTR`, `isDirty`, `isDiscardable`, `isEmpty`, `isFrozen`, `isHibernated`, `isIcmMetricsFinished`, `isIgnorableForRendering`, `isOpen`, `normalizeAlignment`, `setComputedLayoutProperties`, `setDimension`, `setDirty`, `setHeight`, `setHibernated`, `setIcmMetricsFinished`, `setMajorAxis`, `setMaximumBoxWidth`, `setMinimumChunkWidth`, `setMinorAxis`, `setNext`, `setParent`, `setPosition`, `setPrev`, `setStickyMarker`, `setWidth`, `setX`, `setY`, `updateChangeTracker`

## Constructor Details

### LogicalPageBox

    public LogicalPageBox(PageGrid pageGrid)

## Method Details

### appyStyle

    public void appyStyle(LayoutContext context,
                          OutputProcessorMetaData metaData)

> Overrides:
>   appyStyle in interface RenderBox

### clone

    public Object clone()

> Clones this node. Be aware that cloning can get you into deep trouble, as the relations this node has may no longer be valid.
> Overrides:
>   clone in interface RenderBox
> Returns:

### derive

    public RenderNode derive(boolean deepDerive)

> Derive creates a disconnected node that shares all the properties of the original node. The derived node will no longer have any parent, silbling, child or any other relationships with other nodes.
> Overrides:
>   derive in interface RenderBox
> Returns:

### deriveFrozen

    public RenderNode deriveFrozen(boolean deepDerive)

> Derive creates a disconnected node that shares all the properties of the original node. The derived node will no longer have any parent, silbling, child or any other relationships with other nodes.
> Overrides:
>   deriveFrozen in interface RenderBox
> Returns:

### findNodeById

    public RenderNode findNodeById(Object instanceId)

> Overrides:
>   findNodeById in interface RenderBox

### getContentArea

    public NormalFlowRenderBox getContentArea()

### getFooterArea

    public PageAreaRenderBox getFooterArea()

### getHeaderArea

    public PageAreaRenderBox getHeaderArea()

### getInsertationPoint

    public RenderBox getInsertationPoint()

> Overrides:
>   getInsertationPoint in interface RenderBox

### getLogicalPage

    public LogicalPageBox getLogicalPage()

> Overrides:
>   getLogicalPage in interface RenderNode

### getNormalFlow

    public NormalFlowRenderBox getNormalFlow()

> Overrides:
>   getNormalFlow in interface RenderNode

### getPageGrid

    public PageGrid getPageGrid()

### getPageHeight

    public long getPageHeight()

### getPageOffset

    public long getPageOffset()

### getPageWidth

    public long getPageWidth()

### getPhysicalBreaks

    public long[] getPhysicalBreaks(int axis)

### hibernate

    public RenderNode hibernate()

> Derives an hibernation copy. The resulting object should get stripped of all unnecessary caching information and all objects, which will be regenerated when the layouting restarts. Size does matter here.
> Overrides:
>   hibernate in interface RenderBox
> Returns:

### insertFirst

    public void insertFirst(RenderNode node)

### insertLast

    public void insertLast(RenderNode node)

### isNormalFlowActive

    public boolean isNormalFlowActive()

### isOverflow

    public boolean isOverflow()

### setNormalFlowActive

    public void setNormalFlowActive(boolean normalFlowActive)

### setPageOffset

    public void setPageOffset(long pageOffset)

### updatePageArea

    public void updatePageArea(PageGrid pageGrid)