Class PopupDefinition


  • public final class PopupDefinition
    extends Object
    Represents a popup definition for a geo-element, this defines how it will be displayed and behave in a popup. Popup definitions contain information such as:
    • Which attributes of the geo-element should the popup display, whether they are editable, how to format numbers and dates, etc
    • Whether the popup should show attachments for the geo-element
    • What media, such as charts and images, should be displayed for the geo-element
    Since:
    100.0.0
    See Also:
    PopupSource, GeoElement
    • Constructor Detail

      • PopupDefinition

        public PopupDefinition()
        Constructs an empty PopupDefinition.
        Since:
        100.0.0
      • PopupDefinition

        public PopupDefinition​(GeoElement geoElement)
        Constructs a PopupDefinition with PopupFields defined by the attributes of the GeoElement.
        Parameters:
        geoElement - the GeoElement on which to base the popup
        Throws:
        IllegalArgumentException - if the geoElement is null
        Since:
        100.0.0
      • PopupDefinition

        public PopupDefinition​(PopupSource popupSource)
        Constructs a PopupDefinition defined by a PopupSource. By default, all the fields available in the source will be included in the popup fields.
        Parameters:
        popupSource - the PopupSource on which to base the popup
        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 popup as a description.
        Returns:
        the description string
        Since:
        100.0.0
      • setDescription

        public void setDescription​(String description)
        Sets a string that appears in the body of the popup as a description.
        Parameters:
        description - the description string
        Since:
        100.0.0
      • getTitle

        public String getTitle()
        Gets a string that appears at the top of the popup as a title.
        Returns:
        the title string
        Since:
        100.0.0
      • setTitle

        public void setTitle​(String title)
        Sets a string that appears at the top of the popup as a title.
        Parameters:
        title - the title string
        Since:
        100.0.0
      • isShowAttachments

        public boolean isShowAttachments()
        Indicates whether or not the popup should show attachments of the GeoElement.
        Returns:
        true if attachments should be shown, otherwise false
        Since:
        100.0.0
      • setShowAttachments

        public void setShowAttachments​(boolean showAttachments)
        Sets whether or not the popup should show attachments of the GeoElement.
        Parameters:
        showAttachments - a boolean indicating whether attachments should be shown
        Since:
        100.0.0
      • isShowRelatedRecords

        @Deprecated
        public boolean isShowRelatedRecords()
        Deprecated.
        Indicates if the popup should show additional geo-elements that are related to this popup's GeoElement.
        Returns:
        true if additional related geo-elements should be shown; otherwise false
        Since:
        100.0.0
      • setShowRelatedRecords

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

        public List<PopupField> getFields()
        Gets a list of PopupField objects defining how each field participates in the popup.
        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 popup.
        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 popup.
        Returns:
        a list of PopupExpression objects
        Since:
        100.3.0
      • isAllowEdit

        public boolean isAllowEdit()
        Checks if the PopupSource allows the geo-element's attributes to be edited.
        Returns:
        true if editing the geo-element's attributes is allowed
        Since:
        100.0.0
      • setAllowEdit

        public void setAllowEdit​(boolean allowEdit)
        Sets whether or not the PopupSource allows the geo-element's attributes to be edited.
        Parameters:
        allowEdit - true to allow editing the geo-element's attributes
        Since:
        100.0.0
      • isAllowEditGeometry

        public boolean isAllowEditGeometry()
        Checks if the PopupSource allows the geo-element's geometry to be edited.
        Returns:
        true if editing the geo-element's geometry is allowed
        Since:
        100.0.0
      • setAllowEditGeometry

        public void setAllowEditGeometry​(boolean allowEditGeometry)
        Sets whether or not the PopupSource allows the geo-element's geometry to be edited.
        Parameters:
        allowEditGeometry - true to allow editing the geo-element's geometry
        Since:
        100.0.0
      • isAllowDelete

        public boolean isAllowDelete()
        Checks if the PopupSource allows the geo-element to be deleted.
        Returns:
        true if deleting the geo-element is allowed
        Since:
        100.0.0
      • setAllowDelete

        public void setAllowDelete​(boolean allowDelete)
        Sets whether or not the PopupSource allows the geo-element to be deleted.
        Parameters:
        allowDelete - true to allow deleting the geo-element
        Since:
        100.0.0
      • setRelatedFeaturesDefinition

        public void setRelatedFeaturesDefinition​(PopupRelatedFeaturesDefinition popupRelatedFeaturesDefinition)
        Sets a new PopupRelatedFeaturesDefinition for this PopupDefinition.
        Parameters:
        popupRelatedFeaturesDefinition - the popup related features definition to set, can be null
        Since:
        100.1.0