org.apache.fop.area

Class Block

Implemented Interfaces:
Serializable
Known Direct Subclasses:
BlockViewport

public class Block
extends BlockParent

This is the block area class. It holds child block areas such as other blocks or lines.

Field Summary

static int
ABSOLUTE
Relative to the block parent but not effecting the stacking Used for block-container, tables and lists.
static int
FIXED
Relative to a viewport/page but not effecting the stacking Used for block-container.
static int
RELATIVE
Placed relative to the flow position.
static int
STACK
Normally stacked with other blocks.
protected boolean
allowBPDUpdate

Fields inherited from class org.apache.fop.area.BlockParent

children, xOffset, yOffset

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

BT, CLASS_ABSOLUTE, CLASS_BEFORE_FLOAT, CLASS_FIXED, CLASS_FOOTNOTE, CLASS_MAX, CLASS_NORMAL, CLASS_SIDE_FLOAT, LR, ORIENT_0, ORIENT_180, ORIENT_270, ORIENT_90, RL, TB, bpd, ipd, log, props

Fields inherited from class org.apache.fop.area.AreaTreeObject

foreignAttributes

Method Summary

void
addBlock(Block block)
Add the block to this block area.
void
addBlock(Block block, boolean autoHeight)
Add the block to this block area.
void
addLineArea(LineArea line)
Add the line area to this block area.
int
getPositioning()
Get the positioning of this area.
int
getStartIndent()
boolean
isStacked()
Indicates whether this block is stacked, rather than absolutely positioned.
void
setPositioning(int pos)
Set the positioning of this area.

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

addBlock, addChildArea, getChildAreas, getXOffset, getYOffset, isEmpty, setXOffset, setYOffset

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

addChildArea, addTrait, addTrait, getAllocBPD, getAllocIPD, getAreaClass, getBPD, getBooleanTrait, getBorderAndPaddingWidthAfter, getBorderAndPaddingWidthBefore, getBorderAndPaddingWidthEnd, getBorderAndPaddingWidthStart, getIPD, getSpaceAfter, getSpaceBefore, getSpaceEnd, getSpaceStart, getTrait, getTraitAsInteger, getTraits, hasTrait, hasTraits, setAreaClass, setBPD, setIPD, toString

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

getForeignAttributeValue, getForeignAttributes, setForeignAttribute, setForeignAttributes

Field Details

ABSOLUTE

public static final int ABSOLUTE
Relative to the block parent but not effecting the stacking Used for block-container, tables and lists.
Field Value:
2

FIXED

public static final int FIXED
Relative to a viewport/page but not effecting the stacking Used for block-container.
Field Value:
3

RELATIVE

public static final int RELATIVE
Placed relative to the flow position. This effects the flow placement of stacking normally.
Field Value:
1

STACK

public static final int STACK
Normally stacked with other blocks.
Field Value:
0

allowBPDUpdate

protected boolean allowBPDUpdate

Method Details

addBlock

public void addBlock(Block block)
Add the block to this block area.
Overrides:
addBlock in interface BlockParent
Parameters:
block - the block area to add

addBlock

public void addBlock(Block block,
                     boolean autoHeight)
Add the block to this block area.
Parameters:
block - the block area to add
autoHeight - increase the height of the block.

addLineArea

public void addLineArea(LineArea line)
Add the line area to this block area.
Parameters:
line - the line area to add

getPositioning

public int getPositioning()
Get the positioning of this area.
Returns:
the positioning to use when rendering this area

getStartIndent

public int getStartIndent()
Returns:
the start-indent trait

isStacked

public boolean isStacked()
Indicates whether this block is stacked, rather than absolutely positioned.
Returns:
true if it is stacked

setPositioning

public void setPositioning(int pos)
Set the positioning of this area.
Parameters:
pos - the positioning to use when rendering this area

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