Package simulation

Class DrawTask

java.lang.Object
javafx.animation.AnimationTimer
simulation.DrawTask

public class DrawTask
extends javafx.animation.AnimationTimer
Specifies actions required for a simulation to be drawn and ran properly.
  • Constructor Summary

    Constructors 
    Constructor Description
    DrawTask​(javafx.scene.canvas.GraphicsContext gc, Population population, java.util.ArrayList<Obstacle> obstacles)  
  • Method Summary

    Modifier and Type Method Description
    void handle​(long l)
    Function required by javafx.animation.AnimationTimer containing actions ran every frame.

    Methods inherited from class javafx.animation.AnimationTimer

    start, stop

    Methods inherited from class java.lang.Object

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

    • DrawTask

      public DrawTask​(javafx.scene.canvas.GraphicsContext gc, Population population, java.util.ArrayList<Obstacle> obstacles)
  • Method Details

    • handle

      public void handle​(long l)
      Function required by javafx.animation.AnimationTimer containing actions ran every frame.
      Specified by:
      handle in class javafx.animation.AnimationTimer
      Parameters:
      l - The timestamp of the current frame given in nanoseconds.