|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.esri.core.renderer.ClassBreaksRenderer
public class ClassBreaksRenderer
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.
Field Summary | |
---|---|
static String |
TYPE
The Constant TYPE. |
Constructor Summary | |
---|---|
ClassBreaksRenderer()
The Constructor. |
|
ClassBreaksRenderer(org.codehaus.jackson.JsonNode node)
Instantiates ClassBreaksRenderer from a Json node object. |
Method Summary | |
---|---|
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. |
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. |
Symbol |
getSymbol(Graphic graphic)
Returns the symbol of the class break the graphic provided belongs to. |
boolean |
removeClassBreak(ClassBreak classbreak)
Removes a class break. |
void |
setClassBreakInfos(TreeMap<Double,ClassBreak> classBreakInfos)
Sets class break information map. |
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. |
String |
toJson()
Converts into a JSON string. |
List<FeatureTemplate> |
toTemplates(Geometry.Type type)
Creates templates out of the renderer. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String TYPE
Constructor Detail |
---|
public ClassBreaksRenderer()
public ClassBreaksRenderer(org.codehaus.jackson.JsonNode node) throws Exception
node
- the node
Exception
- the exceptionMethod Detail |
---|
public Symbol getSymbol(Graphic graphic)
getSymbol
in interface Renderer<Graphic>
graphic
- the graphic to be symbolized
public String getField()
public void setField(String field)
field
- the field to setpublic double getMinValue()
public void setMinValue(double minValue)
minValue
- the minimum value to setpublic TreeMap<Double,ClassBreak> getClassBreakInfos()
public void setClassBreakInfos(TreeMap<Double,ClassBreak> classBreakInfos)
classBreakInfos
- a TreeMap object in which class break's maximum value maps to class break.public boolean addClassBreak(ClassBreak classbreak)
classbreak
- a class break.
public boolean removeClassBreak(ClassBreak classbreak)
classbreak
- a class break.
public String toJson() throws Exception
toJson
in interface Renderer<Graphic>
Exception
- the exceptionpublic List<FeatureTemplate> toTemplates(Geometry.Type type)
type
- the geometry type. The templates are defined on feature layers, the geometry type is defined on feature
layers.
public Symbol getDefaultSymbol()
public void setDefaultSymbol(Symbol defaultSymbol)
defaultSymbol
- The defaultSymbol to set.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |