Class UIMap

    • Constructor Detail

      • UIMap

        public UIMap()
        Creates the component without a name. The name must be set in all cases using the setPropertyAtom call.
      • UIMap

        public UIMap​(Atom propertyAtom)
        Creates the component with the specified name. All system-reserved names for components begins with "$".
        Parameters:
        propertyAtom - the name of the component, unique within it's parent.
      • UIMap

        public UIMap​(Atom propertyAtom,
                     GProp<?>[] newValue)
              throws PropException
        Creates the component with the specified name, initialized to contain the GProp items. All system-reserved names for components begins with "$".
        Parameters:
        propertyAtom - The name of the component, unique within it's parent.
        newValue - The array of all properties the component should have.
        Throws:
        PropException - when at least one of the properties to initialize the component with is invalid.
    • Method Detail

      • hasImplicitAlignFillX

        public boolean hasImplicitAlignFillX()
        Returns if the component has implicit component horizontal fill.
        Overrides:
        hasImplicitAlignFillX in class UIContainer
        Returns:
        Always true: true means component will always fill the space in X.
      • hasImplicitAlignFillY

        public boolean hasImplicitAlignFillY()
        Returns if the component has implicit component vertical fill.
        Overrides:
        hasImplicitAlignFillY in class UIContainer
        Returns:
        Always: true means component will always fill the space in Y.
      • canAlignX

        public boolean canAlignX()
        Returns if the component can be aligned left, right, center, or horizontal fill.
        Overrides:
        canAlignX in class UIComp
        Returns:
        false, swap container takes up entire width.
      • canAlignY

        public boolean canAlignY()
        Returns if the component can be aligned top, bottom, middle or vertical fill.
        Overrides:
        canAlignY in class UIComp
        Returns:
        false, swap container takes up entire height.
      • convertLoadedProp

        protected GProp<?> convertLoadedProp​(GProp<?> childProp)
        Enables conversion or omission of a property loaded from XML.

        This method is typically used to process changes of e.g. property types, e.g. from IntProp to NumberProp, in case of a change of property definitions.

        Overrides:
        convertLoadedProp in class PropCnr
        Parameters:
        childProp - The child property that is about to be added.
        Returns:
        The property to add, null to omit it. The default processing is to return the same property, i.e. childProp.
      • onEventSelf

        public void onEventSelf​(GEvent event)
        Updates a VirtualSpace Field when a component text changes.
        Specified by:
        onEventSelf in interface IGProp<GProp<?>[]>
        Overrides:
        onEventSelf in class UIComp
        Parameters:
        event - The property event.
      • onResolved

        public void onResolved​(VSRelativeReference<?> reference,
                               VSField field)
        Called when the property reference has been resolved. UI components use this method to set its state according to the field, this is handled in by the UIComp class.

        Components must override to provide the implementation for e.g. value contents, styles, etc.

        Specified by:
        onResolved in interface IVSFieldListener
        Overrides:
        onResolved in class UIComp
        Parameters:
        reference - The VSRelativeReference instance holding the reference.
        field - The target reference.
      • onValueChanged

        public void onValueChanged​(VSField field,
                                   Value value,
                                   GProp<?> trigger,
                                   IPostEventProcessing postProcessing)
        Called when the field value is set.
        Specified by:
        onValueChanged in interface IVSFieldListener
        Overrides:
        onValueChanged in class UIComp
        Parameters:
        field - The VS field.
        value - The value, never null, but value.isNull() could be true.
        trigger - The trigger property that may be null.
        postProcessing - Post-processing instance.
      • setVSFieldToComponent

        public void setVSFieldToComponent​(VSField field)
        Method called when a VirtualSpace Field is resolved or when reconnection is done. Override to provide additional processing. By default all states (enabled, read-only and visible), message and field contents are set from the field to the component.
        Specified by:
        setVSFieldToComponent in interface IUIComp
        Overrides:
        setVSFieldToComponent in class UIComp
        Parameters:
        field - The VS field.
      • 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).
        Overrides:
        getApproximateSize in class UIContainer
        Returns:
        The size of the component: 200x200.
      • getFirstMarkersNull

        public MapMarkers getFirstMarkersNull()
        Gets the first markers group.
        Returns:
        The markers group, or null if not found.
      • getMarkersNull

        public MapMarkers getMarkersNull​(java.lang.String name)
        Gets the markers group by name.
        Parameters:
        name - The name of the marker group.
        Returns:
        The markers group, or null if not found.
      • getMarkers

        public MapMarkers getMarkers​(java.lang.String name)
                              throws NotFoundException
        Gets the markers group by name.
        Parameters:
        name - The name of the marker group.
        Returns:
        The markers group (never null).
        Throws:
        NotFoundException - If markers group is not found.