Class MapMarkerProp

    • Field Detail

      • PN_LABEL_CHAR

        public static final java.lang.String PN_LABEL_CHAR
        Property name: label character "ch".
        See Also:
        Constant Field Values
      • PN_LATITUDE

        public static final java.lang.String PN_LATITUDE
        Property name: latitude "lat".
        See Also:
        Constant Field Values
      • PN_LONGITUDE

        public static final java.lang.String PN_LONGITUDE
        Property name: longitude "lng".
        See Also:
        Constant Field Values
    • Constructor Detail

      • MapMarkerProp

        public MapMarkerProp()
        Constructor of the marker property without name.
      • MapMarkerProp

        public MapMarkerProp​(Atom atom)
        Constructor of the marker property.
        Parameters:
        atom - The name of this property.
    • Method Detail

      • setContentItem

        public void setContentItem​(IContentData<?> itemData)
        Returns the content item that has initialized this property container.
        Specified by:
        setContentItem in interface IContentItem
        Parameters:
        itemData - Sets the content item that has updated this property container.
      • getContentItem

        public MapMarker getContentItem​(boolean createIfNotPresent)
        Returns the content item that has initialized this property container. If it has not been initialized, it will be initialized with this call if the flag createIfNotPresent is true.
        Specified by:
        getContentItem in interface IContentItem
        Parameters:
        createIfNotPresent - Creates the content data if it doesn't exist if true.
        Returns:
        The content item, null if not previously initialized if createIfNotPresent is false.
      • getDeviceType

        public final int getDeviceType()
        Gets the device type: -1=mobile, 0=both, 1=desktop.
        Specified by:
        getDeviceType in interface IUIComp
      • getApproximateSize

        public Size getApproximateSize()
        Returns the size of the component in pixels. The size is a calculation and does not exactly reflect the real size that may be different due to additional styles not taken into account by this method. The size is calculated from the font of the component and default or defined values (such as character length or number of lines for text area).
        Specified by:
        getApproximateSize in class UIComp
        Returns:
        The size of the component.
        Throws:
        java.lang.IllegalStateException - If called outside of the Designer, e.g. from the Server.
      • getMarkers

        public MapMarkers getMarkers()
        Gets the map markers container.
        Returns:
        The map markers container, or null if marker is orphaned.
      • getMap

        public UIMap getMap()
        Gets the map associated with the marker.
        Returns:
        The map, or null if marker or markers container is orphaned.
      • onRemoteEvent

        public void onRemoteEvent​(RemoteEvent event)
        Called when a remote property event should be processed by this property.
        Specified by:
        onRemoteEvent in interface IGProp<GProp<?>[]>
        Overrides:
        onRemoteEvent in class UIComp
        Parameters:
        event - The remote event.
      • addMappings

        protected void addMappings​(VSMappings mappings,
                                   VSComponent vsStateFocus)
        Gets the mappings of a VirtualSpace to the panel components.

        The default is to find the relative references to VS and add those references. Override to provide other functionality.

        Overrides:
        addMappings in class UIComp
        Parameters:
        mappings - The mappings instance to fill in.
        vsStateFocus - Do not go past this component when going up in the parent tree, null for none.
      • triggerRemoteSelectionEvent

        protected void triggerRemoteSelectionEvent​(boolean isSelected)
        Sends the selection property to the connected clients.
        Parameters:
        isSelected -
      • isUnselected

        public boolean isUnselected()
        Returns if the selection is not set.
        Specified by:
        isUnselected in interface IUIBooleanSelectionComp
        Returns:
        true if unselected, false if selected.
      • isON

        public boolean isON()
        Returns if the selection is "on".
        Specified by:
        isON in interface IUIBooleanSelectionComp
        Returns:
        true if on, false if off.
      • isOFF

        public boolean isOFF()
        Returns if the selection is "off".
        Specified by:
        isOFF in interface IUIBooleanSelectionComp
        Returns:
        true if off, false if on.
      • setSelection

        public boolean setSelection​(boolean isSelected)
        Sets the selection.
        Specified by:
        setSelection in interface IUIBooleanSelectionComp
        Parameters:
        isSelected - The selected state.
        Returns:
        true if state is changed, false for no change.
      • getSelectionPropAtom

        public Atom getSelectionPropAtom()
        Returns the selection property atom for verification of selection changes.

        This method is used by the framework in UIComp to fire selection events when the property value changes.

        Specified by:
        getSelectionPropAtom in interface IUISelectionComp
        Returns:
        Atom.SELECTED.
      • getSelectionType

        public int getSelectionType()
        Gets the selection type of the component.

        This method forwards the selection type to the map markers.

        Specified by:
        getSelectionType in interface IUISelectionComp
        Returns:
        A value indicating the selection capability as the SELECTION_TYPE_* values.
      • isSelectionTriStateBased

        public boolean isSelectionTriStateBased()
        Returns if the selection component supports index-based selection.
        Specified by:
        isSelectionTriStateBased in interface IUISelectionComp
        Returns:
        false.
      • isSelectionIndexBased

        public boolean isSelectionIndexBased()
        Returns if the selection component supports index-based selection.
        Specified by:
        isSelectionIndexBased in interface IUISelectionComp
        Returns:
        false.
      • isSelectionCellBased

        public boolean isSelectionCellBased()
        Returns if the selection component supports is cell based.
        Specified by:
        isSelectionCellBased in interface IUISelectionComp
        Returns:
        false.
      • getOnUISelectionMethod

        public java.lang.reflect.Method getOnUISelectionMethod()
        Returns the method to use for onUISelection notifications that is attached to this selection component. The method name is not important, but must have the annotation and signature:

        @OnUISelection(name = "some/property")
        public void onUISelection(UISelectionEvent event)

        Specified by:
        getOnUISelectionMethod in interface IUISelectionComp
        Returns:
        The method, or null if none is registered.
      • onSelectionChanged

        protected void onSelectionChanged​(GEvent event)
        Method called when the selection of the component changed due to a property change (value changed, property added or removed).
        Overrides:
        onSelectionChanged in class UIComp
        Parameters:
        event - The event that causes the selection change.
      • onNotifySelectionChanged

        protected void onNotifySelectionChanged​(GEvent event)
        Method called when the selection of the component has changed and has been verified to be different from a previous selection. Subclasses can override this method to inform potential listeners.
        Overrides:
        onNotifySelectionChanged in class UIComp
        Parameters:
        event - The event that causes the selection change, COULD BE NULL!
      • onPrepare

        protected void onPrepare​(IAppOwner appOwner,
                                 IModuleOwner moduleOwner,
                                 boolean isPostCall,
                                 java.util.List<java.lang.Throwable> errors)
                          throws PropException
        Called when the application is being prepared. The order of onPrepare calls is always parent first, the children. The method is called twice, first time with isPostCall set to false, then a second time with true.
        Overrides:
        onPrepare in class UIComp
        Parameters:
        appOwner - The application owner.
        moduleOwner - The Module owner.
        isPostCall - Flag indicating this is a post-call.
        errors - A list of errors that occurred but did not cause an abort.
        Throws:
        PropException - For property errors during the application preparation to need to abort.