Class Margin


  • public class Margin
    extends Object
    GraphUI CSS property Margin, scaled space between or around elements and not included in the element's size.

    The CSS margin properties are used to create space around elements, outside of any defined borders.

    Center alignment is defined via Alignment and Margin ignored with only center Alignment w/o Alignment.Bit.Fill scale.

    • Field Detail

      • None

        public static final Margin None
        Zero margin constant.
      • top

        public final float top
        Scaled top value
      • right

        public final float right
        Scaled right value
      • bottom

        public final float bottom
        Scaled bottom value
      • left

        public final float left
        Scaled left value
    • Constructor Detail

      • Margin

        public Margin​(float top,
                      float right,
                      float bottom,
                      float left)
        Ctor
        Parameters:
        top - scaled top value
        right - scaled right value
        bottom - scaled bottom value
        left - scaled left value
      • Margin

        public Margin​(float top,
                      float rl,
                      float bottom)
        Ctor
        Parameters:
        top - scaled top value
        rl - scaled right and left value
        bottom - scaled bottom value
      • Margin

        public Margin​(float tb,
                      float rl)
        Ctor
        Parameters:
        tb - scaled top and bottom value
        rl - scaled right and left value
      • Margin

        public Margin​(float trbl)
        Ctor
        Parameters:
        trbl - scaled top, right, bottom and left value
    • Method Detail

      • width

        public float width()
        Return scaled width of horizontal values top + right. Zero if #isCenteredHoriz().
      • height

        public float height()
        Return scaled height of vertical values bottom + top. Zero if #isCenteredVert().
      • zeroWidth

        public boolean zeroWidth()
      • zeroHeight

        public boolean zeroHeight()
      • zeroSize

        public boolean zeroSize()