Class GraphController

java.lang.Object
fr.iMath.controllers.GraphController
All Implemented Interfaces:
javafx.fxml.Initializable

public class GraphController
extends java.lang.Object
implements javafx.fxml.Initializable
JavaFX: Show the graph within a UI
  • Field Summary

    Fields 
    Modifier and Type Field Description
    javafx.scene.chart.ScatterChart<java.lang.Float,​java.lang.Float> result  
  • Constructor Summary

    Constructors 
    Constructor Description
    GraphController()  
  • Method Summary

    Modifier and Type Method Description
    void initialize​(java.net.URL location, java.util.ResourceBundle resources)  
    void showGraph​(Equation eq, float min, float max, int nbrValues)
    Get values for a graph between min and max with nbrValues values.
    void showGraph​(Equation eq1, Equation eq2, float minX, float maxX, int nbrValues)
    Calculate all the points and show graph from two equations

    Methods inherited from class java.lang.Object

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

    • result

      public javafx.scene.chart.ScatterChart<java.lang.Float,​java.lang.Float> result
  • Constructor Details

  • Method Details

    • showGraph

      public void showGraph​(Equation eq1, Equation eq2, float minX, float maxX, int nbrValues)
      Calculate all the points and show graph from two equations
      Parameters:
      eq1 - First equation for the X-Axis
      eq2 - Second equation for the Y-Axis
      minX - Min X value
      maxX - Max X value
      nbrValues - Number of points to calculate
    • initialize

      public void initialize​(java.net.URL location, java.util.ResourceBundle resources)
      Specified by:
      initialize in interface javafx.fxml.Initializable
    • showGraph

      public void showGraph​(Equation eq, float min, float max, int nbrValues)
      Get values for a graph between min and max with nbrValues values.
      Parameters:
      eq - Selected equation
      min - The Minimum value
      max - The Maximum value
      nbrValues - The total number of values