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
-
Nested Class Summary
-
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
-
Field Details
-
simulatorProperty
Simulateur.
-
-
Constructor Details
-
SimulationService
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 classjavafx.concurrent.Service<java.lang.Void>
-