de.vc.jfo.flow

## Class Inline

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

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

      public class Inline
      extends FlowObjectWithElements
      implements InlineElement

  The fo:inline formatting object is commonly used for formatting a portion of text with a background or enclosing it in a border.

  See Also:
    Serialized Form

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `Inline.Factory` This factory creates some special Inline-Objects.

  - ### 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
    `Inline()` Creates a new empty inline.
    `Inline(BlockElement element)` Creates a new inline and adds an element.
    `Inline(boolean collapseWhiteSpace)` Creates a new empty inline and sets white-space-collapse.
    `Inline(InlineElement element)` Creates a new inline and adds an element.
    `Inline(java.lang.String text)` Creates a new inline with a simple text as content.
    `Inline(java.lang.String text, boolean collapseWhiteSpace)` Creates a new inline with a simple text as content.
    `Inline(java.lang.String text, java.awt.Color color)` Creates a new inline with a simple text as content.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `Inline` | `add(BlockElement element)` Adds an formatting object (that is a block-group-member) to this FO at end.
    `Inline` | `add(Footnote footnote)` Adds an footnote to this inline at end.
    `Inline` | `add(InlineElement element)` Adds an formatting object (that is an inline-group-member) to this FO at end.
    `Inline` | `add(int idx, BlockElement element)` Adds an formatting object (that is a block-group-member) to this FO at the given index.
    `Inline` | `add(int idx, InlineElement element)` Adds an formatting object (that is an inline-group-member) to this FO at the given index.
    `Inline` | `add(int idx, java.lang.String text)` Adds some text (PCdata) to this FO at the given index.
    `Inline` | `add(java.lang.String text)` Adds some text (PCdata) to this FO.
    `Inline` | `addBasicLink(java.lang.String url)` Adds a basic link to this inline.
    `Inline` | `addBasicLink(java.lang.String text, java.lang.String externalDestination)` Adds a basic link to this inline.
    `Accessibility` | `getAccessibility()` Gets the accessibilty of this fo.
    `Background` | `getBackground()` Gets the background of this fo.
    `Border` | `getBorder()` Gets the border of this fo.
    `java.awt.Color` | `getColor()` Gets the (foreground) color of this inline.
    `Padding` | `getPadding()` Gets the padding of this fo.
    `RelativePosition` | `getRelativePosition()` Gets the relative position of this fo.
    `Values.VerticalAlignment` | `getVerticalAlignment()` Gets the vertical alignment.
    `boolean` | `hasBorder()` Returns true if at least one border attribute is set.
    `boolean` | `isWhiteSpaceCollapse()`
    `void` | `newLine()` Deprecated. Use a new Block or call Block.newLine
    `void` | `setAccessibility(Accessibility access)` Sets the accessibility of this fo.
    `void` | `setBackground(Background bg)` Sets the background of this fo.
    `void` | `setBackgroundColor(java.awt.Color c)` Sets the background-color of this inline.
    `void` | `setBlink(boolean b)` Sets, if this inline is blinking.
    `void` | `setBold(boolean b)` Sets, if this inline is bold.
    `void` | `setBorder(Border border)` Sets the border of this fo.
    `void` | `setColor(java.awt.Color c)` Sets the foreground-color of this inline.
    `void` | `setItalic(boolean b)` Sets, if this inline is italic.
    `void` | `setLetterSpacing(Measure space)`
    `void` | `setLineThrough(boolean b)` Sets, if this inline has a line through.
    `void` | `setOverline(boolean b)` Sets, if this inline is overlined.
    `void` | `setPadding(Padding padding)` Sets the padding of this fo.
    `void` | `setRelativePosition(RelativePosition pos)` Sets the relative position of this fo.
    `void` | `setUnderline(boolean b)` Sets, if this inline is underlined.
    `void` | `setVerticalAlignment(Measure vAlign)`
    `void` | `setVerticalAlignment(Values.VerticalAlignment va)` Sets the vertical alignment.
    `void` | `setWhiteSpaceCollapse(boolean b)`

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

    - #### Inline

          public Inline()

      Creates a new empty inline.

    - #### Inline

          public Inline(java.lang.String text)

      Creates a new inline with a simple text as content.
      Parameters:
        `text` - Simple text.

    - #### Inline

          public Inline(java.lang.String text,
                java.awt.Color color)

      Creates a new inline with a simple text as content.
      Parameters:
        `text` - Simple text.
        `color` - Color.

    - #### Inline

          public Inline(InlineElement element)

      Creates a new inline and adds an element.
      Parameters:
        `element` - Element.

    - #### Inline

          public Inline(BlockElement element)

      Creates a new inline and adds an element.
      Parameters:
        `element` - Element.

    - #### Inline

          public Inline(java.lang.String text,
                boolean collapseWhiteSpace)

      Creates a new inline with a simple text as content.
      Parameters:
        `text` - Simple text.
        `collapseWhiteSpace` - Do collapse white Space (true by default).

    - #### Inline

          public Inline(boolean collapseWhiteSpace)

      Creates a new empty inline and sets white-space-collapse.
      Parameters:
        `collapseWhiteSpace` - Do collapse white Space (true by default).

  - ### Method Detail

    - #### newLine

          public void newLine()

      Deprecated. Use a new Block or call Block.newLine
      Starts a new line.

    - #### setWhiteSpaceCollapse

          public void setWhiteSpaceCollapse(boolean b)

    - #### isWhiteSpaceCollapse

          public boolean isWhiteSpaceCollapse()

    - #### setColor

          public void setColor(java.awt.Color c)

      Sets the foreground-color of this inline.
      Parameters:
        `c` - Foreground-Color.

    - #### getColor

          public java.awt.Color getColor()

      Gets the (foreground) color of this inline. By default Color.black is returned.
      Returns:
        Color.

    - #### setBackgroundColor

          public void setBackgroundColor(java.awt.Color c)

      Sets the background-color of this inline.
      Parameters:
        `c` - Background-Color.

    - #### setUnderline

          public void setUnderline(boolean b)

      Sets, if this inline is underlined.
      Parameters:
        `b` - true, if underlined.

    - #### setLineThrough

          public void setLineThrough(boolean b)

      Sets, if this inline has a line through.
      Parameters:
        `b` - true, if has a line-through.

    - #### setOverline

          public void setOverline(boolean b)

      Sets, if this inline is overlined.
      Parameters:
        `b` - true, if overlined.

    - #### setBlink

          public void setBlink(boolean b)

      Sets, if this inline is blinking.
      Parameters:
        `b` - true, if blinking.

    - #### setItalic

          public void setItalic(boolean b)

      Sets, if this inline is italic.
      Parameters:
        `b` - true, if italic.

    - #### setBold

          public void setBold(boolean b)

      Sets, if this inline is bold.
      Parameters:
        `b` - true, if bold.

    - #### setVerticalAlignment

          public void setVerticalAlignment(Values.VerticalAlignment va)

      Sets the vertical alignment.
      Parameters:
        `va` - Vertical Alignment (Values.V_ALIGN_*).

    - #### setVerticalAlignment

          public void setVerticalAlignment(Measure vAlign)

    - #### setLetterSpacing

          public void setLetterSpacing(Measure space)

    - #### getVerticalAlignment

          public Values.VerticalAlignment getVerticalAlignment()

      Gets the vertical alignment. Currently nullable.
      Returns:
        Vertical alignment.

    - #### add

          public Inline add(InlineElement element)

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

    - #### add

          public Inline add(BlockElement element)

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

    - #### add

          public Inline add(Footnote footnote)

      Adds an footnote to this inline at end.
      Parameters:
        `footnote` - Footnote.
      Returns:
        this inline for chained calls.

    - #### add

          public Inline add(java.lang.String text)

      Adds some text (PCdata) to this FO.
      Parameters:
        `text` - Some text.
      Returns:
        this inline for chained calls.

    - #### add

          public Inline 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 inline for chained calls.

    - #### add

          public Inline add(int idx,
                   BlockElement element)

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

    - #### add

          public Inline add(int idx,
                   java.lang.String text)

      Adds some text (PCdata) to this FO at the given index.
      Parameters:
        `idx` - Index.
        `text` - Some text.
      Returns:
        this inline for chained calls.

    - #### addBasicLink

          public Inline addBasicLink(java.lang.String text,
                            java.lang.String externalDestination)

      Adds a basic link to this inline.
      Parameters:
        `text` - text of link.
        `externalDestination` - External destination of link.
      Returns:
        this inline for chained calls.

    - #### addBasicLink

          public Inline addBasicLink(java.lang.String url)

      Adds a basic link to this inline.
      Parameters:
        `url` - URL of link (URL is text and external destination).
      Returns:
        this inline for chained calls.

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

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