de.vc.jfo.pagination

## Class Declarations

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

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

      public class Declarations
      extends FormattingObject

  The fo:declarations formatting object is used to group global declarations for a stylesheet.

  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
    `Declarations()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `add(ColorProfile profile)`
    `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` | `addUnsafe(int idx, NodeElement element)` Adds a NodeElement to this FormattingObject at a given index.
    `void` | `addUnsafe(NodeElement element)` Adds a NodeElement to this FormattingObject.
    `boolean` | `addUnsafe(java.lang.Object child)` Adds a NodeElement to this FormattingObject.
    `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

      `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

    - #### Declarations

          public Declarations()

  - ### Method Detail

    - #### add

          public void add(ColorProfile profile)

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

    - #### 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 void addUnsafe(NodeElement element)

      Adds a NodeElement to this FormattingObject. You must ensure, that this FormattingObject can contain given element.
      Parameters:
        `element` - Element.

    - #### addUnsafe

          public void addUnsafe(int idx,
                       NodeElement element)

      Adds a NodeElement to this FormattingObject at a given index. You must ensure, that this FormattingObject can contain given element.
      Parameters:
        `idx` - Index.
        `element` - Element.

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

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

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

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

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