|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.esri.android.map.InfoTemplate
public class InfoTemplate
An InfoTemplate is an object containing a title template and a content template.
These title and content templates can contain references to values by using the token prototype ${[key]}.
These tokens are replaced with the appropriate values when content and title are requested through the methods
getContent(Graphic)
and getTitle(Graphic)
respectively, using the attributes contained in the
Graphic
provided.
Example:
InfoTemplate infoTemplate = new InfoTemplate(); infoTemplate.setTitleTemplate("I am a title for ${graphicName}"); infoTemplate.setContentTemplate("My geometry type is ${geometryType}");
Constructor Summary | |
---|---|
InfoTemplate()
Default constructor. |
|
InfoTemplate(String title,
String content)
Instantiates an InfoTemplate with the given content and title. |
Method Summary | |
---|---|
String |
getContent(Graphic graphic)
Gets the content populated with the attribute values of the provided graphic. |
String |
getContentTemplate()
Gets the content without replacing the tokens. |
String |
getTitle(Graphic graphic)
Gets the title populated with the attribute values of the provided graphic. |
String |
getTitleTemplate()
Gets the title without replacing the tokens. |
void |
setContentTemplate(String content)
Sets the content template. |
void |
setTitleTemplate(String title)
Sets the title template. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public InfoTemplate()
public InfoTemplate(String title, String content)
title
- the title of the InfoTemplate.content
- the content of the InfoTemplate.Method Detail |
---|
public String getTitleTemplate()
public void setTitleTemplate(String title)
title
- the title template.public String getContentTemplate()
public String getContent(Graphic graphic)
graphic
- the graphic containing the attributes to be used to populate the content.
public String getTitle(Graphic graphic)
graphic
- the graphic containing the attributes to be used to populate the title.
public void setContentTemplate(String content)
content
- the content template.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |