Package com.helger.pdflayout.base
Interface IPLHasHorizontalAlignment<IMPLTYPE extends IPLHasHorizontalAlignment<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,AbstractPLText,PLBox,PLTableCell,PLText
public interface IPLHasHorizontalAlignment<IMPLTYPE extends IPLHasHorizontalAlignment<IMPLTYPE>>
extends IPLRenderableObject<IMPLTYPE>
Base interface for objects with a horizontal alignment
- Author:
- Philip Helger
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptiondefault floatgetIndentX(float fAvailableWidth, float fElementWidth) Get the indentation for a certain horizontal alignment.setHorzAlign(EHorzAlignment eHorzAlign) Set the horizontal alignment of this element.Methods inherited from interface com.helger.commons.traits.IGenericImplTrait
thisAsTMethods inherited from interface com.helger.commons.id.IHasID
getIDMethods inherited from interface com.helger.pdflayout.base.IPLHasOutline
getOutlineBottom, getOutlineLeft, getOutlineRight, getOutlineTop, getOutlineXSum, getOutlineYSumMethods inherited from interface com.helger.pdflayout.base.IPLObject
getAsSplittable, getDebugID, hasID, isVertSplittable, setBasicDataFromMethods inherited from interface com.helger.pdflayout.base.IPLRenderableObject
beforeRender, getPreparedHeight, getPreparedSize, getPreparedWidth, getRenderHeight, getRenderSize, getRenderWidth, isPrepared, prepare, renderMethods inherited from interface com.helger.pdflayout.base.IPLVisitable
visit
-
Field Details
-
DEFAULT_HORZ_ALIGNMENT
-
-
Method Details
-
getHorzAlign
- Returns:
- The horizontal alignment of this element. By default it is
EHorzAlignment.DEFAULT. Nevernull. The horizontal alignment may only be applied to contained children!
-
setHorzAlign
Set the horizontal alignment of this element. The horizontal alignment may only be applied to contained children!- Parameters:
eHorzAlign- The new horizontal alignment. May not benull.- Returns:
- this
-
getIndentX
Get the indentation for a certain horizontal alignment. This method uses the provided element width as the basis for alignment.- Parameters:
fAvailableWidth- The available width of the surrounding element. This is usually larger than fElementWidth.fElementWidth- The width of the element to align.- Returns:
- The indentation offset. Always ≥ 0.
-