fop 0.91beta

org.apache.fop.datatypes
Class LengthBase

java.lang.Object
  |
  +--org.apache.fop.datatypes.LengthBase
All 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
protected  FObj fobj
          The FO for which this property is to be calculated.
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
 
Constructor Summary
LengthBase(FObj parentFO, PropertyList plist, int baseType)
          Constructor
 
Method Summary
 int getBaseLength(PercentBaseContext context)
           
 double getBaseValue()
           
 int getDimension()
          Determines whether a numeric property is created or one with a percentage base.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CUSTOM_BASE

public static final int CUSTOM_BASE
constant for a custom percent-based length

FONTSIZE

public static final int FONTSIZE
constant for a font-size percent-based length

INH_FONTSIZE

public static final int INH_FONTSIZE
constant for an inh font-size percent-based length

PARENT_AREA_WIDTH

public static final int PARENT_AREA_WIDTH
constant for a containing box percent-based length

CONTAINING_REFAREA_WIDTH

public static final int CONTAINING_REFAREA_WIDTH
constant for a containing refarea percent-based length

CONTAINING_BLOCK_WIDTH

public static final int CONTAINING_BLOCK_WIDTH
constant for a containing block percent-based length

CONTAINING_BLOCK_HEIGHT

public static final int CONTAINING_BLOCK_HEIGHT
constant for a containing block percent-based length

IMAGE_INTRINSIC_WIDTH

public static final int IMAGE_INTRINSIC_WIDTH
constant for a image intrinsic percent-based length

IMAGE_INTRINSIC_HEIGHT

public static final int IMAGE_INTRINSIC_HEIGHT
constant for a image intrinsic percent-based length

IMAGE_BACKGROUND_POSITION_HORIZONTAL

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

IMAGE_BACKGROUND_POSITION_VERTICAL

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

TABLE_UNITS

public static final int TABLE_UNITS
constant for a table-unit-based length

ALIGNMENT_ADJUST

public static final int ALIGNMENT_ADJUST
constant for a alignment adjust percent-based length

fobj

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

LengthBase

public LengthBase(FObj parentFO,
                  PropertyList plist,
                  int baseType)
           throws PropertyException
Constructor
Parameters:
parentFO - parent FO for this
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 Detail

getDimension

public int getDimension()
Description copied from interface: PercentBase
Determines whether a numeric property is created or one with a percentage base.
Specified by:
getDimension in interface PercentBase
Returns:
the dimension of this object (always 1)

getBaseValue

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

getBaseLength

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

fop 0.91beta

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