Added Programming Project
Added base template project including: basic javadoc comments. Maven JavaFX setup. Placeholder JavaFX controllers and FXML files.
This commit is contained in:
parent
8363922eeb
commit
1015736283
18 changed files with 317 additions and 0 deletions
13
src/Welsh Vocabulary Tutor/.idea/compiler.xml
generated
Normal file
13
src/Welsh Vocabulary Tutor/.idea/compiler.xml
generated
Normal file
|
@ -0,0 +1,13 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="CompilerConfiguration">
|
||||
<annotationProcessing>
|
||||
<profile name="Maven default annotation processors profile" enabled="true">
|
||||
<sourceOutputDir name="target/generated-sources/annotations" />
|
||||
<sourceTestOutputDir name="target/generated-test-sources/test-annotations" />
|
||||
<outputRelativeToContentRoot value="true" />
|
||||
<module name="Welsh Vocabulary Tutor" />
|
||||
</profile>
|
||||
</annotationProcessing>
|
||||
</component>
|
||||
</project>
|
7
src/Welsh Vocabulary Tutor/.idea/encodings.xml
generated
Normal file
7
src/Welsh Vocabulary Tutor/.idea/encodings.xml
generated
Normal file
|
@ -0,0 +1,7 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="Encoding">
|
||||
<file url="file://$PROJECT_DIR$/src/main/java" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/src/main/resources" charset="UTF-8" />
|
||||
</component>
|
||||
</project>
|
14
src/Welsh Vocabulary Tutor/.idea/misc.xml
generated
Normal file
14
src/Welsh Vocabulary Tutor/.idea/misc.xml
generated
Normal file
|
@ -0,0 +1,14 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ExternalStorageConfigurationManager" enabled="true" />
|
||||
<component name="MavenProjectsManager">
|
||||
<option name="originalFiles">
|
||||
<list>
|
||||
<option value="$PROJECT_DIR$/pom.xml" />
|
||||
</list>
|
||||
</option>
|
||||
</component>
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_11" project-jdk-name="11" project-jdk-type="JavaSDK">
|
||||
<output url="file://$PROJECT_DIR$/out" />
|
||||
</component>
|
||||
</project>
|
90
src/Welsh Vocabulary Tutor/.idea/workspace.xml
generated
Normal file
90
src/Welsh Vocabulary Tutor/.idea/workspace.xml
generated
Normal file
|
@ -0,0 +1,90 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ChangeListManager">
|
||||
<list default="true" id="b436be74-9b31-4913-bf6e-41784cacd483" name="Default Changelist" comment="" />
|
||||
<option name="SHOW_DIALOG" value="false" />
|
||||
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
||||
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
|
||||
<option name="LAST_RESOLUTION" value="IGNORE" />
|
||||
</component>
|
||||
<component name="MavenImportPreferences">
|
||||
<option name="importingSettings">
|
||||
<MavenImportingSettings>
|
||||
<option name="importAutomatically" value="true" />
|
||||
</MavenImportingSettings>
|
||||
</option>
|
||||
</component>
|
||||
<component name="ProjectId" id="1ZuzdvhY95vKxjmCaMLe5YQbnXd" />
|
||||
<component name="ProjectViewState">
|
||||
<option name="hideEmptyMiddlePackages" value="true" />
|
||||
<option name="showExcludedFiles" value="true" />
|
||||
<option name="showLibraryContents" value="true" />
|
||||
</component>
|
||||
<component name="PropertiesComponent">
|
||||
<property name="RunOnceActivity.ShowReadmeOnStart" value="true" />
|
||||
<property name="WebServerToolWindowFactoryState" value="false" />
|
||||
<property name="aspect.path.notification.shown" value="true" />
|
||||
<property name="project.structure.last.edited" value="Libraries" />
|
||||
<property name="project.structure.proportion" value="0.0" />
|
||||
<property name="project.structure.side.proportion" value="0.2" />
|
||||
</component>
|
||||
<component name="RunManager">
|
||||
<configuration name="App" type="Application" factoryName="Application" temporary="true" nameIsGenerated="true">
|
||||
<option name="MAIN_CLASS_NAME" value="uk.ac.aber.cs22120.group20.App" />
|
||||
<module name="Welsh Vocabulary Tutor" />
|
||||
<extension name="coverage">
|
||||
<pattern>
|
||||
<option name="PATTERN" value="uk.ac.aber.cs22120.group20.*" />
|
||||
<option name="ENABLED" value="true" />
|
||||
</pattern>
|
||||
</extension>
|
||||
<method v="2">
|
||||
<option name="Make" enabled="true" />
|
||||
</method>
|
||||
</configuration>
|
||||
<recent_temporary>
|
||||
<list>
|
||||
<item itemvalue="Application.App" />
|
||||
</list>
|
||||
</recent_temporary>
|
||||
</component>
|
||||
<component name="SvnConfiguration">
|
||||
<configuration />
|
||||
</component>
|
||||
<component name="TaskManager">
|
||||
<task active="true" id="Default" summary="Default task">
|
||||
<changelist id="b436be74-9b31-4913-bf6e-41784cacd483" name="Default Changelist" comment="" />
|
||||
<created>1585703857421</created>
|
||||
<option name="number" value="Default" />
|
||||
<option name="presentableId" value="Default" />
|
||||
<updated>1585703857421</updated>
|
||||
<workItem from="1585703861677" duration="881000" />
|
||||
</task>
|
||||
<servers />
|
||||
</component>
|
||||
<component name="TypeScriptGeneratedFilesManager">
|
||||
<option name="version" value="1" />
|
||||
</component>
|
||||
<component name="WindowStateProjectService">
|
||||
<state width="1878" height="282" key="GridCell.Tab.0.bottom" timestamp="1585703985278">
|
||||
<screen x="0" y="0" width="1920" height="1040" />
|
||||
</state>
|
||||
<state width="1878" height="282" key="GridCell.Tab.0.bottom/0.0.1920.1040@0.0.1920.1040" timestamp="1585703985278" />
|
||||
<state width="1878" height="282" key="GridCell.Tab.0.center" timestamp="1585703985278">
|
||||
<screen x="0" y="0" width="1920" height="1040" />
|
||||
</state>
|
||||
<state width="1878" height="282" key="GridCell.Tab.0.center/0.0.1920.1040@0.0.1920.1040" timestamp="1585703985278" />
|
||||
<state width="1878" height="282" key="GridCell.Tab.0.left" timestamp="1585703985278">
|
||||
<screen x="0" y="0" width="1920" height="1040" />
|
||||
</state>
|
||||
<state width="1878" height="282" key="GridCell.Tab.0.left/0.0.1920.1040@0.0.1920.1040" timestamp="1585703985278" />
|
||||
<state width="1878" height="282" key="GridCell.Tab.0.right" timestamp="1585703985278">
|
||||
<screen x="0" y="0" width="1920" height="1040" />
|
||||
</state>
|
||||
<state width="1878" height="282" key="GridCell.Tab.0.right/0.0.1920.1040@0.0.1920.1040" timestamp="1585703985278" />
|
||||
<state x="441" y="95" key="SettingsEditor" timestamp="1585703966325">
|
||||
<screen x="0" y="0" width="1920" height="1040" />
|
||||
</state>
|
||||
<state x="441" y="95" key="SettingsEditor/0.0.1920.1040@0.0.1920.1040" timestamp="1585703966325" />
|
||||
</component>
|
||||
</project>
|
2
src/Welsh Vocabulary Tutor/Welsh Vocabulary Tutor.iml
Normal file
2
src/Welsh Vocabulary Tutor/Welsh Vocabulary Tutor.iml
Normal file
|
@ -0,0 +1,2 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module type="JAVA_MODULE" version="4" />
|
44
src/Welsh Vocabulary Tutor/pom.xml
Normal file
44
src/Welsh Vocabulary Tutor/pom.xml
Normal file
|
@ -0,0 +1,44 @@
|
|||
<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/maven-v4_0_0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>uk.ac.aber.cs22120.group20</groupId>
|
||||
<artifactId>Welsh Vocabulary Tutor</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<maven.compiler.source>11</maven.compiler.source>
|
||||
<maven.compiler.target>11</maven.compiler.target>
|
||||
</properties>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.openjfx</groupId>
|
||||
<artifactId>javafx-controls</artifactId>
|
||||
<version>11</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.openjfx</groupId>
|
||||
<artifactId>javafx-fxml</artifactId>
|
||||
<version>11</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<version>3.8.0</version>
|
||||
<configuration>
|
||||
<release>11</release>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.openjfx</groupId>
|
||||
<artifactId>javafx-maven-plugin</artifactId>
|
||||
<version>0.0.1</version>
|
||||
<configuration>
|
||||
<mainClass>uk.ac.aber.cs22120.group20.App</mainClass>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
|
@ -0,0 +1,7 @@
|
|||
module uk.ac.aber.cs22120.group20 {
|
||||
requires javafx.controls;
|
||||
requires javafx.fxml;
|
||||
|
||||
opens uk.ac.aber.cs22120.group20 to javafx.fxml;
|
||||
exports uk.ac.aber.cs22120.group20;
|
||||
}
|
|
@ -0,0 +1,48 @@
|
|||
package uk.ac.aber.cs22120.group20;
|
||||
|
||||
import javafx.application.Application;
|
||||
import javafx.fxml.FXMLLoader;
|
||||
import javafx.scene.Parent;
|
||||
import javafx.scene.Scene;
|
||||
import javafx.stage.Stage;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
/**
|
||||
* Launch class of the Welsh Vocabulary tutor Application
|
||||
*
|
||||
* @author Brad Corbett [brc9]
|
||||
* @author Henry Dugmore [hjd3]
|
||||
* @author Kain Bryan-Jones [kab74]
|
||||
* @author Luke Wybar [law39]
|
||||
* @author Marcin Jakob [maj83]
|
||||
* @author Oscar Pocock [osp1]
|
||||
* @author Tom Perry [top1]
|
||||
* @author Waylen Watts [ncw]
|
||||
*
|
||||
* @version 0.1
|
||||
*/
|
||||
public class App extends Application {
|
||||
private static Scene scene;
|
||||
|
||||
@Override
|
||||
public void start(Stage stage) throws IOException {
|
||||
scene = new Scene(loadFXML("primary"));
|
||||
stage.setScene(scene);
|
||||
stage.show();
|
||||
}
|
||||
|
||||
static void setRoot(String fxml) throws IOException {
|
||||
scene.setRoot(loadFXML(fxml));
|
||||
}
|
||||
|
||||
private static Parent loadFXML(String fxml) throws IOException {
|
||||
FXMLLoader fxmlLoader = new FXMLLoader(App.class.getResource(fxml + ".fxml"));
|
||||
return fxmlLoader.load();
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
launch();
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,14 @@
|
|||
package uk.ac.aber.cs22120.group20;
|
||||
|
||||
import java.io.IOException;
|
||||
import javafx.fxml.FXML;
|
||||
/**
|
||||
* Placeholder Controller
|
||||
*/
|
||||
public class PrimaryController {
|
||||
|
||||
@FXML
|
||||
private void switchToSecondary() throws IOException {
|
||||
App.setRoot("secondary");
|
||||
}
|
||||
}
|
|
@ -0,0 +1,14 @@
|
|||
package uk.ac.aber.cs22120.group20;
|
||||
|
||||
import java.io.IOException;
|
||||
import javafx.fxml.FXML;
|
||||
/**
|
||||
* Placeholder Controller
|
||||
*/
|
||||
public class SecondaryController {
|
||||
|
||||
@FXML
|
||||
private void switchToPrimary() throws IOException {
|
||||
App.setRoot("primary");
|
||||
}
|
||||
}
|
|
@ -0,0 +1,16 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<?import javafx.scene.layout.VBox?>
|
||||
<?import javafx.scene.control.Label?>
|
||||
<?import javafx.scene.control.Button?>
|
||||
<?import javafx.geometry.Insets?>
|
||||
|
||||
<VBox alignment="CENTER" spacing="20.0" xmlns="http://javafx.com/javafx/8.0.171" xmlns:fx="http://javafx.com/fxml/1" fx:controller="uk.ac.aber.cs22120.group20.PrimaryController">
|
||||
<children>
|
||||
<Label text="Primary View" />
|
||||
<Button fx:id="primaryButton" text="Switch to Secondary View" onAction="#switchToSecondary"/>
|
||||
</children>
|
||||
<padding>
|
||||
<Insets bottom="20.0" left="20.0" right="20.0" top="20.0" />
|
||||
</padding>
|
||||
</VBox>
|
|
@ -0,0 +1,16 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<?import javafx.scene.layout.VBox?>
|
||||
<?import javafx.scene.control.Label?>
|
||||
<?import javafx.scene.control.Button?>
|
||||
<?import javafx.geometry.Insets?>
|
||||
|
||||
<VBox alignment="CENTER" spacing="20.0" xmlns="http://javafx.com/javafx/8.0.171" xmlns:fx="http://javafx.com/fxml/1" fx:controller="uk.ac.aber.cs22120.group20.SecondaryController">
|
||||
<children>
|
||||
<Label text="Secondary View" />
|
||||
<Button fx:id="secondaryButton" text="Switch to Primary View" onAction="#switchToPrimary" />
|
||||
</children>
|
||||
<padding>
|
||||
<Insets bottom="20.0" left="20.0" right="20.0" top="20.0" />
|
||||
</padding>
|
||||
</VBox>
|
BIN
src/Welsh Vocabulary Tutor/target/classes/module-info.class
Normal file
BIN
src/Welsh Vocabulary Tutor/target/classes/module-info.class
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -0,0 +1,16 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<?import javafx.scene.layout.VBox?>
|
||||
<?import javafx.scene.control.Label?>
|
||||
<?import javafx.scene.control.Button?>
|
||||
<?import javafx.geometry.Insets?>
|
||||
|
||||
<VBox alignment="CENTER" spacing="20.0" xmlns="http://javafx.com/javafx/8.0.171" xmlns:fx="http://javafx.com/fxml/1" fx:controller="uk.ac.aber.cs22120.group20.PrimaryController">
|
||||
<children>
|
||||
<Label text="Primary View" />
|
||||
<Button fx:id="primaryButton" text="Switch to Secondary View" onAction="#switchToSecondary"/>
|
||||
</children>
|
||||
<padding>
|
||||
<Insets bottom="20.0" left="20.0" right="20.0" top="20.0" />
|
||||
</padding>
|
||||
</VBox>
|
|
@ -0,0 +1,16 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<?import javafx.scene.layout.VBox?>
|
||||
<?import javafx.scene.control.Label?>
|
||||
<?import javafx.scene.control.Button?>
|
||||
<?import javafx.geometry.Insets?>
|
||||
|
||||
<VBox alignment="CENTER" spacing="20.0" xmlns="http://javafx.com/javafx/8.0.171" xmlns:fx="http://javafx.com/fxml/1" fx:controller="uk.ac.aber.cs22120.group20.SecondaryController">
|
||||
<children>
|
||||
<Label text="Secondary View" />
|
||||
<Button fx:id="secondaryButton" text="Switch to Primary View" onAction="#switchToPrimary" />
|
||||
</children>
|
||||
<padding>
|
||||
<Insets bottom="20.0" left="20.0" right="20.0" top="20.0" />
|
||||
</padding>
|
||||
</VBox>
|
Reference in a new issue