Package swingtree

Enum Class UI.FitComponent

java.lang.Object
java.lang.Enum<UI.FitComponent>
swingtree.UI.FitComponent
All Implemented Interfaces:
Serializable, Comparable<UI.FitComponent>, Constable
Enclosing class:
UI

public static enum UI.FitComponent extends Enum<UI.FitComponent>
This enum is used to specify how an image or icon (usually a SvgIcon) should be scaled to fit the dimensions of the component that it is being rendered into, like for example through the SvgIcon.paintIcon(java.awt.Component, Graphics, int, int) method.
  • Enum Constant Details

    • WIDTH

      public static final UI.FitComponent WIDTH
      Fit the image or icon to the width of the component.
    • HEIGHT

      public static final UI.FitComponent HEIGHT
      Fit the image or icon to the height of the component.
    • WIDTH_AND_HEIGHT

      public static final UI.FitComponent WIDTH_AND_HEIGHT
      Fit the image or icon to the width and height of the component.
    • MAX_DIM

      public static final UI.FitComponent MAX_DIM
      Fit the image to the largest dimension of the component.
    • MIN_DIM

      public static final UI.FitComponent MIN_DIM
      Fit the image to the smallest dimension of the component.
    • NO

      public static final UI.FitComponent NO
      Do not fit the image to the component.
  • Method Details

    • values

      public static UI.FitComponent[] 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 UI.FitComponent 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