Skip to content

Commit

Permalink
Test
Browse files Browse the repository at this point in the history
  • Loading branch information
Lukem121 committed May 3, 2019
1 parent fb4af34 commit e667de0
Show file tree
Hide file tree
Showing 33 changed files with 6,789 additions and 0 deletions.
53 changes: 53 additions & 0 deletions build.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
<?xml version="1.0" encoding="UTF-8"?><!-- You may freely edit this file. See commented blocks below for --><!-- some examples of how to customize the build. --><!-- (If you delete it and reopen the project it will be recreated.) --><!-- By default, only the Clean and Build commands use this build script. --><project name="SC" default="default" basedir="." xmlns:fx="javafx:com.sun.javafx.tools.ant">
<description>Builds, tests, and runs the project SC.</description>
<import file="nbproject/build-impl.xml"/>
<!--
There exist several targets which are by default empty and which can be
used for execution of your tasks. These targets are usually executed
before and after some main targets. Those of them relevant for JavaFX project are:
-pre-init: called before initialization of project properties
-post-init: called after initialization of project properties
-pre-compile: called before javac compilation
-post-compile: called after javac compilation
-pre-compile-test: called before javac compilation of JUnit tests
-post-compile-test: called after javac compilation of JUnit tests
-pre-jfx-jar: called before FX SDK specific <fx:jar> task
-post-jfx-jar: called after FX SDK specific <fx:jar> task
-pre-jfx-deploy: called before FX SDK specific <fx:deploy> task
-post-jfx-deploy: called after FX SDK specific <fx:deploy> task
-pre-jfx-native: called just after -pre-jfx-deploy if <fx:deploy> runs in native packaging mode
-post-jfx-native: called just after -post-jfx-deploy if <fx:deploy> runs in native packaging mode
-post-clean: called after cleaning build products
(Targets beginning with '-' are not intended to be called on their own.)
Example of inserting a HTML postprocessor after javaFX SDK deployment:
<target name="-post-jfx-deploy">
<basename property="jfx.deployment.base" file="${jfx.deployment.jar}" suffix=".jar"/>
<property name="jfx.deployment.html" location="${jfx.deployment.dir}${file.separator}${jfx.deployment.base}.html"/>
<custompostprocess>
<fileset dir="${jfx.deployment.html}"/>
</custompostprocess>
</target>
Example of calling an Ant task from JavaFX SDK. Note that access to JavaFX SDK Ant tasks must be
initialized; to ensure this is done add the dependence on -check-jfx-sdk-version target:
<target name="-post-jfx-jar" depends="-check-jfx-sdk-version">
<echo message="Calling jar task from JavaFX SDK"/>
<fx:jar ...>
...
</fx:jar>
</target>
For more details about JavaFX SDK Ant tasks go to
http://docs.oracle.com/javafx/2/deployment/jfxpub-deployment.htm
For list of available properties check the files
nbproject/build-impl.xml and nbproject/jfx-impl.xml.
-->
</project>
4 changes: 4 additions & 0 deletions build/built-jar.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#Fri, 03 May 2019 16:05:45 +0100


E\:\\Documents\\Sprite\ Sheet\ Creator\\Sprite-Sheet-Creator=
Binary file added build/classes/icon_32x32.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added build/classes/icon_64x64.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
29 changes: 29 additions & 0 deletions build/classes/sc/FXMLDocument.fxml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<?xml version="1.0" encoding="UTF-8"?>

<?import javafx.scene.canvas.Canvas?>
<?import javafx.scene.control.Button?>
<?import javafx.scene.control.ComboBox?>
<?import javafx.scene.control.Label?>
<?import javafx.scene.layout.AnchorPane?>
<?import javafx.scene.layout.Pane?>

<AnchorPane id="AnchorPane" fx:id="pane" prefHeight="737.0" prefWidth="672.0" stylesheets="@stylesheet.css" xmlns="http://javafx.com/javafx/11.0.1" xmlns:fx="http://javafx.com/fxml/1" fx:controller="sc.FXMLDocumentController">
<children>
<Button layoutX="574.0" layoutY="685.0" mnemonicParsing="false" onAction="#addImage" text="Add Images" />
<ComboBox fx:id="combobox" layoutX="112.0" layoutY="686.0" onAction="#comboBoxEvent" prefHeight="25.0" prefWidth="73.0" promptText="64" />
<Button layoutX="456.0" layoutY="685.0" mnemonicParsing="false" onAction="#saveImage" text="Save Spritesheet" />
<Pane layoutX="14.0" layoutY="14.0" prefHeight="640.0" prefWidth="640.0" styleClass="canvas" stylesheets="@stylesheet.css">
<children>
<Canvas fx:id="displayCanvas" height="640.0" width="640.0" />
</children>
</Pane>
<Label layoutX="14.0" layoutY="690.0" text="Save Resolution" />
<Button layoutX="355.0" layoutY="685.0" mnemonicParsing="false" onAction="#clearImages" text="Clear Images" />
<AnchorPane layoutX="-877.0" layoutY="14.0" prefHeight="657.0" prefWidth="721.0">
<children>
<Canvas fx:id="hiddenCanvas" height="640.0" visible="false" width="640.0" />
<Canvas id=".canvas" fx:id="workCanvas" height="640.0" styleClass="stylesheet.css" visible="false" width="640.0" />
</children>
</AnchorPane>
</children>
</AnchorPane>
Binary file added build/classes/sc/FXMLDocumentController.class
Binary file not shown.
Binary file added build/classes/sc/FxDialogs.class
Binary file not shown.
Binary file added build/classes/sc/SC.class
Binary file not shown.
3 changes: 3 additions & 0 deletions build/classes/sc/stylesheet.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.canvas{
-fx-background-color: antiquewhite, white ;
}
45 changes: 45 additions & 0 deletions dist/SC.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
<html><head>
<SCRIPT src="http://java.com/js/dtjava.js"></SCRIPT>
<script>
function launchApplication(jnlpfile) {
dtjava.launch( {
url : 'SC.jnlp',
jnlp_content : 'PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjxqbmxwIHNwZWM9IjEuMCIgeG1sbnM6amZ4PSJodHRwOi8vamF2YWZ4LmNvbSIgaHJlZj0iU0Muam5scCI+DQogIDxpbmZvcm1hdGlvbj4NCiAgICA8dGl0bGU+U0M8L3RpdGxlPg0KICAgIDx2ZW5kb3I+bHVrZWE8L3ZlbmRvcj4NCiAgICA8ZGVzY3JpcHRpb24+bnVsbDwvZGVzY3JpcHRpb24+DQogICAgPG9mZmxpbmUtYWxsb3dlZC8+DQogIDwvaW5mb3JtYXRpb24+DQogIDxyZXNvdXJjZXM+DQogICAgPGoyc2UgdmVyc2lvbj0iMS42KyIgaHJlZj0iaHR0cDovL2phdmEuc3VuLmNvbS9wcm9kdWN0cy9hdXRvZGwvajJzZSIvPg0KICAgIDxqYXIgaHJlZj0iU0MuamFyIiBzaXplPSIyMTMxOCIgZG93bmxvYWQ9ImVhZ2VyIiAvPg0KICA8L3Jlc291cmNlcz4NCiAgPGpmeDpqYXZhZngtZGVzYyAgd2lkdGg9IjgwMCIgaGVpZ2h0PSI2MDAiIG1haW4tY2xhc3M9InNjLlNDIiAgbmFtZT0iU0MiIC8+DQogIDx1cGRhdGUgY2hlY2s9ImFsd2F5cyIvPg0KPC9qbmxwPg0K'
},
{
javafx : '8.0+'
},
{}
);
return false;
}
</script>

<script>
function javafxEmbedsc() {
dtjava.embed(
{
id : 'sc',
url : 'SC.jnlp',
placeholder : 'javafx-app-placeholder',
width : '800',
height : '600',
jnlp_content : 'PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjxqbmxwIHNwZWM9IjEuMCIgeG1sbnM6amZ4PSJodHRwOi8vamF2YWZ4LmNvbSIgaHJlZj0iU0Muam5scCI+DQogIDxpbmZvcm1hdGlvbj4NCiAgICA8dGl0bGU+U0M8L3RpdGxlPg0KICAgIDx2ZW5kb3I+bHVrZWE8L3ZlbmRvcj4NCiAgICA8ZGVzY3JpcHRpb24+bnVsbDwvZGVzY3JpcHRpb24+DQogICAgPG9mZmxpbmUtYWxsb3dlZC8+DQogIDwvaW5mb3JtYXRpb24+DQogIDxyZXNvdXJjZXM+DQogICAgPGoyc2UgdmVyc2lvbj0iMS42KyIgaHJlZj0iaHR0cDovL2phdmEuc3VuLmNvbS9wcm9kdWN0cy9hdXRvZGwvajJzZSIvPg0KICAgIDxqYXIgaHJlZj0iU0MuamFyIiBzaXplPSIyMTMxOCIgZG93bmxvYWQ9ImVhZ2VyIiAvPg0KICA8L3Jlc291cmNlcz4NCiAgPGpmeDpqYXZhZngtZGVzYyAgd2lkdGg9IjgwMCIgaGVpZ2h0PSI2MDAiIG1haW4tY2xhc3M9InNjLlNDIiAgbmFtZT0iU0MiIC8+DQogIDx1cGRhdGUgY2hlY2s9ImFsd2F5cyIvPg0KPC9qbmxwPg0K'
},
{
javafx : '8.0+'
},
{}
);
}
<!-- Embed FX application into web page once page is loaded -->
dtjava.addOnloadCallback(javafxEmbedsc);
</script>

</head><body>
<h2>Test page for <b>SC</b></h2>
<b>Webstart:</b> <a href='SC.jnlp' onclick="return launchApplication('SC.jnlp');">click to launch this app as webstart</a><br><hr><br>

<!-- Applet will be inserted here -->
<div id='javafx-app-placeholder'></div>
</body></html>
Binary file added dist/SC.jar
Binary file not shown.
15 changes: 15 additions & 0 deletions dist/SC.jnlp
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<jnlp spec="1.0" xmlns:jfx="http://javafx.com" href="SC.jnlp">
<information>
<title>SC</title>
<vendor>lukea</vendor>
<description>null</description>
<offline-allowed/>
</information>
<resources>
<j2se version="1.6+" href="http://java.sun.com/products/autodl/j2se"/>
<jar href="SC.jar" size="21318" download="eager" />
</resources>
<jfx:javafx-desc width="800" height="600" main-class="sc.SC" name="SC" />
<update check="always"/>
</jnlp>
Binary file added icon_32x32.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions manifest.mf
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Manifest-Version: 1.0
X-COMMENT: Main-Class will be added automatically by build

Loading

0 comments on commit e667de0

Please sign in to comment.