public class

ClassBreaksRenderer

extends BaseRenderer
java.lang.Object
   ↳ com.esri.core.renderer.BaseRenderer
     ↳ com.esri.core.renderer.ClassBreaksRenderer

Class Overview

A class breaks renderer symbolizes each graphic based on the value of some numeric attribute. Graphics with similar values for the attribute get the same symbol. The "breaks" define the values at which the symbology changes. Each break has a value range determined by its maximum value and implicit minimum value.

For example, suppose you have a "buildings" layer with an attribute that defines the building age. You want to symbolize buildings constructed since the year 2000 in green, buildings constructed between 1980 and 2000 in yellow, and buildings built before 1980 with red. This would be a good scenario for a class breaks renderer.

Summary

Constants
String TYPE The Constant TYPE.
[Expand]
Inherited Fields
From class com.esri.core.renderer.BaseRenderer
Public Constructors
ClassBreaksRenderer()
The Constructor.
ClassBreaksRenderer(JsonNode node)
Instantiates ClassBreaksRenderer from a Json node object.
Public Methods
boolean addClassBreak(ClassBreak classbreak)
Adds a class break.
TreeMap<Double, ClassBreak> getClassBreakInfos()
Returns a TreeMap object in which class break's maximum value maps to class break.
String getDefaultLabel()
Symbol getDefaultSymbol()
Gets the default symbol of the ClassBreaksRenderer.
String getField()
Gets the attribute field used by renderer to match values.
double getMinValue()
Gets the minimum value.
String getNormalizationField()
double getNormalizationTotal()
NormalizationType getNormalizationType()
Symbol getSymbol(Feature graphic)
Symbol getSymbol(Graphic graphic)
This method is deprecated. please use getSymbol(Feature)
boolean removeClassBreak(ClassBreak classbreak)
Removes a class break.
void setClassBreakInfos(TreeMap<Double, ClassBreak> classBreakInfos)
Sets class break information map.
void setDefaultLabel(String defaultLabel)
void setDefaultSymbol(Symbol defaultSymbol)
Sets the default symbol of the ClassBreaksRenderer.
void setField(String field)
Sets the attribute field used by renderer to match values.
void setMinValue(double minValue)
Sets minimum value.
void setNormalizationField(String normalizeField)
void setNormalizationTotal(double normalizeTotal)
void setNormalizationType(NormalizationType normalizeType)
List<FeatureTemplate> toTemplates(Geometry.Type type)
Creates templates out of the renderer.
Protected Methods
String getType()
void toJson(JsonGenerator node)
[Expand]
Inherited Methods
From class com.esri.core.renderer.BaseRenderer
From class java.lang.Object
From interface com.esri.core.renderer.Renderer

Constants

public static final String TYPE

The Constant TYPE.

Constant Value: "classBreaks"

Public Constructors

public ClassBreaksRenderer ()

The Constructor.

public ClassBreaksRenderer (JsonNode node)

Instantiates ClassBreaksRenderer from a Json node object.

Parameters
node JsonNode: the node
Throws
Exception the exception

Public Methods

public boolean addClassBreak (ClassBreak classbreak)

Adds a class break.

Parameters
classbreak ClassBreak: a class break.
Returns
boolean true, if adds the class break

public TreeMap<Double, ClassBreak> getClassBreakInfos ()

Returns a TreeMap object in which class break's maximum value maps to class break.

Returns
TreeMap<Double, ClassBreak> the class breaks information map.

public String getDefaultLabel ()

Returns
String the defaultLabel

public Symbol getDefaultSymbol ()

Gets the default symbol of the ClassBreaksRenderer. It will be used on the values which in the ranges.

Returns
Symbol Returns the defaultSymbol.

public String getField ()

Gets the attribute field used by renderer to match values.

Returns
String the field.

public double getMinValue ()

Gets the minimum value.

Returns
double the minimum value.

public String getNormalizationField ()

Returns
String the normalizeField

public double getNormalizationTotal ()

Returns
double the normalizeTotal

public NormalizationType getNormalizationType ()

Returns
NormalizationType the normalized Type

public Symbol getSymbol (Feature graphic)

Parameters
graphic Feature
Returns
Symbol

public Symbol getSymbol (Graphic graphic)

This method is deprecated.
please use getSymbol(Feature)

Returns the symbol of the class break the graphic provided belongs to.

Parameters
graphic Graphic: the graphic to be symbolized
Returns
Symbol the symbol

public boolean removeClassBreak (ClassBreak classbreak)

Removes a class break.

Parameters
classbreak ClassBreak: a class break.
Returns
boolean true if the class break is removed successfully.

public void setClassBreakInfos (TreeMap<Double, ClassBreak> classBreakInfos)

Sets class break information map.

Parameters
classBreakInfos TreeMap: a TreeMap object in which class break's maximum value maps to class break.

public void setDefaultLabel (String defaultLabel)

Parameters
defaultLabel String: the defaultLabel to set

public void setDefaultSymbol (Symbol defaultSymbol)

Sets the default symbol of the ClassBreaksRenderer. It is null by default.

Parameters
defaultSymbol Symbol: The defaultSymbol to set.

public void setField (String field)

Sets the attribute field used by renderer to match values.

Parameters
field String: the field to set

public void setMinValue (double minValue)

Sets minimum value.

Parameters
minValue double: the minimum value to set

public void setNormalizationField (String normalizeField)

Parameters
normalizeField String: the normalizeField to set

public void setNormalizationTotal (double normalizeTotal)

Parameters
normalizeTotal double: the normalizeTotal to set

public void setNormalizationType (NormalizationType normalizeType)

Parameters
normalizeType NormalizationType: the normalizeType to set

public List<FeatureTemplate> toTemplates (Geometry.Type type)

Creates templates out of the renderer.

Parameters
type Geometry.Type: the geometry type. The templates are defined on feature layers, the geometry type is defined on feature layers.
Returns
List<FeatureTemplate> the list< feature template>

Protected Methods

protected String getType ()

Returns
String

protected void toJson (JsonGenerator node)

Parameters
node JsonGenerator
Throws
Exception