com.esri.core.internal.value
Class RampDefinition

java.lang.Object
  extended by com.esri.core.internal.value.RampDefinition

public class RampDefinition
extends Object

This class is used to store the properties of an AlgorithmicColorRamp and serialize/deserialize to/from JSON.


Nested Class Summary
static class RampDefinition.Algorithm
          Defines an algorithm used by a map server to generate a color ramp given starting and ending colors.
 
Constructor Summary
RampDefinition(int from, int to, RampDefinition.Algorithm algorithm)
          Instantiates a new ramp definition with the given from and to colors and the given algorithm.
 
Method Summary
 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.
protected  void toJson(org.codehaus.jackson.JsonGenerator node)
          Write this class to the given JsonNode.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RampDefinition

public RampDefinition(int from,
                      int to,
                      RampDefinition.Algorithm algorithm)
Instantiates a new ramp definition with the given from and to colors and the given algorithm.

Parameters:
from - the from
to - the to
algorithm - the algorithm
See Also:
RampDefinition.Algorithm
Method Detail

getFromColor

public int getFromColor()
Gets the from color.

Returns:
the from color

setFromColor

public void setFromColor(int fromColor)
Sets the from color.

Parameters:
fromColor - the new from color

getToColor

public int getToColor()
Gets the to color.

Returns:
the to color

setToColor

public void setToColor(int toColor)
Sets the to color.

Parameters:
toColor - the new to color

getAlgorithm

public RampDefinition.Algorithm getAlgorithm()
Gets the algorithm used to generate intermediate colors between the from color and the to color.

Returns:
the algorithm

setAlgorithm

public void setAlgorithm(RampDefinition.Algorithm algorithm)
Sets the algorithm used to generate intermediate colors between the from color and the to color.

Parameters:
algorithm - the new algorithm
See Also:
RampDefinition.Algorithm

toJson

protected void toJson(org.codehaus.jackson.JsonGenerator node)
               throws Exception
Write this class to the given JsonNode.

Parameters:
node - the node to write this instance's value to
Throws:
Exception - the exception


Copyright © 2012. All Rights Reserved.