Story 5 done
This commit is contained in:
@@ -88,11 +88,7 @@ public class AddTripController extends Controller{
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!fail) {
|
if (!fail) {
|
||||||
String date = "";
|
Trip trip = new Trip(tripName.getText() ,stops, direction.getValue(), ride.getValue(), days, boolReoccur, endDate.getValue());
|
||||||
if (endDate.getValue() != null && boolReoccur == true){
|
|
||||||
date = endDate.getValue().toString();
|
|
||||||
}
|
|
||||||
Trip trip = new Trip(tripName.getText() ,stops, direction.getValue(), ride.getValue(), days, boolReoccur, date);
|
|
||||||
System.out.println(trip);
|
System.out.println(trip);
|
||||||
Optional<ButtonType> result = popUp(Alert.AlertType.CONFIRMATION, "Success!", "Trip Added", String.format("Your Trip %1s has been added successfully!\n\nWould you like to add another trip?", tripName.getText()), ButtonSets.YesNo);
|
Optional<ButtonType> result = popUp(Alert.AlertType.CONFIRMATION, "Success!", "Trip Added", String.format("Your Trip %1s has been added successfully!\n\nWould you like to add another trip?", tripName.getText()), ButtonSets.YesNo);
|
||||||
parent.getSession().getDataManager().addTrip(trip);
|
parent.getSession().getDataManager().addTrip(trip);
|
||||||
|
|||||||
@@ -66,6 +66,14 @@ public class BaseController extends Controller {
|
|||||||
changeScene(SceneCode.SHARED_RIDES);
|
changeScene(SceneCode.SHARED_RIDES);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void mySharedRides() throws Exception{
|
||||||
|
changeScene(SceneCode.MY_SHARED_RIDES);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void myBookings() throws Exception{
|
||||||
|
changeScene(SceneCode.MY_BOOKINGS);
|
||||||
|
}
|
||||||
|
|
||||||
public void setContent(Parent parent1){
|
public void setContent(Parent parent1){
|
||||||
//remove all children that do not belong to the original fxml
|
//remove all children that do not belong to the original fxml
|
||||||
while (base.getChildren().size() > childNum) {
|
while (base.getChildren().size() > childNum) {
|
||||||
|
|||||||
@@ -17,6 +17,7 @@ import utils.DataManagerSerialiser;
|
|||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
|
import java.time.LocalDate;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -73,7 +74,7 @@ public class Main extends Application {
|
|||||||
ObservableList<TripStop> tripStops = FXCollections.observableArrayList();
|
ObservableList<TripStop> tripStops = FXCollections.observableArrayList();
|
||||||
tripStops.addAll(tripStop1, tripStop4);
|
tripStops.addAll(tripStop1, tripStop4);
|
||||||
|
|
||||||
Trip trip = new Trip("Home to Uni", tripStops, "University", ride, days, true, "30-12-2017");
|
Trip trip = new Trip("Home to Uni", tripStops, "University", ride, days, true, LocalDate.of(2017, 12, 30));
|
||||||
|
|
||||||
this.session.getDataManager().addRides(ride);
|
this.session.getDataManager().addRides(ride);
|
||||||
|
|
||||||
|
|||||||
@@ -51,6 +51,7 @@ public class MainController extends Controller{
|
|||||||
for (String s: notifications){
|
for (String s: notifications){
|
||||||
popUp(Alert.AlertType.INFORMATION, "Notification!", "You have received a Notification", s);
|
popUp(Alert.AlertType.INFORMATION, "Notification!", "You have received a Notification", s);
|
||||||
}
|
}
|
||||||
|
notifications.clear();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,108 @@
|
|||||||
|
package controllers;
|
||||||
|
|
||||||
|
import javafx.collections.FXCollections;
|
||||||
|
import javafx.collections.ObservableList;
|
||||||
|
import javafx.fxml.FXML;
|
||||||
|
import javafx.scene.control.*;
|
||||||
|
import javafx.scene.paint.Color;
|
||||||
|
import model.*;
|
||||||
|
|
||||||
|
import java.net.URL;
|
||||||
|
import java.util.Comparator;
|
||||||
|
import java.util.Optional;
|
||||||
|
import java.util.ResourceBundle;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Created by Gondr on 2/06/2017.
|
||||||
|
*/
|
||||||
|
public class MyBookingsController extends Controller {
|
||||||
|
@FXML
|
||||||
|
private Label rideLabel;
|
||||||
|
@FXML
|
||||||
|
private Label directionLabel;
|
||||||
|
@FXML
|
||||||
|
private Label mondayLabel;
|
||||||
|
@FXML
|
||||||
|
private Label tuesdayLabel;
|
||||||
|
@FXML
|
||||||
|
private Label wednesdayLabel;
|
||||||
|
@FXML
|
||||||
|
private Label thursdayLabel;
|
||||||
|
@FXML
|
||||||
|
private Label fridayLabel;
|
||||||
|
@FXML
|
||||||
|
private Label saturdayLabel;
|
||||||
|
@FXML
|
||||||
|
private Label sundayLabel;
|
||||||
|
@FXML
|
||||||
|
private Label reoccuringLabel;
|
||||||
|
@FXML
|
||||||
|
private Label endDateLabel;
|
||||||
|
@FXML
|
||||||
|
private TableView<TripStop> stopsList;
|
||||||
|
@FXML
|
||||||
|
private ListView<SharedTrip> tripsList;
|
||||||
|
private ObservableList<SharedTrip> trips;
|
||||||
|
@FXML
|
||||||
|
private TableColumn<TripStop, String> stopTimeColumn;
|
||||||
|
@FXML
|
||||||
|
private TableColumn<TripStop, String> stopNameColumn;
|
||||||
|
private Trip selectedTrip;
|
||||||
|
|
||||||
|
private void setRideDays(Label day, boolean travelling){
|
||||||
|
if (travelling){
|
||||||
|
day.setTextFill(Color.GREEN);
|
||||||
|
}else{
|
||||||
|
day.setTextFill(Color.RED);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void cancelRide(){
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void runLater(){
|
||||||
|
//fill tables etc;
|
||||||
|
Session.session.getUser().populateBookings();
|
||||||
|
trips = FXCollections.observableArrayList(Session.session.getUser().getBookings());
|
||||||
|
Comparator<? super SharedTrip> comparatorByStartDate = new Comparator<SharedTrip>() {
|
||||||
|
@Override
|
||||||
|
public int compare(SharedTrip o1, SharedTrip o2) {
|
||||||
|
return (int)(o1.getStartDate().toEpochDay() - o2.getStartDate().toEpochDay());
|
||||||
|
}
|
||||||
|
};
|
||||||
|
FXCollections.sort(trips, comparatorByStartDate);
|
||||||
|
tripsList.setItems(trips);
|
||||||
|
stopTimeColumn.setCellValueFactory(p -> p.getValue().nameProperty());
|
||||||
|
stopNameColumn.setCellValueFactory(p -> p.getValue().nameProperty());
|
||||||
|
tripsList.getSelectionModel().selectedItemProperty().addListener((observable, oldValue, newValue) -> {
|
||||||
|
selectedTrip = tripsList.getSelectionModel().getSelectedItem();
|
||||||
|
stopsList.setItems(selectedTrip.route);
|
||||||
|
rideLabel.setText(selectedTrip.ride.toString());
|
||||||
|
directionLabel.setText(selectedTrip.direction);
|
||||||
|
setRideDays(mondayLabel, selectedTrip.days[Trip.MONDAY]);
|
||||||
|
setRideDays(tuesdayLabel, selectedTrip.days[Trip.TUESDAY]);
|
||||||
|
setRideDays(wednesdayLabel, selectedTrip.days[Trip.WEDNESDAY]);
|
||||||
|
setRideDays(thursdayLabel, selectedTrip.days[Trip.THURSDAY]);
|
||||||
|
setRideDays(fridayLabel, selectedTrip.days[Trip.FRIDAY]);
|
||||||
|
setRideDays(saturdayLabel, selectedTrip.days[Trip.SATURDAY]);
|
||||||
|
setRideDays(sundayLabel, selectedTrip.days[Trip.SUNDAY]);
|
||||||
|
if (selectedTrip.reoccur){
|
||||||
|
reoccuringLabel.setText("Yes");
|
||||||
|
endDateLabel.setText(selectedTrip.endDate.toString());
|
||||||
|
}else{
|
||||||
|
reoccuringLabel.setText("No");
|
||||||
|
endDateLabel.setText("-");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void initialize(URL location, ResourceBundle resources) {
|
||||||
|
rideLabel.setText("-");
|
||||||
|
directionLabel.setText("-");
|
||||||
|
reoccuringLabel.setText("-");
|
||||||
|
endDateLabel.setText("-");
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,107 @@
|
|||||||
|
package controllers;
|
||||||
|
|
||||||
|
import javafx.collections.FXCollections;
|
||||||
|
import javafx.collections.ObservableList;
|
||||||
|
import javafx.fxml.FXML;
|
||||||
|
import javafx.scene.control.*;
|
||||||
|
import javafx.scene.paint.Color;
|
||||||
|
import model.*;
|
||||||
|
|
||||||
|
import java.net.URL;
|
||||||
|
import java.util.Comparator;
|
||||||
|
import java.util.Optional;
|
||||||
|
import java.util.ResourceBundle;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Created by Gondr on 2/06/2017.
|
||||||
|
*/
|
||||||
|
public class MySharedTripsController extends Controller{
|
||||||
|
@FXML
|
||||||
|
private Label rideLabel;
|
||||||
|
@FXML
|
||||||
|
private Label directionLabel;
|
||||||
|
@FXML
|
||||||
|
private Label mondayLabel;
|
||||||
|
@FXML
|
||||||
|
private Label tuesdayLabel;
|
||||||
|
@FXML
|
||||||
|
private Label wednesdayLabel;
|
||||||
|
@FXML
|
||||||
|
private Label thursdayLabel;
|
||||||
|
@FXML
|
||||||
|
private Label fridayLabel;
|
||||||
|
@FXML
|
||||||
|
private Label saturdayLabel;
|
||||||
|
@FXML
|
||||||
|
private Label sundayLabel;
|
||||||
|
@FXML
|
||||||
|
private Label reoccuringLabel;
|
||||||
|
@FXML
|
||||||
|
private Label endDateLabel;
|
||||||
|
@FXML
|
||||||
|
private TableView<TripStop> stopsList;
|
||||||
|
@FXML
|
||||||
|
private ListView<SharedTrip> tripsList;
|
||||||
|
private ObservableList<SharedTrip> trips;
|
||||||
|
@FXML
|
||||||
|
private TableColumn<TripStop, String> stopTimeColumn;
|
||||||
|
@FXML
|
||||||
|
private TableColumn<TripStop, String> stopNameColumn;
|
||||||
|
private SharedTrip selectedTrip;
|
||||||
|
|
||||||
|
private void setRideDays(Label day, boolean travelling){
|
||||||
|
if (travelling){
|
||||||
|
day.setTextFill(Color.GREEN);
|
||||||
|
}else{
|
||||||
|
day.setTextFill(Color.RED);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void cancelRide(){
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void runLater(){
|
||||||
|
//fill tables etc;
|
||||||
|
trips = FXCollections.observableArrayList(parent.getSession().getDataManager().getSharedTrips());
|
||||||
|
tripsList.setItems(trips);
|
||||||
|
Comparator<? super SharedTrip> comparatorByStartDate = new Comparator<SharedTrip>() {
|
||||||
|
@Override
|
||||||
|
public int compare(SharedTrip o1, SharedTrip o2) {
|
||||||
|
return (int)(o1.getStartDate().toEpochDay() - o2.getStartDate().toEpochDay());
|
||||||
|
}
|
||||||
|
};
|
||||||
|
FXCollections.sort(trips, comparatorByStartDate);
|
||||||
|
stopTimeColumn.setCellValueFactory(p -> p.getValue().nameProperty());
|
||||||
|
stopNameColumn.setCellValueFactory(p -> p.getValue().nameProperty());
|
||||||
|
tripsList.getSelectionModel().selectedItemProperty().addListener((observable, oldValue, newValue) -> {
|
||||||
|
selectedTrip = tripsList.getSelectionModel().getSelectedItem();
|
||||||
|
stopsList.setItems(selectedTrip.route);
|
||||||
|
rideLabel.setText(selectedTrip.ride.toString());
|
||||||
|
directionLabel.setText(selectedTrip.direction);
|
||||||
|
setRideDays(mondayLabel, selectedTrip.days[Trip.MONDAY]);
|
||||||
|
setRideDays(tuesdayLabel, selectedTrip.days[Trip.TUESDAY]);
|
||||||
|
setRideDays(wednesdayLabel, selectedTrip.days[Trip.WEDNESDAY]);
|
||||||
|
setRideDays(thursdayLabel, selectedTrip.days[Trip.THURSDAY]);
|
||||||
|
setRideDays(fridayLabel, selectedTrip.days[Trip.FRIDAY]);
|
||||||
|
setRideDays(saturdayLabel, selectedTrip.days[Trip.SATURDAY]);
|
||||||
|
setRideDays(sundayLabel, selectedTrip.days[Trip.SUNDAY]);
|
||||||
|
if (selectedTrip.reoccur){
|
||||||
|
reoccuringLabel.setText("Yes");
|
||||||
|
endDateLabel.setText(selectedTrip.endDate.toString());
|
||||||
|
}else{
|
||||||
|
reoccuringLabel.setText("No");
|
||||||
|
endDateLabel.setText("-");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void initialize(URL location, ResourceBundle resources) {
|
||||||
|
rideLabel.setText("-");
|
||||||
|
directionLabel.setText("-");
|
||||||
|
reoccuringLabel.setText("-");
|
||||||
|
endDateLabel.setText("-");
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -109,7 +109,7 @@ public class MyTripsController extends Controller{
|
|||||||
setRideDays(sundayLabel, selectedTrip.days[Trip.SUNDAY]);
|
setRideDays(sundayLabel, selectedTrip.days[Trip.SUNDAY]);
|
||||||
if (selectedTrip.reoccur){
|
if (selectedTrip.reoccur){
|
||||||
reoccuringLabel.setText("Yes");
|
reoccuringLabel.setText("Yes");
|
||||||
endDateLabel.setText(selectedTrip.endDate);
|
endDateLabel.setText(selectedTrip.endDate.toString());
|
||||||
}else{
|
}else{
|
||||||
reoccuringLabel.setText("No");
|
reoccuringLabel.setText("No");
|
||||||
endDateLabel.setText("-");
|
endDateLabel.setText("-");
|
||||||
|
|||||||
@@ -130,6 +130,7 @@ public class SharedTripsController extends Controller{
|
|||||||
Button bookRide = new Button("Book Ride");
|
Button bookRide = new Button("Book Ride");
|
||||||
bookRide.setOnAction(e->{
|
bookRide.setOnAction(e->{
|
||||||
trip.bookSeat(Session.session.getUser());
|
trip.bookSeat(Session.session.getUser());
|
||||||
|
Session.session.getUser().book(trip);
|
||||||
tripDetails.close();
|
tripDetails.close();
|
||||||
search();
|
search();
|
||||||
popUp(Alert.AlertType.CONFIRMATION, "Success!", "You have Successfully booked a ride!", "The ride has been successfully booked and can be viewed in your booked rides.");
|
popUp(Alert.AlertType.CONFIRMATION, "Success!", "You have Successfully booked a ride!", "The ride has been successfully booked and can be viewed in your booked rides.");
|
||||||
|
|||||||
@@ -161,7 +161,17 @@ public class DataManager {
|
|||||||
routes.putIfAbsent(Session.session.getUser().getID(), FXCollections.observableArrayList());
|
routes.putIfAbsent(Session.session.getUser().getID(), FXCollections.observableArrayList());
|
||||||
trips.putIfAbsent(Session.session.getUser().getID(), FXCollections.observableArrayList());
|
trips.putIfAbsent(Session.session.getUser().getID(), FXCollections.observableArrayList());
|
||||||
sharedTrips.putIfAbsent(Session.session.getUser().getID(), FXCollections.observableArrayList());
|
sharedTrips.putIfAbsent(Session.session.getUser().getID(), FXCollections.observableArrayList());
|
||||||
|
if (Session.session.getUser().bookings == null) {
|
||||||
|
Session.session.getUser().bookings = new ArrayList<>();
|
||||||
|
}
|
||||||
notifications.putIfAbsent(Session.session.getUser().getID(), FXCollections.observableArrayList());
|
notifications.putIfAbsent(Session.session.getUser().getID(), FXCollections.observableArrayList());
|
||||||
|
//expiry things for Driver
|
||||||
|
if (Session.session.getUser() instanceof Driver){
|
||||||
|
String licenseOverdue = ((Driver)Session.session.getUser()).getLicenseNotification();
|
||||||
|
if (licenseOverdue != null){
|
||||||
|
notifications.get(Session.session.getUser().getID()).add(licenseOverdue);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
//////////////////////////////
|
//////////////////////////////
|
||||||
//Getters and Setters
|
//Getters and Setters
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ public class Driver extends User{
|
|||||||
protected String licenseNumber;
|
protected String licenseNumber;
|
||||||
protected LocalDate licenseDateIssued;
|
protected LocalDate licenseDateIssued;
|
||||||
protected LocalDate licenseDateExpire;
|
protected LocalDate licenseDateExpire;
|
||||||
|
private LocalDate lastNotified;
|
||||||
|
|
||||||
public enum LicenseType{
|
public enum LicenseType{
|
||||||
RESTRICTED("Restricted"), FULL("Full"), FULL2YEARS("Full for 2 Years");
|
RESTRICTED("Restricted"), FULL("Full"), FULL2YEARS("Full for 2 Years");
|
||||||
@@ -44,6 +45,29 @@ public class Driver extends User{
|
|||||||
this.licenseNumber = licenseNumber;
|
this.licenseNumber = licenseNumber;
|
||||||
this.licenseDateIssued = licenseDateIssued;
|
this.licenseDateIssued = licenseDateIssued;
|
||||||
this.licenseDateExpire = licenseDateExpire;
|
this.licenseDateExpire = licenseDateExpire;
|
||||||
|
lastNotified = LocalDate.MIN;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getLicenseNotification(){
|
||||||
|
if (licenseDateExpire.minusWeeks(4).isBefore(LocalDate.now())){
|
||||||
|
if (licenseDateExpire.minusWeeks(2).isBefore(LocalDate.now())){
|
||||||
|
if (licenseDateExpire.minusWeeks(1).isBefore(LocalDate.now())){
|
||||||
|
if (licenseDateExpire.minusWeeks(1).isAfter(lastNotified)){
|
||||||
|
lastNotified = LocalDate.now();
|
||||||
|
return "Your License is expiring in 1 weeks.";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (licenseDateExpire.minusWeeks(2).isAfter(lastNotified)){
|
||||||
|
lastNotified = LocalDate.now();
|
||||||
|
return "Your License is expiring in 2 weeks.";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (licenseDateExpire.minusWeeks(4).isAfter(lastNotified)){
|
||||||
|
lastNotified = LocalDate.now();
|
||||||
|
return "Your License is expiring in 4 weeks.";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,7 +16,8 @@ public enum SceneCode {
|
|||||||
//screens after login
|
//screens after login
|
||||||
HOME("home"),ADD_RIDE("addride"),MY_RIDES("myrides"), ADD_STOPS("addstops"), MY_STOPS("mystops"), ADD_ROUTE("addroute"),
|
HOME("home"),ADD_RIDE("addride"),MY_RIDES("myrides"), ADD_STOPS("addstops"), MY_STOPS("mystops"), ADD_ROUTE("addroute"),
|
||||||
MY_ROUTES("myroutes"), ADD_TRIP("addtrip"), MY_TRIPS("mytrips"), SHARED_RIDES("sharedtrips"), SEARCH_STOPS("searchstops"),
|
MY_ROUTES("myroutes"), ADD_TRIP("addtrip"), MY_TRIPS("mytrips"), SHARED_RIDES("sharedtrips"), SEARCH_STOPS("searchstops"),
|
||||||
REGISTER("register", false), ADD_PHOTO("addphoto", false), REGISTER_DRIVER("registerdriver", false);
|
REGISTER("register", false), ADD_PHOTO("addphoto", false), REGISTER_DRIVER("registerdriver", false), MY_SHARED_RIDES("mysharedtrips"),
|
||||||
|
MY_BOOKINGS("mybookedtrips");
|
||||||
|
|
||||||
private String path;
|
private String path;
|
||||||
private boolean loadMenu;
|
private boolean loadMenu;
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
package model;
|
package model;
|
||||||
|
|
||||||
|
import java.time.LocalDate;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by Gondr on 28/05/2017.
|
* Created by Gondr on 28/05/2017.
|
||||||
*/
|
*/
|
||||||
@@ -7,14 +9,19 @@ public class SharedTrip extends Trip {
|
|||||||
|
|
||||||
private int seatsAvailable;
|
private int seatsAvailable;
|
||||||
|
|
||||||
private User[] userBookings;
|
protected User[] userBookings;
|
||||||
|
|
||||||
|
private LocalDate startDate;
|
||||||
|
|
||||||
public SharedTrip (Trip trip, int seatsAvailable){
|
public SharedTrip (Trip trip, int seatsAvailable){
|
||||||
super(trip.name, trip.route, trip.direction, trip.ride, trip.days, trip.reoccur, trip.endDate);
|
super(trip.name, trip.route, trip.direction, trip.ride, trip.days, trip.reoccur, trip.endDate);
|
||||||
userBookings = new User[this.ride.getNumSeats() - 1];
|
userBookings = new User[this.ride.getNumSeats() - 1];
|
||||||
|
startDate = LocalDate.now();
|
||||||
this.seatsAvailable = seatsAvailable;
|
this.seatsAvailable = seatsAvailable;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public String getDays(){
|
public String getDays(){
|
||||||
String daysString = "";
|
String daysString = "";
|
||||||
for (int i = 0; i < 7; i++){
|
for (int i = 0; i < 7; i++){
|
||||||
@@ -37,6 +44,10 @@ public class SharedTrip extends Trip {
|
|||||||
seatsAvailable -= 1;
|
seatsAvailable -= 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public LocalDate getStartDate(){
|
||||||
|
return startDate;
|
||||||
|
}
|
||||||
|
|
||||||
public boolean isFull(){
|
public boolean isFull(){
|
||||||
return seatsAvailable == 0;
|
return seatsAvailable == 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ package model;
|
|||||||
import javafx.collections.FXCollections;
|
import javafx.collections.FXCollections;
|
||||||
import javafx.collections.ObservableList;
|
import javafx.collections.ObservableList;
|
||||||
|
|
||||||
|
import java.time.LocalDate;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
|
||||||
@@ -17,7 +18,7 @@ public class Trip {
|
|||||||
public Ride ride;
|
public Ride ride;
|
||||||
public boolean[] days;
|
public boolean[] days;
|
||||||
public boolean reoccur;
|
public boolean reoccur;
|
||||||
public String endDate;
|
public LocalDate endDate;
|
||||||
public String name;
|
public String name;
|
||||||
|
|
||||||
public static int MONDAY = 0;
|
public static int MONDAY = 0;
|
||||||
@@ -64,7 +65,7 @@ public class Trip {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public Trip(String name, ObservableList<TripStop> route, String direction, Ride ride, boolean[] days, boolean reoccur, String endDate){
|
public Trip(String name, ObservableList<TripStop> route, String direction, Ride ride, boolean[] days, boolean reoccur, LocalDate endDate){
|
||||||
this.name = name;
|
this.name = name;
|
||||||
this.route = route;
|
this.route = route;
|
||||||
this.direction = direction;
|
this.direction = direction;
|
||||||
|
|||||||
@@ -6,6 +6,8 @@ import javafx.scene.image.Image;
|
|||||||
import javax.imageio.ImageIO;
|
import javax.imageio.ImageIO;
|
||||||
import java.awt.image.BufferedImage;
|
import java.awt.image.BufferedImage;
|
||||||
import java.io.*;
|
import java.io.*;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Arrays;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by Gondr on 1/06/2017.
|
* Created by Gondr on 1/06/2017.
|
||||||
@@ -21,6 +23,7 @@ public class User {
|
|||||||
transient protected Image photo;
|
transient protected Image photo;
|
||||||
private byte[] image;
|
private byte[] image;
|
||||||
protected String ID;
|
protected String ID;
|
||||||
|
protected transient ArrayList<SharedTrip> bookings;
|
||||||
|
|
||||||
public enum AccountType{
|
public enum AccountType{
|
||||||
PASSENGER("Passenger"), DRIVER("Driver");
|
PASSENGER("Passenger"), DRIVER("Driver");
|
||||||
@@ -51,7 +54,7 @@ public class User {
|
|||||||
this.mobilephone = mobilephone;
|
this.mobilephone = mobilephone;
|
||||||
this.photo = photo;
|
this.photo = photo;
|
||||||
this.accountType = AccountType.PASSENGER;
|
this.accountType = AccountType.PASSENGER;
|
||||||
|
bookings = new ArrayList<>();
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean checkPassword(String p){
|
public boolean checkPassword(String p){
|
||||||
@@ -66,6 +69,14 @@ public class User {
|
|||||||
return ID;
|
return ID;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void book(SharedTrip trip){
|
||||||
|
bookings.add(trip);
|
||||||
|
}
|
||||||
|
|
||||||
|
public ArrayList<SharedTrip> getBookings() {
|
||||||
|
return bookings;
|
||||||
|
}
|
||||||
|
|
||||||
public void serialise(){
|
public void serialise(){
|
||||||
try {
|
try {
|
||||||
BufferedImage bi = SwingFXUtils.fromFXImage(photo, null);
|
BufferedImage bi = SwingFXUtils.fromFXImage(photo, null);
|
||||||
@@ -80,6 +91,19 @@ public class User {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void populateBookings(){
|
||||||
|
bookings = new ArrayList<>();
|
||||||
|
for (SharedTrip s: Session.session.getDataManager().getAllSharedTrips()){
|
||||||
|
for (User u: s.userBookings){
|
||||||
|
if (u != null) {
|
||||||
|
if (u.getStudentNumber() == this.studentNumber) {
|
||||||
|
this.bookings.add(s);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public void deserialise(){
|
public void deserialise(){
|
||||||
ByteArrayInputStream in = new ByteArrayInputStream(image);
|
ByteArrayInputStream in = new ByteArrayInputStream(image);
|
||||||
BufferedImage bi = null;
|
BufferedImage bi = null;
|
||||||
@@ -89,5 +113,6 @@ public class User {
|
|||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
photo = SwingFXUtils.toFXImage(bi, null);
|
photo = SwingFXUtils.toFXImage(bi, null);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -57,11 +57,21 @@
|
|||||||
<Button mnemonicParsing="false" onAction="#sharedRides" text="Shared Rides" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" />
|
<Button mnemonicParsing="false" onAction="#sharedRides" text="Shared Rides" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" />
|
||||||
</children>
|
</children>
|
||||||
</AnchorPane>
|
</AnchorPane>
|
||||||
<AnchorPane prefHeight="200.0" prefWidth="200.0">
|
<AnchorPane>
|
||||||
<children>
|
<children>
|
||||||
<Button mnemonicParsing="false" onAction="#searchStops" text="Search Stops" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" />
|
<Button mnemonicParsing="false" onAction="#searchStops" text="Search Stops" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" />
|
||||||
</children>
|
</children>
|
||||||
</AnchorPane>
|
</AnchorPane>
|
||||||
|
<AnchorPane>
|
||||||
|
<children>
|
||||||
|
<Button mnemonicParsing="false" onAction="#mySharedRides" text="My Shared Rides" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" />
|
||||||
|
</children>
|
||||||
|
</AnchorPane>
|
||||||
|
<AnchorPane>
|
||||||
|
<children>
|
||||||
|
<Button mnemonicParsing="false" onAction="#myBookings" text="My Bookings" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" />
|
||||||
|
</children>
|
||||||
|
</AnchorPane>
|
||||||
</children>
|
</children>
|
||||||
</VBox>
|
</VBox>
|
||||||
</children>
|
</children>
|
||||||
|
|||||||
@@ -0,0 +1,129 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
|
||||||
|
<?import javafx.geometry.*?>
|
||||||
|
<?import javafx.scene.text.*?>
|
||||||
|
<?import javafx.scene.control.*?>
|
||||||
|
<?import java.lang.*?>
|
||||||
|
<?import javafx.scene.layout.*?>
|
||||||
|
|
||||||
|
<AnchorPane prefHeight="400.0" prefWidth="600.0" xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1" fx:controller="controllers.MyBookingsController">
|
||||||
|
<children>
|
||||||
|
<GridPane layoutX="213.0" layoutY="99.0" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
|
||||||
|
<columnConstraints>
|
||||||
|
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="300.0" />
|
||||||
|
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="300.0" />
|
||||||
|
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="300.0" />
|
||||||
|
</columnConstraints>
|
||||||
|
<rowConstraints>
|
||||||
|
<RowConstraints maxHeight="50.0" minHeight="50.0" prefHeight="50.0" vgrow="SOMETIMES" />
|
||||||
|
<RowConstraints maxHeight="40.0" minHeight="40.0" prefHeight="40.0" vgrow="SOMETIMES" />
|
||||||
|
<RowConstraints minHeight="10.0" prefHeight="348.0" vgrow="SOMETIMES" />
|
||||||
|
</rowConstraints>
|
||||||
|
<children>
|
||||||
|
<ListView fx:id="tripsList" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" prefHeight="200.0" prefWidth="200.0" GridPane.rowIndex="2" />
|
||||||
|
<Label text="My Bookings" GridPane.columnSpan="3" GridPane.halignment="CENTER">
|
||||||
|
<font>
|
||||||
|
<Font size="18.0" />
|
||||||
|
</font>
|
||||||
|
</Label>
|
||||||
|
<Label text="Trips" GridPane.halignment="CENTER" GridPane.rowIndex="1">
|
||||||
|
<font>
|
||||||
|
<Font size="16.0" />
|
||||||
|
</font>
|
||||||
|
</Label>
|
||||||
|
<Label text="Stops" GridPane.columnIndex="1" GridPane.halignment="CENTER" GridPane.rowIndex="1">
|
||||||
|
<font>
|
||||||
|
<Font size="16.0" />
|
||||||
|
</font>
|
||||||
|
</Label>
|
||||||
|
<TableView fx:id="stopsList" prefHeight="200.0" prefWidth="200.0" GridPane.columnIndex="1" GridPane.rowIndex="2">
|
||||||
|
<columns>
|
||||||
|
<TableColumn fx:id="stopTimeColumn" prefWidth="104.0" text="Time" />
|
||||||
|
<TableColumn fx:id="stopNameColumn" prefWidth="95.0" text="Stop" />
|
||||||
|
</columns>
|
||||||
|
</TableView>
|
||||||
|
<Label text="Information" GridPane.columnIndex="2" GridPane.halignment="CENTER" GridPane.rowIndex="1">
|
||||||
|
<font>
|
||||||
|
<Font size="16.0" />
|
||||||
|
</font>
|
||||||
|
</Label>
|
||||||
|
<GridPane GridPane.columnIndex="2" GridPane.rowIndex="2">
|
||||||
|
<columnConstraints>
|
||||||
|
<ColumnConstraints hgrow="SOMETIMES" maxWidth="80.0" minWidth="10.0" prefWidth="80.0" />
|
||||||
|
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
|
||||||
|
</columnConstraints>
|
||||||
|
<rowConstraints>
|
||||||
|
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||||
|
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||||
|
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||||
|
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||||
|
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||||
|
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||||
|
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||||
|
</rowConstraints>
|
||||||
|
<children>
|
||||||
|
<Label text="Ride:" />
|
||||||
|
<Label fx:id="rideLabel" text="Label" GridPane.columnIndex="1" />
|
||||||
|
<Label text="Direction:" GridPane.rowIndex="1" />
|
||||||
|
<Label fx:id="directionLabel" text="Label" GridPane.columnIndex="1" GridPane.rowIndex="1" />
|
||||||
|
<Label text="Days:" GridPane.rowIndex="2" />
|
||||||
|
<Label text="Reoccuring:" GridPane.rowIndex="3" />
|
||||||
|
<Label text="Trip End Date:" GridPane.rowIndex="4" />
|
||||||
|
<Label fx:id="reoccuringLabel" text="Label" GridPane.columnIndex="1" GridPane.rowIndex="3" />
|
||||||
|
<Label fx:id="endDateLabel" text="Label" GridPane.columnIndex="1" GridPane.rowIndex="4" />
|
||||||
|
<HBox alignment="CENTER_LEFT" prefHeight="100.0" prefWidth="200.0" GridPane.columnIndex="1" GridPane.halignment="CENTER" GridPane.rowIndex="2" GridPane.valignment="CENTER">
|
||||||
|
<children>
|
||||||
|
<Label fx:id="sundayLabel" style="-fx-border-color: #F0F0F0; -fx-border-width: 1;" text="S">
|
||||||
|
<padding>
|
||||||
|
<Insets bottom="5.0" left="5.0" right="5.0" top="5.0" />
|
||||||
|
</padding>
|
||||||
|
</Label>
|
||||||
|
<Label fx:id="mondayLabel" style="-fx-border-color: #F0F0F0; -fx-border-width: 1;" text="M" AnchorPane.bottomAnchor="23.0" AnchorPane.topAnchor="22.0">
|
||||||
|
<HBox.margin>
|
||||||
|
<Insets />
|
||||||
|
</HBox.margin>
|
||||||
|
<padding>
|
||||||
|
<Insets bottom="5.0" left="5.0" right="5.0" top="5.0" />
|
||||||
|
</padding>
|
||||||
|
</Label>
|
||||||
|
<Label fx:id="tuesdayLabel" style="-fx-border-color: #F0F0F0; -fx-border-width: 1;" text="T">
|
||||||
|
<padding>
|
||||||
|
<Insets bottom="5.0" left="5.0" right="5.0" top="5.0" />
|
||||||
|
</padding>
|
||||||
|
</Label>
|
||||||
|
<Label fx:id="wednesdayLabel" style="-fx-border-color: #F0F0F0; -fx-border-width: 1;" text="W">
|
||||||
|
<padding>
|
||||||
|
<Insets bottom="5.0" left="5.0" right="5.0" top="5.0" />
|
||||||
|
</padding>
|
||||||
|
</Label>
|
||||||
|
<Label fx:id="thursdayLabel" style="-fx-border-color: #F0F0F0; -fx-border-width: 1;" text="T">
|
||||||
|
<padding>
|
||||||
|
<Insets bottom="5.0" left="5.0" right="5.0" top="5.0" />
|
||||||
|
</padding>
|
||||||
|
</Label>
|
||||||
|
<Label fx:id="fridayLabel" style="-fx-border-color: #F0F0F0; -fx-border-width: 1;" text="F">
|
||||||
|
<padding>
|
||||||
|
<Insets bottom="5.0" left="5.0" right="5.0" top="5.0" />
|
||||||
|
</padding>
|
||||||
|
</Label>
|
||||||
|
<Label fx:id="saturdayLabel" style="-fx-border-color: #F0F0F0; -fx-border-width: 1;" text="S">
|
||||||
|
<padding>
|
||||||
|
<Insets bottom="5.0" left="5.0" right="5.0" top="5.0" />
|
||||||
|
</padding>
|
||||||
|
</Label>
|
||||||
|
</children>
|
||||||
|
</HBox>
|
||||||
|
<AnchorPane GridPane.columnSpan="2" GridPane.rowIndex="6">
|
||||||
|
<children>
|
||||||
|
<Button mnemonicParsing="false" onAction="#cancelRide" text="Cancel Ride" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" GridPane.rowIndex="5" />
|
||||||
|
</children>
|
||||||
|
</AnchorPane>
|
||||||
|
</children>
|
||||||
|
<GridPane.margin>
|
||||||
|
<Insets left="10.0" right="10.0" />
|
||||||
|
</GridPane.margin>
|
||||||
|
</GridPane>
|
||||||
|
</children>
|
||||||
|
</GridPane>
|
||||||
|
</children>
|
||||||
|
</AnchorPane>
|
||||||
@@ -0,0 +1,129 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
|
||||||
|
<?import javafx.geometry.*?>
|
||||||
|
<?import javafx.scene.text.*?>
|
||||||
|
<?import javafx.scene.control.*?>
|
||||||
|
<?import java.lang.*?>
|
||||||
|
<?import javafx.scene.layout.*?>
|
||||||
|
|
||||||
|
<AnchorPane prefHeight="400.0" prefWidth="600.0" xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1" fx:controller="controllers.MySharedTripsController">
|
||||||
|
<children>
|
||||||
|
<GridPane layoutX="213.0" layoutY="99.0" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
|
||||||
|
<columnConstraints>
|
||||||
|
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="300.0" />
|
||||||
|
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="300.0" />
|
||||||
|
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="300.0" />
|
||||||
|
</columnConstraints>
|
||||||
|
<rowConstraints>
|
||||||
|
<RowConstraints maxHeight="50.0" minHeight="50.0" prefHeight="50.0" vgrow="SOMETIMES" />
|
||||||
|
<RowConstraints maxHeight="40.0" minHeight="40.0" prefHeight="40.0" vgrow="SOMETIMES" />
|
||||||
|
<RowConstraints minHeight="10.0" prefHeight="348.0" vgrow="SOMETIMES" />
|
||||||
|
</rowConstraints>
|
||||||
|
<children>
|
||||||
|
<ListView fx:id="tripsList" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" prefHeight="200.0" prefWidth="200.0" GridPane.rowIndex="2" />
|
||||||
|
<Label text="My Trips" GridPane.columnSpan="3" GridPane.halignment="CENTER">
|
||||||
|
<font>
|
||||||
|
<Font size="18.0" />
|
||||||
|
</font>
|
||||||
|
</Label>
|
||||||
|
<Label text="Trips" GridPane.halignment="CENTER" GridPane.rowIndex="1">
|
||||||
|
<font>
|
||||||
|
<Font size="16.0" />
|
||||||
|
</font>
|
||||||
|
</Label>
|
||||||
|
<Label text="Stops" GridPane.columnIndex="1" GridPane.halignment="CENTER" GridPane.rowIndex="1">
|
||||||
|
<font>
|
||||||
|
<Font size="16.0" />
|
||||||
|
</font>
|
||||||
|
</Label>
|
||||||
|
<TableView fx:id="stopsList" prefHeight="200.0" prefWidth="200.0" GridPane.columnIndex="1" GridPane.rowIndex="2">
|
||||||
|
<columns>
|
||||||
|
<TableColumn fx:id="stopTimeColumn" prefWidth="104.0" text="Time" />
|
||||||
|
<TableColumn fx:id="stopNameColumn" prefWidth="95.0" text="Stop" />
|
||||||
|
</columns>
|
||||||
|
</TableView>
|
||||||
|
<Label text="Information" GridPane.columnIndex="2" GridPane.halignment="CENTER" GridPane.rowIndex="1">
|
||||||
|
<font>
|
||||||
|
<Font size="16.0" />
|
||||||
|
</font>
|
||||||
|
</Label>
|
||||||
|
<GridPane GridPane.columnIndex="2" GridPane.rowIndex="2">
|
||||||
|
<columnConstraints>
|
||||||
|
<ColumnConstraints hgrow="SOMETIMES" maxWidth="80.0" minWidth="10.0" prefWidth="80.0" />
|
||||||
|
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
|
||||||
|
</columnConstraints>
|
||||||
|
<rowConstraints>
|
||||||
|
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||||
|
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||||
|
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||||
|
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||||
|
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||||
|
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||||
|
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||||
|
</rowConstraints>
|
||||||
|
<children>
|
||||||
|
<Label text="Ride:" />
|
||||||
|
<Label fx:id="rideLabel" text="Label" GridPane.columnIndex="1" />
|
||||||
|
<Label text="Direction:" GridPane.rowIndex="1" />
|
||||||
|
<Label fx:id="directionLabel" text="Label" GridPane.columnIndex="1" GridPane.rowIndex="1" />
|
||||||
|
<Label text="Days:" GridPane.rowIndex="2" />
|
||||||
|
<Label text="Reoccuring:" GridPane.rowIndex="3" />
|
||||||
|
<Label text="Trip End Date:" GridPane.rowIndex="4" />
|
||||||
|
<Label fx:id="reoccuringLabel" text="Label" GridPane.columnIndex="1" GridPane.rowIndex="3" />
|
||||||
|
<Label fx:id="endDateLabel" text="Label" GridPane.columnIndex="1" GridPane.rowIndex="4" />
|
||||||
|
<HBox alignment="CENTER_LEFT" prefHeight="100.0" prefWidth="200.0" GridPane.columnIndex="1" GridPane.halignment="CENTER" GridPane.rowIndex="2" GridPane.valignment="CENTER">
|
||||||
|
<children>
|
||||||
|
<Label fx:id="sundayLabel" style="-fx-border-color: #F0F0F0; -fx-border-width: 1;" text="S">
|
||||||
|
<padding>
|
||||||
|
<Insets bottom="5.0" left="5.0" right="5.0" top="5.0" />
|
||||||
|
</padding>
|
||||||
|
</Label>
|
||||||
|
<Label fx:id="mondayLabel" style="-fx-border-color: #F0F0F0; -fx-border-width: 1;" text="M" AnchorPane.bottomAnchor="23.0" AnchorPane.topAnchor="22.0">
|
||||||
|
<HBox.margin>
|
||||||
|
<Insets />
|
||||||
|
</HBox.margin>
|
||||||
|
<padding>
|
||||||
|
<Insets bottom="5.0" left="5.0" right="5.0" top="5.0" />
|
||||||
|
</padding>
|
||||||
|
</Label>
|
||||||
|
<Label fx:id="tuesdayLabel" style="-fx-border-color: #F0F0F0; -fx-border-width: 1;" text="T">
|
||||||
|
<padding>
|
||||||
|
<Insets bottom="5.0" left="5.0" right="5.0" top="5.0" />
|
||||||
|
</padding>
|
||||||
|
</Label>
|
||||||
|
<Label fx:id="wednesdayLabel" style="-fx-border-color: #F0F0F0; -fx-border-width: 1;" text="W">
|
||||||
|
<padding>
|
||||||
|
<Insets bottom="5.0" left="5.0" right="5.0" top="5.0" />
|
||||||
|
</padding>
|
||||||
|
</Label>
|
||||||
|
<Label fx:id="thursdayLabel" style="-fx-border-color: #F0F0F0; -fx-border-width: 1;" text="T">
|
||||||
|
<padding>
|
||||||
|
<Insets bottom="5.0" left="5.0" right="5.0" top="5.0" />
|
||||||
|
</padding>
|
||||||
|
</Label>
|
||||||
|
<Label fx:id="fridayLabel" style="-fx-border-color: #F0F0F0; -fx-border-width: 1;" text="F">
|
||||||
|
<padding>
|
||||||
|
<Insets bottom="5.0" left="5.0" right="5.0" top="5.0" />
|
||||||
|
</padding>
|
||||||
|
</Label>
|
||||||
|
<Label fx:id="saturdayLabel" style="-fx-border-color: #F0F0F0; -fx-border-width: 1;" text="S">
|
||||||
|
<padding>
|
||||||
|
<Insets bottom="5.0" left="5.0" right="5.0" top="5.0" />
|
||||||
|
</padding>
|
||||||
|
</Label>
|
||||||
|
</children>
|
||||||
|
</HBox>
|
||||||
|
<AnchorPane GridPane.columnSpan="2" GridPane.rowIndex="6">
|
||||||
|
<children>
|
||||||
|
<Button mnemonicParsing="false" onAction="#cancelRide" text="Share This Ride" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" GridPane.rowIndex="5" />
|
||||||
|
</children>
|
||||||
|
</AnchorPane>
|
||||||
|
</children>
|
||||||
|
<GridPane.margin>
|
||||||
|
<Insets left="10.0" right="10.0" />
|
||||||
|
</GridPane.margin>
|
||||||
|
</GridPane>
|
||||||
|
</children>
|
||||||
|
</GridPane>
|
||||||
|
</children>
|
||||||
|
</AnchorPane>
|
||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -57,11 +57,21 @@
|
|||||||
<Button mnemonicParsing="false" onAction="#sharedRides" text="Shared Rides" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" />
|
<Button mnemonicParsing="false" onAction="#sharedRides" text="Shared Rides" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" />
|
||||||
</children>
|
</children>
|
||||||
</AnchorPane>
|
</AnchorPane>
|
||||||
<AnchorPane prefHeight="200.0" prefWidth="200.0">
|
<AnchorPane>
|
||||||
<children>
|
<children>
|
||||||
<Button mnemonicParsing="false" onAction="#searchStops" text="Search Stops" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" />
|
<Button mnemonicParsing="false" onAction="#searchStops" text="Search Stops" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" />
|
||||||
</children>
|
</children>
|
||||||
</AnchorPane>
|
</AnchorPane>
|
||||||
|
<AnchorPane>
|
||||||
|
<children>
|
||||||
|
<Button mnemonicParsing="false" onAction="#mySharedRides" text="My Shared Rides" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" />
|
||||||
|
</children>
|
||||||
|
</AnchorPane>
|
||||||
|
<AnchorPane>
|
||||||
|
<children>
|
||||||
|
<Button mnemonicParsing="false" onAction="#myBookings" text="My Bookings" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" />
|
||||||
|
</children>
|
||||||
|
</AnchorPane>
|
||||||
</children>
|
</children>
|
||||||
</VBox>
|
</VBox>
|
||||||
</children>
|
</children>
|
||||||
|
|||||||
@@ -0,0 +1,129 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
|
||||||
|
<?import javafx.geometry.*?>
|
||||||
|
<?import javafx.scene.text.*?>
|
||||||
|
<?import javafx.scene.control.*?>
|
||||||
|
<?import java.lang.*?>
|
||||||
|
<?import javafx.scene.layout.*?>
|
||||||
|
|
||||||
|
<AnchorPane prefHeight="400.0" prefWidth="600.0" xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1" fx:controller="controllers.MyBookingsController">
|
||||||
|
<children>
|
||||||
|
<GridPane layoutX="213.0" layoutY="99.0" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
|
||||||
|
<columnConstraints>
|
||||||
|
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="300.0" />
|
||||||
|
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="300.0" />
|
||||||
|
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="300.0" />
|
||||||
|
</columnConstraints>
|
||||||
|
<rowConstraints>
|
||||||
|
<RowConstraints maxHeight="50.0" minHeight="50.0" prefHeight="50.0" vgrow="SOMETIMES" />
|
||||||
|
<RowConstraints maxHeight="40.0" minHeight="40.0" prefHeight="40.0" vgrow="SOMETIMES" />
|
||||||
|
<RowConstraints minHeight="10.0" prefHeight="348.0" vgrow="SOMETIMES" />
|
||||||
|
</rowConstraints>
|
||||||
|
<children>
|
||||||
|
<ListView fx:id="tripsList" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" prefHeight="200.0" prefWidth="200.0" GridPane.rowIndex="2" />
|
||||||
|
<Label text="My Bookings" GridPane.columnSpan="3" GridPane.halignment="CENTER">
|
||||||
|
<font>
|
||||||
|
<Font size="18.0" />
|
||||||
|
</font>
|
||||||
|
</Label>
|
||||||
|
<Label text="Trips" GridPane.halignment="CENTER" GridPane.rowIndex="1">
|
||||||
|
<font>
|
||||||
|
<Font size="16.0" />
|
||||||
|
</font>
|
||||||
|
</Label>
|
||||||
|
<Label text="Stops" GridPane.columnIndex="1" GridPane.halignment="CENTER" GridPane.rowIndex="1">
|
||||||
|
<font>
|
||||||
|
<Font size="16.0" />
|
||||||
|
</font>
|
||||||
|
</Label>
|
||||||
|
<TableView fx:id="stopsList" prefHeight="200.0" prefWidth="200.0" GridPane.columnIndex="1" GridPane.rowIndex="2">
|
||||||
|
<columns>
|
||||||
|
<TableColumn fx:id="stopTimeColumn" prefWidth="104.0" text="Time" />
|
||||||
|
<TableColumn fx:id="stopNameColumn" prefWidth="95.0" text="Stop" />
|
||||||
|
</columns>
|
||||||
|
</TableView>
|
||||||
|
<Label text="Information" GridPane.columnIndex="2" GridPane.halignment="CENTER" GridPane.rowIndex="1">
|
||||||
|
<font>
|
||||||
|
<Font size="16.0" />
|
||||||
|
</font>
|
||||||
|
</Label>
|
||||||
|
<GridPane GridPane.columnIndex="2" GridPane.rowIndex="2">
|
||||||
|
<columnConstraints>
|
||||||
|
<ColumnConstraints hgrow="SOMETIMES" maxWidth="80.0" minWidth="10.0" prefWidth="80.0" />
|
||||||
|
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
|
||||||
|
</columnConstraints>
|
||||||
|
<rowConstraints>
|
||||||
|
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||||
|
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||||
|
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||||
|
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||||
|
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||||
|
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||||
|
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||||
|
</rowConstraints>
|
||||||
|
<children>
|
||||||
|
<Label text="Ride:" />
|
||||||
|
<Label fx:id="rideLabel" text="Label" GridPane.columnIndex="1" />
|
||||||
|
<Label text="Direction:" GridPane.rowIndex="1" />
|
||||||
|
<Label fx:id="directionLabel" text="Label" GridPane.columnIndex="1" GridPane.rowIndex="1" />
|
||||||
|
<Label text="Days:" GridPane.rowIndex="2" />
|
||||||
|
<Label text="Reoccuring:" GridPane.rowIndex="3" />
|
||||||
|
<Label text="Trip End Date:" GridPane.rowIndex="4" />
|
||||||
|
<Label fx:id="reoccuringLabel" text="Label" GridPane.columnIndex="1" GridPane.rowIndex="3" />
|
||||||
|
<Label fx:id="endDateLabel" text="Label" GridPane.columnIndex="1" GridPane.rowIndex="4" />
|
||||||
|
<HBox alignment="CENTER_LEFT" prefHeight="100.0" prefWidth="200.0" GridPane.columnIndex="1" GridPane.halignment="CENTER" GridPane.rowIndex="2" GridPane.valignment="CENTER">
|
||||||
|
<children>
|
||||||
|
<Label fx:id="sundayLabel" style="-fx-border-color: #F0F0F0; -fx-border-width: 1;" text="S">
|
||||||
|
<padding>
|
||||||
|
<Insets bottom="5.0" left="5.0" right="5.0" top="5.0" />
|
||||||
|
</padding>
|
||||||
|
</Label>
|
||||||
|
<Label fx:id="mondayLabel" style="-fx-border-color: #F0F0F0; -fx-border-width: 1;" text="M" AnchorPane.bottomAnchor="23.0" AnchorPane.topAnchor="22.0">
|
||||||
|
<HBox.margin>
|
||||||
|
<Insets />
|
||||||
|
</HBox.margin>
|
||||||
|
<padding>
|
||||||
|
<Insets bottom="5.0" left="5.0" right="5.0" top="5.0" />
|
||||||
|
</padding>
|
||||||
|
</Label>
|
||||||
|
<Label fx:id="tuesdayLabel" style="-fx-border-color: #F0F0F0; -fx-border-width: 1;" text="T">
|
||||||
|
<padding>
|
||||||
|
<Insets bottom="5.0" left="5.0" right="5.0" top="5.0" />
|
||||||
|
</padding>
|
||||||
|
</Label>
|
||||||
|
<Label fx:id="wednesdayLabel" style="-fx-border-color: #F0F0F0; -fx-border-width: 1;" text="W">
|
||||||
|
<padding>
|
||||||
|
<Insets bottom="5.0" left="5.0" right="5.0" top="5.0" />
|
||||||
|
</padding>
|
||||||
|
</Label>
|
||||||
|
<Label fx:id="thursdayLabel" style="-fx-border-color: #F0F0F0; -fx-border-width: 1;" text="T">
|
||||||
|
<padding>
|
||||||
|
<Insets bottom="5.0" left="5.0" right="5.0" top="5.0" />
|
||||||
|
</padding>
|
||||||
|
</Label>
|
||||||
|
<Label fx:id="fridayLabel" style="-fx-border-color: #F0F0F0; -fx-border-width: 1;" text="F">
|
||||||
|
<padding>
|
||||||
|
<Insets bottom="5.0" left="5.0" right="5.0" top="5.0" />
|
||||||
|
</padding>
|
||||||
|
</Label>
|
||||||
|
<Label fx:id="saturdayLabel" style="-fx-border-color: #F0F0F0; -fx-border-width: 1;" text="S">
|
||||||
|
<padding>
|
||||||
|
<Insets bottom="5.0" left="5.0" right="5.0" top="5.0" />
|
||||||
|
</padding>
|
||||||
|
</Label>
|
||||||
|
</children>
|
||||||
|
</HBox>
|
||||||
|
<AnchorPane GridPane.columnSpan="2" GridPane.rowIndex="6">
|
||||||
|
<children>
|
||||||
|
<Button mnemonicParsing="false" onAction="#cancelRide" text="Cancel Ride" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" GridPane.rowIndex="5" />
|
||||||
|
</children>
|
||||||
|
</AnchorPane>
|
||||||
|
</children>
|
||||||
|
<GridPane.margin>
|
||||||
|
<Insets left="10.0" right="10.0" />
|
||||||
|
</GridPane.margin>
|
||||||
|
</GridPane>
|
||||||
|
</children>
|
||||||
|
</GridPane>
|
||||||
|
</children>
|
||||||
|
</AnchorPane>
|
||||||
@@ -0,0 +1,129 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
|
||||||
|
<?import javafx.geometry.*?>
|
||||||
|
<?import javafx.scene.text.*?>
|
||||||
|
<?import javafx.scene.control.*?>
|
||||||
|
<?import java.lang.*?>
|
||||||
|
<?import javafx.scene.layout.*?>
|
||||||
|
|
||||||
|
<AnchorPane prefHeight="400.0" prefWidth="600.0" xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1" fx:controller="controllers.MySharedTripsController">
|
||||||
|
<children>
|
||||||
|
<GridPane layoutX="213.0" layoutY="99.0" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
|
||||||
|
<columnConstraints>
|
||||||
|
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="300.0" />
|
||||||
|
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="300.0" />
|
||||||
|
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="300.0" />
|
||||||
|
</columnConstraints>
|
||||||
|
<rowConstraints>
|
||||||
|
<RowConstraints maxHeight="50.0" minHeight="50.0" prefHeight="50.0" vgrow="SOMETIMES" />
|
||||||
|
<RowConstraints maxHeight="40.0" minHeight="40.0" prefHeight="40.0" vgrow="SOMETIMES" />
|
||||||
|
<RowConstraints minHeight="10.0" prefHeight="348.0" vgrow="SOMETIMES" />
|
||||||
|
</rowConstraints>
|
||||||
|
<children>
|
||||||
|
<ListView fx:id="tripsList" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" prefHeight="200.0" prefWidth="200.0" GridPane.rowIndex="2" />
|
||||||
|
<Label text="My Trips" GridPane.columnSpan="3" GridPane.halignment="CENTER">
|
||||||
|
<font>
|
||||||
|
<Font size="18.0" />
|
||||||
|
</font>
|
||||||
|
</Label>
|
||||||
|
<Label text="Trips" GridPane.halignment="CENTER" GridPane.rowIndex="1">
|
||||||
|
<font>
|
||||||
|
<Font size="16.0" />
|
||||||
|
</font>
|
||||||
|
</Label>
|
||||||
|
<Label text="Stops" GridPane.columnIndex="1" GridPane.halignment="CENTER" GridPane.rowIndex="1">
|
||||||
|
<font>
|
||||||
|
<Font size="16.0" />
|
||||||
|
</font>
|
||||||
|
</Label>
|
||||||
|
<TableView fx:id="stopsList" prefHeight="200.0" prefWidth="200.0" GridPane.columnIndex="1" GridPane.rowIndex="2">
|
||||||
|
<columns>
|
||||||
|
<TableColumn fx:id="stopTimeColumn" prefWidth="104.0" text="Time" />
|
||||||
|
<TableColumn fx:id="stopNameColumn" prefWidth="95.0" text="Stop" />
|
||||||
|
</columns>
|
||||||
|
</TableView>
|
||||||
|
<Label text="Information" GridPane.columnIndex="2" GridPane.halignment="CENTER" GridPane.rowIndex="1">
|
||||||
|
<font>
|
||||||
|
<Font size="16.0" />
|
||||||
|
</font>
|
||||||
|
</Label>
|
||||||
|
<GridPane GridPane.columnIndex="2" GridPane.rowIndex="2">
|
||||||
|
<columnConstraints>
|
||||||
|
<ColumnConstraints hgrow="SOMETIMES" maxWidth="80.0" minWidth="10.0" prefWidth="80.0" />
|
||||||
|
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
|
||||||
|
</columnConstraints>
|
||||||
|
<rowConstraints>
|
||||||
|
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||||
|
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||||
|
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||||
|
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||||
|
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||||
|
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||||
|
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||||
|
</rowConstraints>
|
||||||
|
<children>
|
||||||
|
<Label text="Ride:" />
|
||||||
|
<Label fx:id="rideLabel" text="Label" GridPane.columnIndex="1" />
|
||||||
|
<Label text="Direction:" GridPane.rowIndex="1" />
|
||||||
|
<Label fx:id="directionLabel" text="Label" GridPane.columnIndex="1" GridPane.rowIndex="1" />
|
||||||
|
<Label text="Days:" GridPane.rowIndex="2" />
|
||||||
|
<Label text="Reoccuring:" GridPane.rowIndex="3" />
|
||||||
|
<Label text="Trip End Date:" GridPane.rowIndex="4" />
|
||||||
|
<Label fx:id="reoccuringLabel" text="Label" GridPane.columnIndex="1" GridPane.rowIndex="3" />
|
||||||
|
<Label fx:id="endDateLabel" text="Label" GridPane.columnIndex="1" GridPane.rowIndex="4" />
|
||||||
|
<HBox alignment="CENTER_LEFT" prefHeight="100.0" prefWidth="200.0" GridPane.columnIndex="1" GridPane.halignment="CENTER" GridPane.rowIndex="2" GridPane.valignment="CENTER">
|
||||||
|
<children>
|
||||||
|
<Label fx:id="sundayLabel" style="-fx-border-color: #F0F0F0; -fx-border-width: 1;" text="S">
|
||||||
|
<padding>
|
||||||
|
<Insets bottom="5.0" left="5.0" right="5.0" top="5.0" />
|
||||||
|
</padding>
|
||||||
|
</Label>
|
||||||
|
<Label fx:id="mondayLabel" style="-fx-border-color: #F0F0F0; -fx-border-width: 1;" text="M" AnchorPane.bottomAnchor="23.0" AnchorPane.topAnchor="22.0">
|
||||||
|
<HBox.margin>
|
||||||
|
<Insets />
|
||||||
|
</HBox.margin>
|
||||||
|
<padding>
|
||||||
|
<Insets bottom="5.0" left="5.0" right="5.0" top="5.0" />
|
||||||
|
</padding>
|
||||||
|
</Label>
|
||||||
|
<Label fx:id="tuesdayLabel" style="-fx-border-color: #F0F0F0; -fx-border-width: 1;" text="T">
|
||||||
|
<padding>
|
||||||
|
<Insets bottom="5.0" left="5.0" right="5.0" top="5.0" />
|
||||||
|
</padding>
|
||||||
|
</Label>
|
||||||
|
<Label fx:id="wednesdayLabel" style="-fx-border-color: #F0F0F0; -fx-border-width: 1;" text="W">
|
||||||
|
<padding>
|
||||||
|
<Insets bottom="5.0" left="5.0" right="5.0" top="5.0" />
|
||||||
|
</padding>
|
||||||
|
</Label>
|
||||||
|
<Label fx:id="thursdayLabel" style="-fx-border-color: #F0F0F0; -fx-border-width: 1;" text="T">
|
||||||
|
<padding>
|
||||||
|
<Insets bottom="5.0" left="5.0" right="5.0" top="5.0" />
|
||||||
|
</padding>
|
||||||
|
</Label>
|
||||||
|
<Label fx:id="fridayLabel" style="-fx-border-color: #F0F0F0; -fx-border-width: 1;" text="F">
|
||||||
|
<padding>
|
||||||
|
<Insets bottom="5.0" left="5.0" right="5.0" top="5.0" />
|
||||||
|
</padding>
|
||||||
|
</Label>
|
||||||
|
<Label fx:id="saturdayLabel" style="-fx-border-color: #F0F0F0; -fx-border-width: 1;" text="S">
|
||||||
|
<padding>
|
||||||
|
<Insets bottom="5.0" left="5.0" right="5.0" top="5.0" />
|
||||||
|
</padding>
|
||||||
|
</Label>
|
||||||
|
</children>
|
||||||
|
</HBox>
|
||||||
|
<AnchorPane GridPane.columnSpan="2" GridPane.rowIndex="6">
|
||||||
|
<children>
|
||||||
|
<Button mnemonicParsing="false" onAction="#cancelRide" text="Share This Ride" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" GridPane.rowIndex="5" />
|
||||||
|
</children>
|
||||||
|
</AnchorPane>
|
||||||
|
</children>
|
||||||
|
<GridPane.margin>
|
||||||
|
<Insets left="10.0" right="10.0" />
|
||||||
|
</GridPane.margin>
|
||||||
|
</GridPane>
|
||||||
|
</children>
|
||||||
|
</GridPane>
|
||||||
|
</children>
|
||||||
|
</AnchorPane>
|
||||||
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
|
|||||||
{}
|
{"79984862":[{"seatsAvailable":3,"userBookings":[{"studentNumber":79984862,"email":"[email protected]","password":"123456","address":"90 Stables Street","homephone":"033466057","mobilephone":"+642726242114","accountType":"DRIVER","ID":"79984862"},null,null,null],"startDate":{"year":2017,"month":6,"day":2},"serialisedRoute":[{"serialiseTime":"9:00","serialiseName":"1 Avonhead Road"},{"serialiseTime":"9:15","serialiseName":"1 University Drive"}],"direction":"University","ride":{"model":"Nissan March","colour":"Baby Blue","licensePlate":"EPU001","year":2004,"numSeats":5},"days":[false,true,true,false,true,false,false],"reoccur":true,"endDate":{"year":2017,"month":12,"day":30},"name":"Home to Uni"}]}
|
||||||
@@ -1 +1 @@
|
|||||||
{"79984862":[{"serialisedRoute":[{"serialiseTime":"9:00","serialiseName":"1 Avonhead Road"},{"serialiseTime":"9:15","serialiseName":"1 University Drive"}],"direction":"University","ride":{"model":"Nissan March","colour":"Baby Blue","licensePlate":"EPU001","year":2004,"numSeats":5},"days":[false,true,true,false,true,false,false],"reoccur":true,"endDate":"30-12-2017","name":"Home to Uni"}]}
|
{"79984862":[{"serialisedRoute":[{"serialiseTime":"9:00","serialiseName":"1 Avonhead Road"},{"serialiseTime":"9:15","serialiseName":"1 University Drive"}],"direction":"University","ride":{"model":"Nissan March","colour":"Baby Blue","licensePlate":"EPU001","year":2004,"numSeats":5},"days":[false,true,true,false,true,false,false],"reoccur":true,"endDate":{"year":2017,"month":12,"day":30},"name":"Home to Uni"}]}
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
#Generated by Maven
|
|
||||||
#Fri May 19 15:51:59 NZST 2017
|
|
||||||
version=1.0-SNAPSHOT
|
|
||||||
groupId=ride-sharing-system
|
|
||||||
artifactId=ride-sharing-system
|
|
||||||
@@ -1,25 +0,0 @@
|
|||||||
controllers\HomeController.class
|
|
||||||
controllers\Main.class
|
|
||||||
controllers\MyStopsController.class
|
|
||||||
controllers\AddTripController$2.class
|
|
||||||
model\Session.class
|
|
||||||
model\Ride.class
|
|
||||||
model\Route.class
|
|
||||||
model\TripStop.class
|
|
||||||
controllers\MyRidesController.class
|
|
||||||
controllers\AddRouteController.class
|
|
||||||
controllers\AddRideController.class
|
|
||||||
model\ButtonSets.class
|
|
||||||
model\Trip.class
|
|
||||||
controllers\BaseController.class
|
|
||||||
model\SceneCode.class
|
|
||||||
controllers\AddTripController.class
|
|
||||||
model\DataManager.class
|
|
||||||
controllers\MyRoutesController.class
|
|
||||||
controllers\AddStopsController.class
|
|
||||||
controllers\MyRoutesController$1.class
|
|
||||||
controllers\MainController.class
|
|
||||||
model\Stop.class
|
|
||||||
controllers\AddTripController$1.class
|
|
||||||
controllers\Controller.class
|
|
||||||
model\ButtonTypes.class
|
|
||||||
@@ -1,22 +0,0 @@
|
|||||||
D:\Programming\Workspace\SENG301\src\main\java\controllers\AddTripController.java
|
|
||||||
D:\Programming\Workspace\SENG301\src\main\java\controllers\HomeController.java
|
|
||||||
D:\Programming\Workspace\SENG301\src\main\java\model\Ride.java
|
|
||||||
D:\Programming\Workspace\SENG301\src\main\java\model\Stop.java
|
|
||||||
D:\Programming\Workspace\SENG301\src\main\java\controllers\MyRoutesController.java
|
|
||||||
D:\Programming\Workspace\SENG301\src\main\java\controllers\AddStopsController.java
|
|
||||||
D:\Programming\Workspace\SENG301\src\main\java\model\Session.java
|
|
||||||
D:\Programming\Workspace\SENG301\src\main\java\controllers\AddRideController.java
|
|
||||||
D:\Programming\Workspace\SENG301\src\main\java\controllers\MyRidesController.java
|
|
||||||
D:\Programming\Workspace\SENG301\src\main\java\controllers\BaseController.java
|
|
||||||
D:\Programming\Workspace\SENG301\src\main\java\model\Trip.java
|
|
||||||
D:\Programming\Workspace\SENG301\src\main\java\model\DataManager.java
|
|
||||||
D:\Programming\Workspace\SENG301\src\main\java\controllers\Main.java
|
|
||||||
D:\Programming\Workspace\SENG301\src\main\java\model\TripStop.java
|
|
||||||
D:\Programming\Workspace\SENG301\src\main\java\controllers\Controller.java
|
|
||||||
D:\Programming\Workspace\SENG301\src\main\java\controllers\MainController.java
|
|
||||||
D:\Programming\Workspace\SENG301\src\main\java\model\ButtonTypes.java
|
|
||||||
D:\Programming\Workspace\SENG301\src\main\java\model\Route.java
|
|
||||||
D:\Programming\Workspace\SENG301\src\main\java\controllers\AddRouteController.java
|
|
||||||
D:\Programming\Workspace\SENG301\src\main\java\model\ButtonSets.java
|
|
||||||
D:\Programming\Workspace\SENG301\src\main\java\controllers\MyStopsController.java
|
|
||||||
D:\Programming\Workspace\SENG301\src\main\java\model\SceneCode.java
|
|
||||||
-4
@@ -1,4 +0,0 @@
|
|||||||
RunCucumberTests.class
|
|
||||||
steps\PlaceholderSteps.class
|
|
||||||
model\DataManagerTest.class
|
|
||||||
controllers\MainControllerTest.class
|
|
||||||
-4
@@ -1,4 +0,0 @@
|
|||||||
D:\Programming\Workspace\SENG301\src\test\java\steps\PlaceholderSteps.java
|
|
||||||
D:\Programming\Workspace\SENG301\src\test\java\RunCucumberTests.java
|
|
||||||
D:\Programming\Workspace\SENG301\src\test\java\model\DataManagerTest.java
|
|
||||||
D:\Programming\Workspace\SENG301\src\test\java\controllers\MainControllerTest.java
|
|
||||||
Binary file not shown.
@@ -1,67 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8" ?>
|
|
||||||
<testsuite tests="1" failures="0" name="controllers.MainControllerTest" time="0.008" errors="0" skipped="0">
|
|
||||||
<properties>
|
|
||||||
<property name="java.runtime.name" value="Java(TM) SE Runtime Environment"/>
|
|
||||||
<property name="sun.boot.library.path" value="H:\Programs\Java\jdk1.8.0_102\jre\bin"/>
|
|
||||||
<property name="java.vm.version" value="25.102-b14"/>
|
|
||||||
<property name="java.vm.vendor" value="Oracle Corporation"/>
|
|
||||||
<property name="maven.multiModuleProjectDirectory" value="D:\Programming\Workspace\SENG301"/>
|
|
||||||
<property name="java.vendor.url" value="http://java.oracle.com/"/>
|
|
||||||
<property name="path.separator" value=";"/>
|
|
||||||
<property name="guice.disable.misplaced.annotation.check" value="true"/>
|
|
||||||
<property name="java.vm.name" value="Java HotSpot(TM) 64-Bit Server VM"/>
|
|
||||||
<property name="file.encoding.pkg" value="sun.io"/>
|
|
||||||
<property name="user.script" value=""/>
|
|
||||||
<property name="user.country" value="NZ"/>
|
|
||||||
<property name="sun.java.launcher" value="SUN_STANDARD"/>
|
|
||||||
<property name="sun.os.patch.level" value=""/>
|
|
||||||
<property name="java.vm.specification.name" value="Java Virtual Machine Specification"/>
|
|
||||||
<property name="user.dir" value="D:\Programming\Workspace\SENG301"/>
|
|
||||||
<property name="java.runtime.version" value="1.8.0_102-b14"/>
|
|
||||||
<property name="java.awt.graphicsenv" value="sun.awt.Win32GraphicsEnvironment"/>
|
|
||||||
<property name="java.endorsed.dirs" value="H:\Programs\Java\jdk1.8.0_102\jre\lib\endorsed"/>
|
|
||||||
<property name="os.arch" value="amd64"/>
|
|
||||||
<property name="java.io.tmpdir" value="C:\Users\Gondr\AppData\Local\Temp\"/>
|
|
||||||
<property name="line.separator" value="
|
|
||||||
"/>
|
|
||||||
<property name="java.vm.specification.vendor" value="Oracle Corporation"/>
|
|
||||||
<property name="user.variant" value=""/>
|
|
||||||
<property name="os.name" value="Windows 10"/>
|
|
||||||
<property name="classworlds.conf" value="H:\Programs\apache-maven-3.3.9\bin\m2.conf"/>
|
|
||||||
<property name="sun.jnu.encoding" value="Cp1252"/>
|
|
||||||
<property name="java.library.path" value="H:\Programs\Java\jdk1.8.0_102\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:\Program Files (x86)\Razer Chroma SDK\bin;H:\Programs\Razer Chroma SDK\bin;C:\ProgramData\Oracle\Java\javapath;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;H:\Programs\Git\cmd;H:\Programs\Python;C:\TDM-GCC-64\bin;H:\Programs\apache-maven-3.3.9\bin;C:\Program Files (x86)\Skype\Phone\;."/>
|
|
||||||
<property name="java.specification.name" value="Java Platform API Specification"/>
|
|
||||||
<property name="java.class.version" value="52.0"/>
|
|
||||||
<property name="sun.management.compiler" value="HotSpot 64-Bit Tiered Compilers"/>
|
|
||||||
<property name="os.version" value="10.0"/>
|
|
||||||
<property name="user.home" value="C:\Users\Gondr"/>
|
|
||||||
<property name="user.timezone" value="Pacific/Auckland"/>
|
|
||||||
<property name="java.awt.printerjob" value="sun.awt.windows.WPrinterJob"/>
|
|
||||||
<property name="java.specification.version" value="1.8"/>
|
|
||||||
<property name="file.encoding" value="Cp1252"/>
|
|
||||||
<property name="user.name" value="Gondr"/>
|
|
||||||
<property name="java.class.path" value="H:\Programs\apache-maven-3.3.9\boot\plexus-classworlds-2.5.2.jar"/>
|
|
||||||
<property name="java.vm.specification.version" value="1.8"/>
|
|
||||||
<property name="sun.arch.data.model" value="64"/>
|
|
||||||
<property name="java.home" value="H:\Programs\Java\jdk1.8.0_102\jre"/>
|
|
||||||
<property name="sun.java.command" value="org.codehaus.plexus.classworlds.launcher.Launcher clean package"/>
|
|
||||||
<property name="java.specification.vendor" value="Oracle Corporation"/>
|
|
||||||
<property name="user.language" value="en"/>
|
|
||||||
<property name="awt.toolkit" value="sun.awt.windows.WToolkit"/>
|
|
||||||
<property name="java.vm.info" value="mixed mode"/>
|
|
||||||
<property name="java.version" value="1.8.0_102"/>
|
|
||||||
<property name="java.ext.dirs" value="H:\Programs\Java\jdk1.8.0_102\jre\lib\ext;C:\Windows\Sun\Java\lib\ext"/>
|
|
||||||
<property name="sun.boot.class.path" value="H:\Programs\Java\jdk1.8.0_102\jre\lib\resources.jar;H:\Programs\Java\jdk1.8.0_102\jre\lib\rt.jar;H:\Programs\Java\jdk1.8.0_102\jre\lib\sunrsasign.jar;H:\Programs\Java\jdk1.8.0_102\jre\lib\jsse.jar;H:\Programs\Java\jdk1.8.0_102\jre\lib\jce.jar;H:\Programs\Java\jdk1.8.0_102\jre\lib\charsets.jar;H:\Programs\Java\jdk1.8.0_102\jre\lib\jfr.jar;H:\Programs\Java\jdk1.8.0_102\jre\classes"/>
|
|
||||||
<property name="sun.stderr.encoding" value="cp850"/>
|
|
||||||
<property name="java.vendor" value="Oracle Corporation"/>
|
|
||||||
<property name="maven.home" value="H:\Programs\apache-maven-3.3.9"/>
|
|
||||||
<property name="file.separator" value="\"/>
|
|
||||||
<property name="java.vendor.url.bug" value="http://bugreport.sun.com/bugreport/"/>
|
|
||||||
<property name="sun.cpu.endian" value="little"/>
|
|
||||||
<property name="sun.io.unicode.encoding" value="UnicodeLittle"/>
|
|
||||||
<property name="sun.stdout.encoding" value="cp850"/>
|
|
||||||
<property name="sun.desktop" value="windows"/>
|
|
||||||
<property name="sun.cpu.isalist" value="amd64"/>
|
|
||||||
</properties>
|
|
||||||
<testcase classname="controllers.MainControllerTest" name="testLogin" time="0.008"/>
|
|
||||||
</testsuite>
|
|
||||||
@@ -1,69 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8" ?>
|
|
||||||
<testsuite tests="3" failures="0" name="model.DataManagerTest" time="0.049" errors="0" skipped="0">
|
|
||||||
<properties>
|
|
||||||
<property name="java.runtime.name" value="Java(TM) SE Runtime Environment"/>
|
|
||||||
<property name="sun.boot.library.path" value="H:\Programs\Java\jdk1.8.0_102\jre\bin"/>
|
|
||||||
<property name="java.vm.version" value="25.102-b14"/>
|
|
||||||
<property name="java.vm.vendor" value="Oracle Corporation"/>
|
|
||||||
<property name="maven.multiModuleProjectDirectory" value="D:\Programming\Workspace\SENG301"/>
|
|
||||||
<property name="java.vendor.url" value="http://java.oracle.com/"/>
|
|
||||||
<property name="path.separator" value=";"/>
|
|
||||||
<property name="guice.disable.misplaced.annotation.check" value="true"/>
|
|
||||||
<property name="java.vm.name" value="Java HotSpot(TM) 64-Bit Server VM"/>
|
|
||||||
<property name="file.encoding.pkg" value="sun.io"/>
|
|
||||||
<property name="user.script" value=""/>
|
|
||||||
<property name="user.country" value="NZ"/>
|
|
||||||
<property name="sun.java.launcher" value="SUN_STANDARD"/>
|
|
||||||
<property name="sun.os.patch.level" value=""/>
|
|
||||||
<property name="java.vm.specification.name" value="Java Virtual Machine Specification"/>
|
|
||||||
<property name="user.dir" value="D:\Programming\Workspace\SENG301"/>
|
|
||||||
<property name="java.runtime.version" value="1.8.0_102-b14"/>
|
|
||||||
<property name="java.awt.graphicsenv" value="sun.awt.Win32GraphicsEnvironment"/>
|
|
||||||
<property name="java.endorsed.dirs" value="H:\Programs\Java\jdk1.8.0_102\jre\lib\endorsed"/>
|
|
||||||
<property name="os.arch" value="amd64"/>
|
|
||||||
<property name="java.io.tmpdir" value="C:\Users\Gondr\AppData\Local\Temp\"/>
|
|
||||||
<property name="line.separator" value="
|
|
||||||
"/>
|
|
||||||
<property name="java.vm.specification.vendor" value="Oracle Corporation"/>
|
|
||||||
<property name="user.variant" value=""/>
|
|
||||||
<property name="os.name" value="Windows 10"/>
|
|
||||||
<property name="classworlds.conf" value="H:\Programs\apache-maven-3.3.9\bin\m2.conf"/>
|
|
||||||
<property name="sun.jnu.encoding" value="Cp1252"/>
|
|
||||||
<property name="java.library.path" value="H:\Programs\Java\jdk1.8.0_102\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:\Program Files (x86)\Razer Chroma SDK\bin;H:\Programs\Razer Chroma SDK\bin;C:\ProgramData\Oracle\Java\javapath;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;H:\Programs\Git\cmd;H:\Programs\Python;C:\TDM-GCC-64\bin;H:\Programs\apache-maven-3.3.9\bin;C:\Program Files (x86)\Skype\Phone\;."/>
|
|
||||||
<property name="java.specification.name" value="Java Platform API Specification"/>
|
|
||||||
<property name="java.class.version" value="52.0"/>
|
|
||||||
<property name="sun.management.compiler" value="HotSpot 64-Bit Tiered Compilers"/>
|
|
||||||
<property name="os.version" value="10.0"/>
|
|
||||||
<property name="user.home" value="C:\Users\Gondr"/>
|
|
||||||
<property name="user.timezone" value="Pacific/Auckland"/>
|
|
||||||
<property name="java.awt.printerjob" value="sun.awt.windows.WPrinterJob"/>
|
|
||||||
<property name="java.specification.version" value="1.8"/>
|
|
||||||
<property name="file.encoding" value="Cp1252"/>
|
|
||||||
<property name="user.name" value="Gondr"/>
|
|
||||||
<property name="java.class.path" value="H:\Programs\apache-maven-3.3.9\boot\plexus-classworlds-2.5.2.jar"/>
|
|
||||||
<property name="java.vm.specification.version" value="1.8"/>
|
|
||||||
<property name="sun.arch.data.model" value="64"/>
|
|
||||||
<property name="java.home" value="H:\Programs\Java\jdk1.8.0_102\jre"/>
|
|
||||||
<property name="sun.java.command" value="org.codehaus.plexus.classworlds.launcher.Launcher clean package"/>
|
|
||||||
<property name="java.specification.vendor" value="Oracle Corporation"/>
|
|
||||||
<property name="user.language" value="en"/>
|
|
||||||
<property name="awt.toolkit" value="sun.awt.windows.WToolkit"/>
|
|
||||||
<property name="java.vm.info" value="mixed mode"/>
|
|
||||||
<property name="java.version" value="1.8.0_102"/>
|
|
||||||
<property name="java.ext.dirs" value="H:\Programs\Java\jdk1.8.0_102\jre\lib\ext;C:\Windows\Sun\Java\lib\ext"/>
|
|
||||||
<property name="sun.boot.class.path" value="H:\Programs\Java\jdk1.8.0_102\jre\lib\resources.jar;H:\Programs\Java\jdk1.8.0_102\jre\lib\rt.jar;H:\Programs\Java\jdk1.8.0_102\jre\lib\sunrsasign.jar;H:\Programs\Java\jdk1.8.0_102\jre\lib\jsse.jar;H:\Programs\Java\jdk1.8.0_102\jre\lib\jce.jar;H:\Programs\Java\jdk1.8.0_102\jre\lib\charsets.jar;H:\Programs\Java\jdk1.8.0_102\jre\lib\jfr.jar;H:\Programs\Java\jdk1.8.0_102\jre\classes"/>
|
|
||||||
<property name="sun.stderr.encoding" value="cp850"/>
|
|
||||||
<property name="java.vendor" value="Oracle Corporation"/>
|
|
||||||
<property name="maven.home" value="H:\Programs\apache-maven-3.3.9"/>
|
|
||||||
<property name="file.separator" value="\"/>
|
|
||||||
<property name="java.vendor.url.bug" value="http://bugreport.sun.com/bugreport/"/>
|
|
||||||
<property name="sun.cpu.endian" value="little"/>
|
|
||||||
<property name="sun.io.unicode.encoding" value="UnicodeLittle"/>
|
|
||||||
<property name="sun.stdout.encoding" value="cp850"/>
|
|
||||||
<property name="sun.desktop" value="windows"/>
|
|
||||||
<property name="sun.cpu.isalist" value="amd64"/>
|
|
||||||
</properties>
|
|
||||||
<testcase classname="model.DataManagerTest" name="addRoute" time="0.049"/>
|
|
||||||
<testcase classname="model.DataManagerTest" name="addRide" time="0"/>
|
|
||||||
<testcase classname="model.DataManagerTest" name="addStop" time="0"/>
|
|
||||||
</testsuite>
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
-------------------------------------------------------------------------------
|
|
||||||
Test set: controllers.MainControllerTest
|
|
||||||
-------------------------------------------------------------------------------
|
|
||||||
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.061 sec
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
-------------------------------------------------------------------------------
|
|
||||||
Test set: model.DataManagerTest
|
|
||||||
-------------------------------------------------------------------------------
|
|
||||||
Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.05 sec
|
|
||||||
Reference in New Issue
Block a user