Interface LayoutInfo

    • Method Detail

      • getLayoutStage

        LayoutStage getLayoutStage()
        The LayoutStage this element represents. The information will not be complete until the final LayoutStage (LayoutStage.STAGE2 ) has been reached.
        Returns:
        current layout stage.
      • setLayoutStage

        void setLayoutStage​(LayoutStage newStage)
        Parameters:
        newStage - new Layout Stage.
      • getDescentHeight

        float getDescentHeight​(LayoutStage stage)
        Returns the current height of the lower part of this component from the baseline.
        Parameters:
        stage - LayoutStage to get this information for (either LayoutStage.STAGE1 or LayoutStage.STAGE2)
        Returns:
        Height of the lower part.
      • getHorizontalCenterOffset

        float getHorizontalCenterOffset​(LayoutStage stage)
        Retrieve the X-position of the horizontal center of the content. In most cases, this will be width / 2. This does not, however, take extra borders into account. An element may have different border width on left and right, in which case the center will be moved.
        Parameters:
        stage - LayoutStage to get this information for (either LayoutStage.STAGE1 or LayoutStage.STAGE2)
        Returns:
        X-position of the center of the content
      • shiftVertically

        void shiftVertically​(float offsetY,
                             LayoutStage stage)
        Shift vertically by given offset.
        Parameters:
        offsetY - offset to shift.
        stage - Stage to manipulate.
      • setStretchWidth

        void setStretchWidth​(float stretchWidth)
        Set the stretch width for children, or < 0 if children should be horizontally unstretched.
        Parameters:
        stretchWidth - new stretch width
      • getStretchWidth

        float getStretchWidth()
        Retrieve the stretch width if set, or STAGE1.width if unset.
        Returns:
        stretch width.
      • setStretchDescent

        void setStretchDescent​(float stretchDescent)
        Set the stretch descent for children. Defaults to STAGE1.descent
        Parameters:
        stretchDescent - new stretch descent
      • getStretchDescent

        float getStretchDescent()
        Retrieve the stretch descent if set, or STAGE1.descent if unset.
        Returns:
        stretch descent.
      • setStretchAscent

        void setStretchAscent​(float stretchAscent)
        Set the stretch ascent for children. Defaults to STAGE1.ascent
        Parameters:
        stretchAscent - new stretch ascent
      • getStretchAscent

        float getStretchAscent()
        Retrieve the stretch ascent if set, or STAGE1.ascent if unset.
        Returns:
        stretch ascent.
      • setGraphicsObject

        void setGraphicsObject​(GraphicsObject graphicsObject)
        Parameters:
        graphicsObject - the GraphicsObject to set.
      • getGraphicObjects

        java.util.List<GraphicsObject> getGraphicObjects()
        Returns:
        Graphic objects associated with this node.