Class SimpleAction

    • Constructor Detail

      • SimpleAction

        public SimpleAction​(java.lang.String name,
                            SRunnable action)
    • Method Detail

      • reset

        public void reset()
        Description copied from interface: Action
        Resets the action to the state it was in before being run.
        Specified by:
        reset in interface Action<java.lang.Void>
        Specified by:
        reset in class AbstractAction<java.lang.Void>
      • start

        public void start()
        Description copied from interface: Action
        Runs the action. Should only return once the action is complete/interrupted/failed.
        Specified by:
        start in interface Action<java.lang.Void>
        Specified by:
        start in class AbstractAction<java.lang.Void>
      • stop

        public void stop()
        Description copied from interface: Action
        Interrupts and stops the action.
        Specified by:
        stop in interface Action<java.lang.Void>
        Specified by:
        stop in class AbstractAction<java.lang.Void>
      • skip

        public void skip()
        Description copied from interface: Action
        Marks the action to be skipped next time it is run, or immediately if it is currently running.
        Specified by:
        skip in interface Action<java.lang.Void>
        Specified by:
        skip in class AbstractAction<java.lang.Void>
      • getError

        public java.lang.Exception getError()
        Description copied from interface: Action
        Returns the exception that caused the the action to result in failure.
        Returns:
        Exception
      • isRunning

        public boolean isRunning()
        Description copied from interface: Action
        Returns whether the action is currently running or not.
        Specified by:
        isRunning in interface Action<java.lang.Void>
        Specified by:
        isRunning in class AbstractAction<java.lang.Void>
        Returns:
        Is it running?
      • getData

        public java.lang.Void getData()
        Description copied from interface: Action
        Returns whatever data this action generates.
        Specified by:
        getData in interface Action<java.lang.Void>
        Specified by:
        getData in class AbstractAction<java.lang.Void>
        Returns:
        Generated data
      • getChildren

        public java.util.List<Action> getChildren()
        Description copied from interface: Action
        Returns an unmodifiable list of sub-actions that this action contains. The exact meaning of a sub-action and how it relates to the running of this action depends on the type of action this is.
        Specified by:
        getChildren in interface Action<java.lang.Void>
        Specified by:
        getChildren in class AbstractAction<java.lang.Void>
        Returns:
        List of sub-actions
      • getDisplay

        public SimpleActionDisplay getDisplay()
        Description copied from interface: Action
        Returns the JavaFX node used to display this action in an ActionQueueDisplay object.
        Returns:
        Node
      • copy

        public SimpleAction copy()
        Description copied from interface: Action
        Creates a deep copy of this action.
        Returns:
        Deep copy of this action