org.apache.fop.datatypes

Class LengthBase

Implemented Interfaces:
PercentBase

public class LengthBase
extends java.lang.Object
implements PercentBase

Models a length which can be used as a factor in a percentage length calculation

Field Summary

static int
ALIGNMENT_ADJUST
constant for a alignment adjust percent-based length
static int
CONTAINING_BLOCK_HEIGHT
constant for a containing block percent-based length
static int
CONTAINING_BLOCK_WIDTH
constant for a containing block percent-based length
static int
CONTAINING_REFAREA_WIDTH
constant for a containing refarea percent-based length
static int
CUSTOM_BASE
constant for a custom percent-based length
static int
FONTSIZE
constant for a font-size percent-based length
static int
IMAGE_BACKGROUND_POSITION_HORIZONTAL
constant for a image background position horizontal percent-based length
static int
IMAGE_BACKGROUND_POSITION_VERTICAL
constant for a image background position vertical percent-based length
static int
IMAGE_INTRINSIC_HEIGHT
constant for a image intrinsic percent-based length
static int
IMAGE_INTRINSIC_WIDTH
constant for a image intrinsic percent-based length
static int
INH_FONTSIZE
constant for an inh font-size percent-based length
static int
PARENT_AREA_WIDTH
constant for a containing box percent-based length
static int
TABLE_UNITS
constant for a table-unit-based length
protected FObj
fobj
The FO for which this property is to be calculated.
protected static Log
log
logging instance

Constructor Summary

LengthBase(PropertyList plist, int baseType)
Constructor

Method Summary

Length
getBaseLength()
int
getBaseLength(PercentBaseContext context)
double
getBaseValue()
int
getDimension()
String
toString()

Field Details

ALIGNMENT_ADJUST

public static final int ALIGNMENT_ADJUST
constant for a alignment adjust percent-based length
Field Value:
12

CONTAINING_BLOCK_HEIGHT

public static final int CONTAINING_BLOCK_HEIGHT
constant for a containing block percent-based length
Field Value:
6

CONTAINING_BLOCK_WIDTH

public static final int CONTAINING_BLOCK_WIDTH
constant for a containing block percent-based length
Field Value:
5

CONTAINING_REFAREA_WIDTH

public static final int CONTAINING_REFAREA_WIDTH
constant for a containing refarea percent-based length
Field Value:
4

CUSTOM_BASE

public static final int CUSTOM_BASE
constant for a custom percent-based length
Field Value:
0

FONTSIZE

public static final int FONTSIZE
constant for a font-size percent-based length
Field Value:
1

IMAGE_BACKGROUND_POSITION_HORIZONTAL

public static final int IMAGE_BACKGROUND_POSITION_HORIZONTAL
constant for a image background position horizontal percent-based length
Field Value:
9

IMAGE_BACKGROUND_POSITION_VERTICAL

public static final int IMAGE_BACKGROUND_POSITION_VERTICAL
constant for a image background position vertical percent-based length
Field Value:
10

IMAGE_INTRINSIC_HEIGHT

public static final int IMAGE_INTRINSIC_HEIGHT
constant for a image intrinsic percent-based length
Field Value:
8

IMAGE_INTRINSIC_WIDTH

public static final int IMAGE_INTRINSIC_WIDTH
constant for a image intrinsic percent-based length
Field Value:
7

INH_FONTSIZE

public static final int INH_FONTSIZE
constant for an inh font-size percent-based length
Field Value:
2

PARENT_AREA_WIDTH

public static final int PARENT_AREA_WIDTH
constant for a containing box percent-based length
Field Value:
3

TABLE_UNITS

public static final int TABLE_UNITS
constant for a table-unit-based length
Field Value:
11

fobj

protected FObj fobj
The FO for which this property is to be calculated.

log

protected static Log log
logging instance

Constructor Details

LengthBase

public LengthBase(PropertyList plist,
                  int baseType)
            throws PropertyException
Constructor
Parameters:
plist - property list for this
baseType - a constant defining the type of teh percent base
Throws:
PropertyException - In case an problem occurs while evaluating values

Method Details

getBaseLength

public Length getBaseLength()
Returns:
the base length as a Length

getBaseLength

public int getBaseLength(PercentBaseContext context)
            throws PropertyException
Specified by:
getBaseLength in interface PercentBase

getBaseValue

public double getBaseValue()
Specified by:
getBaseValue in interface PercentBase
Returns:
the base value of this object (always 1.0)

getDimension

public int getDimension()
Specified by:
getDimension in interface PercentBase
Returns:
the dimension of this object (always 1)

toString

public String toString()

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