|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.esri.core.map.Graphic
public class Graphic
The Graphic class is used to represent a feature that can have geometry, a symbol, and attributes.
Graphic objects can be displayed using rendered using a GraphicsLayer (see the GraphicsLayer class for more
details).
| Field Summary | |
|---|---|
protected Map<String,Object> |
attributes
Name-value pairs of fields and their connected field values that are associated with the graphic. |
| Constructor Summary | |
|---|---|
Graphic()
Instantiates an empty Graphic object. |
|
Graphic(Geometry geometry)
Instantiates a new Graphic object. |
|
Graphic(Geometry geometry,
Symbol symbol)
Instantiates a new Graphic object. |
|
| Method Summary | |
|---|---|
void |
addAttribute(String key,
Object value)
Sets the field name and the field value associated with the graphic. |
String[] |
getAttributeNames()
Gets the name of all the attributes. |
Map<String,Object> |
getAttributes()
Returns all attributes of the graphic as a read-only collection. |
Object |
getAttributeValue(String key)
Gets the attribute value by the given name. |
Geometry |
getGeometry()
Gets the geometry that defines the graphic. |
InfoTemplate |
getInfoTemplate()
Returns the template. |
Symbol |
getSymbol()
Gets the symbol for the graphic. |
void |
removeAllAttribute()
Removes all the attributes associated with the graphic. |
void |
removeAttribute(String key)
Removes a field from the graphic. |
void |
setAttributes(Map<String,Object> attrs)
Sets the name-value pairs of fields and their connected field values that are associated with the graphic. |
Object |
setAttributeValue(String key,
Object value)
Sets the attribute value by the given name. |
void |
setGeometry(Geometry geometry)
Sets the geometry that defines the graphic. |
void |
setInfoTemplate(InfoTemplate infoTemplate)
Gets the template. |
void |
setSymbol(Symbol symbol)
Sets the symbol for the graphic. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected final Map<String,Object> attributes
| Constructor Detail |
|---|
public Graphic(Geometry geometry,
Symbol symbol)
geometry - the geometry to draw;symbol - the symbol to draw the geometry with.public Graphic(Geometry geometry)
geometry - the geometry to draw;public Graphic()
| Method Detail |
|---|
public Symbol getSymbol()
public void setSymbol(Symbol symbol)
symbol - public Geometry getGeometry()
public void setGeometry(Geometry geometry)
public void setAttributes(Map<String,Object> attrs)
public void addAttribute(String key,
Object value)
key - the field name;value - the field value;public void removeAttribute(String key)
public String[] getAttributeNames()
public Object getAttributeValue(String key)
public Object setAttributeValue(String key,
Object value)
public void removeAllAttribute()
public InfoTemplate getInfoTemplate()
public void setInfoTemplate(InfoTemplate infoTemplate)
public Map<String,Object> getAttributes()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||