de.vc.jfo.flow

## Class Flow

- java.lang.Object
- - de.vc.xml.AbstractNode
  - - de.vc.xml.AbstractNodeWithAttributes
    - - de.vc.jfo.FormattingObject
      - - de.vc.jfo.SwappingFObj
        - - de.vc.jfo.flow.Flow

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

      public class Flow
      extends SwappingFObj

  The content of the fo:flow formatting object is a sequence of flow objects that provides the flowing text content that is distributed into pages.

  Elements of this flow are hold in a swapping-list. This means you can swap elements at start of list to disc, BUT swapped elements aren't modifiable or removable. By default swapping is disabled.

  See Also:
    `SwappingFObj.setAutoSwapping(int,int)`, 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
    `Flow(PageSequence s)` Creates a new, empty flow.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `Flow` | `add(BlockElement element)` Adds a formatting object that is a BlockGroupMember to this flow.
    `Flow` | `add(InlineElement element)` Adds an InlineElement embedded in a fo-block.
    `Flow` | `add(java.lang.String text)` Adds some text embedded in a fo-block.
    `Flow` | `addBreak(Values.Break br)` Inserts a break.
    `void` | `addElement(int idx, java.lang.Object o)` Adds a node element at `index` to this node.
    `void` | `addElement(java.lang.Object o)` Adds a node element to this node.
    `Flow` | `addPageBreak()` Inserts a page-break.
    `PageSequence` | `getPageSequence()` Returns the parent node casted to PageSequence.
    `boolean` | `replaceElement(java.lang.Object oldElement, java.lang.Object newElement)` Replaces an element.
    `void` | `setAutoSpanAll(boolean enable)`
    `java.lang.Object` | `setElement(int idx, java.lang.Object o)` Replaces a node element at `index` of this node.
    `void` | `spanAllElements()`

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

      `add, add, addUnsafe, addUnsafe, clone, disableAutoSwapping, firstElement, getElementList, getElements, isEmpty, lastElement, remove, remove, removeAll, removeElement, removeElement, removeLast, setAutoSwapping, swapAll`

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

      `addUnsafe, cloned, clonedList, createUniqueID, doGetAttribute, doSetAttribute, elementCount, get, getAbsolutePosition, getAccessibility, getAttributeMap, getBackground, getBorder, getDefinedAttributes, getDocument, getFont, getID, getLanguage, getLogger, getMargin, getMeasureValue, getObjectValue, getObjectValue, getObjectValue, getObjectValue, getOrphans, getPadding, getParentFO, getRelativePosition, getWidows, hasBorder, hasID, hasPadding, isHyphenation, setAbsolutePosition, setAccessibility, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setBackground, setBorder, 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, getAttrAsBoolean, getAttrAsInteger, getAttrAsString, getAttrAsString, getAttribute, getAttribute, getAttributeMap, getContentText, getContentText, getDefinedAttributes, getElements, getElements, getElements, getFirstElement, getIndex, getLocalName, getNamespacePrefix, getNamespacePrefixes, getNamespaceURI, getParent, getParent, getParent, getParentOrThis, getQName, getRoot, hasEqualAttrs, indexOf, 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

    - #### Flow

          public Flow(PageSequence s)

      Creates a new, empty flow.
      Parameters:
        `s` - PageSequence.

  - ### Method Detail

    - #### add

          public Flow add(BlockElement element)

      Adds a formatting object that is a BlockGroupMember to this flow.
      Parameters:
        `element` - Element.
      Returns:
        This flow for chained calls.

    - #### addPageBreak

          public Flow addPageBreak()

      Inserts a page-break.
      Returns:
        This flow for chained calls.

    - #### add

          public Flow add(InlineElement element)

      Adds an InlineElement embedded in a fo-block.
      Parameters:
        `element` - Element.
      Returns:
        This flow for chained calls.

    - #### add

          public Flow add(java.lang.String text)

      Adds some text embedded in a fo-block.
      Parameters:
        `text` - Text.
      Returns:
        This flow for chained calls.

    - #### addBreak

          public Flow addBreak(Values.Break br)

      Inserts a break.
      Parameters:
        `br` - Break.
      Returns:
        This flow for chained calls.

    - #### getPageSequence

          public PageSequence getPageSequence()

      Returns the parent node casted to PageSequence.
      Returns:
        PageSequence.

    - #### setAutoSpanAll

          public void setAutoSpanAll(boolean enable)

    - #### spanAllElements

          public void spanAllElements()

    - #### replaceElement

          public boolean replaceElement(java.lang.Object oldElement,
                               java.lang.Object newElement)

      Replaces an element.
      Specified by:
        `replaceElement` in interface `Node`
      Overrides:
        `replaceElement` in class `FormattingObject`
      Parameters:
        `oldElement` - Old element.
        `newElement` - New element.
      Returns:
        `true` if this node contained `oldElement`

    - #### addElement

          public void addElement(java.lang.Object o)

      Description copied from class: `SwappingFObj`
      Adds a node element to this node.
      Specified by:
        `addElement` in interface `Node`
      Overrides:
        `addElement` in class `SwappingFObj`
      Parameters:
        `o` - Node element.

    - #### addElement

          public void addElement(int idx,
                        java.lang.Object o)

      Description copied from class: `SwappingFObj`
      Adds a node element at `index` to this node.
      Specified by:
        `addElement` in interface `Node`
      Overrides:
        `addElement` in class `SwappingFObj`
      Parameters:
        `idx` - Index of element.
        `o` - Node element.

    - #### setElement

          public java.lang.Object setElement(int idx,
                                    java.lang.Object o)

      Description copied from class: `SwappingFObj`
      Replaces a node element at `index` of this node.
      Specified by:
        `setElement` in interface `Node`
      Overrides:
        `setElement` in class `SwappingFObj`
      Parameters:
        `idx` - Index of element.
        `o` - Node element.
      Returns:
        Replaced element.

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