org.apache.fop.fo
Class PropertyList

java.lang.Object
  extended byjava.util.AbstractMap
      extended byjava.util.HashMap
          extended byorg.apache.fop.fo.PropertyList
All Implemented Interfaces:
java.lang.Cloneable, java.util.Map, java.io.Serializable
Direct Known Subclasses:
DirectPropertyListBuilder.AttrPropertyList

public class PropertyList
extends java.util.HashMap

See Also:
Serialized Form

Field Summary
static int AFTER
           
static int BEFORE
           
static int BLOCKPROGDIM
           
static int BOTTOM
           
static int END
           
static int HEIGHT
           
static int INLINEPROGDIM
           
static int LEFT
           
static int RIGHT
           
static int START
           
static int TOP
           
static int WIDTH
           
 
Constructor Summary
PropertyList(PropertyList parentPropertyList, java.lang.String space, java.lang.String el)
           
 
Method Summary
 Property get(java.lang.String propertyName)
          Return the property on the current FlowObject.
 java.lang.String getElement()
           
 Property getExplicit(java.lang.String propertyName)
          Return the value explicitly specified on this FO.
 Property getExplicitBaseProp(java.lang.String propertyName)
          Return the value explicitly specified on this FO.
 Property getExplicitOrShorthand(java.lang.String propertyName)
          Return the value explicitly specified on this FO.
 FObj getFObj()
           
 Property getFromParent(java.lang.String propertyName)
          Return the value of this property on the parent of this FO.
 Property getInherited(java.lang.String propertyName)
          Return the value of this property inherited by this FO.
 java.lang.String getNameSpace()
           
 Property getNearestSpecified(java.lang.String propertyName)
          Return the "nearest" specified value for the given property.
 FObj getParentFObj()
           
 Property getSpecified(java.lang.String propertyName)
          Return the property on the current FlowObject if it is specified, or if a corresponding property is specified.
 void setBuilder(PropertyListBuilder builder)
           
 void setFObj(FObj fobj)
           
 void setWritingMode(int writingMode)
          Set the writing mode traits for the FO with this property list.
 java.lang.String wmAbsToRel(int absdir)
          Given an absolute direction (top, bottom, left, right), return the corresponding writing model relative direction name for the flow object.
 java.lang.String wmRelToAbs(int reldir)
          Given a writing mode relative direction (start, end, before, after) return the corresponding absolute direction name for the flow object.
 
Methods inherited from class java.util.HashMap
clear, clone, containsKey, containsValue, entrySet, get, isEmpty, keySet, put, putAll, remove, size, values
 
Methods inherited from class java.util.AbstractMap
equals, hashCode, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.Map
equals, hashCode
 

Field Detail

LEFT

public static final int LEFT
See Also:
Constant Field Values

RIGHT

public static final int RIGHT
See Also:
Constant Field Values

TOP

public static final int TOP
See Also:
Constant Field Values

BOTTOM

public static final int BOTTOM
See Also:
Constant Field Values

HEIGHT

public static final int HEIGHT
See Also:
Constant Field Values

WIDTH

public static final int WIDTH
See Also:
Constant Field Values

START

public static final int START
See Also:
Constant Field Values

END

public static final int END
See Also:
Constant Field Values

BEFORE

public static final int BEFORE
See Also:
Constant Field Values

AFTER

public static final int AFTER
See Also:
Constant Field Values

BLOCKPROGDIM

public static final int BLOCKPROGDIM
See Also:
Constant Field Values

INLINEPROGDIM

public static final int INLINEPROGDIM
See Also:
Constant Field Values
Constructor Detail

PropertyList

public PropertyList(PropertyList parentPropertyList,
                    java.lang.String space,
                    java.lang.String el)
Method Detail

setFObj

public void setFObj(FObj fobj)

getFObj

public FObj getFObj()

getParentFObj

public FObj getParentFObj()

getExplicitOrShorthand

public Property getExplicitOrShorthand(java.lang.String propertyName)
Return the value explicitly specified on this FO.

Parameters:
propertyName - The name of the property whose value is desired. It may be a compound name, such as space-before.optimum.
Returns:
The value if the property is explicitly set or set by a shorthand property, otherwise null.

getExplicit

public Property getExplicit(java.lang.String propertyName)
Return the value explicitly specified on this FO.

Parameters:
propertyName - The name of the property whose value is desired. It may be a compound name, such as space-before.optimum.
Returns:
The value if the property is explicitly set, otherwise null.

getExplicitBaseProp

public Property getExplicitBaseProp(java.lang.String propertyName)
Return the value explicitly specified on this FO.

Parameters:
propertyName - The name of the base property whose value is desired.
Returns:
The value if the property is explicitly set, otherwise null.

getInherited

public Property getInherited(java.lang.String propertyName)
Return the value of this property inherited by this FO. Implements the inherited-property-value function. The property must be inheritable!

Parameters:
propertyName - The name of the property whose value is desired.
Returns:
The inherited value, otherwise null.

getSpecified

public Property getSpecified(java.lang.String propertyName)
Return the property on the current FlowObject if it is specified, or if a corresponding property is specified. If neither is specified, it returns null.


get

public Property get(java.lang.String propertyName)
Return the property on the current FlowObject. If it isn't set explicitly, this will try to compute it based on other properties, or if it is inheritable, to return the inherited value. If all else fails, it returns the default value.


setBuilder

public void setBuilder(PropertyListBuilder builder)

getNameSpace

public java.lang.String getNameSpace()

getElement

public java.lang.String getElement()

getNearestSpecified

public Property getNearestSpecified(java.lang.String propertyName)
Return the "nearest" specified value for the given property. Implements the from-nearest-specified-value function.

Parameters:
propertyName - The name of the property whose value is desired.
Returns:
The computed value if the property is explicitly set on some ancestor of the current FO, else the initial value.

getFromParent

public Property getFromParent(java.lang.String propertyName)
Return the value of this property on the parent of this FO. Implements the from-parent function.

Parameters:
propertyName - The name of the property whose value is desired.
Returns:
The computed value on the parent or the initial value if this FO is the root or is in a different namespace from its parent.

wmAbsToRel

public java.lang.String wmAbsToRel(int absdir)
Given an absolute direction (top, bottom, left, right), return the corresponding writing model relative direction name for the flow object. Uses the stored writingMode.


wmRelToAbs

public java.lang.String wmRelToAbs(int reldir)
Given a writing mode relative direction (start, end, before, after) return the corresponding absolute direction name for the flow object. Uses the stored writingMode.


setWritingMode

public void setWritingMode(int writingMode)
Set the writing mode traits for the FO with this property list.



Copyright ? 1999-2003 Apache Software Foundation. All Rights Reserved.