java.lang.Object | |
↳ | com.esri.core.renderer.UniqueValueRenderer |
A unique value renderer symbolizes groups of graphics that have matching attributes. This is most common with nominal, or string data. For example, you could use a unique value renderer to symbolize zoning designations: yellow for "Residential", purple for "Industrial", red for "Commercial", and so on. You can also use unique value renderers on numeric fields that are coded values, or on ordinal attributes such as "First", "Second", "Third", and so on. Typically features are rendered based on the unique values of one attribute field. However, up to three fields can be combined to generate a unique value.
Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
String | TYPE | The Constant TYPE. |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
UniqueValueRenderer()
Instantiates an empty UniqueValueRenderer object.
| |||||||||||
UniqueValueRenderer(JsonNode node)
Instantiates ClassBreak from a Json node object.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
boolean |
addUniqueValue(UniqueValue uniqueValue)
Adds a unique value.
| ||||||||||
String |
getDefaultLabel()
Gets the default label.
| ||||||||||
Symbol |
getDefaultSymbol()
Gets the default symbol.
| ||||||||||
String |
getField1()
Gets the first attribute field.
| ||||||||||
String |
getField2()
Gets the second attribute field.
| ||||||||||
String |
getField3()
Gets the third attribute field.
| ||||||||||
String |
getFieldDelimiter()
Gets field delimiter.
| ||||||||||
Symbol |
getSymbol(Graphic graphic)
Returns the symbol of the unique value the graphic provided corresponds to.
| ||||||||||
List<UniqueValue> |
getUniqueValueInfos()
Gets a list of unique values.
| ||||||||||
boolean |
removeUniqueValue(UniqueValue uniqueValue)
Removes a unique value.
| ||||||||||
void |
setDefaultLabel(String defaultLabel)
Sets the default label.
| ||||||||||
void |
setDefaultSymbol(Symbol defaultSymbol)
Sets the default symbol.
| ||||||||||
void |
setField1(String field1)
Sets the first attribute field.
| ||||||||||
void |
setField2(String field2)
Sets the second attribute field.
| ||||||||||
void |
setField3(String field3)
Sets the third attribute field.
| ||||||||||
void |
setFieldDelimiter(String fieldDelimiter)
Sets field delimiter.
| ||||||||||
void |
setUniqueValueInfos(List<UniqueValue> uniqueValueInfos)
Sets unique values.
| ||||||||||
String |
toJson()
Converts into a JSON string.
| ||||||||||
FeatureType[] |
toTypes(Field[] fields, Geometry.Type type)
Creates templates out of the renderer.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
| |||||||||||
From interface
com.esri.core.renderer.Renderer
|
Instantiates an empty UniqueValueRenderer object.
Instantiates ClassBreak from a Json node object.
node | the node |
---|
Exception | the exception |
---|
Adds a unique value.
uniqueValue | the unique value to add. |
---|
Gets the default symbol.
Gets the first attribute field.
Gets the second attribute field.
Gets the third attribute field.
Gets field delimiter.
Returns the symbol of the unique value the graphic provided corresponds to.
graphic | the graphic to be symbolized |
---|
Gets a list of unique values.
Removes a unique value.
uniqueValue | the unique value to remove. |
---|
Sets the default label.
defaultLabel | the default label to set. |
---|
Sets the default symbol.
defaultSymbol | the default symbol used for unmatched values. |
---|
Sets the first attribute field.
field1 | the name of the attribute field the renderer uses to match values against. |
---|
Sets the second attribute field.
field2 | If needed, specifies an additional attribute field the renderer uses to match values. |
---|
Sets the third attribute field.
field3 | If needed, specifies an additional attribute field the renderer uses to match values. |
---|
Sets field delimiter.
fieldDelimiter | string inserted between the values if multiple attribute fields are specified |
---|
Sets unique values.
uniqueValueInfos | the unique value list |
---|
Creates templates out of the renderer.
fields | the field types. |
---|---|
type | the geometry type. The templates are defined on feature layers, the geometry type is defined on feature layers. |