Skip to content

Commit

Permalink
GUI Created
Browse files Browse the repository at this point in the history
  • Loading branch information
marl0rd committed Jun 17, 2014
1 parent 611d984 commit f60f81d
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
3 changes: 1 addition & 2 deletions src/main/java/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
*/
public class Main {
public static void main(String[] args){
SecondOrderSystem G = new SecondOrderSystem("G");
G.start();

}
}
15 changes: 14 additions & 1 deletion src/main/java/gui/Gui.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,22 @@

import javafx.beans.property.*;
import javafx.fxml.FXML;
import javafx.fxml.FXMLLoader;
import javafx.scene.chart.CategoryAxis;
import javafx.scene.chart.LineChart;
import javafx.scene.chart.NumberAxis;
import javafx.scene.chart.XYChart;
import javafx.scene.control.Button;
import javafx.scene.control.TextField;
import javafx.scene.layout.AnchorPane;

import java.io.IOException;
import java.sql.Timestamp;

/**
* Created by marlon on 6/16/14.
*/
public class Gui {
public class Gui extends AnchorPane{
private static final int TRENDING_DATA_LIMIT = 50;
private static final long SAMPLING_TIME = 500;

Expand All @@ -35,6 +39,15 @@ public class Gui {
private final XYChart.Series<Double, Timestamp> systemOutput = new XYChart.Series<>();

public Gui() {
try {
FXMLLoader fxmlLoader = new FXMLLoader(getClass().getResource("Gui.fxml"));
fxmlLoader.setRoot(this);
fxmlLoader.setController(this);
fxmlLoader.load();
} catch (IOException exception) {
throw new RuntimeException(exception);
}

output = new SimpleDoubleProperty(this, "systemOutput", 0.0);
lastUpdate = System.currentTimeMillis();
timestamp = new ObjectPropertyBase<Timestamp>(new Timestamp(System.currentTimeMillis())) {
Expand Down

0 comments on commit f60f81d

Please sign in to comment.