Class AlignContext

  • Direct Known Subclasses:
    BoxAlignContext, InlineBlockAlignContext, NodeAlignContext, ReplacedContentAlignContext, TextElementAlignContext

    public abstract class AlignContext
    extends Object
    To position an element inside an box, we need the following data:

    (1) Offset. The distance between the parent's top-edge and the child's top edge.

    (2) Dominant baseline. The childs alignment point is defined by that one.

    (3) Ascent. The distance from the baseline to the top edge.

    (4) descent. The distance from the baseline to the bottom edge.

    Thomas Morgner
    • Constructor Detail

      • AlignContext

        protected AlignContext​(RenderNode node)
    • Method Detail

      • isSimpleNode

        public boolean isSimpleNode()
      • shift

        public abstract void shift​(long delta)
      • getAfterEdge

        public abstract long getAfterEdge()
      • getBeforeEdge

        public abstract long getBeforeEdge()
      • setDominantBaseline

        public void setDominantBaseline​(int dominantBaseline)
      • getDominantBaseline

        public int getDominantBaseline()
      • getBaselineDistance

        public abstract long getBaselineDistance​(int baseline)