de.vc.jfo.flow

## Class FlowObjectWithElements

- java.lang.Object
- - de.vc.xml.AbstractNode
  - - de.vc.xml.AbstractNodeWithAttributes
    - - de.vc.jfo.FormattingObject
      - - de.vc.jfo.flow.FlowObject
        - - de.vc.jfo.flow.FlowObjectWithElements

- All Implemented Interfaces:
    Node, NodeElement, java.io.Serializable, java.lang.Cloneable
  Direct Known Subclasses:
    BasicLink, BidiOverride, Block, BlockContainer, FOFloat, FootnoteBody, Inline, InlineContainer, InstreamForeignObject, Leader, ListBlock, ListItemBody, ListItemLabel, Marker, MultiCase, MultiProperties, MultiSwitch, MultiToggle, StaticContent, TableCaption, TableCell, TableContent, TableRow, Wrapper

      public class FlowObjectWithElements
      extends FlowObject

  Flow object with elements.
  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`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `FlowObjectWithElements` | `add(int idx, MultiSwitch element)` Adds a MultiSwitch at the given index.
    `FlowObjectWithElements` | `add(int idx, Wrapper wrapper)` Adds a Wrapper at given index.
    `FlowObjectWithElements` | `add(MultiSwitch element)` Adds a MultiSwitch.
    `FlowObjectWithElements` | `add(Wrapper wrapper)` Adds a Wrapper.
    `protected void` | `addAllImpl(java.util.List l)`
    `void` | `addAllUnsafe(java.util.Collection elements)` Deprecated. Replaced by addElements(Collection).
    `void` | `addAllUnsafe(java.lang.Object[] elements)` Deprecated. Replaced by addElements(Object[]).
    `void` | `addElement(int index, java.lang.Object e)` Adds a node element at `index` to this node.
    `void` | `addElement(java.lang.Object e)` Adds a node element to this node.
    `void` | `addElements(java.util.Collection elements)` Adds some NodeElements to this FormattingObject.
    `void` | `addElements(java.lang.Object[] elements)` Adds some NodeElements to this FormattingObject.
    `boolean` | `addUnsafe(int idx, java.lang.Object element)` Deprecated. Replaced by addElement(int,Object).
    `boolean` | `addUnsafe(java.lang.Object element)` Deprecated. Replaced by addElement(Object).
    `java.lang.Object` | `clone()` Deep copy.
    `java.lang.Object` | `firstElement()` Gets the first element of the content.
    `java.util.List` | `getElements()` Gets childreen of this node.
    `boolean` | `isEmpty()` Tests, if the content is empty (has no elements).
    `java.lang.Object` | `lastElement()` Gets the last element of the content.
    `boolean` | `remove(int idx)` Removes an object from the content.
    `boolean` | `remove(java.lang.Object obj)` Removes an object from the content.
    `void` | `removeAll()` Removes all objects from content.
    `java.lang.Object` | `removeElement(int i)` Removes an element from this node.
    `boolean` | `removeElement(java.lang.Object e)` Removes an element from this node.
    `boolean` | `removeLast()` Removes the last object from content.
    `boolean` | `replaceElement(java.lang.Object oldElement, java.lang.Object newElement)` Replaces an element.
    `java.lang.Object` | `setElement(int index, java.lang.Object e)` Replaces a node element at `index` of this node.

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

      `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, 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`

- - ### Method Detail

    - #### 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.

    - #### addElement

          public void addElement(java.lang.Object e)

      Adds a node element to this node.
      Specified by:
        `addElement` in interface `Node`
      Overrides:
        `addElement` in class `FormattingObject`
      Parameters:
        `e` - Node element.
      Throws:
        `java.lang.UnsupportedOperationException` - is throws if no childreen are allowed.
        `java.lang.NullPointerException` - is thrown if `e==null`

    - #### addElement

          public void addElement(int index,
                        java.lang.Object e)

      Adds a node element at `index` to this node.
      Specified by:
        `addElement` in interface `Node`
      Overrides:
        `addElement` in class `FormattingObject`
      Parameters:
        `index` - Index of element.
        `e` - Node element.
      Throws:
        `java.lang.IndexOutOfBoundsException` - is thrown if `index` is out of bounds.
        `java.lang.UnsupportedOperationException` - is throws if no childreen are allowed.
        `java.lang.NullPointerException` - is thrown if `e==null`

    - #### addElements

          public void addElements(java.util.Collection elements)

      Description copied from class: `AbstractNode`
      Adds some NodeElements to this FormattingObject. You must ensure, that this FormattingObject can contain given elements.
      Overrides:
        `addElements` in class `AbstractNode`
      Parameters:
        `elements` - Collection of elements.

    - #### addElements

          public void addElements(java.lang.Object[] elements)

      Description copied from class: `AbstractNode`
      Adds some NodeElements to this FormattingObject. You must ensure, that this FormattingObject can contain given elements.
      Overrides:
        `addElements` in class `AbstractNode`
      Parameters:
        `elements` - Collection of elements.

    - #### setElement

          public java.lang.Object setElement(int index,
                                    java.lang.Object e)

      Replaces a node element at `index` of this node.
      Specified by:
        `setElement` in interface `Node`
      Overrides:
        `setElement` in class `FormattingObject`
      Parameters:
        `index` - Index of element.
        `e` - Node element.
      Returns:
        Replaced element.
      Throws:
        `java.lang.IndexOutOfBoundsException` - is thrown if `index` is out of bounds.
        `java.lang.UnsupportedOperationException` - is throws if no childreen are allowed.
        `java.lang.NullPointerException` - is thrown if `e==null`

    - #### 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`

    - #### removeElement

          public boolean removeElement(java.lang.Object e)

      Removes an element from this node.
      Specified by:
        `removeElement` in interface `Node`
      Overrides:
        `removeElement` in class `FormattingObject`
      Parameters:
        `e` - NodeElement
      Returns:
        `true` if this node contained the specified element.

    - #### removeElement

          public java.lang.Object removeElement(int i)

      Removes an element from this node.
      Specified by:
        `removeElement` in interface `Node`
      Overrides:
        `removeElement` in class `FormattingObject`
      Parameters:
        `i` - Index of element.
      Returns:
        Removed node element.
      Throws:
        `java.lang.IndexOutOfBoundsException` - is thrown if `index` is out of bounds.

    - #### add

          public FlowObjectWithElements add(MultiSwitch element)

      Adds a MultiSwitch.
      Parameters:
        `element` - MultiSwitch.
      Returns:
        This object for chained calls.

    - #### add

          public FlowObjectWithElements add(int idx,
                                   MultiSwitch element)

      Adds a MultiSwitch at the given index.
      Parameters:
        `idx` - Index.
        `element` - MultiSwitch.
      Returns:
        This object for chained calls.

    - #### add

          public FlowObjectWithElements add(Wrapper wrapper)

      Adds a Wrapper.
      Parameters:
        `wrapper` - Wrapper.
      Returns:
        This object for chained calls.

    - #### add

          public FlowObjectWithElements add(int idx,
                                   Wrapper wrapper)

      Adds a Wrapper at given index.
      Parameters:
        `idx` - Index.
        `wrapper` - Wrapper.
      Returns:
        This object for chained calls.

    - #### lastElement

          public java.lang.Object lastElement()

      Gets the last element of the content.
      Specified by:
        `lastElement` in interface `Node`
      Overrides:
        `lastElement` in class `AbstractNode`
      Returns:
        Last element.

    - #### firstElement

          public java.lang.Object firstElement()

      Gets the first element of the content.
      Specified by:
        `firstElement` in interface `Node`
      Overrides:
        `firstElement` in class `AbstractNode`
      Returns:
        First element.

    - #### remove

          public boolean remove(int idx)

      Removes an object from the content.
      Parameters:
        `idx` - Index of object.
      Returns:
        true, if element is removed, false otherwise.

    - #### remove

          public boolean remove(java.lang.Object obj)

      Removes an object from the content.
      Parameters:
        `obj` - Object to be removed from the content, if present.
      Returns:
        true, if element is removed, false otherwise.

    - #### removeLast

          public boolean removeLast()

      Removes the last object from content.
      Returns:
        true, if removed.

    - #### removeAll

          public void removeAll()

      Removes all objects from content.

    - #### addUnsafe

          public boolean addUnsafe(java.lang.Object element)

      Deprecated. Replaced by addElement(Object).
      Adds a NodeElement to this FormattingObject. You must ensure, that this FormattingObject can contain given element.
      Overrides:
        `addUnsafe` in class `FormattingObject`
      Parameters:
        `element` - Element.
      Returns:
        true.

    - #### addUnsafe

          public boolean addUnsafe(int idx,
                          java.lang.Object element)

      Deprecated. Replaced by addElement(int,Object).
      Adds a NodeElement to this FormattingObject at a given index. You must ensure, that this FormattingObject can contain given element.
      Overrides:
        `addUnsafe` in class `FormattingObject`
      Parameters:
        `idx` - Index.
        `element` - Element.
      Returns:
        true.

    - #### addAllUnsafe

          public void addAllUnsafe(java.util.Collection elements)

      Deprecated. Replaced by addElements(Collection).
      Adds some NodeElements to this FormattingObject. You must ensure, that this FormattingObject can contain given elements.
      Parameters:
        `elements` - Collection of elements.

    - #### addAllUnsafe

          public void addAllUnsafe(java.lang.Object[] elements)

      Deprecated. Replaced by addElements(Object[]).
      Adds some NodeElements to this FormattingObject. You must ensure, that this FormattingObject can contain given elements.
      Parameters:
        `elements` - Collection of elements.

    - #### clone

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

      Deep copy.
      Specified by:
        `clone` in interface `NodeElement`
      Overrides:
        `clone` in class `FormattingObject`
      Returns:
        Clone.
      Throws:
        `java.lang.CloneNotSupportedException`

    - #### isEmpty

          public boolean isEmpty()

      Description copied from class: `FormattingObject`
      Tests, if the content is empty (has no elements).
      Specified by:
        `isEmpty` in interface `Node`
      Overrides:
        `isEmpty` in class `FormattingObject`
      Returns:
        true, if content is empty.

    - #### addAllImpl

          protected final void addAllImpl(java.util.List l)

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