Enum Class AxisConfig

java.lang.Object
java.lang.Enum<AxisConfig>
codechicken.lib.gui.modular.lib.geometry.AxisConfig
All Implemented Interfaces:
Serializable, Comparable<AxisConfig>, Constable

public enum AxisConfig extends Enum<AxisConfig>
Denies how each of the three axis parameters are computed based on the available constraints. Note: If both min and max are defined, size is ignored.
  • Enum Constant Details

    • NONE

      public static final AxisConfig NONE
      If nothing is constrained. min=0, max=0, size=0
    • MIN_ONLY

      public static final AxisConfig MIN_ONLY
      If only Min is constrained. min=min, max=min, size=0
    • MAX_ONLY

      public static final AxisConfig MAX_ONLY
      If only Max is constrained. min=max, max=max, size=0
    • SIZE_ONLY

      public static final AxisConfig SIZE_ONLY
      If only Size is constrained. min=0, max=size, size=size
    • MIN_SIZE

      public static final AxisConfig MIN_SIZE
      If Min and Size are constrained . min=min, max=min+size, size=size
    • MAX_SIZE

      public static final AxisConfig MAX_SIZE
      If Max and Size are constrained. min=max-size, max=max, size=size
    • MIN_MAX

      public static final AxisConfig MIN_MAX
      If Min and Max are constrained. min=min, max=max, size=max-min
    • MIN_MAX_SIZE

      public static final AxisConfig MIN_MAX_SIZE
      If Min, Max and Size are constrained the Size is ignored. min=min, max=max, size=max-min
  • Field Details

  • Method Details

    • values

      public static AxisConfig[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static AxisConfig valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • getConfigFor

      public static AxisConfig getConfigFor(@Nullable @Nullable Constraint min, @Nullable @Nullable Constraint max, @Nullable @Nullable Constraint size)