public class

AlgorithmicColorRamp

extends ColorRamp
java.lang.Object
   ↳ com.esri.core.renderer.ColorRamp
     ↳ com.esri.core.renderer.AlgorithmicColorRamp

Class Overview

This class defines an algorithmically generated color ramp to be used by a server when generating a class breaks or unique value renderer. The color ramp is defined by from and to colors and an algorithm that should be used to generate the intermediate colors.

Summary

Public Constructors
AlgorithmicColorRamp(int from, int to, RampDefinition.Algorithm algorithm)
Instantiates a new algorithmic color ramp using the given from and to colors and the given algorithm.
AlgorithmicColorRamp(RampDefinition rampDefinition)
Instantiates a new algorithmic color ramp from a given RampDefinition.
AlgorithmicColorRamp(JsonNode node)
Instantiates a new algorithmic color ramp from the given JsonNode.
Public Methods
RampDefinition.Algorithm getAlgorithm()
Gets the algorithm used to generate intermediate colors between the from color and the to color.
int getFromColor()
Gets the from color.
int getToColor()
Gets the to color.
void setAlgorithm(RampDefinition.Algorithm algorithm)
Sets the algorithm used to generate intermediate colors between the from color and the to color.
void setFromColor(int fromColor)
Sets the from color.
void setToColor(int toColor)
Sets the to color.
String toString()
Protected Methods
void toJson(JsonGenerator node)
This method is used by toJson() to turn this instance into a JSON string.
[Expand]
Inherited Methods
From class com.esri.core.renderer.ColorRamp
From class java.lang.Object

Public Constructors

public AlgorithmicColorRamp (int from, int to, RampDefinition.Algorithm algorithm)

Instantiates a new algorithmic color ramp using the given from and to colors and the given algorithm.

Parameters
from int: the from color
to int: the to color
algorithm RampDefinition.Algorithm: the algorithm used to generate intermediate colors

public AlgorithmicColorRamp (RampDefinition rampDefinition)

Instantiates a new algorithmic color ramp from a given RampDefinition.

Parameters
rampDefinition RampDefinition: the ramp definition that will define this color ramp

public AlgorithmicColorRamp (JsonNode node)

Instantiates a new algorithmic color ramp from the given JsonNode.

Parameters
node JsonNode: the node defining an algorithmic color ramp

Public Methods

public RampDefinition.Algorithm getAlgorithm ()

Gets the algorithm used to generate intermediate colors between the from color and the to color.

Returns
RampDefinition.Algorithm the algorithm

public int getFromColor ()

Gets the from color.

Returns
int the from color

public int getToColor ()

Gets the to color.

Returns
int the to color

public void setAlgorithm (RampDefinition.Algorithm algorithm)

Sets the algorithm used to generate intermediate colors between the from color and the to color.

Parameters
algorithm RampDefinition.Algorithm: the new algorithm

public void setFromColor (int fromColor)

Sets the from color.

Parameters
fromColor int: the new from color

public void setToColor (int toColor)

Sets the to color.

Parameters
toColor int: the new to color

public String toString ()

Returns
String

Protected Methods

protected void toJson (JsonGenerator node)

This method is used by toJson() to turn this instance into a JSON string.

This method should be overridden in subclasses to add their class data to the given JSON node. Note that this base class method should be called by the override.

Parameters
node JsonGenerator: the node
Throws
IOException
JsonGenerationException
Exception