Class DimensionUtil

java.lang.Object
com.iamsoft.util.ui.swing.DimensionUtil

public final class DimensionUtil extends Object
Utility methods for Dimensions.
  • Method Summary

    Modifier and Type
    Method
    Description
    static Dimension
    max(Dimension... pDimensions)
    Accepts an array of Dimensions and returns a new Dimension whose width and height are the largest of each width/height in argument dimensions.
    static Dimension
    min(Dimension... pDimensions)
    Accepts an array of Dimensions and returns a new Dimension whose width and height are the smallest of each width/height in argument dimensions.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • min

      public static Dimension min(Dimension... pDimensions)
      Accepts an array of Dimensions and returns a new Dimension whose width and height are the smallest of each width/height in argument dimensions.
      Parameters:
      pDimensions - Dimension to be constrained.
      Returns:
      Dimension whose width and height are the minimum of all argument dimensions.
    • max

      public static Dimension max(Dimension... pDimensions)
      Accepts an array of Dimensions and returns a new Dimension whose width and height are the largest of each width/height in argument dimensions.
      Parameters:
      pDimensions - Dimension to be constrained.
      Returns:
      Dimension whose width and height are the minimum of all argument dimensions.