public class Colors extends Object implements Cloneable, Serializable
ElementKind.
The currently supported color names are:
"red", "green", "yellow", "blue", "magenta", "cyan",
"gray".WKTFormat.getColors(),
WKTFormat.setColors(Colors),
Serialized FormDefined in the sis-metadata module
| Modifier and Type | Field and Description |
|---|---|
static Colors |
DEFAULT
The default colors used by
FormattableObject.print(). |
static Colors |
NAMING
Emphases on identification information
(name and
identifiers) only.
|
| Constructor and Description |
|---|
Colors()
Creates a new, initially empty, set of colors.
|
Colors(Colors colors)
Creates a new set of colors initialized to a copy of the given one.
|
| Modifier and Type | Method and Description |
|---|---|
Colors |
clone()
Returns a clone of this
Colors. |
boolean |
equals(Object other)
Compares this
Colors with the given object for equality. |
String |
getName(ElementKind key)
Returns the color for the given syntactic element.
|
int |
hashCode()
Returns a hash code value for this object.
|
void |
setName(ElementKind key,
String color)
Sets the color of the given syntactic element from a color name.
|
public static final Colors DEFAULT
FormattableObject.print().
Those colors give better results on a Console with black background.
This map is immutable.FormattableObject.print()public static final Colors NAMING
public Colors()
public Colors(Colors colors)
colors - the set of colors to copy.public void setName(ElementKind key, String color) throws IllegalArgumentException
"red", "green", "yellow", "blue", "magenta", "cyan"
and "gray", case-insensitive.key - the syntactic element for which to set the color.color - the color to give to the specified element, or null if none.IllegalArgumentException - if the given color name is not recognized.public final String getName(ElementKind key)
key - the syntactic element for which to get the color.null if none.public Colors clone()
Colors.public boolean equals(Object other)
Colors with the given object for equality.Copyright © 2010–2017 The Apache Software Foundation. All rights reserved.