com.esri.core.renderer
Class SimpleRenderer

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

public class SimpleRenderer
extends Object
implements Renderer<Graphic>

A simple renderer uses the same symbol for every graphic.

See Also:
Serialized Form

Field Summary
static String TYPE
           
 
Constructor Summary
SimpleRenderer(org.codehaus.jackson.JsonNode node)
          Instantiates SimpleRenderer from a Json node object.
SimpleRenderer(Symbol symbol)
          Instantiates SimpleRenderer with a symbol.
 
Method Summary
 boolean equals(Object obj)
           
 String getDescription()
          Gets the description.
 String getLabel()
          Gets the label
 Symbol getSymbol(Graphic graphic)
          Gets the symbol for the given graphic.
 int hashCode()
           
 void setDescription(String description)
          Sets the description.
 void setLabel(String label)
          Sets the label.
 String toJson()
          Serializes the properties into a JSON String representation.
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TYPE

public static final String TYPE
See Also:
Constant Field Values
Constructor Detail

SimpleRenderer

public SimpleRenderer(org.codehaus.jackson.JsonNode node)
               throws Exception
Instantiates SimpleRenderer from a Json node object.

Throws:
Exception

SimpleRenderer

public SimpleRenderer(Symbol symbol)
Instantiates SimpleRenderer with a symbol.

Parameters:
symbol - The graphic symbol.
Method Detail

getSymbol

public Symbol getSymbol(Graphic graphic)
Gets the symbol for the given graphic.

Specified by:
getSymbol in interface Renderer<Graphic>
Parameters:
graphic - Graphic object.
Returns:
Symbol object.

getLabel

public String getLabel()
Gets the label

Returns:
the label.

setLabel

public void setLabel(String label)
Sets the label.

Parameters:
label - the label to set

getDescription

public String getDescription()
Gets the description.

Returns:
the description.

setDescription

public void setDescription(String description)
Sets the description.

Parameters:
description - the description to set

toJson

public String toJson()
              throws Exception
Serializes the properties into a JSON String representation.

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

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object


Copyright © 2012. All Rights Reserved.