Class VSFocusReference

  • All Implemented Interfaces:
    EventListener, ICircularRetargetParent, IGProp<java.lang.String>, IPropReference, java.lang.Cloneable
    Direct Known Subclasses:
    EditorVSFocusReference

    public class VSFocusReference
    extends VSRelativeReference<VSComponent>
    Focus reference is used to set a reference to a focusable VSComponent. This focus component is always a non-virtualized component at all times (when resolved) as it generally points to another VirtualSpace from the one that this property is logically located in by (if any).
    Author:
    Christopher Mindus
    • Constructor Detail

      • VSFocusReference

        public VSFocusReference()
        Creates a VirtualSpace focus reference property with no name and with a null value.
      • VSFocusReference

        public VSFocusReference​(Atom propertyAtom)
        Creates a VirtualSpace focus reference property with the specified name with a null value.
        Parameters:
        propertyAtom - the property atom.
      • VSFocusReference

        public VSFocusReference​(Atom propertyAtom,
                                java.lang.String newValue)
        Creates a VirtualSpace focus reference property with the specified name and value.
        Parameters:
        propertyAtom - the property atom.
        newValue - the new string value for the property.
    • Method Detail

      • onVirtualized

        protected void onVirtualized​(IAppSessionGyro appGyro,
                                     IClientSessionGyro clientGyro,
                                     VirtualSpace virtualSpace,
                                     PropCnr virtualizedProp,
                                     GProp<?> clonedProp)
        Called when this property has been virtualized.

        Override to perform required processing.

        Overrides:
        onVirtualized in class VSRelativeReference<VSComponent>
        Parameters:
        appGyro - The application gyro instance performing the virtualization.
        clientGyro - The client gyro session, can be null if not initialized from the client gyro.
        virtualSpace - The virtualized VirtualSpace.
        virtualizedProp - The property being virtualized.
        clonedProp - The property that is cloned to produce this virtualized property.
      • onResolved

        protected void onResolved​(VSComponent target)
        Called when the property reference has been resolved.

        Note: Overrides the super-method to avoid having the component references with listeners and to verify the focusability of the reference in the Designer.

        Specified by:
        onResolved in class VSRelativeReference<VSComponent>
        Parameters:
        target - The target reference.
      • onRemoved

        protected void onRemoved​(VSComponent oldTarget)
        Called when the property reference has been disposed of e.g. due to new reference or pure disposal of this property.

        Overrides the super-method to remove the focus potential error property if the component is not focusable.

        Specified by:
        onRemoved in class VSRelativeReference<VSComponent>
        Parameters:
        oldTarget - The old target reference.