Class PreparationContext

java.lang.Object
com.helger.pdflayout.render.PreparationContext

@Immutable public final class PreparationContext extends Object
The current context for preparing an element. The preparation context depends on the location of an element.
Author:
Philip Helger
  • Constructor Details

    • PreparationContext

      public PreparationContext(@Nullable PreparationContextGlobal aGlobalCtx, @Nonnegative float fAvailableWidth, @Nonnegative float fAvailableHeight)
      Constructor
      Parameters:
      aGlobalCtx - The global preparation context worked upon. May be null.
      fAvailableWidth - The available width of the surrounding element. Includes margin, border and padding of the contained element. Should be > 0.
      fAvailableHeight - The available height of the surrounding element. Includes margin, border and padding of the contained element. Should be > 0.
  • Method Details

    • getGlobalContext

      @Nullable public PreparationContextGlobal getGlobalContext()
    • getAvailableWidth

      public float getAvailableWidth()
      Returns:
      The available width of the surrounding element. Should be > 0.
    • getAvailableHeight

      public float getAvailableHeight()
      Returns:
      The available height of the surrounding element. Should be > 0.
    • toString

      public String toString()
      Overrides:
      toString in class Object