diff --git a/res/userdb.db b/res/userdb.db index 9919893..f98b130 100644 Binary files a/res/userdb.db and b/res/userdb.db differ diff --git a/src/main/java/seng202/group9/GUI/FlightRDController.java b/src/main/java/seng202/group9/GUI/FlightRDController.java index 5338719..7e82abe 100644 --- a/src/main/java/seng202/group9/GUI/FlightRDController.java +++ b/src/main/java/seng202/group9/GUI/FlightRDController.java @@ -222,6 +222,29 @@ public class FlightRDController extends Controller { flightPathListView(); } + public void movePointUp(){ + FlightPoint toMove = flightTableView.getSelectionModel().getSelectedItem(); + int toMoveIndex = flightTableView.getSelectionModel().getSelectedIndex(); + try{ + theDataSet.moveFlightPoint(toMove, toMoveIndex-1); + } catch (DataException e) { + e.printStackTrace(); + } + updateTable(currentPathIndex); + + } + + public void movePointDown(){ + FlightPoint toMove = flightTableView.getSelectionModel().getSelectedItem(); + int toMoveIndex = flightTableView.getSelectionModel().getSelectedIndex(); + try{ + theDataSet.moveFlightPoint(toMove, toMoveIndex+1); + } catch (DataException e) { + e.printStackTrace(); + } + updateTable(currentPathIndex); + } + /** * Updates the table so that when the database is changed (deleted or edited) it still shows the correct data values. * @param currentPathIndex The index of the current path in the Path array list.