initial commit

This commit is contained in:
Hendrik Schutter 2019-03-30 22:31:04 +01:00
parent 8a47e0123f
commit d287e27776
10 changed files with 297 additions and 0 deletions

8
build.fxbuild Normal file
View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="ASCII"?>
<anttasks:AntTask xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:anttasks="http://org.eclipse.fx.ide.jdt/1.0" buildDirectory="${project}/build">
<deploy>
<application name="jFx3Dtest"/>
<info/>
</deploy>
<signjar/>
</anttasks:AntTask>

90
pom.xml Normal file
View File

@ -0,0 +1,90 @@
<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>
<version>0.0.2</version>
<name>jFx3Dtest</name>
<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>
<dependency>
<groupId>com.jfoenix</groupId>
<artifactId>jfoenix</artifactId>
<version>9.0.8</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.0</version>
<configuration>
<source>11</source>
<target>11</target>
<!--<release>11</release> -->
<showWarnings>true</showWarnings>
<showDeprecation>true</showDeprecation>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.6.0</version>
<executions>
<execution>
<goals>
<goal>java</goal>
</goals>
</execution>
</executions>
<configuration>
<mainClass>main.java.com.ThreeDtest.application.Main</mainClass>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.2.1</version>
<configuration>
<finalName>3Dtest</finalName>
<shadedArtifactAttached>true</shadedArtifactAttached>
<transformers>
<transformer
implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
<mainClass>com.ThreeDtest.application.JavaFX11Main</mainClass>
</transformer>
</transformers>
</configuration>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
<artifactId>3Dtest</artifactId>
<groupId>application</groupId>
<description>testing the 3D Cube Mapping</description>
</project>

View File

@ -0,0 +1,10 @@
package main.java.com.ThreeDtest.application;
public class JavaFX11Main
{
public static void main(String[] args)
{
Main.main(args);
}
}

View File

@ -0,0 +1,107 @@
package main.java.com.ThreeDtest.application;
import javafx.application.Application;
import javafx.event.ActionEvent;
import javafx.fxml.FXML;
import javafx.fxml.FXMLLoader;
import javafx.stage.Stage;
import javafx.scene.Scene;
import javafx.scene.control.Alert;
import javafx.scene.control.Alert.AlertType;
import javafx.scene.control.Button;
import javafx.scene.control.MenuItem;
import javafx.scene.layout.AnchorPane;
public class Main extends Application
{
@FXML
private AnchorPane mainAnchorpane;
@FXML
private MenuItem menuItemStart;
@FXML
private MenuItem menuItemReset;
@FXML
private MenuItem menuItemClose;
@FXML
private MenuItem menuItemHilfe;
@FXML
private Button startStopButton;
@FXML
private Button resetButton;
@Override
public void start(Stage primaryStage)
{
try {
FXMLLoader loader = new FXMLLoader(
getClass().getResource("/fxml/MainWindow.fxml"));
AnchorPane pane = loader.load();
primaryStage.setTitle("jFx3Dtest");
Scene scene = new Scene(pane);
/**
* alle event listener mit fxml-loader
*
*/
scene.getStylesheets().add(
Main.class.getResource("/css/application.css").toExternalForm());
primaryStage.setScene(scene);
primaryStage.show();
} catch (Exception e) {
e.printStackTrace();
}
}
@FXML
public void menuItemStartAction(ActionEvent event)
{
}
@FXML
public void menuItemResetAction(ActionEvent event)
{
}
@FXML
public void menuItemCloseAction(ActionEvent event)
{
System.exit(0);
}
@FXML
public void startStopButtonAction(ActionEvent event)
{
}
@FXML
public void resetButtonAction(ActionEvent event)
{
}
@FXML
public void menuItemHilfeAction(ActionEvent event)
{
Alert alert = new Alert(AlertType.INFORMATION);
alert.setTitle("Alert");
alert.setHeaderText("Some info");
alert.setContentText("Author: localhorst@mosad.xyz");
alert.showAndWait();
}
public static void main(String[] args)
{
launch(args);
}
}

View File

@ -0,0 +1 @@
/* JavaFX CSS - Leave this comment until you have at least create one rule which uses -fx-Property */

View File

@ -0,0 +1,38 @@
<?xml version="1.0" encoding="UTF-8"?>
<?import javafx.scene.control.Menu?>
<?import javafx.scene.control.MenuBar?>
<?import javafx.scene.control.MenuItem?>
<?import javafx.scene.control.SeparatorMenuItem?>
<?import javafx.scene.layout.AnchorPane?>
<?import javafx.scene.layout.BorderPane?>
<?import javafx.scene.layout.HBox?>
<AnchorPane fx:id="mainAnchorpane" maxHeight="400.0" maxWidth="500.0" minHeight="400.0" minWidth="500.0" prefHeight="400.0" prefWidth="500.0" xmlns="http://javafx.com/javafx/9" xmlns:fx="http://javafx.com/fxml/1" fx:controller="main.java.com.ThreeDtest.application.Main">
<children>
<BorderPane prefHeight="400.0" prefWidth="500.0">
<bottom>
<HBox prefHeight="100.0" prefWidth="200.0" BorderPane.alignment="CENTER" />
</bottom>
<top>
<MenuBar BorderPane.alignment="CENTER">
<menus>
<Menu mnemonicParsing="false" text="Aktion">
<items>
<MenuItem fx:id="menuItemStart" mnemonicParsing="false" onAction="#menuItemStartAction" text="Start" />
<MenuItem fx:id="menuItemReset" mnemonicParsing="false" onAction="#menuItemResetAction" text="Reset" />
<SeparatorMenuItem mnemonicParsing="false" />
<MenuItem fx:id="menuItemClose" mnemonicParsing="false" onAction="#menuItemCloseAction" text="Beenden" />
</items>
</Menu>
<Menu mnemonicParsing="false" text="Hilfe">
<items>
<MenuItem fx:id="menuItemHilfe" mnemonicParsing="false" onAction="#menuItemHilfeAction" text="Info" />
</items>
</Menu>
</menus>
</MenuBar>
</top>
</BorderPane>
</children>
</AnchorPane>

View File

@ -0,0 +1 @@
/* JavaFX CSS - Leave this comment until you have at least create one rule which uses -fx-Property */

View File

@ -0,0 +1,38 @@
<?xml version="1.0" encoding="UTF-8"?>
<?import javafx.scene.control.Menu?>
<?import javafx.scene.control.MenuBar?>
<?import javafx.scene.control.MenuItem?>
<?import javafx.scene.control.SeparatorMenuItem?>
<?import javafx.scene.layout.AnchorPane?>
<?import javafx.scene.layout.BorderPane?>
<?import javafx.scene.layout.HBox?>
<AnchorPane fx:id="mainAnchorpane" maxHeight="400.0" maxWidth="500.0" minHeight="400.0" minWidth="500.0" prefHeight="400.0" prefWidth="500.0" xmlns="http://javafx.com/javafx/9" xmlns:fx="http://javafx.com/fxml/1" fx:controller="main.java.com.ThreeDtest.application.Main">
<children>
<BorderPane prefHeight="400.0" prefWidth="500.0">
<bottom>
<HBox prefHeight="100.0" prefWidth="200.0" BorderPane.alignment="CENTER" />
</bottom>
<top>
<MenuBar BorderPane.alignment="CENTER">
<menus>
<Menu mnemonicParsing="false" text="Aktion">
<items>
<MenuItem fx:id="menuItemStart" mnemonicParsing="false" onAction="#menuItemStartAction" text="Start" />
<MenuItem fx:id="menuItemReset" mnemonicParsing="false" onAction="#menuItemResetAction" text="Reset" />
<SeparatorMenuItem mnemonicParsing="false" />
<MenuItem fx:id="menuItemClose" mnemonicParsing="false" onAction="#menuItemCloseAction" text="Beenden" />
</items>
</Menu>
<Menu mnemonicParsing="false" text="Hilfe">
<items>
<MenuItem fx:id="menuItemHilfe" mnemonicParsing="false" onAction="#menuItemHilfeAction" text="Info" />
</items>
</Menu>
</menus>
</MenuBar>
</top>
</BorderPane>
</children>
</AnchorPane>

View File

@ -0,0 +1,2 @@
main/java/com/ThreeDtest/application/Main.class
main/java/com/ThreeDtest/application/JavaFX11Main.class

View File

@ -0,0 +1,2 @@
/home/hendrik/eclipse-workspace/Java/jFx3Dtest/src/main/java/com/ThreeDtest/application/JavaFX11Main.java
/home/hendrik/eclipse-workspace/Java/jFx3Dtest/src/main/java/com/ThreeDtest/application/Main.java