de.vc.jfo.flow

## Class Leader

- 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
          - - de.vc.jfo.flow.Leader

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

      public class Leader
      extends FlowObjectWithElements
      implements InlineElement

  The fo:leader formatting object is often used:
  - in table-of-contents to generate sequences of "." glyphs that separate titles from page numbers
  - to create entry fields in fill-in-the-blank forms
  - to create horizontal rules for use as separators

  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
    `Leader()`
    `Leader(Measure length)`
    `Leader(Measure length, Values.Pattern pattern)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `Leader` | `add(InlineElement element)` Adds an formatting object (that is an inline-group-member) to this FO at end.
    `Leader` | `add(int idx, InlineElement element)` Adds an formatting object (that is an inline-group-member) to this FO at the given index.
    `Leader` | `add(int idx, java.lang.String pcdata)` Adds PCdata (Text) to this FO at the given index.
    `Leader` | `add(java.lang.String pcdata)` Adds PCdata (Text) to this FO.
    `Accessibility` | `getAccessibility()` Gets the accessibilty of this fo.
    `Background` | `getBackground()` Gets the background of this fo.
    `Border` | `getBorder()` Gets the border of this fo.
    `Measure` | `getLength()` Gets the length of this leader.
    `Padding` | `getPadding()` Gets the padding of this fo.
    `Values.Pattern` | `getPattern()` Gets the pattern of this leader (spaces, dots, rule and more..).
    `RelativePosition` | `getRelativePosition()` Gets the relative position of this fo.
    `boolean` | `hasBorder()` Returns true if at least one border attribute is set.
    `void` | `setAccessibility(Accessibility access)` Sets the accessibility of this fo.
    `void` | `setBackground(Background bg)` Sets the background of this fo.
    `void` | `setBorder(Border border)` Sets the border of this fo.
    `void` | `setLength(Measure value)` Sets the length of this leader.
    `void` | `setPadding(Padding padding)` Sets the padding of this fo.
    `void` | `setPattern(Values.Pattern value)` Sets the pattern of this leader.
    `void` | `setRelativePosition(RelativePosition pos)` Sets the relative position of this fo.

    - ### Methods inherited from class de.vc.jfo.flow.FlowObjectWithElements

      `add, add, add, add, addAllImpl, addAllUnsafe, addAllUnsafe, addElement, addElement, addElements, addElements, addUnsafe, addUnsafe, clone, firstElement, getElements, isEmpty, lastElement, remove, remove, removeAll, removeElement, removeElement, removeLast, replaceElement, setElement`

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

      `cloned, clonedList, createUniqueID, doGetAttribute, doSetAttribute, elementCount, get, getAbsolutePosition, getAttributeMap, getDefinedAttributes, getDocument, getFont, getID, getLanguage, getLogger, getMargin, getMeasureValue, getObjectValue, getObjectValue, getObjectValue, getObjectValue, getOrphans, getParentFO, getWidows, hasID, hasPadding, isHyphenation, setAbsolutePosition, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setFont, setHyphenation, setID, setLanguage, setLanguage, setMargin, setOrphans, 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`

    - ### Methods inherited from interface de.vc.xml.Node

      `addAttributeChangeListener, addElement, addElement, clearInheratedAttribute, clearInheratedAttributes, clearValue, contains, fireSaxEvents, firstElement, getAttrAsString, getAttrAsString, getAttribute, getAttribute, getAttributeMap, getContentText, getDefinedAttributes, getElements, getElements, getLocalName, getNamespacePrefix, getNamespacePrefixes, getNamespaceURI, getQName, getRoot, indexOf, isEmpty, lastElement, removeAttributeChangeListener, removeElement, removeElement, replaceElement, setAttribute, setAttributes, setElement, setNamespace`

    - ### Methods inherited from interface de.vc.xml.NodeElement

      `clone, getParent, setParent, writeTo`

- - ### Constructor Detail

    - #### Leader

          public Leader()

    - #### Leader

          public Leader(Measure length)

    - #### Leader

          public Leader(Measure length,
                Values.Pattern pattern)

  - ### Method Detail

    - #### getPadding

          public Padding getPadding()

      Gets the padding of this fo. Is never null.
      Overrides:
        `getPadding` in class `FormattingObject`
      Returns:
        Padding.

    - #### setPadding

          public void setPadding(Padding padding)

      Sets the padding of this fo.
      Overrides:
        `setPadding` in class `FormattingObject`
      Parameters:
        `padding` - Padding.

    - #### hasBorder

          public boolean hasBorder()

      Returns true if at least one border attribute is set.
      Overrides:
        `hasBorder` in class `FormattingObject`
      Returns:
        True if at least one border attribute is set.

    - #### getBorder

          public Border getBorder()

      Gets the border of this fo. Is never null.
      Overrides:
        `getBorder` in class `FormattingObject`
      Returns:
        Border.

    - #### setBorder

          public void setBorder(Border border)

      Sets the border of this fo. If border is NULL, an empty border is created.
      Overrides:
        `setBorder` in class `FormattingObject`
      Parameters:
        `border` - Border.

    - #### getBackground

          public Background getBackground()

      Gets the background of this fo. Is never null.
      Overrides:
        `getBackground` in class `FormattingObject`
      Returns:
        Background.

    - #### setBackground

          public void setBackground(Background bg)

      Sets the background of this fo.
      Overrides:
        `setBackground` in class `FormattingObject`
      Parameters:
        `bg` - Background.

    - #### getAccessibility

          public Accessibility getAccessibility()

      Gets the accessibilty of this fo. Is never null.
      Overrides:
        `getAccessibility` in class `FormattingObject`
      Returns:
        Accessibility.

    - #### setAccessibility

          public void setAccessibility(Accessibility access)

      Sets the accessibility of this fo.
      Overrides:
        `setAccessibility` in class `FormattingObject`
      Parameters:
        `access` - Accessibility.

    - #### getRelativePosition

          public RelativePosition getRelativePosition()

      Gets the relative position of this fo. Is never null.
      Overrides:
        `getRelativePosition` in class `FormattingObject`
      Returns:
        RelativePosition.

    - #### setRelativePosition

          public void setRelativePosition(RelativePosition pos)

      Sets the relative position of this fo.
      Overrides:
        `setRelativePosition` in class `FormattingObject`
      Parameters:
        `pos` - RelativePosition.

    - #### add

          public Leader add(InlineElement element)

      Adds an formatting object (that is an inline-group-member) to this FO at end.
      Parameters:
        `element` - FormattingObject.
      Returns:
        This leader for chained calls.

    - #### add

          public Leader add(java.lang.String pcdata)

      Adds PCdata (Text) to this FO.
      Parameters:
        `pcdata` - Text/PCdata.
      Returns:
        This leader for chained calls.

    - #### add

          public Leader add(int idx,
                   InlineElement element)

      Adds an formatting object (that is an inline-group-member) to this FO at the given index.
      Parameters:
        `idx` - Index.
        `element` - FormattingObject.
      Returns:
        This leader for chained calls.

    - #### add

          public Leader add(int idx,
                   java.lang.String pcdata)

      Adds PCdata (Text) to this FO at the given index.
      Parameters:
        `idx` - Index.
        `pcdata` - Text/PCdata.
      Returns:
        This leader for chained calls.

    - #### getLength

          public Measure getLength()

      Gets the length of this leader. By default 0pt is returned.
      Returns:
        Length of this leader.

    - #### setLength

          public void setLength(Measure value)

      Sets the length of this leader.
      Parameters:
        `value` - Length of leader.

    - #### getPattern

          public Values.Pattern getPattern()

      Gets the pattern of this leader (spaces, dots, rule and more..). By default PATTERN_SPACE is returned.
      Returns:
        Pattern.

    - #### setPattern

          public void setPattern(Values.Pattern value)

      Sets the pattern of this leader.
      Parameters:
        `value` - Pattern.

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