org.apache.fop.render.rtf.rtflib.tools

## Class PercentContext

- java.lang.Object
- - org.apache.fop.render.rtf.rtflib.tools.PercentContext

- All Implemented Interfaces:
    PercentBaseContext

      public class PercentContext
      extends java.lang.Object
      implements PercentBaseContext

  PercentBaseContext implementation to track base widths for percentage calculations.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `PercentContext()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `getBaseLength(int lengthBase, FObj fobj)` Returns the available width for a specific FObj
    `void` | `setDimension(FObj fobj)` Elements willing to use this context have to register themselves by calling this function.
    `void` | `setDimension(FObj fobj, int width)` Elements having a width property can call this function if their width is calculated in RTFHandler
    `void` | `setTableUnit(Table table, int tableUnit)` Records the calculated table unit for a given table.

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

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

- - ### Constructor Detail

    - #### PercentContext

          public PercentContext()

  - ### Method Detail

    - #### getBaseLength

          public int getBaseLength(int lengthBase,
                                   FObj fobj)

      Returns the available width for a specific FObj
      Specified by:
        `getBaseLength` in interface `PercentBaseContext`
      Parameters:
        `lengthBase` - lengthBase not used
        `fobj` - the FObj
      Returns:
        Available Width

    - #### setDimension

          public void setDimension(FObj fobj,
                                   int width)

      Elements having a width property can call this function if their width is calculated in RTFHandler
      Parameters:
        `fobj` - the FObj
        `width` - width of the FObj (in millipoints)

    - #### setTableUnit

          public void setTableUnit(Table table,
                                   int tableUnit)

      Records the calculated table unit for a given table.
      Parameters:
        `table` - the table for which the table unit is set
        `tableUnit` - the table unit value (in millipoints)

    - #### setDimension

          public void setDimension(FObj fobj)

      Elements willing to use this context have to register themselves by calling this function.
      Parameters:
        `fobj` - the FObj

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