Enum ColorModelType
- All Implemented Interfaces:
Serializable
,Comparable<ColorModelType>
,java.lang.constant.Constable
Information about the color model. This enumeration provides an easier way of determining
whether the color ramp can be replaced, and whether it should be replaced
for performance reasons.
- Since:
- 1.1
- Version:
- 1.3
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum Constants -
Field Summary
FieldsModifier and TypeFieldDescriptionfinal boolean
Whether rendering with this color model is slow.final boolean
Whether the color model uses a color palette. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivate
ColorModelType
(boolean useColorRamp, boolean isSlow) Creates a new enumeration value. -
Method Summary
Modifier and TypeMethodDescriptionstatic ColorModelType
find
(ColorModel model) Gets the type of given color model.static ColorModelType
Returns the enum constant of this type with the specified name.static ColorModelType[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
DIRECT
Color model uses directly RGB colors. This model is efficient and should not be changed. Color palette cannot be changed. -
INDEXED
Color model uses indexed colors. This model is efficient and does not need to be changed. Color palette can be changed. -
SCALED
Color model uses colors computed on the fly from floating point values. This model is inefficient and should be changed if possible. -
OTHER
Unrecognized color model. Includes the case where the color model is null. Must be flagged as "slow" for forcing the creation of a new color model.
-
-
Field Details
-
useColorRamp
public final boolean useColorRampWhether the color model uses a color palette. Atrue
value implies that the color ramp is replaceable. -
isSlow
public final boolean isSlowWhether rendering with this color model is slow. In such case, the color model may need to be changed usingColorizer
.
-
-
Constructor Details
-
ColorModelType
private ColorModelType(boolean useColorRamp, boolean isSlow) Creates a new enumeration value.
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type has no constant with the specified nameNullPointerException
- if the argument is null
-
find
Gets the type of given color model.- Parameters:
model
- the color model (may benull
).- Returns:
- type of given color model (never
null
).
-