Package gui

Class SimulationService

java.lang.Object
javafx.concurrent.Service<java.lang.Void>
gui.SimulationService
All Implemented Interfaces:
javafx.concurrent.Worker<java.lang.Void>, javafx.event.EventTarget

public class SimulationService
extends javafx.concurrent.Service<java.lang.Void>
Classe permettant d'exécuter un tour de simulation dans un autre Thread avec un service proposé par JavaFX.
  • Property Summary

    Properties inherited from class javafx.concurrent.Service

    exception, executor, message, onCancelled, onFailed, onReady, onRunning, onScheduled, onSucceeded, progress, running, state, title, totalWork, value, workDone
  • Nested Class Summary

    Nested classes/interfaces inherited from interface javafx.concurrent.Worker

    javafx.concurrent.Worker.State
  • Field Summary

    Fields 
    Modifier and Type Field Description
    private javafx.beans.property.SimpleObjectProperty<NBodySimulator> simulatorProperty
    Simulateur.
  • Constructor Summary

    Constructors 
    Constructor Description
    SimulationService​(NBodySimulator simulator)
    Constructeur de la classe.
  • Method Summary

    Modifier and Type Method Description
    protected javafx.concurrent.Task<java.lang.Void> createTask()
    Permet de créer une tâche sur un Thread.

    Methods inherited from class javafx.concurrent.Service

    addEventFilter, addEventHandler, buildEventDispatchChain, cancel, cancelled, exceptionProperty, executeTask, executorProperty, failed, fireEvent, getException, getExecutor, getMessage, getOnCancelled, getOnFailed, getOnReady, getOnRunning, getOnScheduled, getOnSucceeded, getProgress, getState, getTitle, getTotalWork, getValue, getWorkDone, isRunning, messageProperty, onCancelledProperty, onFailedProperty, onReadyProperty, onRunningProperty, onScheduledProperty, onSucceededProperty, progressProperty, ready, removeEventFilter, removeEventHandler, reset, restart, running, runningProperty, scheduled, setEventHandler, setExecutor, setOnCancelled, setOnFailed, setOnReady, setOnRunning, setOnScheduled, setOnSucceeded, start, stateProperty, succeeded, titleProperty, totalWorkProperty, valueProperty, workDoneProperty

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • Constructor Details

    • SimulationService

      public SimulationService​(NBodySimulator simulator)
      Constructeur de la classe.
      Parameters:
      simulator - Simulateur sur lequel il faut simuler
  • Method Details

    • createTask

      protected javafx.concurrent.Task<java.lang.Void> createTask()
      Permet de créer une tâche sur un Thread.
      Specified by:
      createTask in class javafx.concurrent.Service<java.lang.Void>