Class ScreenProp

    • Constructor Detail

      • ScreenProp

        public ScreenProp()
        Creates the style property container without a name. The name must be set in all cases using the setPropertyAtom call.
      • ScreenProp

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

      • addPredefinedPropsImpl

        protected void addPredefinedPropsImpl()
                                       throws PropException
        Adds the predefined containers for identifications, fields and actions. This method is overridden fully by the Editor versions of the class.
        Throws:
        PropException
      • getPredefinedProps

        protected void getPredefinedProps()
        Adds the predefined containers for identifications, fields and actions. This method is overridden fully by the Editor versions of the class.
        Overrides:
        getPredefinedProps in class PropCnr
      • getScreenName

        public java.lang.String getScreenName()
        Gets the screen name.
        Returns:
        The screen name.
      • hasVirtualSpaceConnection

        public boolean hasVirtualSpaceConnection()
        Checks for connection to VS.
        Returns:
        If screen is connected to a VirtualSpace.
      • getVSReference

        public VSParticipant getVSReference​(Atom refAtom)
        Gets a VSReference instance from the container or any parent containers. The method is used by VSRelativeReference to look up the VSReference instance in order to resolve the relative path to the target property.
        Specified by:
        getVSReference in interface IGProp<GProp<?>[]>
        Overrides:
        getVSReference in class PropCnr
        Parameters:
        refAtom - The property atom of the requesting relative reference property.
        Returns:
        The instance of the VSReference or null if unassigned.
      • createVSReference

        public VSParticipant createVSReference​(Atom refAtom,
                                               PropCnr[] returnParent)
        Creates a VSReference instance from the container or any parent containers. The method is used in the Designer to create a VirtualSpace connection for VSRelativeReference to look up the VSReference instance in order to resolve the relative path to the target property.

        This method needs to be overridden by subclasses of PropCnr that has a VSReference as property, and *SHOULD* match getVSReference(Atom).

        The default is to re-target the call to the parent container, and if the root, a folder or a file property is reached, null is returned.

        Overrides:
        createVSReference in class PropCnr
        Parameters:
        refAtom - The property asking for the VSReference.
        returnParent - An array of PropCnr [1] that will be filled in with the parent property of the VSRefernce.
        Returns:
        The instance of the VSReference or null if unassigned. The returned instance could also be a VSParticipant and should therefore be processed accordingly.

        For this method, it's a VSParticipant.

      • getVSParticipant

        public VSParticipant getVSParticipant()
        Gets the VSParticipant instance. This is also an instance of VSReference.
        Returns:
        The instance of the VSParticipant, or null if not yet defined.
      • getVirtualSpace

        public VirtualSpace getVirtualSpace()
        Gets the VirtualSpace for this panel.

        Method for IVSParticipant: Gets the referrer's back-reference to the VirtualSpace. This is used by the VSParticipantReference when verifying its references.

        Specified by:
        getVirtualSpace in interface IVSAccessor
        Returns:
        The VirtualSpace reference, or null for none.
      • getParticipantDescription

        public java.lang.String getParticipantDescription()
        Returns the given description of the referrer participant.
        Specified by:
        getParticipantDescription in interface IReferrerParticipant
        Returns:
        The string the Designer entered in the Description field, or "n/a" for none.
      • isPrimaryParticipant

        public boolean isPrimaryParticipant()
        Checks if this panel is primary or not. A primary participant is chosen in the selection processing when multiple participants are ordered in a VS ParticipantsHolder container.
        Specified by:
        isPrimaryParticipant in interface IReferrerParticipant
        Returns:
        The default implementation returns true.
      • getDescription

        public java.lang.String getDescription()
        Gets the screen description.
        Returns:
        The screen description, or null for none.
      • getPropBaseReference

        public PropCnr getPropBaseReference()
        Gets a base property container reference instance from the container or any parent containers. The method is used by PropRelativeReference to look up the reference instance in order to resolve the relative path to the target property.

        This method needs to be overridden by subclasses of PropCnr that has a PropRelativeReference as property, e.g. the ScreenProp class in the Terminal Core plug-in.

        The default is to re-target the call to the parent container, and if the root, a folder or a file property is reached, null is returned.

        Specified by:
        getPropBaseReference in interface IGProp<GProp<?>[]>
        Overrides:
        getPropBaseReference in class PropCnr
        Returns:
        The instance of the PropCnr or null if unassigned.
      • getIdentifications

        public ScreenIdentificationsProp getIdentifications()
        Gets the screen identifications container.
        Returns:
        The screen identifications container.
      • getFields

        public ScreenFieldsProp getFields()
        Gets the screen fields container.
        Returns:
        The screen fields container.
      • getActions

        public ScreenActionsProp getActions()
        Gets the screen actions container.
        Returns:
        The screen actions container.
      • updateCachedValues

        protected void updateCachedValues()
        Gets the cached value if not retrieved yet, or not valid.
      • getField

        public ScreenFieldProp getField​(java.lang.String name)
        Gets the field with specified name.
        Parameters:
        name - The field name (case sensitive).
        Returns:
        The screen field property or null if not found.
      • isPopup

        public boolean isPopup()
        Checks if this screen is of pop-up window type.
        Returns:
        true for popup, false for full screen.
      • getWidth

        public int getWidth()
        Gets the width of this screen.
        Returns:
        Width of screen or popup.
      • getHeight

        public int getHeight()
        Gets the height of this screen.
        Returns:
        Height of screen or popup.
      • isMatching

        public boolean isMatching​(HostScreen screen)
        Checks if this screen matches the current host screen, checking size and possible pop-up windows.
        Parameters:
        screen - The host screen.
        Returns:
        true if it matches current host screen, false otherwise.
      • getMatchingPopup

        public int getMatchingPopup​(HostScreen screen)
        Matches the screen with available pop-up windows.
        Parameters:
        screen - The host screen.
        Returns:
        The pop-up window index matching, or -1 for none.
      • isMatching

        public boolean isMatching​(HostScreen screen,
                                  Rect popupWindow)
        Checks if this screen matches the current host screen of the specified pop-up window.
        Parameters:
        screen - The host screen.
        popupWindow - If null, entire screen, otherwise a pop-up window.
        Returns:
        true if it matches current host screen, false otherwise.
      • compareTo

        public int compareTo​(ScreenProp hs)
        Comparator method to sort screens into screen groups.
        Specified by:
        compareTo in interface java.lang.Comparable<ScreenProp>
      • equalsIdentification

        public boolean equalsIdentification​(ScreenProp s)
        Checks if another screen equals in the screen identification.
        Parameters:
        s - Another screen to compare identifications with.
        Returns:
        If screen identifications are equal.
      • populateVirtualSpace

        public int populateVirtualSpace​(HostScreen hostScreen,
                                        boolean alwaysOverwrite)
        Populates the VirtualSpace from the host screen.
        Parameters:
        hostScreen - The host screen.
        alwaysOverwrite - Flag to always set the VS fields, even if there is no difference in the host data.
        Returns:
        The number of VirtualSpace Fields that has been set.
      • onVirtualSpaceVirtualized

        public void onVirtualSpaceVirtualized​(IAppSessionGyro appGyro,
                                              VirtualSpace virtualizedVirtualSpace)
        Called when the VirtualSpace has been virtualized, giving the opportunity for e.g. data connectors to prepare it's virtualized counterparts if this is required.

        This call is done to the non-virtualized instance of the VirtualSpace participant.

        Specified by:
        onVirtualSpaceVirtualized in interface IVSParticipant
        Parameters:
        appGyro - The application gyro instance.
        virtualizedVirtualSpace - The virtualized VirtualSpace instance.