com.esri.core.renderer
Class DictionaryRenderer

java.lang.Object
  extended by com.esri.core.renderer.DictionaryRenderer
All Implemented Interfaces:
Renderer<Graphic>, Serializable

public class DictionaryRenderer
extends Object
implements Renderer<Graphic>

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
 }
 }
 

Since:
1.1
See Also:
Serialized Form

Field Summary
static String TYPE
          The Constant TYPE.
 
Method Summary
 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(Graphic graphic)
          Returns the Multi-Layer symbol associated with this renderer.
 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TYPE

public static final String TYPE
The Constant TYPE.

See Also:
Constant Field Values
Method Detail

getSymbolScaleFactor

public double getSymbolScaleFactor()
Returns the scale factor for the symbols.

Returns:
the scale factor
Since:
1.1

isLabelsVisible

public boolean isLabelsVisible()
Returns a flag indicating if the labels are visible.

Returns:
true if the labels are visible, false otherwise.
Since:
1.1

setLabelsVisible

public void setLabelsVisible(boolean labelsVisible)
Sets a flag to make the labels visible (true) or hidden (false).

Parameters:
labelsVisible - the labels visible
Since:
1.1

getMinLabelScale

public double getMinLabelScale()
Returns the minimum label scale for the labels to be displayed.

Returns:
the minimum label scale
Since:
1.1

setMinLabelScale

public void setMinLabelScale(double scale)
Sets the minimum label scale for the labels to be displayed.

Parameters:
scale - the minimum label scale
Since:
1.1

getMaxLabelScale

public double getMaxLabelScale()
Returns the maximum label scale for the labels to be displayed.

Returns:
the maximum label scale
Since:
1.1

setMaxLabelScale

public void setMaxLabelScale(double scale)
Sets the minimum label scale for the labels to be displayed.

Parameters:
scale - the maximum label scale
Since:
1.1

getSymbol

public Symbol getSymbol(Graphic graphic)
Returns the Multi-Layer symbol associated with this renderer.

Specified by:
getSymbol in interface Renderer<Graphic>
Parameters:
graphic - the graphic
Returns:
the MultiLayerSymbol
Since:
1.1

toJson

public String toJson()
              throws Exception
Description copied from interface: Renderer
Converts the render to a Json String.

Specified by:
toJson in interface Renderer<Graphic>
Throws:
Exception


Copyright © 2010. All Rights Reserved.