Package com.helger.pdflayout.base
Interface IPLHasVerticalAlignment<IMPLTYPE extends IPLHasVerticalAlignment<IMPLTYPE>>
-
- Type Parameters:
IMPLTYPE- Implementation type
- All Superinterfaces:
com.helger.commons.traits.IGenericImplTrait<IMPLTYPE>,com.helger.commons.id.IHasID<String>,IPLHasOutline,IPLObject<IMPLTYPE>,IPLRenderableObject<IMPLTYPE>,IPLVisitable
- All Known Subinterfaces:
IPLBlockElement<IMPLTYPE>
- All Known Implementing Classes:
AbstractPLBlockElement,AbstractPLBox,PLBox,PLTableCell
public interface IPLHasVerticalAlignment<IMPLTYPE extends IPLHasVerticalAlignment<IMPLTYPE>> extends IPLRenderableObject<IMPLTYPE>
Base interface for objects with a vertical alignment- Author:
- Philip Helger
-
-
Field Summary
Fields Modifier and Type Field Description static EVertAlignmentDEFAULT_VERT_ALIGNMENT
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default floatgetIndentY(float fAvailableHeight)Get the indentation for a certain vertical alignment.default floatgetIndentY(float fAvailableHeight, float fElementHeight)Get the indentation for a certain vertical alignment.EVertAlignmentgetVertAlign()IMPLTYPEsetVertAlign(EVertAlignment eVertAlign)Set the vertical alignment of this element.-
Methods inherited from interface com.helger.pdflayout.base.IPLHasOutline
getOutlineBottom, getOutlineLeft, getOutlineRight, getOutlineTop, getOutlineXSum, getOutlineYSum
-
Methods inherited from interface com.helger.pdflayout.base.IPLObject
getAsSplittable, getDebugID, hasID, isVertSplittable, setBasicDataFrom
-
Methods inherited from interface com.helger.pdflayout.base.IPLRenderableObject
beforeRender, getPreparedHeight, getPreparedSize, getPreparedWidth, getRenderHeight, getRenderSize, getRenderWidth, isPrepared, prepare, render
-
Methods inherited from interface com.helger.pdflayout.base.IPLVisitable
visit
-
-
-
-
Field Detail
-
DEFAULT_VERT_ALIGNMENT
static final EVertAlignment DEFAULT_VERT_ALIGNMENT
-
-
Method Detail
-
getVertAlign
@Nonnull EVertAlignment getVertAlign()
- Returns:
- The vertical alignment of this element. By default it is
EVertAlignment.DEFAULT. Nevernull. The vertical alignment may only be applied to contained children!
-
setVertAlign
@Nonnull IMPLTYPE setVertAlign(@Nonnull EVertAlignment eVertAlign)
Set the vertical alignment of this element. The vertical alignment may only be applied to contained children!- Parameters:
eVertAlign- The new vertical alignment. May not benull.- Returns:
- this
-
getIndentY
@Nonnegative default float getIndentY(float fAvailableHeight)
Get the indentation for a certain vertical alignment. This method uses the prepared height as the basis for alignment.- Parameters:
fAvailableHeight- The available height of the surrounding element.- Returns:
- The indentation offset. Always ≥ 0.
-
getIndentY
@Nonnegative default float getIndentY(float fAvailableHeight, float fElementHeight)
Get the indentation for a certain vertical alignment. This method uses the provided element height as the basis for alignment.- Parameters:
fAvailableHeight- The available height of the surrounding element. This is usually larger than fElementHeight.fElementHeight- The height of the element to align.- Returns:
- The indentation offset. Always ≥ 0.
-
-