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()
           
 String getLabel()
           
 Symbol getSymbol(Graphic graphic)
          Subclasses must override this method.
 int hashCode()
           
 void setDescription(String description)
           
 void setLabel(String label)
           
 String toJson()
          Converts the render to a Json String.
 
Methods inherited from class java.lang.Object
clone, finalize, 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)
Description copied from interface: Renderer
Subclasses must override this method. You wouldn't typically work with this method unless you need to create your own renderer.

Specified by:
getSymbol in interface Renderer<Graphic>
Parameters:
graphic - The Graphic to symbolize.
Returns:
the symbol based on the properties of the graphic.

getLabel

public String getLabel()
Returns:
the label

setLabel

public void setLabel(String label)
Parameters:
label - the label to set

getDescription

public String getDescription()
Returns:
the description

setDescription

public void setDescription(String description)
Parameters:
description - the description to set

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

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

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


Copyright © 2010. All Rights Reserved.