de.vc.jfo.pagination

## Class PageSequence

- java.lang.Object
- - de.vc.xml.AbstractNode
  - - de.vc.xml.AbstractNodeWithAttributes
    - - de.vc.jfo.FormattingObject
      - - de.vc.jfo.pagination.PageSequence

- All Implemented Interfaces:
    Node, NodeElement, java.io.Serializable, java.lang.Cloneable

      public class PageSequence
      extends FormattingObject

  The fo:page-sequence formatting object is used to specify how to create a (sub-)sequence of pages within a document; for example, a chapter of a report. The content of these pages comes from flow children (consisting of the single fo:flow and any fo:static-content flow objects) of the fo:page-sequence. The layout of these pages comes from the fo:page-sequence-master or page-master referenced by the master-reference trait on the fo:page-sequence. The sequence of areas returned by each of the flow-object children of the fo:page-sequence are made descendants of the generated pages as described below.

  See Also:
    Serialized Form

- - ### Field Summary

    - ### Fields inherited from class de.vc.jfo.FormattingObject

      `EMPTY_ARRAY`

    - ### Fields inherited from class de.vc.xml.AbstractNodeWithAttributes

      `MAP_TYPE_FLYWEIGHT, MAP_TYPE_HASH`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `PageSequence()` Creates a new page-sequence.
    `PageSequence(Document doc)` Creates a new page sequence and adds it to a document.
    `PageSequence(Document doc, PageMaster pageMaster)` Creates a new page-sequence that references the given PageMaster.
    `PageSequence(Document doc, PageMaster pageMaster, int initialPageNr)` Creates a new page-sequence that references the given PageMaster and page-number ist started at the given number.
    `PageSequence(PageMaster pageMaster)` Deprecated. Use `new PageSequence(Document, PageMaster)` instead.
    `PageSequence(PageMaster pageMaster, int initialPageNr)` Deprecated. Use `new PageSequence(Document, PageMaster, int)` instead.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `addStaticContent(StaticContent content)` Adds a static content to this page-sequence.
    `void` | `addStaticContent(java.lang.String flowName, StaticContent content)` Adds a static content to this page-sequence.
    `void` | `addStaticContent(Values.Region region, StaticContent content)` Adds a static content to this page-sequence.
    `boolean` | `addUnsafe(java.lang.Object child)` Adds a NodeElement to this FormattingObject.
    `java.lang.Object` | `clone()` Clones this element.
    `StaticContent` | `getContentAfter()` Gets the region after body (Footer).
    `StaticContent` | `getContentBefore()` Gets the region before body (Header).
    `StaticContent` | `getContentEnd()` Gets the region right of body.
    `StaticContent` | `getContentStart()` Gets the region left of body.
    `Document` | `getDocument()` Gets the document, that contains this.
    `java.util.List` | `getElements()` Gets childreen of this node.
    `Flow` | `getFlow()` Gets the flow of body.
    `int` | `getIndex()` Returns the index of this page-sequence in parent document starting at 0.
    `java.lang.Integer` | `getInitialPageNumber()` Gets the initial page number.
    `java.lang.String` | `getMasterReference()`
    `PageMaster` | `getPageMaster()` Gets the PageMaster of this PageSequence.
    `StaticContent` | `getStaticContent(java.lang.String flowName)`
    `StaticContent` | `getStaticContent(Values.Region region)` Gets the static-content of a region.
    `Title` | `getTitle()` Gets the title of this page sequence.
    `void` | `setContentAfter(StaticContent content)` Sets the content after body (Footer).
    `void` | `setContentBefore(StaticContent content)` Sets the content before body (Header).
    `void` | `setContentEnd(StaticContent content)` Sets the content right of body.
    `void` | `setContentStart(StaticContent content)` Sets the content left of body.
    `void` | `setForcePageCount(Values.ForcePageCount value)` Sets the force-page-count attribute.
    `void` | `setInitialPageNumber(java.lang.Integer nr)` Sets the initial page number.
    `void` | `setPageMaster(PageMaster master)` Sets the PageMaster of this PageSequence.
    `void` | `setTitle(Title title)` Sets the title of this page sequence.

    - ### Methods inherited from class de.vc.jfo.FormattingObject

      `addElement, addElement, addUnsafe, cloned, clonedList, createUniqueID, doGetAttribute, doSetAttribute, elementCount, get, getAbsolutePosition, getAccessibility, getAttributeMap, getBackground, getBorder, getDefinedAttributes, getFont, getID, getLanguage, getLogger, getMargin, getMeasureValue, getObjectValue, getObjectValue, getObjectValue, getObjectValue, getOrphans, getPadding, getParentFO, getRelativePosition, getWidows, hasBorder, hasID, hasPadding, isEmpty, isHyphenation, removeElement, removeElement, replaceElement, setAbsolutePosition, setAccessibility, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setBackground, setBorder, setElement, setFont, setHyphenation, setID, setLanguage, setLanguage, setMargin, setOrphans, setPadding, setRelativePosition, setWidows`

    - ### Methods inherited from class de.vc.xml.AbstractNodeWithAttributes

      `getDefaultMapType, setDefaultMapType`

    - ### Methods inherited from class de.vc.xml.AbstractNode

      `addAttributeChangeListener, addElements, addElements, clearEqualAttributes, clearInheratedAttribute, clearInheratedAttributes, clearValue, contains, contains, copyAttributes, createID, findFirstNodeWithText, findNode, findNodesWithText, fire, fireSaxEvents, firstElement, getAttrAsBoolean, getAttrAsInteger, getAttrAsString, getAttrAsString, getAttribute, getAttribute, getAttributeMap, getContentText, getContentText, getDefinedAttributes, getElements, getElements, getElements, getFirstElement, getLocalName, getNamespacePrefix, getNamespacePrefixes, getNamespaceURI, getParent, getParent, getParent, getParentOrThis, getQName, getRoot, hasEqualAttrs, indexOf, lastElement, liftInheritedAttribute, removeAttributeChangeListener, setAttribute, setAttributes, setAttrIfNotNull, setEnableAttributeChangeEvent, setNamespace, setParent, setQName, setUndefinedAttributes, writeTo, writeTo, writeTo, writeTo`

    - ### Methods inherited from class java.lang.Object

      `equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### PageSequence

          public PageSequence()

      Creates a new page-sequence.

    - #### PageSequence

          public PageSequence(Document doc)

      Creates a new page sequence and adds it to a document.
      Parameters:
        `doc` - Document.

    - #### PageSequence

          public PageSequence(PageMaster pageMaster)

      Deprecated. Use `new PageSequence(Document, PageMaster)` instead.
      Creates a new page-sequence that references the given PageMaster. You don't need to register PageMaster at documents LayoutMasterSet.
      Parameters:
        `pageMaster` - PageMaster.

    - #### PageSequence

          public PageSequence(Document doc,
                      PageMaster pageMaster)

      Creates a new page-sequence that references the given PageMaster. You don't need to register PageMaster at documents LayoutMasterSet. This PageSequence is added to the given Document.
      Parameters:
        `doc` - Document.
        `pageMaster` - PageMaster.

    - #### PageSequence

          public PageSequence(PageMaster pageMaster,
                      int initialPageNr)

      Deprecated. Use `new PageSequence(Document, PageMaster, int)` instead.
      Creates a new page-sequence that references the given PageMaster and page-number ist started at the given number. You don't need to register PageMaster at documents LayoutMasterSet.
      Parameters:
        `pageMaster` - PageMaster.
        `initialPageNr` - Initial page number.

    - #### PageSequence

          public PageSequence(Document doc,
                      PageMaster pageMaster,
                      int initialPageNr)

      Creates a new page-sequence that references the given PageMaster and page-number ist started at the given number. This PageSequence is added to the given Document.
      You don't need to register PageMaster at documents LayoutMasterSet.
      Parameters:
        `doc` - Document.
        `pageMaster` - PageMaster.
        `initialPageNr` - Initial page number.

  - ### Method Detail

    - #### clone

          public java.lang.Object clone()
                                 throws java.lang.CloneNotSupportedException

      Description copied from interface: `NodeElement`
      Clones this element. Should return a deep copy!
      Specified by:
        `clone` in interface `NodeElement`
      Overrides:
        `clone` in class `FormattingObject`
      Returns:
        Clone.
      Throws:
        `java.lang.CloneNotSupportedException`

    - #### setForcePageCount

          public void setForcePageCount(Values.ForcePageCount value)

      Sets the force-page-count attribute.
      Parameters:
        `value` -

    - #### setInitialPageNumber

          public void setInitialPageNumber(java.lang.Integer nr)

      Sets the initial page number.
      Parameters:
        `nr` - Initial page number.

    - #### getInitialPageNumber

          public java.lang.Integer getInitialPageNumber()

      Gets the initial page number.
      Returns:
        Initial Page Number or NULL, if not defined.

    - #### setTitle

          public void setTitle(Title title)

      Sets the title of this page sequence.
      Parameters:
        `title` - Title

    - #### getTitle

          public Title getTitle()

      Gets the title of this page sequence.
      Returns:
        Title or NULL, if not defined.

    - #### addStaticContent

          public boolean addStaticContent(StaticContent content)

      Adds a static content to this page-sequence. Note, that property flow-name of static-content must be set!
      Parameters:
        `content` - Static content.
      Returns:
        `true` if content was added.

    - #### addStaticContent

          public void addStaticContent(Values.Region region,
                              StaticContent content)

      Adds a static content to this page-sequence.
      Parameters:
        `region` - Region of content (see Values.Region...)
        `content` - Static content.

    - #### addStaticContent

          public void addStaticContent(java.lang.String flowName,
                              StaticContent content)

      Adds a static content to this page-sequence.
      Parameters:
        `flowName` - Flow name of region.
        `content` - Static content.

    - #### getStaticContent

          public StaticContent getStaticContent(Values.Region region)

      Gets the static-content of a region.
      Parameters:
        `region` - Region.
      Returns:
        Static content or NULL, if not declared.

    - #### getStaticContent

          public StaticContent getStaticContent(java.lang.String flowName)

    - #### setContentBefore

          public void setContentBefore(StaticContent content)

      Sets the content before body (Header).
      Parameters:
        `content` - Content before body.

    - #### getContentBefore

          public StaticContent getContentBefore()

      Gets the region before body (Header). Is never NULL.
      Returns:
        Region before body.

    - #### setContentAfter

          public void setContentAfter(StaticContent content)

      Sets the content after body (Footer).
      Parameters:
        `content` - Content after body.

    - #### getContentAfter

          public StaticContent getContentAfter()

      Gets the region after body (Footer). Is never NULL.
      Returns:
        Region after body.

    - #### setContentStart

          public void setContentStart(StaticContent content)

      Sets the content left of body.
      Parameters:
        `content` - Content left of body.

    - #### getContentStart

          public StaticContent getContentStart()

      Gets the region left of body. Is never NULL.
      Returns:
        Region left of body.

    - #### setContentEnd

          public void setContentEnd(StaticContent content)

      Sets the content right of body.
      Parameters:
        `content` - Content right of body.

    - #### getContentEnd

          public StaticContent getContentEnd()

      Gets the region right of body. Is never NULL.
      Returns:
        Region right of body.

    - #### getFlow

          public Flow getFlow()

      Gets the flow of body.
      Returns:
        Flow of body.

    - #### getElements

          public java.util.List getElements()

      Description copied from class: `AbstractNode`
      Gets childreen of this node. A child is typical an instance of `NodeElement` or `String`.
      Specified by:
        `getElements` in interface `Node`
      Specified by:
        `getElements` in class `AbstractNode`
      Returns:
        Childreen.

    - #### setPageMaster

          public void setPageMaster(PageMaster master)

      Sets the PageMaster of this PageSequence. Note: To set a PageMaster to this PageSequence, this PageSequence must have a parent document.
      Parameters:
        `master` - PageMaster.

    - #### getPageMaster

          public PageMaster getPageMaster()

      Gets the PageMaster of this PageSequence. Note, this works only if this page-sequence is a child of Document and the Document has a corresponding PageMaster OR if you used a
      Returns:
        master PageMaster.

    - #### getDocument

          public Document getDocument()

      Gets the document, that contains this.
      Overrides:
        `getDocument` in class `FormattingObject`
      Returns:
        Parent document.

    - #### getIndex

          public int getIndex()

      Returns the index of this page-sequence in parent document starting at 0.
      Overrides:
        `getIndex` in class `AbstractNode`
      Returns:
        Index of this page-sequence.

    - #### addUnsafe

          public boolean addUnsafe(java.lang.Object child)

      Description copied from class: `FormattingObject`
      Adds a NodeElement to this FormattingObject. You must ensure, that this FormattingObject can contain given element.
      Overrides:
        `addUnsafe` in class `FormattingObject`
      Parameters:
        `child` - Element.
      Returns:
        `false` if this FO is unable to add object.

    - #### getMasterReference

          public java.lang.String getMasterReference()

© 2003-2011 by Sascha Schmidt (vision-cloud.de). All Rights Reserved.