com.esri.core.symbol
Class SimpleMarkerSymbol

java.lang.Object
  extended by com.esri.core.symbol.MarkerSymbol
      extended by com.esri.core.symbol.SimpleMarkerSymbol
All Implemented Interfaces:
Symbol, Serializable

public class SimpleMarkerSymbol
extends MarkerSymbol

Used to draw points and multipoints (or nodes of polylines and polygons) on the graphics layer using simple markers. SimpleMarkerSymbol is used to display points as a simple shape, for example, a circle.

See Also:
Serialized Form

Nested Class Summary
static class SimpleMarkerSymbol.Style
          The marker style.
 
Field Summary
static String TYPE
          The String type to represent the symbol.
 
Constructor Summary
SimpleMarkerSymbol(Color color, int size, SimpleMarkerSymbol.Style style)
          Instantiates a SimpleMarkerSymbol with the given color, size and style.
SimpleMarkerSymbol(org.codehaus.jackson.JsonNode node)
          Instantiates an object of SimpleMakerSymbol from a JsonNode.
 
Method Summary
 Symbol copy()
          Gets a copy of this Symbol object.
 boolean equals(Object obj)
           
 Color getColor()
          Returns the color of the symbol.
 SimpleLineSymbol getOutline()
          Gets the outline of the SimpleMarkerSymbol.
 float getSize()
          Returns the symbol size in pixels.
 SimpleMarkerSymbol.Style getStyle()
          Returns the marker SimpleMarkerSymbol.Style.
 int hashCode()
           
 void setColor(Color color)
          Sets the color of the symbol.
 void setOutline(SimpleLineSymbol outline)
          Sets the outline of the SimpleMarkerSymbol.
 void setSize(float size)
          Sets the size in pixels.
 void setStyle(SimpleMarkerSymbol.Style style)
          Sets the drawing style.
 String toJson()
          Converts the symbol to a Json String.
 
Methods inherited from class com.esri.core.symbol.MarkerSymbol
getAngle, getHeight, getOffsetX, getOffsetY, getWidth, setAngle, setHeight, setOffsetX, setOffsetY, setWidth
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TYPE

public static final String TYPE
The String type to represent the symbol.

See Also:
Constant Field Values
Constructor Detail

SimpleMarkerSymbol

public SimpleMarkerSymbol(org.codehaus.jackson.JsonNode node)
                   throws Exception
Instantiates an object of SimpleMakerSymbol from a JsonNode.

Parameters:
node - the SimpleMakerSymbol node.
Throws:
Exception

SimpleMarkerSymbol

public SimpleMarkerSymbol(Color color,
                          int size,
                          SimpleMarkerSymbol.Style style)
Instantiates a SimpleMarkerSymbol with the given color, size and style.

Parameters:
color - the symbol color.
size - the symbol size in pixels.
style - the drawing SimpleMarkerSymbol.Style
Method Detail

getColor

public Color getColor()
Returns the color of the symbol. The color is a 32bit value containing alpha as well as RGB. This 32bit value is not pre-multiplied, meaning that its alpha can be any value, regardless of the values of RGB. See the Color class for more details.

Returns:
the color in RGB color value.

setColor

public void setColor(Color color)
Sets the color of the symbol. The color is a 32bit value containing alpha as well as RGB. This 32bit value is not pre-multiplied, meaning that its alpha can be any value, regardless of the values of RGB. See the Color class for more details.

Parameters:
color - the color in ARGB color value.

getSize

public float getSize()
Returns the symbol size in pixels.

Returns:
the size in pixels.

setSize

public void setSize(float size)
Sets the size in pixels.

Parameters:
size - the size in pixels.

getStyle

public SimpleMarkerSymbol.Style getStyle()
Returns the marker SimpleMarkerSymbol.Style.

Returns:
one of the style.

setStyle

public void setStyle(SimpleMarkerSymbol.Style style)
Sets the drawing style.

Parameters:
style - one of the SimpleMarkerSymbol.Style.

getOutline

public SimpleLineSymbol getOutline()
Gets the outline of the SimpleMarkerSymbol.

Returns:
Returns the outline.

setOutline

public void setOutline(SimpleLineSymbol outline)
Sets the outline of the SimpleMarkerSymbol.

Parameters:
outline - The outline to set.

toJson

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

Throws:
Exception

hashCode

public int hashCode()
Overrides:
hashCode in class MarkerSymbol

equals

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

copy

public Symbol copy()
            throws Exception
Description copied from interface: Symbol
Gets a copy of this Symbol object.

Returns:
Symbol object
Throws:
Exception


Copyright © 2012. All Rights Reserved.