Package org.apache.fop.datatypes
Class LengthBase
java.lang.Object
org.apache.fop.datatypes.LengthBase
- All Implemented Interfaces:
PercentBase
Models a length which can be used as a factor in a percentage length
calculation
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
constant for a alignment adjust percent-based lengthstatic final int
constant for a containing block percent-based lengthstatic final int
constant for a containing block percent-based lengthstatic final int
constant for a containing refarea percent-based lengthstatic final int
constant for a custom percent-based lengthprotected FObj
The FO for which this property is to be calculated.static final int
constant for a font-size percent-based lengthstatic final int
constant for a image background position horizontal percent-based lengthstatic final int
constant for a image background position vertical percent-based lengthstatic final int
constant for a image intrinsic percent-based lengthstatic final int
constant for a image intrinsic percent-based lengthstatic final int
constant for an inh font-size percent-based lengthprotected static final org.apache.commons.logging.Log
logging instancestatic final int
constant for a containing box percent-based lengthstatic final int
constant for a table-unit-based length -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
int
getBaseLength
(PercentBaseContext context) double
int
Determines whether a numeric property is created or one with a percentage base.int
hashCode()
toString()
-
Field Details
-
CUSTOM_BASE
public static final int CUSTOM_BASEconstant for a custom percent-based length- See Also:
-
FONTSIZE
public static final int FONTSIZEconstant for a font-size percent-based length- See Also:
-
INH_FONTSIZE
public static final int INH_FONTSIZEconstant for an inh font-size percent-based length- See Also:
-
PARENT_AREA_WIDTH
public static final int PARENT_AREA_WIDTHconstant for a containing box percent-based length- See Also:
-
CONTAINING_REFAREA_WIDTH
public static final int CONTAINING_REFAREA_WIDTHconstant for a containing refarea percent-based length- See Also:
-
CONTAINING_BLOCK_WIDTH
public static final int CONTAINING_BLOCK_WIDTHconstant for a containing block percent-based length- See Also:
-
CONTAINING_BLOCK_HEIGHT
public static final int CONTAINING_BLOCK_HEIGHTconstant for a containing block percent-based length- See Also:
-
IMAGE_INTRINSIC_WIDTH
public static final int IMAGE_INTRINSIC_WIDTHconstant for a image intrinsic percent-based length- See Also:
-
IMAGE_INTRINSIC_HEIGHT
public static final int IMAGE_INTRINSIC_HEIGHTconstant for a image intrinsic percent-based length- See Also:
-
IMAGE_BACKGROUND_POSITION_HORIZONTAL
public static final int IMAGE_BACKGROUND_POSITION_HORIZONTALconstant for a image background position horizontal percent-based length- See Also:
-
IMAGE_BACKGROUND_POSITION_VERTICAL
public static final int IMAGE_BACKGROUND_POSITION_VERTICALconstant for a image background position vertical percent-based length- See Also:
-
TABLE_UNITS
public static final int TABLE_UNITSconstant for a table-unit-based length- See Also:
-
ALIGNMENT_ADJUST
public static final int ALIGNMENT_ADJUSTconstant for a alignment adjust percent-based length- See Also:
-
log
protected static final org.apache.commons.logging.Log loglogging instance -
fobj
The FO for which this property is to be calculated.
-
-
Constructor Details
-
LengthBase
Constructor- Parameters:
plist
- property list for thisbaseType
- a constant defining the type of teh percent base- Throws:
PropertyException
- In case an problem occurs while evaluating values
-
-
Method Details
-
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 interfacePercentBase
- Returns:
- the dimension of this object (always 1)
-
getBaseValue
public double getBaseValue()- Specified by:
getBaseValue
in interfacePercentBase
- Returns:
- the base value of this object (always 1.0)
-
getBaseLength
- Specified by:
getBaseLength
in interfacePercentBase
- Parameters:
context
- The context for percentage evaluation- Returns:
- the integer size in millipoints of the object (this will be used as the base to which a percentage will be applied to compute the length of the referencing item)
- Throws:
PropertyException
- if a problem occurs during evaluation of this value.
-
toString
-
getBaseLength
- Returns:
- the base length as a
Length
-
hashCode
public int hashCode() -
equals
-