public class

Colormap

extends Object
java.lang.Object
   ↳ com.esri.core.renderer.Colormap

Class Overview

A colormap defines a mapping of integer values to colors, with a label for each pair. This can be used with a ColormapRenderer to specify the rendering of a raster layer. The pixels in the raster will be rendered based on the color that each pixel value maps to.

Summary

Nested Classes
class Colormap.UniqueValue A UniqueValue of a Colormap refers to a single pixel value to color mapping. 
Public Constructors
Colormap()
Creates an empty Colormap.
Colormap(List<Colormap.UniqueValue> uniqueValues)
Creates a Colormap with the specified UniqueValues.
Public Methods
void addUniqueValue(Colormap.UniqueValue uniqueValue)
Adds a UniqueValue to the Colormap's list of UniqueValues.
int getMaxValue()
Gets the maximum of the pixel values in the Colormap, or Integer.MAX_VALUE if the colormap is empty.
int getMinValue()
Gets the minimum of the pixel values in the Colormap, or Integer.MIN_VALUE if the colormap is empty.
List<Colormap.UniqueValue> getUniqueValues()
Gets the list of UniqueValues that make up this Colormap.
void removeUniqueValue(Colormap.UniqueValue uniqueValue)
Removes a UniqueValue from the Colormap's list of Uniquevalues.
void setUniqueValues(List<Colormap.UniqueValue> uniqueValues)
Sets the list of UniqueValues that make up this Colormap.
String toJson()
Generates a json representation of the renderer.
Protected Methods
void toJson(JsonGenerator node)
Generates a json representation of the Colormap.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public Colormap ()

Creates an empty Colormap.

public Colormap (List<Colormap.UniqueValue> uniqueValues)

Creates a Colormap with the specified UniqueValues.

Parameters
uniqueValues List: the Colormap's UniqueValues

Public Methods

public void addUniqueValue (Colormap.UniqueValue uniqueValue)

Adds a UniqueValue to the Colormap's list of UniqueValues.

Parameters
uniqueValue Colormap.UniqueValue: the UniqueValue to add

public int getMaxValue ()

Gets the maximum of the pixel values in the Colormap, or Integer.MAX_VALUE if the colormap is empty.

Returns
int the maximum of the pixel values in the Colormap

public int getMinValue ()

Gets the minimum of the pixel values in the Colormap, or Integer.MIN_VALUE if the colormap is empty.

Returns
int the minimum of the pixel values in the Colormap

public List<Colormap.UniqueValue> getUniqueValues ()

Gets the list of UniqueValues that make up this Colormap.

Returns
List<Colormap.UniqueValue> the UniqueValues that make up this Colormap

public void removeUniqueValue (Colormap.UniqueValue uniqueValue)

Removes a UniqueValue from the Colormap's list of Uniquevalues.

Parameters
uniqueValue Colormap.UniqueValue: the UniqueValue to remove

public void setUniqueValues (List<Colormap.UniqueValue> uniqueValues)

Sets the list of UniqueValues that make up this Colormap.

Parameters
uniqueValues List: the UniqueValues that make up this Colormap

public String toJson ()

Generates a json representation of the renderer.

Returns
String the json representation of the renderer
Throws
Exception

Protected Methods

protected void toJson (JsonGenerator node)

Generates a json representation of the Colormap.

Parameters
node JsonGenerator: The node to write the json to
Throws
Exception
Exception