Class AbstractMutableActorDaemonEvent<E,​P>

    • Field Detail

      • m_NoDiscard

        protected boolean m_NoDiscard
        whether to discard change events when busy or not.
      • m_Actors

        protected Sequence m_Actors
        for actors that get executed.
      • m_ExecutingActors

        protected boolean m_ExecutingActors
        whether the actors are currently being executed.
    • Constructor Detail

      • AbstractMutableActorDaemonEvent

        public AbstractMutableActorDaemonEvent()
    • Method Detail

      • updateParent

        protected void updateParent()
        Updates the parent of all actors in this group.
      • setNoDiscard

        public void setNoDiscard​(boolean value)
        Sets whether to process all change events or discard if busy.
        Parameters:
        value - if true all change events get processed
      • getNoDiscard

        public boolean getNoDiscard()
        Returns whether to process all change events or discard if busy.
        Returns:
        true if all change events get processed
      • noDiscardTipText

        public String noDiscardTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • checkActors

        protected abstract String checkActors​(Actor[] actors)
        Checks the actors before they are set via the setActors method. Returns an error message if the actors are not acceptable, null otherwise.
        Parameters:
        actors - the actors to check
        Returns:
        null if accepted, otherwise error message
      • setActors

        public void setActors​(Actor[] value)
        Sets the actors to execute on schedule.
        Parameters:
        value - the actors
      • getActors

        public Actor[] getActors()
        Returns the actors to execute on schedule.
        Returns:
        the actors
      • actorsTipText

        public String actorsTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • handlesEvent

        protected abstract boolean handlesEvent​(E e)
        Checks whether the event is being handled.
        Parameters:
        e - the event to check
        Returns:
        true if being handled
      • preProcessEvent

        protected abstract P preProcessEvent​(E e)
        Preprocesses the event.
        Parameters:
        e - the event to preprocess
        Returns:
        the output of the preprocessing
      • usePreProcessedAsInput

        protected abstract boolean usePreProcessedAsInput()
        Returns whether the preprocessed event is used as input token.
        Returns:
        true if used as input token
      • processEvent

        protected String processEvent​(E e)
        Processes the event.
        Returns:
        null if execution successful, otherwise error message
      • size

        public int size()
        Returns the size of the group.
        Specified by:
        size in interface ActorHandler
        Returns:
        the number of actors
      • get

        public Actor get​(int index)
        Returns the actor at the given position.
        Specified by:
        get in interface ActorHandler
        Parameters:
        index - the position
        Returns:
        the actor
      • set

        public String set​(int index,
                          Actor actor)
        Sets the actor at the given position.
        Specified by:
        set in interface ActorHandler
        Parameters:
        index - the position
        actor - the actor to set at this position
        Returns:
        null if successful, otherwise error message
      • indexOf

        public int indexOf​(String actor)
        Returns the index of the actor.
        Specified by:
        indexOf in interface ActorHandler
        Parameters:
        actor - the name of the actor to look for
        Returns:
        the index of -1 if not found
      • add

        public String add​(Actor actor)
        Inserts the actor at the end.
        Specified by:
        add in interface MutableActorHandler
        Parameters:
        actor - the actor to insert
        Returns:
        null if successful, otherwise error message
      • add

        public String add​(int index,
                          Actor actor)
        Inserts the actor at the given position.
        Specified by:
        add in interface MutableActorHandler
        Parameters:
        index - the position
        actor - the actor to insert
        Returns:
        null if successful, otherwise error message
      • remove

        public Actor remove​(int index)
        Removes the actor at the given position and returns the removed object.
        Specified by:
        remove in interface MutableActorHandler
        Parameters:
        index - the position
        Returns:
        the removed actor
      • getActorHandlerInfo

        public ActorHandlerInfo getActorHandlerInfo()
        Returns some information about the actor handler, e.g., whether it can contain standalones and the actor execution.
        Specified by:
        getActorHandlerInfo in interface ActorHandler
        Returns:
        the info
      • active

        public int active()
        Returns the number of non-skipped actors.
        Returns:
        the 'active' actors
      • firstActive

        public Actor firstActive()
        Returns the first non-skipped actor.
        Specified by:
        firstActive in interface ActorHandler
        Returns:
        the first 'active' actor, null if none available
      • lastActive

        public Actor lastActive()
        Returns the last non-skipped actor.
        Specified by:
        lastActive in interface ActorHandler
        Returns:
        the last 'active' actor, null if none available
      • check

        public String check()
        Performs checks on the "sub-actors".
        Specified by:
        check in interface ActorHandler
        Returns:
        null if everything OK, otherwise error message
      • forceVariables

        protected void forceVariables​(Variables value)
        Updates the Variables instance in use.

        Use with caution!
        Overrides:
        forceVariables in class AbstractActor
        Parameters:
        value - the instance to use
      • wrapUp

        public void wrapUp()
        Cleans up after the execution has finished. Graphical output is left untouched.
        Specified by:
        wrapUp in interface Actor
        Overrides:
        wrapUp in class AbstractActor