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:

Since:
1.0

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()
          Checks if is initialized.
 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
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PopupInfo

public PopupInfo()
Default constructor for PopupInfo.

Since:
1.0
Method Detail

getMinScale

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

Returns:
minScale
Since:
1.0

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
Since:
1.0

getMaxScale

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

Returns:
maxScale
Since:
1.0

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
Since:
1.0

getTitle

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

Returns:
title
Since:
1.0

setTitle

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

Parameters:
title - This popup's title
Since:
1.0

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
Since:
1.0

setDescription

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

Parameters:
description - This popup's description
Since:
1.0

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
Since:
1.0

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
Since:
1.0

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.
Since:
1.0

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.
Since:
1.0

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
Since:
1.0

getMediaInfos

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

Returns:
mediaInfos
Since:
1.0

setMediaInfos

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

Parameters:
mediaInfos - An array of PopupMediaInfos.
Since:
1.0

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.
Since:
1.0

isInitialized

public boolean isInitialized()
Checks if is initialized.

Returns:
true, if checks if is initialized
Since:
1.0


Copyright © 2010. All Rights Reserved.