commit 80ecc27e117055c373bc55be65a47926b8917ceb Author: MrTob <20160078@htblaperg.onmicrosoft.com> Date: Tue May 28 18:46:43 2019 +0200 add files diff --git a/build.xml b/build.xml new file mode 100644 index 0000000..2123bb1 --- /dev/null +++ b/build.xml @@ -0,0 +1,53 @@ + + Builds, tests, and runs the project MontecarloPi. + + + diff --git a/build/built-jar.properties b/build/built-jar.properties new file mode 100644 index 0000000..0e68036 --- /dev/null +++ b/build/built-jar.properties @@ -0,0 +1,4 @@ +#Tue, 28 May 2019 17:51:44 +0200 + + +D\:\\Tobias\\NetBeans\ Projects\\MonteCarloMethode= diff --git a/build/classes/montecarlopi/Circle.class b/build/classes/montecarlopi/Circle.class new file mode 100644 index 0000000..79b60e7 Binary files /dev/null and b/build/classes/montecarlopi/Circle.class differ diff --git a/build/classes/montecarlopi/Controller.class b/build/classes/montecarlopi/Controller.class new file mode 100644 index 0000000..feea5c3 Binary files /dev/null and b/build/classes/montecarlopi/Controller.class differ diff --git a/build/classes/montecarlopi/Model.class b/build/classes/montecarlopi/Model.class new file mode 100644 index 0000000..4b7684f Binary files /dev/null and b/build/classes/montecarlopi/Model.class differ diff --git a/build/classes/montecarlopi/MontecarloPi.class b/build/classes/montecarlopi/MontecarloPi.class new file mode 100644 index 0000000..50ccaa9 Binary files /dev/null and b/build/classes/montecarlopi/MontecarloPi.class differ diff --git a/build/classes/montecarlopi/Point.class b/build/classes/montecarlopi/Point.class new file mode 100644 index 0000000..fa28790 Binary files /dev/null and b/build/classes/montecarlopi/Point.class differ diff --git a/build/classes/montecarlopi/UpdateThread$1.class b/build/classes/montecarlopi/UpdateThread$1.class new file mode 100644 index 0000000..468a1d7 Binary files /dev/null and b/build/classes/montecarlopi/UpdateThread$1.class differ diff --git a/build/classes/montecarlopi/UpdateThread.class b/build/classes/montecarlopi/UpdateThread.class new file mode 100644 index 0000000..56a1e25 Binary files /dev/null and b/build/classes/montecarlopi/UpdateThread.class differ diff --git a/build/classes/montecarlopi/View.class b/build/classes/montecarlopi/View.class new file mode 100644 index 0000000..92c26c1 Binary files /dev/null and b/build/classes/montecarlopi/View.class differ diff --git a/dist/MontecarloPi.html b/dist/MontecarloPi.html new file mode 100644 index 0000000..109fa27 --- /dev/null +++ b/dist/MontecarloPi.html @@ -0,0 +1,45 @@ + + + + + + + +

Test page for MontecarloPi

+ Webstart: click to launch this app as webstart


+ + +
+ diff --git a/dist/MontecarloPi.jar b/dist/MontecarloPi.jar new file mode 100644 index 0000000..05b2678 Binary files /dev/null and b/dist/MontecarloPi.jar differ diff --git a/dist/MontecarloPi.jnlp b/dist/MontecarloPi.jnlp new file mode 100644 index 0000000..5a6bed4 --- /dev/null +++ b/dist/MontecarloPi.jnlp @@ -0,0 +1,18 @@ + + + + MontecarloPi + Eduard + null + + + + + + + + + + + + diff --git a/dist/web-files/dtjava.js b/dist/web-files/dtjava.js new file mode 100644 index 0000000..aecf0f2 --- /dev/null +++ b/dist/web-files/dtjava.js @@ -0,0 +1,3954 @@ +/* + * Copyright (c) 2006, 2016, Oracle and/or its affiliates. All rights reserved. + * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. + */ + +/** + The Java Deployment Toolkit is a utility to deploy Java content in + the browser as applets or applications using the right version of Java. + If needed it can initiate an upgrade of user's system to install required + components of Java platform. +

+ Note that some of the Deployment Toolkit methods may not be fully operational if + used before web page body is loaded (because DT native plugins could not be instantiated). + If you intend to use it before web page DOM tree is ready then dtjava.js + needs to be loaded inside the body element of the page and before use of other DT APIs. + + @module java/deployment_toolkit +*/ +var dtjava = function() { + function notNull(o) { + return (o != undefined && o != null); + } + + function isDef(fn) { + return (fn != null && typeof fn != "undefined"); + } + + //return true if any of patterns from query list is found in the given string + function containsAny(lst, str) { + for (var q = 0; q < lst.length; q++) { + if (str.indexOf(lst[q]) != -1) { + return true; + } + } + return false; + } + + /* Location of static web content - images, javascript files. */ + var jscodebase = (function () { + // + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/nbproject/jfx-impl_backup.xml b/nbproject/jfx-impl_backup.xml new file mode 100644 index 0000000..575cf06 --- /dev/null +++ b/nbproject/jfx-impl_backup.xml @@ -0,0 +1,4049 @@ + + + + + JavaFX-specific Ant calls + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ${cssfileslist} + + + + + + + + + + + + + + + + + + + + + + + + self.addMappedName( + (source.indexOf("jfxrt.jar") >= 0) || + (source.indexOf("deploy.jar") >= 0) || + (source.indexOf("javaws.jar") >= 0) || + (source.indexOf("plugin.jar") >= 0) + ? "" : source + ); + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/nbproject/jfx-impl_backup_1.xml b/nbproject/jfx-impl_backup_1.xml new file mode 100644 index 0000000..6aeb313 --- /dev/null +++ b/nbproject/jfx-impl_backup_1.xml @@ -0,0 +1,4197 @@ + + + + + JavaFX-specific Ant calls + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ${cssfileslist} + + + + + + + + + + + + + + + + + + + + + + + + self.addMappedName( + (source.indexOf("jfxrt.jar") >= 0) || + (source.indexOf("deploy.jar") >= 0) || + (source.indexOf("javaws.jar") >= 0) || + (source.indexOf("plugin.jar") >= 0) + ? "" : source + ); + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/nbproject/private/configs/Run_as_WebStart.properties b/nbproject/private/configs/Run_as_WebStart.properties new file mode 100644 index 0000000..86ae865 --- /dev/null +++ b/nbproject/private/configs/Run_as_WebStart.properties @@ -0,0 +1,2 @@ +# Do not modify this property in this configuration. It can be re-generated. +javafx.run.as=webstart diff --git a/nbproject/private/configs/Run_in_Browser.properties b/nbproject/private/configs/Run_in_Browser.properties new file mode 100644 index 0000000..f4e8549 --- /dev/null +++ b/nbproject/private/configs/Run_in_Browser.properties @@ -0,0 +1,2 @@ +# Do not modify this property in this configuration. It can be re-generated. +javafx.run.as=embedded diff --git a/nbproject/private/private.properties b/nbproject/private/private.properties new file mode 100644 index 0000000..17bc9aa --- /dev/null +++ b/nbproject/private/private.properties @@ -0,0 +1,6 @@ +auxiliary.org-netbeans-modules-projectapi.issue214819_5f_fx_5f_enabled=true +# No need to modify this property unless customizing JavaFX Ant task infrastructure +endorsed.javafx.ant.classpath=. +javafx.run.inbrowser= +javafx.run.inbrowser.path=C:\\Program Files\\Internet Explorer\\IEXPLORE.EXE +user.properties.file=C:\\Users\\Gamer\\AppData\\Roaming\\NetBeans\\8.2\\build.properties diff --git a/nbproject/private/private.xml b/nbproject/private/private.xml new file mode 100644 index 0000000..fc30bd8 --- /dev/null +++ b/nbproject/private/private.xml @@ -0,0 +1,13 @@ + + + + + + file:/D:/Tobias/NetBeans%20Projects/MonteCarloMethode/src/montecarlopi/MontecarloPi.java + file:/D:/Tobias/NetBeans%20Projects/MonteCarloMethode/src/montecarlopi/Model.java + file:/D:/Tobias/NetBeans%20Projects/MonteCarloMethode/src/montecarlopi/View.java + file:/D:/Tobias/NetBeans%20Projects/MonteCarloMethode/src/montecarlopi/UpdateThread.java + file:/D:/Tobias/NetBeans%20Projects/MonteCarloMethode/src/montecarlopi/Controller.java + + + diff --git a/nbproject/private/profiler/settings.xml b/nbproject/private/profiler/settings.xml new file mode 100644 index 0000000..4a8619e --- /dev/null +++ b/nbproject/private/profiler/settings.xml @@ -0,0 +1,6 @@ + + + + +#org.netbeans.modules.profiler.v2.features.ThreadsFeature@ + diff --git a/nbproject/project.properties b/nbproject/project.properties new file mode 100644 index 0000000..5d9a3c9 --- /dev/null +++ b/nbproject/project.properties @@ -0,0 +1,125 @@ +annotation.processing.enabled=true +annotation.processing.enabled.in.editor=false +annotation.processing.processor.options= +annotation.processing.processors.list= +annotation.processing.run.all.processors=true +annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output +application.title=MontecarloPi +application.vendor=Eduard +build.classes.dir=${build.dir}/classes +build.classes.excludes=**/*.java,**/*.form +# This directory is removed when the project is cleaned: +build.dir=build +build.generated.dir=${build.dir}/generated +build.generated.sources.dir=${build.dir}/generated-sources +# Only compile against the classpath explicitly listed here: +build.sysclasspath=ignore +build.test.classes.dir=${build.dir}/test/classes +build.test.results.dir=${build.dir}/test/results +compile.on.save=true +compile.on.save.unsupported.javafx=true +# Uncomment to specify the preferred debugger connection transport: +#debug.transport=dt_socket +debug.classpath=\ + ${run.classpath} +debug.modulepath=\ + ${run.modulepath} +debug.test.classpath=\ + ${run.test.classpath} +debug.test.modulepath=\ + ${run.test.modulepath} +# This directory is removed when the project is cleaned: +dist.dir=dist +dist.jar=${dist.dir}/MontecarloPi.jar +dist.javadoc.dir=${dist.dir}/javadoc +endorsed.classpath= +excludes= +includes=** +# Non-JavaFX jar file creation is deactivated in JavaFX 2.0+ projects +jar.archive.disabled=true +jar.compress=false +javac.classpath=\ + ${javafx.classpath.extension} +# Space-separated list of extra javac options +javac.compilerargs= +javac.deprecation=false +javac.modulepath= +javac.processormodulepath= +javac.processorpath=\ + ${javac.classpath} +javac.source=1.8 +javac.target=1.8 +javac.test.classpath=\ + ${javac.classpath}:\ + ${build.classes.dir} +javac.test.modulepath=\ + ${javac.modulepath} +javac.test.processorpath=\ + ${javac.test.classpath} +javadoc.additionalparam= +javadoc.author=false +javadoc.encoding=${source.encoding} +javadoc.noindex=false +javadoc.nonavbar=false +javadoc.notree=false +javadoc.private=false +javadoc.splitindex=true +javadoc.use=true +javadoc.version=false +javadoc.windowtitle= +javafx.application.implementation.version=1.0 +javafx.binarycss=false +javafx.classpath.extension=\ + ${java.home}/lib/javaws.jar:\ + ${java.home}/lib/deploy.jar:\ + ${java.home}/lib/plugin.jar +javafx.deploy.allowoffline=true +# If true, application update mode is set to 'background', if false, update mode is set to 'eager' +javafx.deploy.backgroundupdate=false +javafx.deploy.embedJNLP=true +javafx.deploy.includeDT=true +# Set true to prevent creation of temporary copy of deployment artifacts before each run (disables concurrent runs) +javafx.disable.concurrent.runs=false +# Set true to enable multiple concurrent runs of the same WebStart or Run-in-Browser project +javafx.enable.concurrent.external.runs=false +# This is a JavaFX project +javafx.enabled=true +javafx.fallback.class=com.javafx.main.NoJavaFXFallback +# Main class for JavaFX +javafx.main.class=montecarlopi.MontecarloPi +javafx.preloader.class= +# This project does not use Preloader +javafx.preloader.enabled=false +javafx.preloader.jar.filename= +javafx.preloader.jar.path= +javafx.preloader.project.path= +javafx.preloader.type=none +# Set true for GlassFish only. Rebases manifest classpaths of JARs in lib dir. Not usable with signed JARs. +javafx.rebase.libs=false +javafx.run.height=600 +javafx.run.width=800 +# Pre-JavaFX 2.0 WebStart is deactivated in JavaFX 2.0+ projects +jnlp.enabled=false +# Main class for Java launcher +main.class=com.javafx.main.Main +# For improved security specify narrower Codebase manifest attribute to prevent RIAs from being repurposed +manifest.custom.codebase=* +# Specify Permissions manifest attribute to override default (choices: sandbox, all-permissions) +manifest.custom.permissions= +manifest.file=manifest.mf +meta.inf.dir=${src.dir}/META-INF +platform.active=default_platform +run.classpath=\ + ${dist.jar}:\ + ${javac.classpath}:\ + ${build.classes.dir} +run.modulepath=\ + ${javac.modulepath} +run.test.classpath=\ + ${javac.test.classpath}:\ + ${build.test.classes.dir} +run.test.modulepath=\ + ${javac.test.modulepath} +source.encoding=UTF-8 +src.dir=src +test.src.dir=test diff --git a/nbproject/project.xml b/nbproject/project.xml new file mode 100644 index 0000000..970e467 --- /dev/null +++ b/nbproject/project.xml @@ -0,0 +1,25 @@ + + + org.netbeans.modules.java.j2seproject + + + + + + + + + + + + + MontecarloPi + + + + + + + + + diff --git a/src/montecarlopi/Circle.java b/src/montecarlopi/Circle.java new file mode 100644 index 0000000..5889fcb --- /dev/null +++ b/src/montecarlopi/Circle.java @@ -0,0 +1,37 @@ +package montecarlopi; +public class Circle { + private double diameter; + + public Circle(double diameter) { + this.diameter = diameter; + } + + public double getRadius() { + return diameter/2; + } + + public double getDurchmesser() { + return diameter; + } + + public boolean isInside(Point p) { + + double x = p.getX(); + double y = p.getY(); + + double a = ((float)diameter/2f)-(float)x; + double b = ((float)diameter/2f)-(float)y; + + double c = (Math.sqrt(Math.pow(a, 2f) + (Math.pow(b, 2f)))); + + + if(((double)diameter/2f) >= c) { + return true; + } + + return false; + } + + + +} diff --git a/src/montecarlopi/Controller.java b/src/montecarlopi/Controller.java new file mode 100644 index 0000000..138d6ef --- /dev/null +++ b/src/montecarlopi/Controller.java @@ -0,0 +1,35 @@ +package montecarlopi; + +public class Controller { + private Model m = null; + private View v = null; + + public Controller() { + m = new Model(); + v = new View(this); + + m.addObserver(v); + } + + public Model getModel() { + return m; + } + + public View getView() { + return v; + } + + public void addOne() { + m.setExit(false); + m.generatePoint(); + } + + public void addThousand() { + m.setExit(false); + for(int i = 0; i < 1000; i++) { + m.generatePoint(); + } + } + + +} diff --git a/src/montecarlopi/Model.java b/src/montecarlopi/Model.java new file mode 100644 index 0000000..c3bb3a7 --- /dev/null +++ b/src/montecarlopi/Model.java @@ -0,0 +1,165 @@ +package montecarlopi; + + +import java.util.LinkedList; +import java.util.Observable; +import javafx.scene.canvas.Canvas; +import javafx.scene.canvas.GraphicsContext; +import javafx.scene.control.ListView; +import javafx.scene.layout.Pane; +import javafx.scene.paint.Color; + +public class Model extends Observable{ + private Circle c; + private LinkedList list; + private Pane pane; + private Canvas can; + private int in, out, tries; + private UpdateThread uT; + private int count = 0; + private boolean exit; + public boolean isExit(){ + return exit; + } + + public Model() { + int size = 400; + c = new Circle(size); + list = new LinkedList<>(); + pane = new Pane(); + pane.setPrefSize(size, size); + initPane(); + in = 0; + out = 0; + tries = 0; + } + + public Pane getPane() { + return pane; + } + + public int getIn() { + return in; + } + + public int getOut() { + return out; + } + + public int getTries() { + return tries; + } + + private void initPane() { + initCanvas(); + pane.getChildren().add(can); + } + + private void initCanvas() { + can = new Canvas(pane.getPrefHeight(),pane.getPrefWidth()); + GraphicsContext gc = can.getGraphicsContext2D(); + gc.clearRect(0, 0, can.getWidth(), can.getHeight()); + gc.fill(); + gc.setStroke(Color.BLACK); + gc.setLineWidth(1); + gc.strokeOval(0, 0, this.c.getDurchmesser() ,this.c.getDurchmesser()); + + gc.strokeRect(0, 0, this.c.getDurchmesser() ,this.c.getDurchmesser()); + } + public Point generatePoint() { + if(exit)return null; + + double x = (Math.random() * c.getDurchmesser()); + double y = (Math.random() * c.getDurchmesser()); + + Point p = new Point(x,y); + addPoint(p); + + return p; + } + + public void reset(ListView list1) { + + list = new LinkedList<>(); + tries = 0; + in = 0; + out = 0; + + GraphicsContext gc = can.getGraphicsContext2D(); + gc.clearRect(0, 0, can.getWidth(), can.getHeight()); + + + gc.setStroke(Color.BLACK); + gc.setLineWidth(1); + gc.strokeOval(0, 0, c.getDurchmesser(), c.getDurchmesser()); + gc.strokeRect(0, 0, c.getDurchmesser(), c.getDurchmesser()); + setExit(true); + list1.getItems().clear(); + setChanged(); + notifyObservers(); + } + + public void addPoint(Point p) { + list.add(p); + boolean in = inOrout(p); + tries++; + + GraphicsContext gc = can.getGraphicsContext2D(); + + + if(in){ + gc.setStroke(Color.VIOLET); //inside + }else{ + gc.setStroke(Color.BLUE); //outside + } + gc.setLineWidth(1); + gc.strokeRect((double)p.getX(),(double)p.getY(), 1, 1); + + setChanged(); + notifyObservers(); + } + + public void generateAuto (ListView list,int count){ + setExit(false); + UpdateThread ut = new UpdateThread(this, list, count); + count++; + ut.start(); + + + + } + + private boolean inOrout(Point p) { + if(c.isInside(p)) { + in++; + return true; + }else{ + out++; + } + return false; + } + + public double getPi() { + if(out != 0) { + return ((double)in / ((double)out+(double)in)) * 4; + } + + return 0; + } + + + void stop(ListView list) { + list.getItems().clear(); + exit=true; + } + + public void setExit(boolean exit) { + this.exit=exit; + } + + + + + + +} diff --git a/src/montecarlopi/MontecarloPi.java b/src/montecarlopi/MontecarloPi.java new file mode 100644 index 0000000..7fff79f --- /dev/null +++ b/src/montecarlopi/MontecarloPi.java @@ -0,0 +1,25 @@ +package montecarlopi; + +import javafx.application.Application; +import javafx.scene.Scene; +import javafx.scene.layout.Pane; +import javafx.stage.Stage; + +public class MontecarloPi extends Application { + @Override + public void start(Stage primaryStage) { + + Controller c = new Controller(); + Pane p = c.getView().getPane(); + Scene scene = new Scene(p, 680, 400); + + primaryStage.setTitle("Calculation of Pi"); + primaryStage.setScene(scene); + primaryStage.setResizable(false); + primaryStage.show(); + } + public static void main(String[] args) { + launch(args); + } + +} diff --git a/src/montecarlopi/Point.java b/src/montecarlopi/Point.java new file mode 100644 index 0000000..665eb99 --- /dev/null +++ b/src/montecarlopi/Point.java @@ -0,0 +1,24 @@ +package montecarlopi; +public class Point { + private double x,y; + + public Point(double x, double y) { + this.x = x; + this.y = y; + } + + public double getX() { + return x; + } + + public double getY() { + return y; + } + + @Override + public String toString() { + return "("+x+"\\"+y+")"; + } + + +} diff --git a/src/montecarlopi/UpdateThread.java b/src/montecarlopi/UpdateThread.java new file mode 100644 index 0000000..368ab7b --- /dev/null +++ b/src/montecarlopi/UpdateThread.java @@ -0,0 +1,52 @@ + +package montecarlopi; + +import java.util.concurrent.TimeUnit; +import java.util.logging.Level; +import java.util.logging.Logger; +import javafx.application.Platform; +import javafx.scene.control.ListView; + +/** + * + * @author tobia + */ +public class UpdateThread extends Thread { + + private int i = 0; + private Model test; + + public UpdateThread(Model test, ListView list, int count) { + setDaemon(true); + setName("Thread " + count); + this.test = test; + list.getItems().add(getName()); + } + + @Override + public void run() { + + while (!this.isInterrupted()) { + + if (test.isExit()) { + return; + } + + Platform.runLater(new Runnable() { + @Override + public void run() { + test.generatePoint(); + } + }); + + try { + + sleep(TimeUnit.MILLISECONDS.toMillis(5)); + } catch (InterruptedException ex) { + Logger.getLogger(UpdateThread.class.getName()).log(Level.SEVERE, null, ex); + } + } + + } + +} diff --git a/src/montecarlopi/View.java b/src/montecarlopi/View.java new file mode 100644 index 0000000..83288d8 --- /dev/null +++ b/src/montecarlopi/View.java @@ -0,0 +1,125 @@ +package montecarlopi; + +import java.util.Observable; +import java.util.Observer; +import javafx.scene.control.Button; +import javafx.scene.control.Label; +import javafx.scene.control.ListView; +import javafx.scene.layout.BorderPane; +import javafx.scene.layout.*; +import javafx.scene.text.Text; + +public class View implements Observer { + + private Controller c; + private BorderPane masterPane; + private Label currPi, in, out, tries, exactPi = null; + private int count = 0; + + private ListView list; + + + public View(Controller c) { + this.c = c; + initPane(); + } + + public Controller getController() { + return c; + } + + public BorderPane getPane() { + return masterPane; + } + + private void initPane() { + masterPane = new BorderPane(); + currPi = new Label(); + in = new Label(); + out = new Label(); + tries = new Label(); + exactPi = new Label(); + + currPi.setText("Approximation for Pi: 0"); + in.setText("Inside: 0"); + out.setText("Outside: 0"); + tries.setText("Attempt: 0"); + exactPi.setText("Exact value: 3.1415926"); + + GridPane rightSide = new GridPane(); + rightSide.add(tries, 0, 0); + rightSide.add(in, 0, 1); + rightSide.add(out, 0, 2); + rightSide.add(exactPi, 0, 3); + rightSide.add(currPi, 0, 4); + + GridPane buttons = new GridPane(); + Button add1000, reset, auto, stop; + + GridPane ThreadList = new GridPane(); + Text text = new Text("running Threads"); + list = new ListView<>(); + list.setPrefSize(100, 100); + + VBox box = new VBox(); + box.getChildren().add(list); + ThreadList.add(box, 0, 1); + ThreadList.add(text, 0, 0); + + add1000 = new Button(); + reset = new Button(); + auto = new Button(); + stop = new Button(); + + add1000.setText("+ 1000"); + stop.setText("stop Threads"); + reset.setText("Reset"); + auto.setText("generate Auto (Thread)"); + + buttons.add(add1000, 1, 0); + buttons.add(reset, 3, 0); + buttons.add(auto, 4, 0); + buttons.add(stop, 1, 1); + + + rightSide.setVgap(5); + rightSide.setHgap(5); + rightSide.add(buttons, 0, 5); + rightSide.add(ThreadList, 0, 6); + + masterPane.setRight(rightSide); + + masterPane.setCenter(c.getModel().getPane()); + + add1000.setOnAction(listener -> { + c.addThousand(); + }); + + reset.setOnAction(listener -> { + c.getModel().reset(list); + }); + + auto.setOnAction(listener -> { + c.getModel().generateAuto(list, count); + count++; + }); + + stop.setOnAction(listener -> { + c.getModel().stop(list); + count=0; + }); + + } + + ; + + + @Override + public void update(Observable o, Object arg) { + currPi.setText("Approximation for Pi: " + c.getModel().getPi()); + in.setText("Inside: " + c.getModel().getIn()); + out.setText("Outside: " + c.getModel().getOut()); + tries.setText("Attempt: " + c.getModel().getTries()); + } + +}