3.3. Examples: Retrieving border and padding values

In this section we follow in detail how the border and padding values for the body region are retrieved. The relevant part of the input FO file is:

<fo:simple-page-master master-name="simpleA4" margin="4pt">
<fo:region-body margin="4pt+20%" border="3pt solid black"
  border-before-width="2pt" border-right-width="4pt"
  border-start-width="inherit"/>
</fo:simple-page-master>

This section was written after I added the cache to the look-up of property values.

This what we are retrieving:

 propertyList.getFOName() = "fo:region-body"
 org.apache.fop.fo.FOPropertyMapping.getPropertyName(propId) = "margin-top"

The margin values are retrieved by the method PropertyManager.getMarginProps. This is the call stack that leads up to it and on to the retrieval of the value of margin-top:

  [1] org.apache.fop.fo.properties.PropertyMaker.findProperty (PropertyMaker.java:240)
  [2] org.apache.fop.fo.PropertyList.findProperty (PropertyList.java:289)
  [3] org.apache.fop.fo.properties.PropertyMaker.get (PropertyMaker.java:291)
  [4] org.apache.fop.fo.PropertyList.get (PropertyList.java:261)
  [5] org.apache.fop.fo.PropertyList.get (PropertyList.java:247)
  [6] org.apache.fop.fo.PropertyManager.getMarginProps (PropertyManager.java:264)
  [7] org.apache.fop.fo.pagination.RegionBody.getViewportRectangle (RegionBody.java:58)
  [8] org.apache.fop.layoutmgr.PageLayoutManager.makeRegionViewport (PageLayoutManager.java:811)
  [9] org.apache.fop.layoutmgr.PageLayoutManager.createPageAreas (PageLayoutManager.java:784)
  [10] org.apache.fop.layoutmgr.PageLayoutManager.createPage (PageLayoutManager.java:721)
  [11] org.apache.fop.layoutmgr.PageLayoutManager.makeNewPage (PageLayoutManager.java:441)
  [12] org.apache.fop.layoutmgr.PageLayoutManager.doLayout (PageLayoutManager.java:191)

The retrieval proceeds as follows:

This what we are retrieving:

 propertyList.getFOName() = "fo:region-body"
 org.apache.fop.fo.FOPropertyMapping.getPropertyName(propId) = "border-before-style"

The border values are retrieved by the method PropertyManager.getBorderAndPadding. This is the call stack that leads up to it and on to the retrieval of the value of border-before-style:

  [1] org.apache.fop.fo.properties.PropertyMaker.findProperty (PropertyMaker.java:240)
  [2] org.apache.fop.fo.PropertyList.findProperty (PropertyList.java:289)
  [3] org.apache.fop.fo.properties.PropertyMaker.get (PropertyMaker.java:291)
  [4] org.apache.fop.fo.PropertyList.get (PropertyList.java:261)
  [5] org.apache.fop.fo.PropertyList.get (PropertyList.java:247)
  [6] org.apache.fop.fo.PropertyManager.initBorderInfo (PropertyManager.java:155)
  [7] org.apache.fop.fo.PropertyManager.getBorderAndPadding (PropertyManager.java:143)
  [8] org.apache.fop.fo.PropertyManager.getMarginProps (PropertyManager.java:289)
  [9] org.apache.fop.fo.pagination.RegionBody.getViewportRectangle (RegionBody.java:58)
  [10] org.apache.fop.layoutmgr.PageLayoutManager.makeRegionViewport (PageLayoutManager.java:811)
  [11] org.apache.fop.layoutmgr.PageLayoutManager.createPageAreas (PageLayoutManager.java:784)
  [12] org.apache.fop.layoutmgr.PageLayoutManager.createPage (PageLayoutManager.java:721)
  [13] org.apache.fop.layoutmgr.PageLayoutManager.makeNewPage (PageLayoutManager.java:441)
  [14] org.apache.fop.layoutmgr.PageLayoutManager.doLayout (PageLayoutManager.java:191)

The retrieval proceeds as follows:

This what we are retrieving:

 propertyList.getFOName() = "fo:region-body"
 org.apache.fop.fo.FOPropertyMapping.getPropertyName(propId) = "border-before-width"

The border values are retrieved by the method PropertyManager.getBorderAndPadding. This is the call stack that leads up to it and on to the retrieval of the value of border-before-width:

main[1] where
  [1] org.apache.fop.fo.properties.PropertyMaker.findProperty (PropertyMaker.java:240)
  [2] org.apache.fop.fo.PropertyList.findProperty (PropertyList.java:289)
  [3] org.apache.fop.fo.properties.PropertyMaker.get (PropertyMaker.java:291)
  [4] org.apache.fop.fo.properties.CompoundPropertyMaker.get (CompoundPropertyMaker.java:146)
  [5] org.apache.fop.fo.PropertyList.get (PropertyList.java:261)
  [6] org.apache.fop.fo.PropertyList.get (PropertyList.java:247)
  [7] org.apache.fop.fo.PropertyManager.initBorderInfo (PropertyManager.java:157)
  [8] org.apache.fop.fo.PropertyManager.getBorderAndPadding (PropertyManager.java:143)
  [9] org.apache.fop.fo.PropertyManager.getMarginProps (PropertyManager.java:289)
  [10] org.apache.fop.fo.pagination.RegionBody.getViewportRectangle (RegionBody.java:58)
  [11] org.apache.fop.layoutmgr.PageLayoutManager.makeRegionViewport (PageLayoutManager.java:811)
  [12] org.apache.fop.layoutmgr.PageLayoutManager.createPageAreas (PageLayoutManager.java:784)
  [13] org.apache.fop.layoutmgr.PageLayoutManager.createPage (PageLayoutManager.java:721)
  [14] org.apache.fop.layoutmgr.PageLayoutManager.makeNewPage (PageLayoutManager.java:441)
  [15] org.apache.fop.layoutmgr.PageLayoutManager.doLayout (PageLayoutManager.java:191)

The difference with the call stack for border-before-style is that border-before-width is a compound property, with a minimum, an optimum and a maximum value.

The retrieval proceeds as follows:

This what we are retrieving:

 propertyList.getFOName() = "fo:region-body"
 org.apache.fop.fo.FOPropertyMapping.getPropertyName(propId) = "border-end-width"

The border values are retrieved by the method PropertyManager.getBorderAndPadding. The call stack that leads up to it and on to the retrieval of the value of border-end-width is identical to the call stack for border-before-width.

The retrieval proceeds as follows: