Package swingtree
Enum Class UI.FitComponent
- All Implemented Interfaces:
Serializable
,Comparable<UI.FitComponent>
,Constable
- Enclosing class:
- UI
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.-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionFit the image or icon to the height of the component.Fit the image to the largest dimension of the component.Fit the image to the smallest dimension of the component.Do not fit the image to the component.Fit the image or icon to the width of the component.Fit the image or icon to the width and height of the component. -
Method Summary
Modifier and TypeMethodDescriptionstatic UI.FitComponent
Returns the enum constant of this class with the specified name.static UI.FitComponent[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
WIDTH
Fit the image or icon to the width of the component. -
HEIGHT
Fit the image or icon to the height of the component. -
WIDTH_AND_HEIGHT
Fit the image or icon to the width and height of the component. -
MAX_DIM
Fit the image to the largest dimension of the component. -
MIN_DIM
Fit the image to the smallest dimension of the component. -
NO
Do not fit the image to the component.
-
-
Method Details
-
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
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 nameNullPointerException
- if the argument is null
-