Initial commit for project

main
Fan-Wu Yang 9 years ago
commit 37ebdb5145

2
.gitignore vendored

@ -0,0 +1,2 @@
.idea
*.iml

@ -0,0 +1,54 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>ride-sharing-system</groupId>
<artifactId>ride-sharing-system</artifactId>
<version>1.0-SNAPSHOT</version>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<version>2.7.13</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>info.cukes</groupId>
<artifactId>cucumber-java</artifactId>
<version>1.2.5</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>info.cukes</groupId>
<artifactId>cucumber-junit</artifactId>
<version>1.2.5</version>
<scope>test</scope>
</dependency>
</dependencies>
</project>

@ -0,0 +1,49 @@
import javafx.application.Application;
import javafx.fxml.FXMLLoader;
import javafx.fxml.Initializable;
import javafx.scene.Parent;
import javafx.scene.Scene;
import javafx.stage.Stage;
/**
* Created by samschofield on 7/03/17.
*/
public class Main extends Application {
public void start(Stage stage) throws Exception {
FXMLLoader loader = new FXMLLoader(getClass().getResource("scenes/main.fxml"));
Parent root = loader.load();
Scene scene = new Scene(root, 500, 400);
stage.setTitle("UC RSS");
stage.setScene(scene);
stage.show();
}
/**
* Replace Scene Content with fxml file code from oracle.
* @param fxml
* @return
* @throws Exception
*/
public Initializable replaceSceneContent(SceneCode fxml) throws Exception {
FXMLLoader loader = new FXMLLoader();
InputStream in = getClass().getClassLoader().getResourceAsStream(fxml.getFilePath());
Parent page;
try {
page = (Parent) loader.load(in);
} finally {
in.close();
}
while(mainContainer.getChildren().size() > 1) {
mainContainer.getChildren().remove(1);
}
mainContainer.getChildren().add(page);
//change session code to fit with the serialisation
session.setSceneDisplayed(fxml);
return (Initializable) loader.getController();
}
}

@ -0,0 +1,17 @@
package controllers;
import javafx.fxml.Initializable;
import java.net.URL;
import java.util.ResourceBundle;
/**
* Created by samschofield on 15/03/17.
*/
public class MainController implements Initializable {
@Override
public void initialize(URL location, ResourceBundle resources) {
}
}

@ -0,0 +1,8 @@
package model;
/**
* Created by fwy13 on 4/04/17.
*/
public enum SceneCode {
MAIN()
}

@ -0,0 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
<?import javafx.scene.text.*?>
<?import javafx.scene.control.*?>
<?import javafx.scene.layout.*?>
<GridPane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="400.0" prefWidth="600.0" xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1" fx:controller="controllers.MainController">
<columnConstraints>
<ColumnConstraints hgrow="SOMETIMES" maxWidth="332.0" minWidth="10.0" prefWidth="218.0" />
<ColumnConstraints hgrow="SOMETIMES" maxWidth="307.0" minWidth="10.0" prefWidth="304.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>
<children>
<Label text="Welcome to the UC Ride Sharing System" GridPane.columnSpan="2" GridPane.halignment="CENTER">
<font>
<Font size="22.0" />
</font>
</Label>
</children>
</GridPane>

@ -0,0 +1,12 @@
import cucumber.api.CucumberOptions;
import cucumber.api.junit.Cucumber;
import org.junit.runner.RunWith;
/**
* Created by samschofield on 4/03/17.
*/
@RunWith(Cucumber.class)
@CucumberOptions(features = "src/test/java/features")
public class RunCucumberTests {
}

@ -0,0 +1,14 @@
package steps;
import cucumber.api.PendingException;
import cucumber.api.java.en.Given;
import cucumber.api.java.en.Then;
import cucumber.api.java.en.When;
/**
* Created by sam on 11/03/17.
*/
public class PlaceholderSteps {
}

Binary file not shown.

@ -0,0 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
<?import javafx.scene.text.*?>
<?import javafx.scene.control.*?>
<?import javafx.scene.layout.*?>
<GridPane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="400.0" prefWidth="600.0" xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1" fx:controller="controllers.MainController">
<columnConstraints>
<ColumnConstraints hgrow="SOMETIMES" maxWidth="332.0" minWidth="10.0" prefWidth="218.0" />
<ColumnConstraints hgrow="SOMETIMES" maxWidth="307.0" minWidth="10.0" prefWidth="304.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>
<children>
<Label text="Welcome to the UC Ride Sharing System" GridPane.columnSpan="2" GridPane.halignment="CENTER">
<font>
<Font size="22.0" />
</font>
</Label>
</children>
</GridPane>
Loading…
Cancel
Save