Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| fop 2.2
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.fop.area
Class LineArea

    java.lang.Object
      org.apache.fop.area.AreaTreeObject
          org.apache.fop.area.Area
              org.apache.fop.area.LineArea

All Implemented Interfaces:
  java.io.Serializable, java.lang.Cloneable

    public class LineArea

extends Area

The line area. This is a line area that contains inline areas.

See Also:
  Serialized Form

Field Summary

Fields inherited from class org.apache.fop.area.Area
`bidiLevel, bpd, CLASS_ABSOLUTE, CLASS_BEFORE_FLOAT, CLASS_FIXED, CLASS_FOOTNOTE, CLASS_MAX, CLASS_NORMAL, CLASS_SIDE_FLOAT, effectiveIPD, ipd, log, ORIENT_0, ORIENT_180, ORIENT_270, ORIENT_90, traits`

Fields inherited from class org.apache.fop.area.AreaTreeObject
`extensionAttachments, foreignAttributes`

Constructor Summary
`LineArea()` default constructor: nothing to do
`LineArea(int alignment, int diff, int stretch, int shrink)` constructor with extra parameters: a new LineAdjustingInfo object is created

Method Summary
`void` | `addChildArea(Area childArea)` Add a child area to this line area.
`void` | `addInlineArea(InlineArea area)` Add an inline child area to this line area.
`void` | `finish()` apply the variation factor to all descendant areas and destroy the AdjustingInfo object if there are no UnresolvedAreas left
`int` | `getEffectiveIPD()`
`int` | `getEndIndent()` Get the end indent of this line area.
`java.util.List` | `getInlineAreas()` Get the inline child areas of this line area.
`int` | `getStartIndent()` Get the start indent of this line area.
`void` | `handleIPDVariation(int ipdVariation)` receive notification about the ipd variation of a descendant area and perform the needed adjustment, according to the alignment; in particular: left-aligned text needs no adjustement; right-aligned text and centered text are handled locally, adjusting the indent of this LineArea; justified text requires a more complex adjustment, as the variation factor computed on the basis of the total stretch and shrink of the line must be applied in every descendant leaf areas (text areas and leader areas).
`void` | `setInlineAreas(java.util.List inlineAreas)` Set (en masse) the inline child areas of this line area.
`void` | `updateExtentsFromChildren()` Updates the extents of the line area from its children.

Methods inherited from class org.apache.fop.area.Area
`activateEffectiveIPD, addTrait, clone, getAllocBPD, getAllocIPD, getAreaClass, getBidiLevel, getBorderAndPaddingWidthAfter, getBorderAndPaddingWidthBefore, getBorderAndPaddingWidthEnd, getBorderAndPaddingWidthStart, getBPD, getEffectiveAllocIPD, getIPD, getSpaceAfter, getSpaceBefore, getSpaceEnd, getSpaceStart, getTrait, getTraitAsBoolean, getTraitAsInteger, getTraits, hasTrait, hasTraits, resetBidiLevel, setAreaClass, setBidiLevel, setBPD, setIPD, setTraits, setWritingModeTraits, toString`

Methods inherited from class org.apache.fop.area.AreaTreeObject
`addExtensionAttachment, getExtensionAttachments, getForeignAttributes, getForeignAttributeValue, hasExtensionAttachments, setExtensionAttachments, setForeignAttribute, setForeignAttributes`

Methods inherited from class java.lang.Object
`equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### LineArea

    public LineArea()

  default constructor: nothing to do

### LineArea

    public LineArea(int alignment,
                    int diff,
                    int stretch,
                    int shrink)

  constructor with extra parameters: a new LineAdjustingInfo object is created

  Parameters:
    `alignment` - alignment of this line
    `diff` - difference between content width and line width
    `stretch` - the available stretch for any adjustments
    `shrink` - the available shrink for any adjustments

Method Detail

### addChildArea

    public void addChildArea(Area childArea)

  Add a child area to this line area.

  Overrides:
    `addChildArea` in class `Area`
  Parameters:
    `childArea` - the inline child area to add

### addInlineArea

    public void addInlineArea(InlineArea area)

  Add an inline child area to this line area.

  Parameters:
    `area` - the inline child area to add

### setInlineAreas

    public void setInlineAreas(java.util.List inlineAreas)

  Set (en masse) the inline child areas of this line area.

  Used by bidirectional processing after line area consituent reordering.

  Parameters:
    `inlineAreas` - the list of inline areas

### getInlineAreas

    public java.util.List getInlineAreas()

  Get the inline child areas of this line area.

  Returns:
    the list of inline areas

### getStartIndent

    public int getStartIndent()

  Get the start indent of this line area. The start indent is used for offsetting the start of the inline areas for alignment or other indents.

  Returns:
    the start indent value

### getEndIndent

    public int getEndIndent()

  Get the end indent of this line area. The end indent is used for offsetting the end of the inline areas for alignment or other indents.

  Returns:
    the end indent value

### updateExtentsFromChildren

    public void updateExtentsFromChildren()

  Updates the extents of the line area from its children.

### handleIPDVariation

    public void handleIPDVariation(int ipdVariation)

  receive notification about the ipd variation of a descendant area and perform the needed adjustment, according to the alignment; in particular:
  - left-aligned text needs no adjustement;
  - right-aligned text and centered text are handled locally, adjusting the indent of this LineArea;
  - justified text requires a more complex adjustment, as the variation factor computed on the basis of the total stretch and shrink of the line must be applied in every descendant leaf areas (text areas and leader areas).

  Parameters:
    `ipdVariation` - the difference between old and new ipd

### finish

    public void finish()

  apply the variation factor to all descendant areas and destroy the AdjustingInfo object if there are no UnresolvedAreas left

### getEffectiveIPD

    public int getEffectiveIPD()

  Overrides:
    `getEffectiveIPD` in class `Area`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| fop 2.2
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright 1999-2017 The Apache Software Foundation. All Rights Reserved.