Class VSParticipantsHolder

  • All Implemented Interfaces:
    EventListener, IGProp<GProp<?>[]>, IPropCnr, java.lang.Cloneable
    Direct Known Subclasses:
    EditorVSParticipantsHolder

    public class VSParticipantsHolder
    extends ReferralsHolder
    This class is a child of the VirtualSpace and contains the participants in the VirtualSpace. It has routines to determine the appropriate panel to display, etc, for Gyro. The container has instances of VSParticipantReference's.
    Author:
    Christopher Mindus
    • Constructor Detail

      • VSParticipantsHolder

        public VSParticipantsHolder()
        Creates a VSParticipantsHolder container without name.
      • VSParticipantsHolder

        public VSParticipantsHolder​(Atom name)
        Creates a VSParticipantsHolder container with a name.
        Parameters:
        name - The name of the container.
    • Method Detail

      • isPropPrivateAtCreation

        protected boolean isPropPrivateAtCreation()
        This property container is private and not transported to remote party.
        Overrides:
        isPropPrivateAtCreation in class GProp<GProp<?>[]>
        Returns:
        true if the property should be set to private at creation, false for default.
      • getVirtualSpace

        public VirtualSpace getVirtualSpace()
        Gets the VirtualSpace associated with this participant holder.
        Returns:
        The VirtualSpace, or null if not added yet.
      • remove

        public boolean remove​(IVSParticipant participant,
                              IComplexOperation op)
        Removes an existing participant.
        Parameters:
        participant - The participant.
        op - The undo/redo operation.
        Returns:
        true for success, false for nothing performed participant not found.
      • remove

        public boolean remove​(java.lang.String ref,
                              IComplexOperation op)
        Removes an existing participant.
        Parameters:
        ref - The participant reference.
        op - The undo/redo operation.
        Returns:
        true for success, false for nothing performed participant not found.
      • contains

        public boolean contains​(IVSParticipant participant)
        Checks if the participant is present in this container.
        Parameters:
        participant - The participant.
        Returns:
        true if participant is found.
      • contains

        public boolean contains​(java.lang.String reference)
        Checks if the participant is present in this container.
      • getParticipants

        public <PC extends PropCnr> PC[] getParticipants​(java.lang.Class<PC> propClass)
        Gets all the participants of a certain type, e.g. UIPanel's. The result will be cached and is very fast.

        DO NOT MODIFY the return value!

        Parameters:
        propClass - The participant type.
        Returns:
        The array of the requested type.
      • onPropInvalidateCache

        protected void onPropInvalidateCache()
        Invalidates a potential cache in this property. This method is called during a synchronized state of the property. Subclasses override this method to provide a robust caching mechanism.
        Overrides:
        onPropInvalidateCache in class GProp<GProp<?>[]>
      • onEventSelf

        public void onEventSelf​(GEvent event)
        Checks for state change events and fires it to listeners.
        Specified by:
        onEventSelf in interface IGProp<GProp<?>[]>
        Overrides:
        onEventSelf in class GProp<GProp<?>[]>
        Parameters:
        event - The property event.
      • verify

        public boolean verify​(PropVerification verification)
        Verifies this property container. The check performed is the extension of classes and that no circular reference is present.
        Specified by:
        verify in interface IGProp<GProp<?>[]>
        Overrides:
        verify in class PropCnr
        Parameters:
        verification - The property verification class.
        Returns:
        true if verification should proceed, false if disposed of and verification should not take place.
      • onVirtualSpaceVirtualized

        public void onVirtualSpaceVirtualized​(VirtualSpace virtualizedVirtualSpace,
                                              IAppSessionGyro appGyro)
        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.

        Client code should not call this method as it is intended to be called from the framework.

        Parameters:
        virtualizedVirtualSpace - The virtualized VirtualSpace instance.
        appGyro - The application gyro instance.