com.esri.core.map.popup
Class PopupInfo

java.lang.Object
  extended by com.esri.core.map.popup.PopupInfo

public class PopupInfo
extends Object

The PopupInfo class represents popup definitions for features that need to be displayed in popups. Popup definitions contain information such as:


Constructor Summary
PopupInfo()
          Default constructor for PopupInfo.
 
Method Summary
static PopupInfo fromJson(org.codehaus.jackson.JsonParser parser)
          Constructs a PopupInfo object from its JSON representation.
 String getDescription()
          Returns the description that is shown for the graphic in the popup.
 PopupFieldInfo getFieldInfo(String fieldName)
          Given a field name, returns the definition of how a graphic's field should be displayed in the popup.
 PopupFieldInfo[] getFieldInfos()
          Return an array of PopupFieldInfo objects which represent how a graphic's fields should be displayed in the popup.
 double getMaxScale()
          Returns the maximum scale that this popup should be shown at.
 PopupMediaInfo[] getMediaInfos()
          Returns the media as an array of PopupMediaInfo objects that is to be displayed in the popup.
 double getMinScale()
          Returns the minimum scale that this popup should be shown at.
 String getTitle()
          Returns the title of this popup.
 boolean isInitialized()
           
 boolean isShowAttachments()
          Returns true if this popup is configured to show attachments, false if otherwise.
 void setDescription(String description)
          Sets the description of this popup.
 void setFieldInfos(PopupFieldInfo[] fieldInfos)
          Sets a list of a graphic’s fields to be displayed in the popup.
 void setMaxScale(double maxScale)
          Sets the maximum scale that this popup should be shown at.
 void setMediaInfos(PopupMediaInfo[] mediaInfos)
          Sets the media that is to be displayed in the popup.
 void setMinScale(double minScale)
          Sets the minimum scale that this popup should be shown at.
 void setShowAttachments(boolean showAttachments)
          Set whether or not this popup should show attachments.
 void setTitle(String title)
          Sets the title of this popup.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PopupInfo

public PopupInfo()
Default constructor for PopupInfo.

Method Detail

getMinScale

public double getMinScale()
Returns the minimum scale that this popup should be shown at.

Returns:
minScale

setMinScale

public void setMinScale(double minScale)
Sets the minimum scale that this popup should be shown at.

Parameters:
minScale - The minimum scale the popup should be shown at

getMaxScale

public double getMaxScale()
Returns the maximum scale that this popup should be shown at.

Returns:
maxScale

setMaxScale

public void setMaxScale(double maxScale)
Sets the maximum scale that this popup should be shown at.

Parameters:
maxScale - The maximum scale the popup should be shown at

getTitle

public String getTitle()
Returns the title of this popup.

Returns:
title

setTitle

public void setTitle(String title)
Sets the title of this popup.

Parameters:
title - This popup's title

getDescription

public String getDescription()
Returns the description that is shown for the graphic in the popup. This can be formatted as HTML. If the description is null then the PopupFieldInfos are used when viewing attributes. This can contain a literal value, or a placeholder for value from the graphic's attribute. The placeholder needs to be of the form {field_name} where field_name is a key in the graphic's attributes.

Returns:
description

setDescription

public void setDescription(String description)
Sets the description of this popup.

Parameters:
description - This popup's description

getFieldInfos

public PopupFieldInfo[] getFieldInfos()
Return an array of PopupFieldInfo objects which represent how a graphic's fields should be displayed in the popup. If the description is null then the PopupFieldInfos are used when viewing attributes.

Returns:
fieldInfos

getFieldInfo

public PopupFieldInfo getFieldInfo(String fieldName)
Given a field name, returns the definition of how a graphic's field should be displayed in the popup.

Parameters:
fieldName - The name of the field to return.
Returns:
fieldInfo

setFieldInfos

public void setFieldInfos(PopupFieldInfo[] fieldInfos)
Sets a list of a graphic’s fields to be displayed in the popup.

Parameters:
fieldInfos - An array of PopupFieldInfos.

isShowAttachments

public boolean isShowAttachments()
Returns true if this popup is configured to show attachments, false if otherwise.

Returns:
true if this popup is configured to show attachments, false if otherwise.

setShowAttachments

public void setShowAttachments(boolean showAttachments)
Set whether or not this popup should show attachments.

Parameters:
showAttachments - True if attachments should be shown in the popup, false otherwise

getMediaInfos

public PopupMediaInfo[] getMediaInfos()
Returns the media as an array of PopupMediaInfo objects that is to be displayed in the popup.

Returns:
mediaInfos

setMediaInfos

public void setMediaInfos(PopupMediaInfo[] mediaInfos)
Sets the media that is to be displayed in the popup.

Parameters:
mediaInfos - An array of PopupMediaInfos.

fromJson

public static PopupInfo fromJson(org.codehaus.jackson.JsonParser parser)
                          throws Exception
Constructs a PopupInfo object from its JSON representation.

Parameters:
parser - A JSON parser object whose position is set at the "popupInfo" node.
Returns:
A PopupInfo object.
Throws:
Exception - An exception that occurred during parsing.

isInitialized

public boolean isInitialized()


Copyright © 2012. All Rights Reserved.