Class Insets

java.lang.Object
javafx.geometry.Insets

public class Insets extends Object
A set of inside offsets for the 4 side of a rectangular area
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static Insets
    Empty insets.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Insets(double topRightBottomLeft)
    Constructs a new Insets instance with same value for all four offsets.
    Insets(double top, double right, double bottom, double left)
    Constructs a new Insets instance with four different offsets.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Indicates whether some other object is "equal to" this one.
    final double
    The inset on the bottom side
    final double
    The inset on the left side
    final double
    The inset on the right side
    final double
    The inset on the top side
    int
    Returns a hash code value for the insets.
    Returns a string representation for the insets.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Field Details

    • EMPTY

      public static Insets EMPTY
      Empty insets. An Insets instance with all offsets equal to zero.
  • Constructor Details

    • Insets

      public Insets(double top, double right, double bottom, double left)
      Constructs a new Insets instance with four different offsets.
      Parameters:
      top - the top offset
      right - the right offset
      bottom - the bottom offset
      left - the left offset
    • Insets

      public Insets(double topRightBottomLeft)
      Constructs a new Insets instance with same value for all four offsets.
      Parameters:
      topRightBottomLeft - the value used for top, bottom, right and left offset
  • Method Details

    • getTop

      public final double getTop()
      The inset on the top side
    • getRight

      public final double getRight()
      The inset on the right side
    • getBottom

      public final double getBottom()
      The inset on the bottom side
    • getLeft

      public final double getLeft()
      The inset on the left side
    • equals

      public boolean equals(Object obj)
      Indicates whether some other object is "equal to" this one.
      Overrides:
      equals in class Object
      Parameters:
      obj - the reference object with which to compare
      Returns:
      true if this object is the same as the obj argument; false otherwise
    • hashCode

      public int hashCode()
      Returns a hash code value for the insets.
      Overrides:
      hashCode in class Object
      Returns:
      a hash code value for the insets.
    • toString

      public String toString()
      Returns a string representation for the insets.
      Overrides:
      toString in class Object
      Returns:
      a string representation for the insets.