Class 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 Detail

      • 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 Detail

      • 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.