Initial commit for Dataset Controller
This commit is contained in:
@@ -99,6 +99,7 @@ public class App extends Application
|
||||
session = new Session();
|
||||
e.printStackTrace();
|
||||
}
|
||||
menuController.createPopUpStage(SceneCode.DATASET_CONTROLLER, 600, 400);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -2175,4 +2175,12 @@ public class Dataset {
|
||||
System.exit(0);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Name of the dataset in the database
|
||||
*/
|
||||
@Override
|
||||
public String toString(){
|
||||
return this.name;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,7 +12,7 @@ public enum SceneCode {
|
||||
AIRPORT_DIST_CALC("airport_dist_calc.fxml"), AIRLINE_ADD("airline_add_form.fxml"), AIRLINE_FILTER("airline_filter_form.fxml"),
|
||||
AIRPORT_ADD("airport_add_form.fxml"), AIRPORT_FILTER("airport_filter_form.fxml"), ROUTE_ADD("route_add_form.fxml"),
|
||||
ROUTE_FILTER("route_filter_form.fxml"), AIRLINE_EDIT("airline_edit_form.fxml"), AIRPORT_EDIT("airport_edit_form.fxml"),
|
||||
ROUTE_EDIT("route_edit_form.fxml"), FLIGHT_EDITOR("flight_editor_form.fxml");
|
||||
ROUTE_EDIT("route_edit_form.fxml"), FLIGHT_EDITOR("flight_editor_form.fxml"), DATASET_CONTROLLER("dataset_editor.fxml");
|
||||
|
||||
|
||||
private String filePath;
|
||||
|
||||
@@ -0,0 +1,46 @@
|
||||
package seng202.group9.GUI;
|
||||
|
||||
import javafx.beans.InvalidationListener;
|
||||
import javafx.collections.FXCollections;
|
||||
import javafx.collections.ListChangeListener;
|
||||
import javafx.collections.ObservableList;
|
||||
import javafx.fxml.FXML;
|
||||
import javafx.scene.control.ListView;
|
||||
import javafx.scene.control.TextField;
|
||||
import seng202.group9.Controller.Dataset;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
import static javafx.collections.FXCollections.observableArrayList;
|
||||
|
||||
/**
|
||||
* Created by fwy13 on 30/09/16.
|
||||
*/
|
||||
public class DatasetController extends Controller{
|
||||
|
||||
@FXML
|
||||
ListView datasetView;
|
||||
@FXML
|
||||
TextField datasetName;
|
||||
Dataset curDataset = null;
|
||||
ObservableList<Dataset> datasetList = observableArrayList();
|
||||
|
||||
public void load() {
|
||||
curDataset = getParent().getCurrentDataset();
|
||||
ArrayList<Dataset> datasets = getParent().getDatasets();
|
||||
datasetList = observableArrayList(datasets);
|
||||
datasetView.setItems(datasetList);
|
||||
}
|
||||
|
||||
public void deleteDataset(){
|
||||
|
||||
}
|
||||
|
||||
public void addDataset(){
|
||||
|
||||
}
|
||||
|
||||
public void openDataset(){
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user