org.apache.fop.layoutmgr

Class KnuthElement

Known Direct Subclasses:
KnuthBox, KnuthGlue, KnuthPenalty

public abstract class KnuthElement
extends ListElement

This is the super class for KnuthBox, KnuthGlue and KnuthPenalty. It stores information common to all sub classes, and the methods to get it: the width, a Position and a boolean marking KnuthElements used for some special feature (for example, the additional elements used to represent a space when text alignment is right, left or center).

Field Summary

static int
INFINITE
The value used as an infinite indicator.

Constructor Summary

KnuthElement(int w, Position pos, boolean bAux)
Create a new KnuthElement.

Method Summary

int
getP()
int
getW()
int
getY()
int
getZ()
boolean
isAuxiliary()
boolean
isUnresolvedElement()

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

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

Field Details

INFINITE

public static final int INFINITE
The value used as an infinite indicator.
Field Value:
1000

Constructor Details

KnuthElement

protected KnuthElement(int w,
                       Position pos,
                       boolean bAux)
Create a new KnuthElement. This class being abstract, this can be called only by subclasses.
Parameters:
w - the width of this element
pos - the Position stored in this element
bAux - is this an auxiliary element?

Method Details

getP

public int getP()
Returns:
the penalty value of this element, if applicable.

getW

public int getW()
Returns:
the width of this element.

getY

public int getY()
Returns:
the stretch value of this element, if applicable.

getZ

public int getZ()
Returns:
the shrink value of this element, if applicable.

isAuxiliary

public boolean isAuxiliary()
Returns:
true if this element is an auxiliary one.

isUnresolvedElement

public boolean isUnresolvedElement()
Overrides:
isUnresolvedElement in interface ListElement

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