Class Insets

    • Constructor Detail

      • Insets

        public Insets()
      • Insets

        public Insets​(int left,
                      int right,
                      int top,
                      int bottom)
    • Method Detail

      • getLeftWidth

        public final int getLeftWidth()
        Specified by:
        getLeftWidth in interface InsetsImmutable
        Returns:
        left inset width in window units.
      • getRightWidth

        public final int getRightWidth()
        Specified by:
        getRightWidth in interface InsetsImmutable
        Returns:
        right inset width in window units.
      • getTotalWidth

        public final int getTotalWidth()
        Specified by:
        getTotalWidth in interface InsetsImmutable
        Returns:
        total width in window units, ie. left_width + right_width
      • getTopHeight

        public final int getTopHeight()
        Specified by:
        getTopHeight in interface InsetsImmutable
        Returns:
        top inset height in window units.
      • getBottomHeight

        public final int getBottomHeight()
        Specified by:
        getBottomHeight in interface InsetsImmutable
        Returns:
        bottom inset height in window units.
      • getTotalHeight

        public final int getTotalHeight()
        Specified by:
        getTotalHeight in interface InsetsImmutable
        Returns:
        total height in window units, ie. top_height + bottom_height
      • set

        public final void set​(int left,
                              int right,
                              int top,
                              int bottom)
        Set the inset values of this instance in window units.
        Parameters:
        left - left inset width in window units.
        right - right inset width in window units.
        top - top inset width in window units.
        bottom - bottom inset width in window units.
      • setLeftWidth

        public final void setLeftWidth​(int left)
        Set the left inset value of this instance in window units.
        Parameters:
        left - left inset width in window units.
      • setRightWidth

        public final void setRightWidth​(int right)
        Set the right inset value of this instance in window units.
        Parameters:
        right - right inset width in window units.
      • setTopHeight

        public final void setTopHeight​(int top)
        Set the top inset value of this instance in window units.
        Parameters:
        top - top inset width in window units.
      • setBottomHeight

        public final void setBottomHeight​(int bottom)
        Set the bottom inset value of this instance in window units.
        Parameters:
        bottom - bottom inset width in window units.
      • equals

        public boolean equals​(Object obj)
        Description copied from interface: InsetsImmutable
        Checks whether two rect objects are equal. Two instances of Insets are equal if the four integer values of the fields left, right, top, and bottom are all equal.
        Specified by:
        equals in interface InsetsImmutable
        Overrides:
        equals in class Object
        Returns:
        true if the two Insets are equal; otherwise false.