org.apache.fop.fo.properties

## Class CorrespondingPropertyMaker

- java.lang.Object
- - org.apache.fop.fo.properties.CorrespondingPropertyMaker

- Direct Known Subclasses:
    DimensionPropertyMaker, IndentPropertyMaker, SpacePropertyMaker

      public class CorrespondingPropertyMaker
      extends java.lang.Object

  Maker class for handling corresponding properties.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected PropertyMaker` | `baseMaker` base property maker
    `protected int` | `lrtb` corresponding property for lr-tb writing mode
    `protected int` | `rltb` corresponding property for rl-tb writing mode
    `protected int` | `tblr` corresponding property for tb-lr writing mode
    `protected int` | `tbrl` corresponding property for tb-rl writing mode
    `protected boolean` | `useParent` user parent property list

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `CorrespondingPropertyMaker(PropertyMaker baseMaker)` Construct a corresponding property maker.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `Property` | `compute(PropertyList propertyList)` Return a Property object representing the value of this property, based on other property values for this FO.
    `protected PropertyList` | `getWMPropertyList(PropertyList pList)` Return the property list to use for fetching writing mode depending property ids.
    `boolean` | `isCorrespondingForced(PropertyList propertyList)` For properties that operate on a relative direction (before, after, start, end) instead of an absolute direction (top, bottom, left, right), this method determines whether a corresponding property is specified on the corresponding absolute direction.
    `void` | `setCorresponding(int lrtb, int rltb, int tbrl, int tblr)` Set corresponding property identifiers.
    `void` | `setRelative(boolean relative)` Set relative flag.
    `void` | `setUseParent(boolean useParent)` Controls whether the PropertyMaker accesses the parent property list or the current property list for determining the writing mode.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### baseMaker

          protected PropertyMaker baseMaker

      base property maker

    - #### lrtb

          protected int lrtb

      corresponding property for lr-tb writing mode

    - #### rltb

          protected int rltb

      corresponding property for rl-tb writing mode

    - #### tbrl

          protected int tbrl

      corresponding property for tb-rl writing mode

    - #### tblr

          protected int tblr

      corresponding property for tb-lr writing mode

    - #### useParent

          protected boolean useParent

      user parent property list

  - ### Constructor Detail

    - #### CorrespondingPropertyMaker

          public CorrespondingPropertyMaker(PropertyMaker baseMaker)

      Construct a corresponding property maker.
      Parameters:
        `baseMaker` - the base property maker

  - ### Method Detail

    - #### setCorresponding

          public void setCorresponding(int lrtb,
                                       int rltb,
                                       int tbrl,
                                       int tblr)

      Set corresponding property identifiers.
      Parameters:
        `lrtb` - the property that corresponds with lr-tb writing mode
        `rltb` - the property that corresponds with rl-tb writing mode
        `tbrl` - the property that corresponds with tb-lr writing mode
        `tblr` - the property that corresponds with tb-lr writing mode

    - #### setUseParent

          public void setUseParent(boolean useParent)

      Controls whether the PropertyMaker accesses the parent property list or the current property list for determining the writing mode.
      Parameters:
        `useParent` - true if the parent property list should be used.

    - #### setRelative

          public void setRelative(boolean relative)

      Set relative flag.
      Parameters:
        `relative` - true if properties operate on a relative direction

    - #### isCorrespondingForced

          public boolean isCorrespondingForced(PropertyList propertyList)

      For properties that operate on a relative direction (before, after, start, end) instead of an absolute direction (top, bottom, left, right), this method determines whether a corresponding property is specified on the corresponding absolute direction. For example, the border-start-color property in a lr-tb writing-mode specifies the same thing that the border-left-color property specifies. In this example, if the Maker for the border-start-color property is testing, and if the border-left-color is specified in the properties, this method should return true.
      Parameters:
        `propertyList` - collection of properties to be tested
      Returns:
        true iff 1) the property operates on a relative direction, AND 2) the property has a corresponding property on an absolute direction, AND 3) the corresponding property on that absolute direction has been specified in the input properties

    - #### compute

          public Property compute(PropertyList propertyList)
                           throws PropertyException

      Return a Property object representing the value of this property, based on other property values for this FO. A special case is properties which inherit the specified value, rather than the computed value.
      Parameters:
        `propertyList` - The PropertyList for the FO.
      Returns:
        Property A computed Property value or null if no rules are specified (in foproperties.xml) to compute the value.
      Throws:
        `PropertyException` - if a property exception occurs

    - #### getWMPropertyList

          protected PropertyList getWMPropertyList(PropertyList pList)

      Return the property list to use for fetching writing mode depending property ids.
      Parameters:
        `pList` - a property list
      Returns:
        the property list to use

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