Fixed Merge Errors

This commit is contained in:
Sunguin Peng
2016-10-01 16:34:50 +13:00
2 changed files with 23 additions and 0 deletions
@@ -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.