public class

DictionaryRenderer

extends Object
implements Renderer
java.lang.Object
   ↳ com.esri.core.renderer.DictionaryRenderer

Class Overview

This is a renderer defined by dictionary. It exposes methods to control the visibility of text items within symbols.The visibility can be set through a message type file which is stored in the resource bundle for MessageProcessor. The visibility defined in the message type file can be overridden by the setter methods exposed in DictionaryRenderer. However, the overridden visibility settings has no effect on the symbols added earlier. A message type file defined in a Json file:

 {
 "type": "position_report",
 "layerName": "position_reports",
 "renderer":
 {
 "type" : "dictionary",
 "description"    : "",
 "dictionaryType" : "2525C",
 "field" : "sic",
 "symbolScaleFactor" : 1.1,
 "labelsVisible" : true,
 "minLabelScale" : 1000000,
 "maxLabelScale" : 100000
 }
 }
 

Summary

Constants
String TYPE The Constant TYPE.
Public Methods
double getMaxLabelScale()
Returns the maximum label scale for the labels to be displayed.
double getMinLabelScale()
Returns the minimum label scale for the labels to be displayed.
Symbol getSymbol(Feature feature)
Subclasses must override this method.
Symbol getSymbol(Graphic graphic)
This method is deprecated. No replacement.
double getSymbolScaleFactor()
Returns the scale factor for the symbols.
boolean isLabelsVisible()
Returns a flag indicating if the labels are visible.
void setLabelsVisible(boolean labelsVisible)
Sets a flag to make the labels visible (true) or hidden (false).
void setMaxLabelScale(double scale)
Sets the minimum label scale for the labels to be displayed.
void setMinLabelScale(double scale)
Sets the minimum label scale for the labels to be displayed.
String toJson()
Converts the render to a Json String.
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.esri.core.renderer.Renderer

Constants

public static final String TYPE

The Constant TYPE.

Constant Value: "dictionary"

Public Methods

public double getMaxLabelScale ()

Returns the maximum label scale for the labels to be displayed.

Returns
double the maximum label scale

public double getMinLabelScale ()

Returns the minimum label scale for the labels to be displayed.

Returns
double the minimum label scale

public Symbol getSymbol (Feature feature)

Subclasses must override this method. You wouldn't typically work with this method unless you need to create your own renderer.

Parameters
feature Feature: The Feature to symbolize.
Returns
Symbol the symbol based on the properties of the graphic.

public Symbol getSymbol (Graphic graphic)

This method is deprecated.
No replacement.

Returns the Multi-Layer symbol associated with this renderer.

Parameters
graphic Graphic: the graphic
Returns
Symbol the MultiLayerSymbol

public double getSymbolScaleFactor ()

Returns the scale factor for the symbols.

Returns
double the scale factor

public boolean isLabelsVisible ()

Returns a flag indicating if the labels are visible.

Returns
boolean true if the labels are visible, false otherwise.

public void setLabelsVisible (boolean labelsVisible)

Sets a flag to make the labels visible (true) or hidden (false).

Parameters
labelsVisible boolean: the labels visible

public void setMaxLabelScale (double scale)

Sets the minimum label scale for the labels to be displayed.

Parameters
scale double: the maximum label scale

public void setMinLabelScale (double scale)

Sets the minimum label scale for the labels to be displayed.

Parameters
scale double: the minimum label scale

public String toJson ()

Converts the render to a Json String.

Returns
String
Throws
Exception