fop 1.1

## org.apache.fop.area
Class Span

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

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

    public class Span

extends Area

The span-reference-area. This is a block-area with 0 border and padding that is stacked within the main-reference-area This object holds one or more normal-flow-reference-area children based on the column-count trait in effect for this span. See fo:region-body definition in the XSL Rec for more information.

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, ipd, log, ORIENT_0, ORIENT_180, ORIENT_270, ORIENT_90, traits`

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

Constructor Summary
`Span(int colCount, int colGap, int ipd)` Create a span area with the number of columns for this span area.

Method Summary
`int` `getColumnCount()` Get the column count for this span area.
`int` `getColumnWidth()` Get the width of a single column within this Span
`NormalFlow` `getCurrentFlow()` Get the NormalFlow area currently being processed
`int` `getCurrentFlowIndex()`
`int` `getHeight()` Get the height of this span area.
`NormalFlow` `getNormalFlow(int colRequested)` Get the normal flow area for a particular column.
`boolean` `hasMoreFlows()` Indicates if the Span has unprocessed flows.
`boolean` `isEmpty()` Indicates whether any child areas have been added to this span area.
`NormalFlow` `moveToNextFlow()` Indicate to the Span that the next column is being processed.
`void` `notifyFlowsFinished()` Called to notify the span that all its flows have been fully generated so it can update its own BPD extent.
`void` `setWritingModeTraits(WritingModeTraitsGetter wmtg)` Sets the writing mode traits for the main reference area of this span area.
`java.lang.String` `toString()`

Methods inherited from class org.apache.fop.area.Area

`addChildArea, addTrait, clone, getAllocBPD, getAllocIPD, getAreaClass, getBidiLevel, getBorderAndPaddingWidthAfter, getBorderAndPaddingWidthBefore, getBorderAndPaddingWidthEnd, getBorderAndPaddingWidthStart, getBPD, getIPD, getSpaceAfter, getSpaceBefore, getSpaceEnd, getSpaceStart, getTrait, getTraitAsBoolean, getTraitAsInteger, getTraits, hasTrait, hasTraits, resetBidiLevel, setAreaClass, setBidiLevel, setBPD, setIPD, setTraits`

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

### Span

    public Span(int colCount,
                int colGap,
                int ipd)

  Create a span area with the number of columns for this span area.

  Parameters:
    `colCount` - the number of columns in the span
    `colGap` - the column gap between each column
    `ipd` - the total ipd of the span

Method Detail

### getColumnCount

    public int getColumnCount()

  Get the column count for this span area.

  Returns:
    the number of columns defined for this span area

### getColumnWidth

    public int getColumnWidth()

  Get the width of a single column within this Span

  Returns:
    the width of a single column

### getHeight

    public int getHeight()

  Get the height of this span area.

  Returns:
    the height of this span area

### getNormalFlow

    public NormalFlow getNormalFlow(int colRequested)

  Get the normal flow area for a particular column.

  Parameters:
    `colRequested` - the zero-based column number of the flow
  Returns:
    the flow area for the requested column

### getCurrentFlow

    public NormalFlow getCurrentFlow()

  Get the NormalFlow area currently being processed

  Returns:
    the current NormalFlow

### getCurrentFlowIndex

    public int getCurrentFlowIndex()

  Returns:
    the index of the current normal flow

### moveToNextFlow

    public NormalFlow moveToNextFlow()

  Indicate to the Span that the next column is being processed.

  Returns:
    the new NormalFlow (in the next column)

### hasMoreFlows

    public boolean hasMoreFlows()

  Indicates if the Span has unprocessed flows.

  Returns:
    true if Span can increment to the next flow, false otherwise.

### notifyFlowsFinished

    public void notifyFlowsFinished()

  Called to notify the span that all its flows have been fully generated so it can update its own BPD extent.

### isEmpty

    public boolean isEmpty()

  Indicates whether any child areas have been added to this span area. This is achieved by looping through each flow.

  Returns:
    true if no child areas have been added yet.

### setWritingModeTraits

    public void setWritingModeTraits(WritingModeTraitsGetter wmtg)

  Sets the writing mode traits for the main reference area of this span area.

  Overrides:
    `setWritingModeTraits` in class `Area`
  Parameters:
    `wmtg` - a WM traits getter

### toString

    public java.lang.String toString()

  Overrides:
    `toString` in class `Area`
  Returns:
    ipd and bpd of area

fop 1.1

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