public class

PopupInfo

extends Object
java.lang.Object
   ↳ com.esri.core.map.popup.PopupInfo
Known Direct Subclasses

Class Overview

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

  • Whether or not a user should be allowed to edit the feature.
  • Which attributes of the feature should the popup display, whether they are editable, how to format numbers and dates, etc.
  • Whether or not the popup should show attachments for the feature.
  • What media, such as charts and images, should be displayed for the feature.

Summary

Fields
protected String description
protected LinkedHashMap<StringPopupFieldInfo> fieldInfos
protected double minScale
protected String title
Public Constructors
PopupInfo(PopupInfo popupInfo)
PopupInfo(Graphic graphic)
PopupInfo()
Default constructor for PopupInfo.
Public Methods
static PopupInfo fromJson(JsonParser parser)
@return
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.
Map<StringPopupFieldInfo> 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()
double getMinScale()
Returns the minimum scale that this popup should be shown at.
String getTitle()
Returns the title of this popup.
boolean isShowAttachments()
void setDescription(String description)
Sets the description of this popup.
void setFieldInfos(Map<StringPopupFieldInfo> fieldInfos)
Sets a list of a graphic 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)
void setMinScale(double minScale)
Sets the minimum scale that this popup should be shown at.
void setShowAttachments(boolean showAttachments)
void setTitle(String title)
Sets the title of this popup.
[Expand]
Inherited Methods
From class java.lang.Object

Fields

protected String description

protected LinkedHashMap<StringPopupFieldInfo> fieldInfos

protected double minScale

protected String title

Public Constructors

public PopupInfo (PopupInfo popupInfo)

public PopupInfo (Graphic graphic)

public PopupInfo ()

Default constructor for PopupInfo.

Public Methods

public static PopupInfo fromJson (JsonParser parser)

@return

Throws
Exception
Exception

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

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

public Map<StringPopupFieldInfo> 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

public double getMaxScale ()

Returns the maximum scale that this popup should be shown at.

Returns
  • maxScale

public PopupMediaInfo[] getMediaInfos ()

Returns
  • the mediaInfos

public double getMinScale ()

Returns the minimum scale that this popup should be shown at.

Returns
  • minScale

public String getTitle ()

Returns the title of this popup.

Returns
  • title

public boolean isShowAttachments ()

Returns
  • the showAttachments

public void setDescription (String description)

Sets the description of this popup.

Parameters
description This popup's description

public void setFieldInfos (Map<StringPopupFieldInfo> fieldInfos)

Sets a list of a graphic fields to be displayed in the popup.

Parameters
fieldInfos An array of PopupFieldInfos.

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

public void setMediaInfos (PopupMediaInfo[] mediaInfos)

Parameters
mediaInfos the mediaInfos to set

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

public void setShowAttachments (boolean showAttachments)

Parameters
showAttachments the showAttachments to set

public void setTitle (String title)

Sets the title of this popup.

Parameters
title This popup's title