Package fr.iMath.controllers
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
-
Field Details
-
result
public javafx.scene.chart.ScatterChart<java.lang.Float,java.lang.Float> result
-
-
Constructor Details
-
GraphController
public GraphController()
-
-
Method Details
-
showGraph
Calculate all the points and show graph from two equations- Parameters:
eq1
- First equation for the X-Axiseq2
- Second equation for the Y-AxisminX
- Min X valuemaxX
- Max X valuenbrValues
- Number of points to calculate
-
initialize
public void initialize(java.net.URL location, java.util.ResourceBundle resources)- Specified by:
initialize
in interfacejavafx.fxml.Initializable
-
showGraph
Get values for a graph between min and max with nbrValues values.- Parameters:
eq
- Selected equationmin
- The Minimum valuemax
- The Maximum valuenbrValues
- The total number of values
-