Class PLElementWithSize

java.lang.Object
com.helger.pdflayout.base.PLElementWithSize

@Immutable public final class PLElementWithSize extends Object
Wraps an IPLRenderableObject together with a size.
Author:
Philip Helger
  • Constructor Details

    • PLElementWithSize

      public PLElementWithSize(@Nonnull IPLRenderableObject<?> aElement, @Nonnull SizeSpec aSize)
      Constructor
      Parameters:
      aElement - Element itself.
      aSize - Size of the element without padding, border and margin
    • PLElementWithSize

      public PLElementWithSize(@Nonnull IPLRenderableObject<?> aElement, @Nonnull SizeSpec aSize, @Nonnull SizeSpec aSizeFull)
      Constructor. This constructor is only present for the unlikely case that the full size differs from the raw size with all the outlines added.
      Parameters:
      aElement - Element itself.
      aSize - Size of the element without padding and margin
      aSizeFull - Size of the element with padding, border and margin
  • Method Details

    • getElement

      @Nonnull public IPLRenderableObject<?> getElement()
      Returns:
      The contained element.
    • getSize

      @Nonnull public SizeSpec getSize()
      Returns:
      The size without padding or margin
    • getSizeFull

      @Nonnull public SizeSpec getSizeFull()
      Returns:
      The size with padding or margin
    • getWidth

      public float getWidth()
      Returns:
      Width without padding or margin
    • getWidthFull

      public float getWidthFull()
      Returns:
      Width with padding and margin
    • getHeight

      public float getHeight()
      Returns:
      Height without padding or margin
    • getHeightFull

      public float getHeightFull()
      Returns:
      Height with padding and margin
    • toString

      public String toString()
      Overrides:
      toString in class Object