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)
          Creates a simple renderer from a JSON node.
SimpleRenderer(Symbol symbol)
          Instantiates SimpleRenderer with a symbol.
 
Method Summary
 Symbol getSymbol(Graphic graphic)
          Subclasses must override this method.
 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
See Also:
Constant Field Values
Constructor Detail

SimpleRenderer

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

Parameters:
symbol - The graphic symbol.

SimpleRenderer

public SimpleRenderer(org.codehaus.jackson.JsonNode node)
               throws Exception
Creates a simple renderer from a JSON node.

Parameters:
node - The JSON node.
Throws:
Exception
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.

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 © 2012. All Rights Reserved.