Class AbstractMutableStandaloneGroupItem<T extends Actor>

    • Constructor Detail

      • AbstractMutableStandaloneGroupItem

        public AbstractMutableStandaloneGroupItem()
    • Method Detail

      • newActorHandler

        protected abstract MutableActorHandler newActorHandler()
        Creates an instance of the actor handler taking care of the sub-actors.
        Returns:
        the handler
      • getEnclosingGroup

        public T getEnclosingGroup()
        Returns the enclosing group.
        Specified by:
        getEnclosingGroup in interface StandaloneGroupItem<T extends Actor>
        Returns:
        the group, null if not available (eg if parent not set)
      • checkSubActor

        protected String checkSubActor​(int index,
                                       Actor actor)
        Checks the sub actor before it is set. Returns an error message if the actor is not acceptable, null otherwise.
        Parameters:
        index - the index the actor gets set
        actor - the actor to check
        Returns:
        null if accepted, otherwise error message
      • checkSubActors

        protected String checkSubActors​(Actor[] actors)
        Checks the sub actors before they are set via the setSubActors 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 sub-actor.
        Parameters:
        value - the actor
      • getActors

        public Actor[] getActors()
        Returns the sub actors.
        Returns:
        the actors
      • actorsTipText

        public abstract 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.
      • get

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

        public int indexOf​(String actor)
        Returns the index of the actor.
        Specified by:
        indexOf in interface ActorHandler
        Specified by:
        indexOf in class AbstractControlActor
        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 everything is fine, otherwise the error
      • 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 everything is fine, otherwise the error
        See Also:
        checkSubActor(int, Actor)
      • 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
      • getInternalActors

        protected MutableActorHandler getInternalActors()
        Returns the internal representation of the actors.
        Returns:
        the internal actors
      • getActorFilter

        protected Class[] getActorFilter()
        Returns the classes that the flow editor uses for filtering.
        Default implementation returns null.
        Returns:
        the classes, null if to use default from underlying actor handler
      • doSetUpSubActors

        protected abstract String doSetUpSubActors()
        Gets called in the setUp() method. Returns null if sub-actors are fine, otherwise error message.
        Returns:
        null if everything OK, otherwise error message
      • setUpSubActors

        protected String setUpSubActors()
        Performs the setUp of the sub-actors.
        Overrides:
        setUpSubActors in class AbstractControlActor
        Returns:
        null if everything is fine, otherwise error message
      • doExecute

        protected String doExecute()
        Executes the flow item.
        Specified by:
        doExecute in class AbstractActor
        Returns:
        null if everything is fine, otherwise error message