Each of the <type>Type classes also implements the get<type> methods
from Property so the layout must do exactly the same as it does now to
extract the right value:

   propertyList.get(PR_INLINE_PROGRESSION_DIMENSION).
                 getLengthRange().getOptimum().getLength();

[Andreas L. Delmelle]


Hmmm... coming back to my recent question about the use of/access to the
background-color property: I somehow would feel much for further extending
the way the Common*Properties are handled. IIC, the calls like the above
should only happen in the background via the propMgr of the FObj, and not
become part of the public API.

I dunno. The spec clearly list which properties that apply for a element:


file:///d:/java/REC-xsl/slice6.html#fo_external-graphic

so it makes sense to find the same list of assignments in the layout managers.

As a concrete example, in Layout, I would rather see something like:

private AreaDimensionProps adimProps;
...
protected void initProperties(PropertyManager propMgr) {
    adimProps = propMgr.getAreaDimensionProps();
    ...
}

Yeah, if it make sense to add more groups of properties together (and it seems that such a ipd,bpd pair make sense) I don't see a problem adding that.


...
Length ipd = aProps.ipd;

Yes, except that it is a LengthRange property.


(maybe the latter can become more abstract
  PropertyValue ipd = aProps.ipd; )

My gut feeling says no. Unless the property in question can take non-LengthRange values (which ipd can not). The layoutmanagers should resolve the property value as far as they can as early as they can IMHO.


regards,
finn



Reply via email to