Package com.helger.pdflayout.base
Class PLElementWithSize
- java.lang.Object
-
- com.helger.pdflayout.base.PLElementWithSize
-
@Immutable public final class PLElementWithSize extends Object
Wraps anIPLRenderableObjecttogether with a size.- Author:
- Philip Helger
-
-
Constructor Summary
Constructors Constructor Description PLElementWithSize(IPLRenderableObject<?> aElement, SizeSpec aSize)ConstructorPLElementWithSize(IPLRenderableObject<?> aElement, SizeSpec aSize, SizeSpec aSizeFull)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description IPLRenderableObject<?>getElement()floatgetHeight()floatgetHeightFull()SizeSpecgetSize()SizeSpecgetSizeFull()floatgetWidth()floatgetWidthFull()StringtoString()
-
-
-
Constructor Detail
-
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 marginaSizeFull- Size of the element with padding, border and margin
-
-
Method Detail
-
getElement
@Nonnull public IPLRenderableObject<?> getElement()
- Returns:
- The contained element.
-
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
-
-