Interface IPLHasHorizontalAlignment<IMPLTYPE extends IPLHasHorizontalAlignment<IMPLTYPE>>

    • Field Detail

      • DEFAULT_HORZ_ALIGNMENT

        static final EHorzAlignment DEFAULT_HORZ_ALIGNMENT
    • Method Detail

      • getHorzAlign

        @Nonnull
        EHorzAlignment getHorzAlign()
        Returns:
        The horizontal alignment of this element. By default it is EHorzAlignment.DEFAULT. Never null. The horizontal alignment may only be applied to contained children!
      • setHorzAlign

        @Nonnull
        IMPLTYPE setHorzAlign​(@Nonnull
                              EHorzAlignment eHorzAlign)
        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 be null.
        Returns:
        this
      • getIndentX

        @Nonnegative
        default float getIndentX​(float fAvailableWidth,
                                 float fElementWidth)
        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.