org.apache.fop.layoutmgr

## Class SpaceElement

- java.lang.Object
- - org.apache.fop.layoutmgr.ListElement
  - - org.apache.fop.layoutmgr.UnresolvedListElement
    - - org.apache.fop.layoutmgr.UnresolvedListElementWithLength
      - - org.apache.fop.layoutmgr.SpaceElement

-     public class SpaceElement
      extends UnresolvedListElementWithLength

  This class represents an unresolved space element.

- - ### Field Summary

    - ### Fields inherited from class org.apache.fop.layoutmgr.UnresolvedListElementWithLength

      `log`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `SpaceElement(Position position, SpaceProperty space, RelSide side, boolean isFirst, boolean isLast, PercentBaseContext context)` Main constructor

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `getPrecedence()`
    `boolean` | `isForcing()`
    `void` | `notifyLayoutManager(MinOptMax effectiveLength)` Called to notify the affected layout manager about the effective length after resolution.
    `String` | `toString()`

    - ### Methods inherited from class org.apache.fop.layoutmgr.UnresolvedListElementWithLength

      `getLength, getSide, isConditional, isFirst, isLast`

    - ### Methods inherited from class org.apache.fop.layoutmgr.UnresolvedListElement

      `getOriginatingLayoutManager`

    - ### Methods inherited from class org.apache.fop.layoutmgr.ListElement

      `getLayoutManager, getPosition, isBox, isForcedBreak, isGlue, isPenalty, isUnresolvedElement, setPosition`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### SpaceElement

          public SpaceElement(Position position,
                              SpaceProperty space,
                              RelSide side,
                              boolean isFirst,
                              boolean isLast,
                              PercentBaseContext context)

      Main constructor
      Parameters:
        `position` - the Position instance needed by the addAreas stage of the LMs.
        `space` - the space property
        `side` - the side to which this space element applies.
        `isFirst` - true if this is a space-before of the first area generated.
        `isLast` - true if this is a space-after of the last area generated.
        `context` - the property evaluation context

  - ### Method Detail

    - #### isForcing

          public boolean isForcing()

      Returns:
        true if the space is forcing.

    - #### getPrecedence

          public int getPrecedence()

      Returns:
        the precedence of the space

    - #### notifyLayoutManager

          public void notifyLayoutManager(MinOptMax effectiveLength)

      Called to notify the affected layout manager about the effective length after resolution. This method is called once before each call to the layout manager's addAreas() method.
      Specified by:
        `notifyLayoutManager` in class `UnresolvedListElementWithLength`
      Parameters:
        `effectiveLength` - the effective length after resolution (may be null which equals to zero effective length)

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `UnresolvedListElementWithLength`

Copyright © 2023 Apache Software Foundation. All rights reserved.