- All Implemented Interfaces:
Serializable
,Comparable<AsciiColorPalette>
,java.lang.constant.Constable
An enumeration for text palette definitions to make it easy working with such
default palettes. Such palettes can be used when drawing ASCII art, each
character element in a palette represents a gray scale, from bright (first
element) to dark (last element).
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionThis palate contains block characters representing shade patterns from white to black representing gray scale colors in terms of ASCII art.This palate contains the full set of characters from white to black representing gray scale colors in terms of ASCII art.This palate contains a minimal set of characters from white to black representing gray scale colors in terms of ASCII art.This palate contains block characters representing shade patterns from white to black representing gray scale colors in terms of ASCII art.This palate contains a normal set of characters from white to black representing gray scale colors in terms of ASCII art. -
Method Summary
Modifier and TypeMethodDescriptionstatic AsciiColorPalette
fromPaletteName
(String aPaletteName) Retrieves the enumeration element representing the given palette name (ignoring the case) or null if none was found.char[]
Returns the palette for the according enumeration element.char[]
Returns the palette for the according enumeration element.static AsciiColorPalette
Returns the enum constant of this type with the specified name.static AsciiColorPalette[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
MIN_LEVEL_GRAY
This palate contains a minimal set of characters from white to black representing gray scale colors in terms of ASCII art. -
NORM_LEVEL_GRAY
This palate contains a normal set of characters from white to black representing gray scale colors in terms of ASCII art. -
MAX_LEVEL_GRAY
This palate contains the full set of characters from white to black representing gray scale colors in terms of ASCII art. -
HALFTONE_GRAY
This palate contains block characters representing shade patterns from white to black representing gray scale colors in terms of ASCII art. -
MONOCHROME
This palate contains block characters representing shade patterns from white to black representing gray scale colors in terms of ASCII art.
-
-
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
-
getPalette
public char[] getPalette()Returns the palette for the according enumeration element.- Returns:
- The according palette.
-
toInverse
public char[] toInverse()Returns the palette for the according enumeration element.- Returns:
- The according palette.
-
fromPaletteName
Retrieves the enumeration element representing the given palette name (ignoring the case) or null if none was found.- Parameters:
aPaletteName
- The palette name for which to get the enumeration element.- Returns:
- The enumeration element determined or null if none matching was found.
-