de.vc.jfo.flow

## Class ListBlock

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

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

      public class ListBlock
      extends FlowObjectWithElements
      implements BlockElement

  The fo:list-block flow object is used to format a list.

  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
    `ListBlock()` Creates a new empty list-block.
    `ListBlock(Measure distance)` Creates a new empty list-block and sets space between labels and bodies.
    `ListBlock(Measure distance, Block defaultLabel)` Creates a new empty list-block, sets space between labels and bodies and sets the default label.
    `ListBlock(Measure distance, InlineElement defaultLabel)` Creates a new empty list-block, sets space between labels and bodies and sets the default label.
    `ListBlock(Measure distance, java.lang.String defaultLabel)` Creates a new empty list-block, sets space between labels and bodies and sets the default label.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `ListBlock` | `add(ListItem item)` Adds an item to this list block.
    `ListBlock` | `addItem(BlockElement label, BlockElement body)` Adds an item to this list block.
    `ListBlock` | `addItem(InlineElement label, InlineElement body)` Adds an item to this list block.
    `ListBlock` | `addItem(java.lang.String label, java.lang.String body)` Adds an item to this list block.
    `ListBlock` | `addSimpleItem(BlockElement body)` Adds an item with default label to this block.
    `ListBlock` | `addSimpleItem(InlineElement body)` Adds an item with default label to this block.
    `ListBlock` | `addSimpleItem(java.lang.String body)` Adds an item with default label to this block.
    `Accessibility` | `getAccessibility()` Gets the accessibilty of this fo.
    `Background` | `getBackground()` Gets the background of this fo.
    `Border` | `getBorder()` Gets the border of this fo.
    `Values.Break` | `getBreakAfter()` Gets the break after this formatting object.
    `Values.Break` | `getBreakBefore()` Gets the break before this formatting object.
    `ListItem` | `getListItem(int idx)` Gets a list item at an index.
    `Margin` | `getMargin()` Gets the margin of this fo.
    `Padding` | `getPadding()` Gets the padding of this fo.
    `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` | `setBreakAfter(Values.Break type)` Sets the break before this formatting object.
    `void` | `setBreakBefore(Values.Break type)` Sets the break before this formatting object.
    `void` | `setDistance(Measure distance)` Sets attribute provisional-distance-between-starts.
    `void` | `setMargin(Margin margin)` Sets the margin of this fo.
    `void` | `setPadding(Padding padding)` Sets the padding of this fo.
    `void` | `setRelativePosition(RelativePosition pos)` Sets the relative position of this fo.
    `void` | `setSeparation(Measure separation)` Sets the provisional label separation.

    - ### 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, getMeasureValue, getObjectValue, getObjectValue, getObjectValue, getObjectValue, getOrphans, getParentFO, getWidows, hasID, hasPadding, isHyphenation, setAbsolutePosition, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setFont, setHyphenation, setID, setLanguage, setLanguage, 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

    - #### ListBlock

          public ListBlock()

      Creates a new empty list-block.

    - #### ListBlock

          public ListBlock(Measure distance)

      Creates a new empty list-block and sets space between labels and bodies.
      Parameters:
        `distance` - Distance.

    - #### ListBlock

          public ListBlock(Measure distance,
                   Block defaultLabel)

      Creates a new empty list-block, sets space between labels and bodies and sets the default label. That label is used, if you add an item via addSimpleItem(Block)
      Parameters:
        `distance` - Distance.
        `defaultLabel` - The default label.

    - #### ListBlock

          public ListBlock(Measure distance,
                   InlineElement defaultLabel)

      Creates a new empty list-block, sets space between labels and bodies and sets the default label. That label is used, if you add an item via addSimpleItem(Block)
      Parameters:
        `distance` - Distance.
        `defaultLabel` - The default label.

    - #### ListBlock

          public ListBlock(Measure distance,
                   java.lang.String defaultLabel)

      Creates a new empty list-block, sets space between labels and bodies and sets the default label. That label is used, if you add an item via addSimpleItem(Block)
      Parameters:
        `distance` - Distance.
        `defaultLabel` - The default label.

  - ### Method Detail

    - #### getMargin

          public Margin getMargin()

      Gets the margin of this fo. Is never null.
      Overrides:
        `getMargin` in class `FormattingObject`
      Returns:
        Margin.

    - #### setMargin

          public void setMargin(Margin margin)

      Sets the margin of this fo.
      Overrides:
        `setMargin` in class `FormattingObject`
      Parameters:
        `margin` - Margin.

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

    - #### setBreakBefore

          public void setBreakBefore(Values.Break type)

      Sets the break before this formatting object.
      Parameters:
        `type` - Type of break. (see Values.BREAK_*)

    - #### getBreakBefore

          public Values.Break getBreakBefore()

      Gets the break before this formatting object.
      Returns:
        Type of break. By default Values.BREAK_AUTO is returned.

    - #### setBreakAfter

          public void setBreakAfter(Values.Break type)

      Sets the break before this formatting object.
      Parameters:
        `type` - Type of break. (see Values.BREAK_*)

    - #### getBreakAfter

          public Values.Break getBreakAfter()

      Gets the break after this formatting object.
      Returns:
        Type of break. By default Values.BREAK_AUTO is returned.

    - #### add

          public ListBlock add(ListItem item)

      Adds an item to this list block.
      Parameters:
        `item` - List item.
      Returns:
        This list-block for chained calls.

    - #### addItem

          public ListBlock addItem(BlockElement label,
                          BlockElement body)

      Adds an item to this list block.
      Parameters:
        `label` - Label of item.
        `body` - Body of item.
      Returns:
        This list-block for chained calls.

    - #### addItem

          public ListBlock addItem(InlineElement label,
                          InlineElement body)

      Adds an item to this list block.
      Parameters:
        `label` - Label of item.
        `body` - Body of item.
      Returns:
        This list-block for chained calls.

    - #### addItem

          public ListBlock addItem(java.lang.String label,
                          java.lang.String body)

      Adds an item to this list block.
      Parameters:
        `label` - Label of item.
        `body` - Body of item.
      Returns:
        This list-block for chained calls.

    - #### addSimpleItem

          public ListBlock addSimpleItem(BlockElement body)

      Adds an item with default label to this block.
      Parameters:
        `body` - Body of item.
      Returns:
        This list-block for chained calls.

    - #### addSimpleItem

          public ListBlock addSimpleItem(InlineElement body)

      Adds an item with default label to this block.
      Parameters:
        `body` - Body of item.
      Returns:
        This list-block for chained calls.

    - #### addSimpleItem

          public ListBlock addSimpleItem(java.lang.String body)

      Adds an item with default label to this block.
      Parameters:
        `body` - Body of item.
      Returns:
        This list-block for chained calls.

    - #### getListItem

          public ListItem getListItem(int idx)

      Gets a list item at an index.
      Parameters:
        `idx` - Index of item.
      Returns:
        Item at idx.

    - #### setDistance

          public void setDistance(Measure distance)

      Sets attribute provisional-distance-between-starts.
      Parameters:
        `distance` - Distance.

    - #### setSeparation

          public void setSeparation(Measure separation)

      Sets the provisional label separation.
      Parameters:
        `separation` - Seperation.

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