forked from Apple-2-Tools/jace
Start of JavaFX overhaul...
This commit is contained in:
parent
0f60a59df7
commit
34addf37f8
@ -12,7 +12,7 @@
|
|||||||
<goal>org.codehaus.mojo:exec-maven-plugin:1.2.1:exec</goal>
|
<goal>org.codehaus.mojo:exec-maven-plugin:1.2.1:exec</goal>
|
||||||
</goals>
|
</goals>
|
||||||
<properties>
|
<properties>
|
||||||
<exec.args>-classpath target/jace-2.0-SNAPSHOT.jar jace.Emulator</exec.args>
|
<exec.args>-classpath %classpath jace.JaceApplication</exec.args>
|
||||||
<exec.executable>java</exec.executable>
|
<exec.executable>java</exec.executable>
|
||||||
</properties>
|
</properties>
|
||||||
</action>
|
</action>
|
||||||
@ -26,7 +26,7 @@
|
|||||||
<goal>org.codehaus.mojo:exec-maven-plugin:1.2.1:exec</goal>
|
<goal>org.codehaus.mojo:exec-maven-plugin:1.2.1:exec</goal>
|
||||||
</goals>
|
</goals>
|
||||||
<properties>
|
<properties>
|
||||||
<exec.args>-Xdebug -Xrunjdwp:transport=dt_socket,server=n,address=${jpda.address} -classpath target/jace-2.0-SNAPSHOT.jar jace.Emulator</exec.args>
|
<exec.args>-classpath %classpath jace.JaceApplication</exec.args>
|
||||||
<exec.executable>java</exec.executable>
|
<exec.executable>java</exec.executable>
|
||||||
<jpda.listen>true</jpda.listen>
|
<jpda.listen>true</jpda.listen>
|
||||||
</properties>
|
</properties>
|
||||||
@ -41,7 +41,7 @@
|
|||||||
<goal>org.codehaus.mojo:exec-maven-plugin:1.2.1:exec</goal>
|
<goal>org.codehaus.mojo:exec-maven-plugin:1.2.1:exec</goal>
|
||||||
</goals>
|
</goals>
|
||||||
<properties>
|
<properties>
|
||||||
<exec.args>-Xdebug -Xrunjdwp:transport=dt_socket,server=n,address=${jpda.address} -classpath target/jace-2.0-SNAPSHOT.jar jace.Emulator</exec.args>
|
<exec.args>-Xdebug -Xrunjdwp:transport=dt_socket,server=n,address=${jpda.address} -classpath %classpath jace.JaceApplication</exec.args>
|
||||||
<exec.executable>java</exec.executable>
|
<exec.executable>java</exec.executable>
|
||||||
<jpda.listen>true</jpda.listen>
|
<jpda.listen>true</jpda.listen>
|
||||||
</properties>
|
</properties>
|
||||||
|
46
pom.xml
46
pom.xml
@ -22,6 +22,29 @@
|
|||||||
<build>
|
<build>
|
||||||
<plugins>
|
<plugins>
|
||||||
<plugin>
|
<plugin>
|
||||||
|
<groupId>com.zenjava</groupId>
|
||||||
|
<artifactId>javafx-maven-plugin</artifactId>
|
||||||
|
<version>2.0</version>
|
||||||
|
<configuration>
|
||||||
|
outlawEditor
|
||||||
|
<mainClass>jace.JaceApplication</mainClass>
|
||||||
|
<!-- only required if signing the jar file -->
|
||||||
|
<keyStoreAlias>example-user</keyStoreAlias>
|
||||||
|
<keyStorePassword>example-password</keyStorePassword>
|
||||||
|
<allPermissions>true</allPermissions>
|
||||||
|
<bundleType>ALL</bundleType>
|
||||||
|
</configuration>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<id>package</id>
|
||||||
|
<phase>package</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>jar</goal>
|
||||||
|
</goals>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
<!-- <plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<artifactId>maven-dependency-plugin</artifactId>
|
<artifactId>maven-dependency-plugin</artifactId>
|
||||||
<version>2.6</version>
|
<version>2.6</version>
|
||||||
@ -39,8 +62,9 @@
|
|||||||
</configuration>
|
</configuration>
|
||||||
</execution>
|
</execution>
|
||||||
</executions>
|
</executions>
|
||||||
</plugin>
|
</plugin>-->
|
||||||
<plugin>
|
|
||||||
|
<!-- <plugin>
|
||||||
<groupId>org.codehaus.mojo</groupId>
|
<groupId>org.codehaus.mojo</groupId>
|
||||||
<artifactId>exec-maven-plugin</artifactId>
|
<artifactId>exec-maven-plugin</artifactId>
|
||||||
<version>1.2.1</version>
|
<version>1.2.1</version>
|
||||||
@ -79,7 +103,7 @@
|
|||||||
</configuration>
|
</configuration>
|
||||||
</execution>
|
</execution>
|
||||||
</executions>
|
</executions>
|
||||||
</plugin>
|
</plugin>-->
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<artifactId>maven-compiler-plugin</artifactId>
|
<artifactId>maven-compiler-plugin</artifactId>
|
||||||
@ -105,4 +129,20 @@
|
|||||||
</plugins>
|
</plugins>
|
||||||
</build>
|
</build>
|
||||||
|
|
||||||
|
<dependencies>
|
||||||
|
<!-- <dependency>
|
||||||
|
<groupId>com.oracle</groupId>
|
||||||
|
<artifactId>javafx</artifactId>
|
||||||
|
<version>2</version>
|
||||||
|
<systemPath>${java.home}/lib/jfxrt.jar</systemPath>
|
||||||
|
<scope>system</scope>
|
||||||
|
</dependency>-->
|
||||||
|
<dependency>
|
||||||
|
<groupId>javafx-packager</groupId>
|
||||||
|
<artifactId>javafx-packager</artifactId>
|
||||||
|
<version>1.7</version>
|
||||||
|
<systemPath>${java.home}/../lib/ant-javafx.jar</systemPath>
|
||||||
|
<scope>system</scope>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
</project>
|
</project>
|
||||||
|
@ -6,10 +6,12 @@
|
|||||||
|
|
||||||
package jace;
|
package jace;
|
||||||
|
|
||||||
|
import java.io.IOException;
|
||||||
import javafx.application.Application;
|
import javafx.application.Application;
|
||||||
import javafx.fxml.FXMLLoader;
|
import javafx.fxml.FXMLLoader;
|
||||||
import javafx.scene.Parent;
|
import javafx.scene.Parent;
|
||||||
import javafx.scene.Scene;
|
import javafx.scene.Scene;
|
||||||
|
import javafx.scene.layout.AnchorPane;
|
||||||
import javafx.stage.Stage;
|
import javafx.stage.Stage;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -17,15 +19,25 @@ import javafx.stage.Stage;
|
|||||||
* @author blurry
|
* @author blurry
|
||||||
*/
|
*/
|
||||||
public class JaceApplication extends Application {
|
public class JaceApplication extends Application {
|
||||||
|
|
||||||
|
Stage primaryStage;
|
||||||
|
JaceUIController controller;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void start(Stage stage) throws Exception {
|
public void start(Stage stage) throws Exception {
|
||||||
Parent root = FXMLLoader.load(getClass().getResource("fxml/JaceUI.fxml"));
|
primaryStage = stage;
|
||||||
|
FXMLLoader fxmlLoader = new FXMLLoader(getClass().getResource("/fxml/JaceUI.fxml"));
|
||||||
|
fxmlLoader.setResources(null);
|
||||||
|
try {
|
||||||
|
AnchorPane node = (AnchorPane) fxmlLoader.load();
|
||||||
|
controller = fxmlLoader.getController();
|
||||||
|
Scene s = new Scene(node);
|
||||||
|
primaryStage.setScene(s);
|
||||||
|
} catch (IOException exception) {
|
||||||
|
throw new RuntimeException(exception);
|
||||||
|
}
|
||||||
|
|
||||||
Scene scene = new Scene(root);
|
primaryStage.show();
|
||||||
|
|
||||||
stage.setScene(scene);
|
|
||||||
stage.show();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
package jace;
|
package jace;
|
||||||
|
|
||||||
import java.awt.Canvas;
|
import javafx.scene.canvas.Canvas;
|
||||||
import java.net.URL;
|
import java.net.URL;
|
||||||
import java.util.ResourceBundle;
|
import java.util.ResourceBundle;
|
||||||
import javafx.fxml.FXML;
|
import javafx.fxml.FXML;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user