Class InsetsUtil

java.lang.Object
com.github.tadukoo.view.InsetsUtil

public final class InsetsUtil extends Object
This class provides utility methods for dealing with Insets
Version:
Alpha v.0.2
Author:
Logan Ferree (Tadukoo)
  • Constructor Details

    • InsetsUtil

      private InsetsUtil()
      Can't create InsetsUtil
  • Method Details

    • zeroInsets

      public static Insets zeroInsets(Insets insets)
      Sets the given Insets to 0, unless they're null (then we create a brand new Insets with zeroed values.
      Parameters:
      insets - The Insets object to set to 0, or null
      Returns:
      An Insets object with zeroed values
    • addInsets

      public static Insets addInsets(Insets source, Insets addition)
      Adds the given additional Insets to the source Insets. If either is null, they're treated as 0 insets.
      Parameters:
      source - The Insets to be added to
      addition - The Insets to use for adding
      Returns:
      The source Insets with their new values