Broke all resource files out into the resources folder

Maven's happier this way
This commit is contained in:
Scott Stamp 2018-10-14 21:31:28 -02:30
parent 3aa50296aa
commit 8bb7799ae0
35 changed files with 16 additions and 30 deletions

View File

@ -103,7 +103,7 @@
<dependency> <dependency>
<groupId>G-Earth</groupId> <groupId>G-Earth</groupId>
<artifactId>G-Earth-UI</artifactId> <artifactId>G-Earth-UI</artifactId>
<version>0.0.1-beta</version> <version>0.1.2-beta</version>
<!--<scope>provided</scope>--> <!--<scope>provided</scope>-->
</dependency> </dependency>
</dependencies> </dependencies>

View File

@ -128,7 +128,7 @@
<dependency> <dependency>
<groupId>G-Earth</groupId> <groupId>G-Earth</groupId>
<artifactId>G-Earth-UI</artifactId> <artifactId>G-Earth-UI</artifactId>
<version>0.0.1-beta</version> <version>0.1.2-beta</version>
<!--<scope>provided</scope>--> <!--<scope>provided</scope>-->
</dependency> </dependency>
</dependencies> </dependencies>

View File

@ -52,6 +52,6 @@ public class BlockAndReplacePackets extends ExtensionForm {
primaryStage.setTitle("Packet blocker &/ replacer"); primaryStage.setTitle("Packet blocker &/ replacer");
primaryStage.setScene(new Scene(root, 580, 262)); primaryStage.setScene(new Scene(root, 580, 262));
primaryStage.getScene().getStylesheets().add(GEarthController.class.getResource("bootstrap3.css").toExternalForm()); primaryStage.getScene().getStylesheets().add(GEarthController.class.getResource("/gearth/ui/bootstrap3.css").toExternalForm());
} }
} }

View File

@ -126,7 +126,7 @@
<dependency> <dependency>
<groupId>G-Earth</groupId> <groupId>G-Earth</groupId>
<artifactId>G-Earth-UI</artifactId> <artifactId>G-Earth-UI</artifactId>
<version>0.0.1-beta</version> <version>0.1.2-beta</version>
<!--<scope>provided</scope>--> <!--<scope>provided</scope>-->
</dependency> </dependency>
</dependencies> </dependencies>

View File

@ -8,28 +8,15 @@
<packaging>jar</packaging> <packaging>jar</packaging>
<version>0.0.1-beta</version> <version>0.1.2-beta</version>
<parent> <parent>
<groupId>G-Earth</groupId> <groupId>G-Earth</groupId>
<artifactId>G-Earth-Parent</artifactId> <artifactId>G-Earth-Parent</artifactId>
<version>0.0.1-beta</version> <version>0.1.2-beta</version>
</parent> </parent>
<build> <build>
<resources>
<!-- Embedded FXML and CSS resources -->
<resource>
<filtering>false</filtering>
<directory>src/main/java</directory>
<includes>
<include>**/*.fxml</include>
<include>**/*.css</include>
<include>**/*.png</include>
</includes>
</resource>
</resources>
<plugins> <plugins>
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
@ -109,7 +96,7 @@
</execution> </execution>
</executions> </executions>
<configuration> <configuration>
<outputDirectory>${project.parent.basedir}/bin</outputDirectory> <outputDirectory>${project.build.directory}/bin</outputDirectory>
<archive> <archive>
<manifest> <manifest>
<mainClass>gearth.Main</mainClass> <mainClass>gearth.Main</mainClass>

View File

@ -14,7 +14,7 @@ public class Main extends Application {
@Override @Override
public void start(Stage primaryStage) throws Exception{ public void start(Stage primaryStage) throws Exception{
FXMLLoader loader = new FXMLLoader(GEarthController.class.getResource("G-Earth.fxml")); FXMLLoader loader = new FXMLLoader(getClass().getResource("/gearth/ui/G-Earth.fxml"));
Parent root = loader.load(); Parent root = loader.load();
GEarthController companion = loader.getController(); GEarthController companion = loader.getController();
@ -25,7 +25,7 @@ public class Main extends Application {
primaryStage.setTitle("G-Earth"); primaryStage.setTitle("G-Earth");
primaryStage.setScene(new Scene(root, 620, 295)); primaryStage.setScene(new Scene(root, 620, 295));
primaryStage.show(); primaryStage.show();
primaryStage.getScene().getStylesheets().add(GEarthController.class.getResource("bootstrap3.css").toExternalForm()); primaryStage.getScene().getStylesheets().add(getClass().getResource("/gearth/ui/bootstrap3.css").toExternalForm());
primaryStage.setOnCloseRequest( event -> { primaryStage.setOnCloseRequest( event -> {
companion.abort(); companion.abort();

View File

@ -18,8 +18,8 @@ public class BoxButton extends StackPane {
//paths zijn relatief aan deze classpath //paths zijn relatief aan deze classpath
public BoxButton(String imageName, String imageOnHoverName) { public BoxButton(String imageName, String imageOnHoverName) {
this.image = new Image(getClass().getResourceAsStream("files/" + imageName)); this.image = new Image(getClass().getResourceAsStream("/gearth/ui/buttons/files/" + imageName));
this.imageOnHover = new Image(getClass().getResourceAsStream("files/" + imageOnHoverName)); this.imageOnHover = new Image(getClass().getResourceAsStream("/gearth/ui/buttons/files/" + imageOnHoverName));
this.imageView = new ImageView(); this.imageView = new ImageView();
setCursor(Cursor.DEFAULT); setCursor(Cursor.DEFAULT);

View File

@ -8,7 +8,6 @@ import javafx.scene.image.ImageView;
import javafx.scene.input.MouseEvent; import javafx.scene.input.MouseEvent;
import javafx.scene.layout.StackPane; import javafx.scene.layout.StackPane;
import java.io.File;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
@ -32,10 +31,10 @@ public class PauseResumeButton extends StackPane{
public PauseResumeButton(boolean isPaused) { public PauseResumeButton(boolean isPaused) {
this.isPaused[0] = isPaused; this.isPaused[0] = isPaused;
this.imagePause = new Image(getClass().getResourceAsStream("files/ButtonPause.png")); this.imagePause = new Image(getClass().getResourceAsStream("/gearth/ui/buttons/files/ButtonPause.png"));
this.imagePauseOnHover = new Image(getClass().getResourceAsStream("files/ButtonPauseHover.png")); this.imagePauseOnHover = new Image(getClass().getResourceAsStream("/gearth/ui/buttons/files/ButtonPauseHover.png"));
this.imageResume = new Image(getClass().getResourceAsStream("files/ButtonResume.png")); this.imageResume = new Image(getClass().getResourceAsStream("/gearth/ui/buttons/files/ButtonResume.png"));
this.imageResumeOnHover = new Image(getClass().getResourceAsStream("files/ButtonResumeHover.png")); this.imageResumeOnHover = new Image(getClass().getResourceAsStream("/gearth/ui/buttons/files/ButtonResumeHover.png"));
this.imageView = new ImageView(); this.imageView = new ImageView();
setCursor(Cursor.DEFAULT); setCursor(Cursor.DEFAULT);

View File

@ -23,7 +23,7 @@ public class UiLogger implements PacketLogger {
@Override @Override
public void start() { public void start() {
FXMLLoader loader = new FXMLLoader(getClass().getResource("/gearth/ui/Logger.fxml")); FXMLLoader loader = new FXMLLoader(getClass().getResource("/gearth/ui/UiLogger.fxml"));
try { try {
Parent root = loader.load(); Parent root = loader.load();

View File

Before

Width:  |  Height:  |  Size: 3.3 KiB

After

Width:  |  Height:  |  Size: 3.3 KiB

View File

Before

Width:  |  Height:  |  Size: 460 B

After

Width:  |  Height:  |  Size: 460 B

View File

Before

Width:  |  Height:  |  Size: 644 B

After

Width:  |  Height:  |  Size: 644 B

View File

Before

Width:  |  Height:  |  Size: 677 B

After

Width:  |  Height:  |  Size: 677 B

View File

Before

Width:  |  Height:  |  Size: 725 B

After

Width:  |  Height:  |  Size: 725 B

View File

Before

Width:  |  Height:  |  Size: 3.2 KiB

After

Width:  |  Height:  |  Size: 3.2 KiB