Klasse FxService<T>

java.lang.Object
javafx.concurrent.Service<T>
com.dua3.utility.fx.FxService<T>
Typparameter:
T - The result type of the service.
Alle implementierten Schnittstellen:
Worker<T>, EventTarget

public abstract class FxService<T> extends Service<T>
Abstract class that extends the JavaFX Service class to manage tasks with progress, state, and title trackers. Allows for the registration and removal of task trackers that implement the FxTaskTracker interface.
  • Konstruktordetails

    • FxService

      protected FxService()
  • Methodendetails

    • createTask

      protected final Task<T> createTask()
      Angegeben von:
      createTask in Klasse Service<T>
    • doCreateTask

      protected abstract Task<T> doCreateTask()
      Creates and returns a custom task to be executed by the FxService. This method must be implemented by subclasses to define the specific behavior and logic of the task being performed by the service.
      Gibt zurück:
      a Task instance of type T representing the operation to be performed
    • addTaskTracker

      public void addTaskTracker(FxTaskTracker t)
      Adds an FxTaskTracker to the list of task trackers. The added tracker will receive updates about task progress, state, and title.
      Parameter:
      t - the FxTaskTracker to be added to the list of task trackers
    • removeTaskTracker

      public void removeTaskTracker(FxTaskTracker t)
      Removes an FxTaskTracker from the list of task trackers. The removed tracker will no longer receive updates about task progress, state, and title.
      Parameter:
      t - the FxTaskTracker to be removed from the list of task trackers