Implemented draw on mouse click (again).

This commit is contained in:
Bandie Yip Kojote 2017-08-10 23:45:18 +02:00
parent 04e486198a
commit ae24110a85
25 changed files with 44 additions and 29 deletions

View File

@ -1,4 +1,4 @@
#Thu, 10 Aug 2017 14:49:07 +0200
#Thu, 10 Aug 2017 23:44:49 +0200
/home/bandie/NetBeansProjects/CircleArt=

View File

@ -44,4 +44,4 @@ HELP=Help
ABOUT=About
DRAWING_OFF=Status: Off
DRAWING_ON=Status: On
HELP_DRAWING=To switch on/off your pen, press D.
HELP_DRAWING=To switch on/off your pen permanently, press D.

View File

@ -44,4 +44,4 @@ HELP=Hilfe
ABOUT=\u00dcber
DRAWING_OFF=Status: Aus
DRAWING_ON=Status: An
HELP_DRAWING=Ein-/Ausschalten des Stiftes durch Dr\u00fccken von D.
HELP_DRAWING=Dauerhaftes ein-/ausschalten des Stiftes durch Dr\u00fccken von D.

View File

@ -44,4 +44,4 @@ HELP=Hilfe
ABOUT=\u00dcber
DRAWING_OFF=Status: Aus
DRAWING_ON=Status: An
HELP_DRAWING=Ein-/Ausschalten des Stiftes durch Dr\u00fccken von D.
HELP_DRAWING=Dauerhaftes ein-/ausschalten des Stiftes durch Dr\u00fccken von D.

View File

@ -44,4 +44,4 @@ HELP=Hilfe
ABOUT=\u00dcber
DRAWING_OFF=Status: Aus
DRAWING_ON=Status: An
HELP_DRAWING=Ein-/Ausschalten des Stiftes durch Dr\u00fccken von D.
HELP_DRAWING=Dauerhaftes ein-/ausschalten des Stiftes durch Dr\u00fccken von D.

View File

@ -44,4 +44,4 @@ HELP=Hilfe
ABOUT=\u00dcber
DRAWING_OFF=Status: Aus
DRAWING_ON=Status: An
HELP_DRAWING=Ein-/Ausschalten des Stiftes durch Dr\u00fccken von D.
HELP_DRAWING=Dauerhaftes ein-/ausschalten des Stiftes durch Dr\u00fccken von D.

View File

@ -44,4 +44,4 @@ HELP=Hilfe
ABOUT=\u00dcber
DRAWING_OFF=Status: Aus
DRAWING_ON=Status: An
HELP_DRAWING=Ein-/Ausschalten des Stiftes durch Dr\u00fccken von D.
HELP_DRAWING=Dauerhaftes ein-/ausschalten des Stiftes durch Dr\u00fccken von D.

View File

@ -44,4 +44,4 @@ HELP=Help
ABOUT=About
DRAWING_OFF=Status: Off
DRAWING_ON=Status: On
HELP_DRAWING=To switch on/off your pen, press D.
HELP_DRAWING=To switch on/off your pen permanently, press D.

View File

@ -44,4 +44,4 @@ HELP=Help
ABOUT=About
DRAWING_OFF=Status: Off
DRAWING_ON=Status: On
HELP_DRAWING=To switch on/off your pen, press D.
HELP_DRAWING=To switch on/off your pen permanently, press D.

View File

@ -44,4 +44,4 @@ HELP=Help
ABOUT=About
DRAWING_OFF=Status: Off
DRAWING_ON=Status: On
HELP_DRAWING=To switch on/off your pen, press D.
HELP_DRAWING=To switch on/off your pen permanently, press D.

View File

@ -44,4 +44,4 @@ HELP=Aider
ABOUT=\u00c0 propos de programme
DRAWING_OFF=Crayon: D\u00e9sactiv\u00e9
DRAWING_ON=Crayon: Allum\u00e9
HELP_DRAWING=Allum\u00e9/D\u00e9sactiv\u00e9 le crayon en appuyant sur la barre d'espacement.
HELP_DRAWING=Pour que allum\u00e9/d\u00e9sactiver le crayon p\u00e9renne: Pressez le D bouton.

View File

@ -44,4 +44,4 @@ HELP=Aider
ABOUT=\u00c0 propos de programme
DRAWING_OFF=Crayon: D\u00e9sactiv\u00e9
DRAWING_ON=Crayon: Allum\u00e9
HELP_DRAWING=Allum\u00e9/D\u00e9sactiv\u00e9 le crayon en appuyant sur la barre d'espacement.
HELP_DRAWING=Pour que allum\u00e9/d\u00e9sactiver le crayon p\u00e9renne: Pressez le D bouton.

View File

@ -44,4 +44,4 @@ HELP=Aider
ABOUT=\u00c0 propos de programme
DRAWING_OFF=Crayon: D\u00e9sactiv\u00e9
DRAWING_ON=Crayon: Allum\u00e9
HELP_DRAWING=Allum\u00e9/D\u00e9sactiv\u00e9 le crayon en appuyant sur la barre d'espacement.
HELP_DRAWING=Pour que allum\u00e9/d\u00e9sactiver le crayon p\u00e9renne: Pressez le D bouton.

View File

@ -44,4 +44,4 @@ HELP=Help
ABOUT=Over dit programma
DRAWING_OFF=Status: Af
DRAWING_ON=Status: Aan
HELP_DRAWING=Je kunt de pen aan/uitschakelen door dat je D drukt.
HELP_DRAWING=Je kunt de permanent pen aan/uitschakelen door dat je D drukt.

View File

@ -44,4 +44,4 @@ HELP=Help
ABOUT=Over dit programma
DRAWING_OFF=Status: Af
DRAWING_ON=Status: Aan
HELP_DRAWING=Je kunt de pen aan/uitschakelen door dat je D drukt.
HELP_DRAWING=Je kunt de permanent pen aan/uitschakelen door dat je D drukt.

4
dist/CircleArt.html vendored
View File

@ -4,7 +4,7 @@
function launchApplication(jnlpfile) {
dtjava.launch( {
url : 'CircleArt.jnlp',
jnlp_content : 'PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPGpubHAgc3BlYz0iMS4wIiB4bWxuczpqZng9Imh0dHA6Ly9qYXZhZnguY29tIiBocmVmPSJDaXJjbGVBcnQuam5scCI+CiAgPGluZm9ybWF0aW9uPgogICAgPHRpdGxlPkNpcmNsZUFydDwvdGl0bGU+CiAgICA8dmVuZG9yPmJhbmRpZTwvdmVuZG9yPgogICAgPGRlc2NyaXB0aW9uPm51bGw8L2Rlc2NyaXB0aW9uPgogICAgPG9mZmxpbmUtYWxsb3dlZC8+CiAgPC9pbmZvcm1hdGlvbj4KICA8cmVzb3VyY2VzPgogICAgPGoyc2UgdmVyc2lvbj0iMS42KyIgaHJlZj0iaHR0cDovL2phdmEuc3VuLmNvbS9wcm9kdWN0cy9hdXRvZGwvajJzZSIvPgogICAgPGphciBocmVmPSJDaXJjbGVBcnQuamFyIiBzaXplPSIxMTA2NzkwIiBkb3dubG9hZD0iZWFnZXIiIC8+CiAgPC9yZXNvdXJjZXM+CiAgPGFwcGxldC1kZXNjICB3aWR0aD0iODAwIiBoZWlnaHQ9IjYwMCIgbWFpbi1jbGFzcz0iY29tLmphdmFme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YW1lPSJyZXF1aXJlZEZYVmVyc2lvbiIgdmFsdWU9IjguMCsiLz4KICA8L2FwcGxldC1kZXNjPgogIDxqZng6amF2YWZ4LWRlc2MgIHdpZHRoPSI4MDAiIGhlaWdodD0iNjAwIiBtYWluLWNsYXNzPSJvcmcuYmFuZGllLmNpcmNsZWFydC5DaXJjbGVBcnQiICBuYW1lPSJDaXJjbGVBcnQiIC8+CiAgPHVwZGF0ZSBjaGVjaz0iYWx3YXlzIi8+Cjwvam5scD4K'
},
{
javafx : '8.0+'
@ -24,7 +24,7 @@
placeholder : 'javafx-app-placeholder',
width : '800',
height : '600',
jnlp_content : 'PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPGpubHAgc3BlYz0iMS4wIiB4bWxuczpqZng9Imh0dHA6Ly9qYXZhZnguY29tIiBocmVmPSJDaXJjbGVBcnQuam5scCI+CiAgPGluZm9ybWF0aW9uPgogICAgPHRpdGxlPkNpcmNsZUFydDwvdGl0bGU+CiAgICA8dmVuZG9yPmJhbmRpZTwvdmVuZG9yPgogICAgPGRlc2NyaXB0aW9uPm51bGw8L2Rlc2NyaXB0aW9uPgogICAgPG9mZmxpbmUtYWxsb3dlZC8+CiAgPC9pbmZvcm1hdGlvbj4KICA8cmVzb3VyY2VzPgogICAgPGoyc2UgdmVyc2lvbj0iMS42KyIgaHJlZj0iaHR0cDovL2phdmEuc3VuLmNvbS9wcm9kdWN0cy9hdXRvZGwvajJzZSIvPgogICAgPGphciBocmVmPSJDaXJjbGVBcnQuamFyIiBzaXplPSIxMTA2NzkwIiBkb3dubG9hZD0iZWFnZXIiIC8+CiAgPC9yZXNvdXJjZXM+CiAgPGFwcGxldC1kZXNjICB3aWR0aD0iODAwIiBoZWlnaHQ9IjYwMCIgbWFpbi1jbGFzcz0iY29tLmphdmFmeC5tYWluLk5vSmF2YUZYRmFsbGJhY2siICBuYW1lPSJDaXJjbGVBcnQiID4KICAgIDxwYXJhbSBuYW1lPSJyZ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amF2YWZ4LWRlc2MgIHdpZHRoPSI4MDAiIGhlaWdodD0iNjAwIiBtYWluLWNsYXNzPSJvcmcuYmFuZGllLmNpcmNsZWFydC5DaXJjbGVBcnQiICBuYW1lPSJDaXJjbGVBcnQiIC8+CiAgPHVwZGF0ZSBjaGVjaz0iYWx3YXlzIi8+Cjwvam5scD4K'
},
{
javafx : '8.0+'

BIN
dist/CircleArt.jar vendored

Binary file not shown.

2
dist/CircleArt.jnlp vendored
View File

@ -8,7 +8,7 @@
</information>
<resources>
<j2se version="1.6+" href="http://java.sun.com/products/autodl/j2se"/>
<jar href="CircleArt.jar" size="1106790" download="eager" />
<jar href="CircleArt.jar" size="1107031" download="eager" />
</resources>
<applet-desc width="800" height="600" main-class="com.javafx.main.NoJavaFXFallback" name="CircleArt" >
<param name="requiredFXVersion" value="8.0+"/>

View File

@ -4,11 +4,15 @@
<open-files xmlns="http://www.netbeans.org/ns/projectui-open-files/2">
<group>
<file>file:/home/bandie/NetBeansProjects/CircleArt/src/org/bandie/circleart/CircleArt.java</file>
<file>file:/home/bandie/NetBeansProjects/CircleArt/src/org/bandie/circleart/msgs.properties</file>
<file>file:/home/bandie/NetBeansProjects/CircleArt/src/org/bandie/circleart/ObjectMath.java</file>
<file>file:/home/bandie/NetBeansProjects/CircleArt/src/org/bandie/circleart/Pen.java</file>
<file>file:/home/bandie/NetBeansProjects/CircleArt/src/org/bandie/circleart/CircleArtGUI.java</file>
<file>file:/home/bandie/NetBeansProjects/CircleArt/src/org/bandie/circleart/SettingsGUI.java</file>
<file>file:/home/bandie/NetBeansProjects/CircleArt/src/org/bandie/circleart/About.java</file>
<file>file:/home/bandie/NetBeansProjects/CircleArt/src/org/bandie/circleart/msgs_de_AT.properties</file>
<file>file:/home/bandie/NetBeansProjects/CircleArt/src/org/bandie/circleart/msgs_fr_BE.properties</file>
<file>file:/home/bandie/NetBeansProjects/CircleArt/src/org/bandie/circleart/msgs_nl_NL.properties</file>
</group>
</open-files>
</project-private>

View File

@ -158,16 +158,17 @@ public class CircleArtGUI extends Application {
root.addEventHandler(MouseEvent.MOUSE_MOVED, (MouseEvent t) -> {
if (P.isOn()) {
double x = t.getSceneX();
double y = t.getSceneY();
drawPane.getChildren().add(new Circle(x, y,
P.getSize(x, y),
P.getColor(x, y)
)
);
draw(t, drawPane);
}
});
root.setOnMouseClicked(eh -> {
draw(eh, drawPane);
});
Scene scene = new Scene(root);
root.addEventHandler(KeyEvent.KEY_PRESSED, (KeyEvent t) -> {
@ -200,6 +201,16 @@ public class CircleArtGUI extends Application {
}
private void draw(MouseEvent t, Pane drawPane){
double x = t.getSceneX();
double y = t.getSceneY();
drawPane.getChildren().add(new Circle(x, y,
P.getSize(x, y),
P.getColor(x, y)
)
);
}
// Fullscreen toggle
private void toggleFullscreen(Stage stage) {
stage.setFullScreen(!stage.isFullScreen());

View File

@ -44,4 +44,4 @@ HELP=Help
ABOUT=About
DRAWING_OFF=Status: Off
DRAWING_ON=Status: On
HELP_DRAWING=To switch on/off your pen, press D.
HELP_DRAWING=To switch on/off your pen permanently, press D.

View File

@ -44,4 +44,4 @@ HELP=Hilfe
ABOUT=\u00dcber
DRAWING_OFF=Status: Aus
DRAWING_ON=Status: An
HELP_DRAWING=Ein-/Ausschalten des Stiftes durch Dr\u00fccken von D.
HELP_DRAWING=Dauerhaftes ein-/ausschalten des Stiftes durch Dr\u00fccken von D.

View File

@ -44,4 +44,4 @@ HELP=Aider
ABOUT=\u00c0 propos de programme
DRAWING_OFF=Crayon: D\u00e9sactiv\u00e9
DRAWING_ON=Crayon: Allum\u00e9
HELP_DRAWING=Allum\u00e9/D\u00e9sactiv\u00e9 le crayon en appuyant sur la barre d'espacement.
HELP_DRAWING=Pour que allum\u00e9/d\u00e9sactiver le crayon p\u00e9renne: Pressez le D bouton.

View File

@ -44,4 +44,4 @@ HELP=Help
ABOUT=Over dit programma
DRAWING_OFF=Status: Af
DRAWING_ON=Status: Aan
HELP_DRAWING=Je kunt de pen aan/uitschakelen door dat je D drukt.
HELP_DRAWING=Je kunt de permanent pen aan/uitschakelen door dat je D drukt.