public class NumberColorMaps extends Object
NumberColorMap
s.
It allows to create and register new maps, and allows a central place to
find registered color maps by name.Modifier and Type | Field and Description |
---|---|
static NumberColorMap |
BONE
BONE ranges from black to white passing from blue.
|
static String |
DEFAULT_NUMBER_COLOR_MAP_NAME |
static NumberColorMap |
GRAY
GRAY ranges from black to white.
|
static NumberColorMap |
HOT
HOT ranges from black to white passing from red and yellow.
|
static NumberColorMap |
HSV
HSV goes through the color wheel: red, yellow, green, cyan, blue, magenta
and back to red.
|
static NumberColorMap |
JET
JET ranges from blue to red, going through cyan and yellow.
|
Modifier and Type | Method and Description |
---|---|
static NumberColorMap |
absolute(List<javafx.scene.paint.Color> colors,
ListDouble values,
javafx.scene.paint.Color nanColor,
String name)
Creates a new
ColorMap where the color list is spaced out
according to the absolute points specified |
static NumberColorMap |
defaultNumberColorMap()
Returns the default
NumberColorMap . |
static Map<String,NumberColorMap> |
getRegisteredColorSchemes()
A set of registered color maps available to all applications.
|
static NumberColorMap |
load(File file)
Loads a
NumberColorMap from a file. |
static NumberColorMapInstance |
optimize(NumberColorMapInstance instance,
Range range)
Returns a new optimized instance created by pre-calculating the colors
in the given range and storing them in an array.
|
static NumberColorMap |
relative(List<javafx.scene.paint.Color> colors,
javafx.scene.paint.Color nanColor,
String name)
Creates a new
ColorMap where the color list is equally
spaced. |
static NumberColorMap |
relative(List<javafx.scene.paint.Color> colors,
ListDouble percentages,
javafx.scene.paint.Color nanColor,
String name)
Creates a new
ColorMap where the color list is spaced out
according to the percentage points specified |
public static final NumberColorMap JET
public static final NumberColorMap GRAY
public static final NumberColorMap BONE
public static final NumberColorMap HOT
public static final NumberColorMap HSV
public static final String DEFAULT_NUMBER_COLOR_MAP_NAME
public static NumberColorMap load(File file)
NumberColorMap
from a file.
It must follow one of the supported format, or an exception is returned. The extension is used to determine which file format is being used.
file
- the color map filepublic static NumberColorMap defaultNumberColorMap()
NumberColorMap
. It searches for DEFAULT_NUMBER_COLOR_MAP_NAME
within the registered maps, and if not found it uses a hard coded version.public static Map<String,NumberColorMap> getRegisteredColorSchemes()
public static NumberColorMapInstance optimize(NumberColorMapInstance instance, Range range)
An optimized map will trade off precision for speed. The color will not change smoothly but will be quantized to the size of the array.
instance
- the color map instance to optimizerange
- the range of values to optimizepublic static NumberColorMap relative(List<javafx.scene.paint.Color> colors, javafx.scene.paint.Color nanColor, String name)
ColorMap
where the color list is equally
spaced.colors
- the list of colors used for the valuesnanColor
- the color used for NaN valuesname
- the name of the color mappublic static NumberColorMap relative(List<javafx.scene.paint.Color> colors, ListDouble percentages, javafx.scene.paint.Color nanColor, String name)
ColorMap
where the color list is spaced out
according to the percentage points specifiedcolors
- the list of colors usedpercentages
- the list of percentages position that divide up the colorsnanColor
- the color used for Nan valuesname
- the name of the color mappublic static NumberColorMap absolute(List<javafx.scene.paint.Color> colors, ListDouble values, javafx.scene.paint.Color nanColor, String name)
ColorMap
where the color list is spaced out
according to the absolute points specifiedcolors
- the list of colors usedvalues
- the list of absolute position that divide up the colorsnanColor
- the color used for Nan valuesname
- the name of the color mapCopyright © 2015. All rights reserved.