- All Implemented Interfaces:
Serializable
,Comparable<ImageColorModel>
,Constable
Enumeration of supported color models (RGB, CMYK).
Defines the color models that can be used when exporting barcode images to vector formats (PDF and EPS). RGB is typically used for screen display and digital distribution, while CMYK is preferred for professional printing workflows.
Each color model has a unique integer ID which can be used for efficient storage in a file or
database. The IDs are small positive integers (1-2) that can be safely cast to byte if needed.
See getID()
and valueOf(int id)
.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionint
getID()
Returns the integer ID associated with this color model.static ImageColorModel
valueOf
(int id) Returns the enum constant of this class associated with the specified integer ID.static ImageColorModel
Returns the enum constant of this class with the specified name.static ImageColorModel[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
RGB
Red-Green-Blue color model. -
CMYK
Cyan-Magenta-Yellow-Key color model.
-
-
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
-
valueOf
Returns the enum constant of this class associated with the specified integer ID.- Parameters:
id
- the ID of the enum constant to be returned- Returns:
- the enum constant associated with the specified ID
- Throws:
IllegalArgumentException
- if this enum class has no constant associated with the specified ID
-
getID
public int getID()Returns the integer ID associated with this color model.- Returns:
- the integer ID associated with this color model
- See Also:
-