Class PopupDefinition


  • public final class PopupDefinition
    extends Object
    A pop-up definition for a GeoElement. This class defines how the geoelement will be displayed and behave in a pop-up. Pop-up definitions contain information such as:
    • Which attributes of the geoelement should the pop-up display, whether it is editable, how to format numbers and dates, etc.
    • Whether the pop-up should show attachments for the geoelement.
    • What media, such as charts and images, should be displayed for the geoelement.
    Since:
    100.0.0
    See Also:
    PopupSource
    • Constructor Detail

      • PopupDefinition

        public PopupDefinition()
        Creates a new, empty pop-up definition. Use this object to define the look and feel of pop-up windows when users click or query a feature.
        Since:
        100.0.0
      • PopupDefinition

        public PopupDefinition​(GeoElement geoElement)
        Creates a new pop-up definition from a GeoElement with pop-up fields defined by attributes of the geoelement.

        Use this object to define the look and feel of pop-up windows when users click or query a feature.

        Parameters:
        geoElement - the geoelement on which to base the pop-up
        Throws:
        IllegalArgumentException - if the geoElement is null
        Since:
        100.0.0
        See Also:
        PopupField
      • PopupDefinition

        public PopupDefinition​(PopupSource popupSource)
        Creates a new pop-up definition from a pop-up source. By default, all the fields available in the source will be included in the pop-up fields.

        Use this object to define the look and feel of pop-up windows when users click or query a feature.

        Parameters:
        popupSource - the PopupSource on which to base the pop-up
        Throws:
        IllegalArgumentException - if popupSource is null
        Since:
        100.0.0
    • Method Detail

      • getDescription

        public String getDescription()
        Gets a string that appears in the body of the pop-up as a description.
        Returns:
        the description string
        Since:
        100.0.0
        See Also:
        setDescription(String)
      • setDescription

        public void setDescription​(String description)
        Sets a string that appears in the body of the pop-up as a description.

        The description can contain a literal value, or a placeholder for value from the geoelement's attribute. The placeholder needs to be of the form {field_name} where field_name is a key in the geoelement's attributes

        Parameters:
        description - the description string
        Since:
        100.0.0
        See Also:
        getDescription()
      • getTitle

        public String getTitle()
        Gets a string that appears at the top of the pop-up as a title.
        Returns:
        the title string
        Since:
        100.0.0
        See Also:
        setTitle(String)
      • setTitle

        public void setTitle​(String title)
        Sets a string that appears at the top of the pop-up as a title.

        The title can contain a literal value, or a placeholder for value from the geo element's attribute. The placeholder needs to be of the form {field_name} where field_name is a key in the geoelement's attributes.

        Parameters:
        title - the title string
        Since:
        100.0.0
        See Also:
        getTitle()
      • isShowAttachments

        public boolean isShowAttachments()
        Checks if attachments should be loaded for feature layers that have attachments.
        Returns:
        true if attachments should be shown; otherwise false
        Since:
        100.0.0
        See Also:
        setShowAttachments(boolean)
      • setShowAttachments

        public void setShowAttachments​(boolean showAttachments)
        Sets whether or not attachments should be loaded for feature layers that have attachments.
        Parameters:
        showAttachments - a boolean indicating whether attachments should be shown
        Since:
        100.0.0
        See Also:
        isShowAttachments()
      • isShowEditSummary

        public boolean isShowEditSummary()
        Checks if the pop-up should display the edit summary of the associated geoelement.
        Returns:
        true if edit summary will be displayed
        Since:
        100.6.0
        See Also:
        setShowEditSummary(boolean)
      • setShowEditSummary

        public void setShowEditSummary​(boolean showEditSummary)
        Sets whether the pop-up should display the edit summary of the associated geoelement.
        Parameters:
        showEditSummary - true if edit summary should be displayed; false otherwise
        Since:
        100.6.0
        See Also:
        isShowEditSummary()
      • isShowRelatedRecords

        @Deprecated
        public boolean isShowRelatedRecords()
        Deprecated.
        Checks if the pop-up should show additional geoelements that are related to this pop-up's geoelement.
        Returns:
        true if additional related geoelements should be shown; otherwise false
        Since:
        100.0.0
      • setShowRelatedRecords

        @Deprecated
        public void setShowRelatedRecords​(boolean showRelatedRecords)
        Sets whether or not the pop-up should show additional geoelements that are related to this pop-up's geoelement.
        Parameters:
        showRelatedRecords - true to show additional related geoelements
        Since:
        100.0.0
      • getFields

        public List<PopupField> getFields()
        Gets a list of PopupField objects defining how each field participates in the pop-up window.

        The order of the list is the order that fields are shown in the pop-up window.

        Returns:
        a list of PopupField objects
        Since:
        100.0.0
      • getMedia

        public List<PopupMedia> getMedia()
        Gets a list of PopupMedia objects that define images and charts displayed in the pop-up.

        The order of the list is the order that media are shown in the pop-up window.

        Returns:
        a list of PopupMedia objects
        Since:
        100.0.0
      • getExpressions

        public List<PopupExpression> getExpressions()
        Gets a list of PopupExpression objects defining the various Arcade expressions on the pop-up.
        Returns:
        a list of PopupExpression objects
        Since:
        100.3.0
      • isAllowEdit

        public boolean isAllowEdit()
        Checks if the pop-up allows the associated GeoElement's attributes to be edited.
        Returns:
        true if editing the geoelement's attributes is allowed
        Since:
        100.0.0
        See Also:
        setAllowEdit(boolean)
      • setAllowEdit

        public void setAllowEdit​(boolean allowEdit)
        Sets whether or not the pop-up allows the associated geoelement's attributes to be edited.
        Parameters:
        allowEdit - true to allow editing the geoelement's attributes
        Since:
        100.0.0
        See Also:
        isAllowEdit()
      • isAllowEditGeometry

        public boolean isAllowEditGeometry()
        Checks if the pop-up allows the associated geoelement's geometry to be edited.
        Returns:
        true if editing the geoelement's geometry is allowed
        Since:
        100.0.0
        See Also:
        setAllowEditGeometry(boolean)
      • setAllowEditGeometry

        public void setAllowEditGeometry​(boolean allowEditGeometry)
        Sets whether or not the pop-up allows the associated geoelement's geometry to be edited.
        Parameters:
        allowEditGeometry - true to allow editing the geoelement's geometry
        Since:
        100.0.0
        See Also:
        isAllowEditGeometry()
      • isAllowDelete

        public boolean isAllowDelete()
        Checks if the pop-up allows the geoelement to be deleted.
        Returns:
        true if deleting the geoelement is allowed
        Since:
        100.0.0
        See Also:
        setAllowDelete(boolean)
      • setAllowDelete

        public void setAllowDelete​(boolean allowDelete)
        Sets whether or not the pop-up allows the geoelement to be deleted.
        Parameters:
        allowDelete - true to allow deleting the geoelement
        Since:
        100.0.0
        See Also:
        isAllowDelete()
      • setRelatedFeaturesDefinition

        public void setRelatedFeaturesDefinition​(PopupRelatedFeaturesDefinition popupRelatedFeaturesDefinition)
        Sets the related features definition for this pop-up definition.

        A definition that dictates whether related features should be displayed in the pop-up and how they should be sorted.

        Parameters:
        popupRelatedFeaturesDefinition - the pop-up related features definition to set, can be null
        Since:
        100.1.0
        See Also:
        getRelatedFeaturesDefinition()