|
|
|
@ -59,6 +59,11 @@ public class AirportRDController extends Controller{
|
|
|
|
* Also sets up the dropdown menu options.
|
|
|
|
* Also sets up the dropdown menu options.
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
public void load() {
|
|
|
|
public void load() {
|
|
|
|
|
|
|
|
if (!checkDataset()){
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
theDataSet = getParent().getCurrentDataset();
|
|
|
|
|
|
|
|
if (theDataSet != null) {
|
|
|
|
//Sets up the table columns to be ready for use for Airport data
|
|
|
|
//Sets up the table columns to be ready for use for Airport data
|
|
|
|
airpIDCol.setCellValueFactory(new PropertyValueFactory<Airport, String>("ID"));
|
|
|
|
airpIDCol.setCellValueFactory(new PropertyValueFactory<Airport, String>("ID"));
|
|
|
|
airpNameCol.setCellValueFactory(new PropertyValueFactory<Airport, String>("Name"));
|
|
|
|
airpNameCol.setCellValueFactory(new PropertyValueFactory<Airport, String>("Name"));
|
|
|
|
@ -68,18 +73,18 @@ public class AirportRDController extends Controller{
|
|
|
|
airpICAOCol.setCellValueFactory(new PropertyValueFactory<Airport, String>("ICAO"));
|
|
|
|
airpICAOCol.setCellValueFactory(new PropertyValueFactory<Airport, String>("ICAO"));
|
|
|
|
airpLatitudeCol.setCellValueFactory(new PropertyValueFactory<Airport, String>("Latitude"));
|
|
|
|
airpLatitudeCol.setCellValueFactory(new PropertyValueFactory<Airport, String>("Latitude"));
|
|
|
|
airpLongitudeCol.setCellValueFactory(new PropertyValueFactory<Airport, String>("Longitude"));
|
|
|
|
airpLongitudeCol.setCellValueFactory(new PropertyValueFactory<Airport, String>("Longitude"));
|
|
|
|
airpAltitudeCol.setCellValueFactory(new PropertyValueFactory<Airport, String> ("Altitude"));
|
|
|
|
airpAltitudeCol.setCellValueFactory(new PropertyValueFactory<Airport, String>("Altitude"));
|
|
|
|
airpTimezoneCol.setCellValueFactory(new PropertyValueFactory<Airport, String>("Timezone"));
|
|
|
|
airpTimezoneCol.setCellValueFactory(new PropertyValueFactory<Airport, String>("Timezone"));
|
|
|
|
airpDSTCol.setCellValueFactory(new PropertyValueFactory<Airport, String>("DST"));
|
|
|
|
airpDSTCol.setCellValueFactory(new PropertyValueFactory<Airport, String>("DST"));
|
|
|
|
airpTzCol.setCellValueFactory(new PropertyValueFactory<Airport, String>("Tz"));
|
|
|
|
airpTzCol.setCellValueFactory(new PropertyValueFactory<Airport, String>("Tz"));
|
|
|
|
|
|
|
|
|
|
|
|
//Assigning the Dataset to the current Dataset's airports and displaying it in a table
|
|
|
|
//Assigning the Dataset to the current Dataset's airports and displaying it in a table
|
|
|
|
theDataSet = getParent().getCurrentDataset();
|
|
|
|
|
|
|
|
currentSession = getParent().getSession();
|
|
|
|
currentSession = getParent().getSession();
|
|
|
|
|
|
|
|
|
|
|
|
tableViewAirportRD.setItems(observableArrayList(theDataSet.getAirports()));
|
|
|
|
tableViewAirportRD.setItems(observableArrayList(theDataSet.getAirports()));
|
|
|
|
tableViewAirportRD.getSelectionModel().setSelectionMode(SelectionMode.MULTIPLE);
|
|
|
|
tableViewAirportRD.getSelectionModel().setSelectionMode(SelectionMode.MULTIPLE);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public void openAdd() {
|
|
|
|
public void openAdd() {
|
|
|
|
createPopUpStage(SceneCode.AIRPORT_ADD, 600, 480);
|
|
|
|
createPopUpStage(SceneCode.AIRPORT_ADD, 600, 480);
|
|
|
|
|