Skip to main content
summaryrefslogtreecommitdiffstats
path: root/demos
diff options
context:
space:
mode:
authorTom Schindl2013-05-24 09:17:10 -0400
committerTom Schindl2013-05-24 09:17:10 -0400
commit353c8c0a1e8f2571628b530f29481c79a06a521b (patch)
treedd4df3e3af0c4ad0f3bf0f92a932da28c9c32fea /demos
parent3766348a64477b871721e2e1a4f421d8296cebc0 (diff)
downloadorg.eclipse.efxclipse-353c8c0a1e8f2571628b530f29481c79a06a521b.tar.gz
org.eclipse.efxclipse-353c8c0a1e8f2571628b530f29481c79a06a521b.tar.xz
org.eclipse.efxclipse-353c8c0a1e8f2571628b530f29481c79a06a521b.zip
initial check in
Diffstat (limited to 'demos')
-rwxr-xr-xdemos/org.eclipse.fx.demo.osgi/.classpath7
-rw-r--r--demos/org.eclipse.fx.demo.osgi/.gitignore1
-rwxr-xr-xdemos/org.eclipse.fx.demo.osgi/.project28
-rwxr-xr-xdemos/org.eclipse.fx.demo.osgi/.settings/org.eclipse.core.resources.prefs2
-rwxr-xr-xdemos/org.eclipse.fx.demo.osgi/.settings/org.eclipse.core.runtime.prefs2
-rwxr-xr-xdemos/org.eclipse.fx.demo.osgi/.settings/org.eclipse.jdt.core.prefs7
-rwxr-xr-xdemos/org.eclipse.fx.demo.osgi/META-INF/MANIFEST.MF39
-rwxr-xr-xdemos/org.eclipse.fx.demo.osgi/OSGI-INF/l10n/bundle.properties4
-rwxr-xr-xdemos/org.eclipse.fx.demo.osgi/OSGiApp.product59
-rw-r--r--demos/org.eclipse.fx.demo.osgi/OSGiApp.product_workbench.launch34
-rwxr-xr-xdemos/org.eclipse.fx.demo.osgi/about.html28
-rwxr-xr-xdemos/org.eclipse.fx.demo.osgi/build.properties7
-rwxr-xr-xdemos/org.eclipse.fx.demo.osgi/plugin.xml27
-rwxr-xr-xdemos/org.eclipse.fx.demo.osgi/src/org/eclipse/fx/demo/osgi/Activator.java30
-rwxr-xr-xdemos/org.eclipse.fx.demo.osgi/src/org/eclipse/fx/demo/osgi/Application.java82
15 files changed, 357 insertions, 0 deletions
diff --git a/demos/org.eclipse.fx.demo.osgi/.classpath b/demos/org.eclipse.fx.demo.osgi/.classpath
new file mode 100755
index 000000000..b1dabee38
--- /dev/null
+++ b/demos/org.eclipse.fx.demo.osgi/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/demos/org.eclipse.fx.demo.osgi/.gitignore b/demos/org.eclipse.fx.demo.osgi/.gitignore
new file mode 100644
index 000000000..5e56e040e
--- /dev/null
+++ b/demos/org.eclipse.fx.demo.osgi/.gitignore
@@ -0,0 +1 @@
+/bin
diff --git a/demos/org.eclipse.fx.demo.osgi/.project b/demos/org.eclipse.fx.demo.osgi/.project
new file mode 100755
index 000000000..9426a3e22
--- /dev/null
+++ b/demos/org.eclipse.fx.demo.osgi/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.fx.demo.osgi</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/demos/org.eclipse.fx.demo.osgi/.settings/org.eclipse.core.resources.prefs b/demos/org.eclipse.fx.demo.osgi/.settings/org.eclipse.core.resources.prefs
new file mode 100755
index 000000000..4824b8026
--- /dev/null
+++ b/demos/org.eclipse.fx.demo.osgi/.settings/org.eclipse.core.resources.prefs
@@ -0,0 +1,2 @@
+eclipse.preferences.version=1
+encoding/<project>=UTF-8
diff --git a/demos/org.eclipse.fx.demo.osgi/.settings/org.eclipse.core.runtime.prefs b/demos/org.eclipse.fx.demo.osgi/.settings/org.eclipse.core.runtime.prefs
new file mode 100755
index 000000000..deae05a97
--- /dev/null
+++ b/demos/org.eclipse.fx.demo.osgi/.settings/org.eclipse.core.runtime.prefs
@@ -0,0 +1,2 @@
+eclipse.preferences.version=1
+line.separator=\r\n
diff --git a/demos/org.eclipse.fx.demo.osgi/.settings/org.eclipse.jdt.core.prefs b/demos/org.eclipse.fx.demo.osgi/.settings/org.eclipse.jdt.core.prefs
new file mode 100755
index 000000000..f42de363a
--- /dev/null
+++ b/demos/org.eclipse.fx.demo.osgi/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,7 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
+org.eclipse.jdt.core.compiler.compliance=1.7
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.7
diff --git a/demos/org.eclipse.fx.demo.osgi/META-INF/MANIFEST.MF b/demos/org.eclipse.fx.demo.osgi/META-INF/MANIFEST.MF
new file mode 100755
index 000000000..0029d7bcb
--- /dev/null
+++ b/demos/org.eclipse.fx.demo.osgi/META-INF/MANIFEST.MF
@@ -0,0 +1,39 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %Bundle-Name
+Bundle-SymbolicName: org.eclipse.fx.demo.osgi;singleton:=true
+Bundle-Version: 1.0.0.qualifier
+Bundle-Activator: org.eclipse.fx.demo.osgi.Activator
+Require-Bundle: org.eclipse.core.runtime,
+ org.eclipse.fx.ui.application
+Bundle-ActivationPolicy: lazy
+Bundle-RequiredExecutionEnvironment: JavaSE-1.7
+Import-Package: javafx.animation;version="2.0.0",
+ javafx.application;version="2.0.0",
+ javafx.beans;version="2.0.0",
+ javafx.beans.binding;version="2.0.0",
+ javafx.beans.property;version="2.0.0",
+ javafx.beans.value;version="2.0.0",
+ javafx.collections;version="2.0.0",
+ javafx.concurrent;version="2.0.0",
+ javafx.embed.swing;version="2.0.0",
+ javafx.event;version="2.0.0",
+ javafx.fxml;version="2.0.0",
+ javafx.geometry;version="2.0.0",
+ javafx.scene;version="2.0.0",
+ javafx.scene.chart;version="2.0.0",
+ javafx.scene.control;version="2.0.0",
+ javafx.scene.control.cell;version="2.0.0",
+ javafx.scene.effect;version="2.0.0",
+ javafx.scene.image;version="2.0.0",
+ javafx.scene.input;version="2.0.0",
+ javafx.scene.layout;version="2.0.0",
+ javafx.scene.media;version="2.0.0",
+ javafx.scene.paint;version="2.0.0",
+ javafx.scene.shape;version="2.0.0",
+ javafx.scene.text;version="2.0.0",
+ javafx.scene.transform;version="2.0.0",
+ javafx.scene.web;version="2.0.0",
+ javafx.stage;version="2.0.0",
+ javafx.util;version="2.0.0"
+Bundle-Vendor: %Bundle-Vendor
diff --git a/demos/org.eclipse.fx.demo.osgi/OSGI-INF/l10n/bundle.properties b/demos/org.eclipse.fx.demo.osgi/OSGI-INF/l10n/bundle.properties
new file mode 100755
index 000000000..97486140f
--- /dev/null
+++ b/demos/org.eclipse.fx.demo.osgi/OSGI-INF/l10n/bundle.properties
@@ -0,0 +1,4 @@
+#Properties file for org.eclipse.fx.demo.osgi
+product.name = OSGIApp
+Bundle-Vendor = BestSolution.at
+Bundle-Name = OSGi Example \ No newline at end of file
diff --git a/demos/org.eclipse.fx.demo.osgi/OSGiApp.product b/demos/org.eclipse.fx.demo.osgi/OSGiApp.product
new file mode 100755
index 000000000..84b5c5772
--- /dev/null
+++ b/demos/org.eclipse.fx.demo.osgi/OSGiApp.product
@@ -0,0 +1,59 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?pde version="3.5"?>
+
+<product name="OSGIApp" id="org.eclipse.fx.demo.osgi.product" application="org.eclipse.fx.demo.osgi.application" useFeatures="false" includeLaunchers="true">
+
+ <configIni use="default">
+ </configIni>
+
+ <launcherArgs>
+ <programArgs>-consoleLog -nosplash</programArgs>
+ <vmArgs>-Xms40m -Xmx384m -Dosgi.framework.extensions=org.eclipse.fx.osgi</vmArgs>
+ </launcherArgs>
+
+ <launcher>
+ <solaris/>
+ <win useIco="false">
+ <bmp/>
+ </win>
+ </launcher>
+
+ <vm>
+ </vm>
+
+ <plugins>
+ <plugin id="com.ibm.icu"/>
+ <plugin id="javax.inject"/>
+ <plugin id="javax.servlet"/>
+ <plugin id="org.eclipse.core.contenttype"/>
+ <plugin id="org.eclipse.core.databinding"/>
+ <plugin id="org.eclipse.core.databinding.observable"/>
+ <plugin id="org.eclipse.core.databinding.property"/>
+ <plugin id="org.eclipse.core.jobs"/>
+ <plugin id="org.eclipse.core.runtime"/>
+ <plugin id="org.eclipse.core.runtime.compatibility.registry" fragment="true"/>
+ <plugin id="org.eclipse.equinox.app"/>
+ <plugin id="org.eclipse.equinox.common"/>
+ <plugin id="org.eclipse.equinox.ds"/>
+ <plugin id="org.eclipse.equinox.event"/>
+ <plugin id="org.eclipse.equinox.preferences"/>
+ <plugin id="org.eclipse.equinox.registry"/>
+ <plugin id="org.eclipse.equinox.util"/>
+ <plugin id="org.eclipse.fx.core"/>
+ <plugin id="org.eclipse.fx.core.databinding"/>
+ <plugin id="org.eclipse.fx.demo.osgi"/>
+ <plugin id="org.eclipse.fx.javafx"/>
+ <plugin id="org.eclipse.fx.osgi" fragment="true"/>
+ <plugin id="org.eclipse.fx.ui.application"/>
+ <plugin id="org.eclipse.fx.ui.databinding"/>
+ <plugin id="org.eclipse.osgi"/>
+ <plugin id="org.eclipse.osgi.services"/>
+ </plugins>
+
+ <configurations>
+ <plugin id="org.eclipse.core.runtime" autoStart="true" startLevel="0" />
+ <plugin id="org.eclipse.equinox.common" autoStart="true" startLevel="2" />
+ <plugin id="org.eclipse.osgi" autoStart="true" startLevel="-1" />
+ </configurations>
+
+</product>
diff --git a/demos/org.eclipse.fx.demo.osgi/OSGiApp.product_workbench.launch b/demos/org.eclipse.fx.demo.osgi/OSGiApp.product_workbench.launch
new file mode 100644
index 000000000..f4ace3cad
--- /dev/null
+++ b/demos/org.eclipse.fx.demo.osgi/OSGiApp.product_workbench.launch
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<launchConfiguration type="org.eclipse.pde.ui.RuntimeWorkbench">
+<booleanAttribute key="append.args" value="true"/>
+<stringAttribute key="application" value="org.eclipse.fx.demo.osgi.application"/>
+<booleanAttribute key="askclear" value="true"/>
+<booleanAttribute key="automaticAdd" value="false"/>
+<booleanAttribute key="automaticValidate" value="false"/>
+<stringAttribute key="bootstrap" value=""/>
+<stringAttribute key="checked" value="[NONE]"/>
+<booleanAttribute key="clearConfig" value="false"/>
+<booleanAttribute key="clearws" value="false"/>
+<booleanAttribute key="clearwslog" value="false"/>
+<stringAttribute key="configLocation" value="${workspace_loc}/.metadata/.plugins/org.eclipse.pde.core/OSGiApp.product"/>
+<booleanAttribute key="default" value="false"/>
+<booleanAttribute key="includeOptional" value="true"/>
+<stringAttribute key="location" value="${workspace_loc}/../runtime-OSGiApp.product"/>
+<booleanAttribute key="org.eclipse.jdt.launching.ATTR_USE_START_ON_FIRST_THREAD" value="false"/>
+<stringAttribute key="org.eclipse.jdt.launching.JRE_CONTAINER" value="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-consoleLog -nosplash"/>
+<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
+<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Dosgi.framework.extensions=org.eclipse.fx.osgi"/>
+<stringAttribute key="pde.version" value="3.3"/>
+<stringAttribute key="product" value="org.eclipse.fx.demo.osgi.product"/>
+<stringAttribute key="productFile" value="/org.eclipse.fx.demo.osgi/OSGiApp.product"/>
+<stringAttribute key="selected_target_plugins" value="com.ibm.icu@default:default,javax.inject@default:default,javax.servlet@default:default,org.eclipse.core.contenttype@default:default,org.eclipse.core.databinding.observable@default:default,org.eclipse.core.databinding.property@default:default,org.eclipse.core.databinding@default:default,org.eclipse.core.jobs@default:default,org.eclipse.core.runtime.compatibility.registry@default:false,org.eclipse.core.runtime@default:true,org.eclipse.equinox.app@default:default,org.eclipse.equinox.common@2:true,org.eclipse.equinox.ds@1:true,org.eclipse.equinox.event@default:default,org.eclipse.equinox.preferences@default:default,org.eclipse.equinox.registry@default:default,org.eclipse.equinox.util@default:default,org.eclipse.fx.javafx@default:default,org.eclipse.fx.osgi@default:false,org.eclipse.osgi.services@default:default,org.eclipse.osgi@-1:true"/>
+<stringAttribute key="selected_workspace_plugins" value="org.eclipse.fx.core.databinding@default:default,org.eclipse.fx.core@default:default,org.eclipse.fx.demo.osgi@default:default,org.eclipse.fx.ui.application@default:default,org.eclipse.fx.ui.databinding@default:default"/>
+<booleanAttribute key="show_selected_only" value="false"/>
+<booleanAttribute key="tracing" value="false"/>
+<booleanAttribute key="useCustomFeatures" value="false"/>
+<booleanAttribute key="useDefaultConfig" value="true"/>
+<booleanAttribute key="useDefaultConfigArea" value="true"/>
+<booleanAttribute key="useProduct" value="true"/>
+<booleanAttribute key="usefeatures" value="false"/>
+</launchConfiguration>
diff --git a/demos/org.eclipse.fx.demo.osgi/about.html b/demos/org.eclipse.fx.demo.osgi/about.html
new file mode 100755
index 000000000..ecd1378e9
--- /dev/null
+++ b/demos/org.eclipse.fx.demo.osgi/about.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>June 2, 2006</p>
+<h3>License</h3>
+
+<p>The BestSolution.at makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
+at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the BestSolution.at, the Content is
+being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
+
+</body>
+</html> \ No newline at end of file
diff --git a/demos/org.eclipse.fx.demo.osgi/build.properties b/demos/org.eclipse.fx.demo.osgi/build.properties
new file mode 100755
index 000000000..88b38cfbf
--- /dev/null
+++ b/demos/org.eclipse.fx.demo.osgi/build.properties
@@ -0,0 +1,7 @@
+source.. = src/
+output.. = bin/
+bin.includes = plugin.xml,\
+ META-INF/,\
+ .,\
+ about.html,\
+ OSGI-INF/
diff --git a/demos/org.eclipse.fx.demo.osgi/plugin.xml b/demos/org.eclipse.fx.demo.osgi/plugin.xml
new file mode 100755
index 000000000..3bd79f6d7
--- /dev/null
+++ b/demos/org.eclipse.fx.demo.osgi/plugin.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+
+ <extension
+ id="application"
+ point="org.eclipse.core.runtime.applications">
+ <application>
+ <run
+ class="org.eclipse.fx.demo.osgi.Application">
+ </run>
+ </application>
+ </extension>
+ <extension
+ id="product"
+ point="org.eclipse.core.runtime.products">
+ <product
+ application="org.eclipse.fx.demo.osgi.application"
+ name="OSGIApp">
+ <property
+ name="appName"
+ value="OSGIApp">
+ </property>
+ </product>
+ </extension>
+
+</plugin>
diff --git a/demos/org.eclipse.fx.demo.osgi/src/org/eclipse/fx/demo/osgi/Activator.java b/demos/org.eclipse.fx.demo.osgi/src/org/eclipse/fx/demo/osgi/Activator.java
new file mode 100755
index 000000000..8716d8c67
--- /dev/null
+++ b/demos/org.eclipse.fx.demo.osgi/src/org/eclipse/fx/demo/osgi/Activator.java
@@ -0,0 +1,30 @@
+package org.eclipse.fx.demo.osgi;
+
+import org.osgi.framework.BundleActivator;
+import org.osgi.framework.BundleContext;
+
+public class Activator implements BundleActivator {
+
+ private static BundleContext context;
+
+ static BundleContext getContext() {
+ return context;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext)
+ */
+ public void start(BundleContext bundleContext) throws Exception {
+ Activator.context = bundleContext;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext)
+ */
+ public void stop(BundleContext bundleContext) throws Exception {
+ Activator.context = null;
+ }
+
+}
diff --git a/demos/org.eclipse.fx.demo.osgi/src/org/eclipse/fx/demo/osgi/Application.java b/demos/org.eclipse.fx.demo.osgi/src/org/eclipse/fx/demo/osgi/Application.java
new file mode 100755
index 000000000..da7951baf
--- /dev/null
+++ b/demos/org.eclipse.fx.demo.osgi/src/org/eclipse/fx/demo/osgi/Application.java
@@ -0,0 +1,82 @@
+package org.eclipse.fx.demo.osgi;
+
+import static java.lang.Math.random;
+import javafx.animation.KeyFrame;
+import javafx.animation.KeyValue;
+import javafx.animation.Timeline;
+import javafx.scene.Group;
+import javafx.scene.Node;
+import javafx.scene.Scene;
+import javafx.scene.effect.BlendMode;
+import javafx.scene.effect.BoxBlur;
+import javafx.scene.paint.Color;
+import javafx.scene.paint.CycleMethod;
+import javafx.scene.paint.LinearGradient;
+import javafx.scene.paint.Stop;
+import javafx.scene.shape.Circle;
+import javafx.scene.shape.Rectangle;
+import javafx.scene.shape.StrokeType;
+import javafx.stage.Stage;
+import javafx.util.Duration;
+
+import org.eclipse.equinox.app.IApplicationContext;
+import org.eclipse.fx.ui.application.AbstractJFXApplication;
+
+/**
+ * This class controls all aspects of the application's execution
+ */
+public class Application extends AbstractJFXApplication {
+
+ @Override
+ protected void jfxStart(IApplicationContext context, javafx.application.Application jfxApplication, Stage primaryStage) {
+ Group root = new Group();
+ Scene scene = new Scene(root, 800, 600, Color.BLACK);
+ primaryStage.setScene(scene);
+
+ Rectangle colors = new Rectangle(scene.getWidth(), scene.getHeight(),
+ new LinearGradient(0f, 1f, 1f, 0f, true, CycleMethod.NO_CYCLE,
+ new Stop[] { new Stop(0, Color.web("#f8bd55")),
+ new Stop(0.14, Color.web("#c0fe56")),
+ new Stop(0.28, Color.web("#5dfbc1")),
+ new Stop(0.43, Color.web("#64c2f8")),
+ new Stop(0.57, Color.web("#be4af7")),
+ new Stop(0.71, Color.web("#ed5fc2")),
+ new Stop(0.85, Color.web("#ef504c")),
+ new Stop(1, Color.web("#f2660f")), }));
+
+ Group circles = new Group();
+ for (int i = 0; i < 30; i++) {
+ Circle circle = new Circle(150, Color.web("white", 0.05));
+ circle.setStrokeType(StrokeType.OUTSIDE);
+ circle.setStroke(Color.web("white", 0.16));
+ circle.setStrokeWidth(4);
+ circles.getChildren().add(circle);
+ }
+ circles.setEffect(new BoxBlur(10, 10, 3));
+
+ Group blendModeGroup = new Group(new Group(new Rectangle(
+ scene.getWidth(), scene.getHeight(), Color.BLACK), circles),
+ colors);
+ colors.setBlendMode(BlendMode.OVERLAY);
+ root.getChildren().add(blendModeGroup);
+
+ Timeline timeline = new Timeline();
+ for (Node circle : circles.getChildren()) {
+ timeline.getKeyFrames().addAll(
+ new KeyFrame(Duration.ZERO, // set start position at 0
+ new KeyValue(circle.translateXProperty(),
+ random() * 800),
+ new KeyValue(circle.translateYProperty(),
+ random() * 600)),
+ new KeyFrame(new Duration(40000), // set end position at 40s
+ new KeyValue(circle.translateXProperty(),
+ random() * 800), new KeyValue(circle
+ .translateYProperty(), random() * 600)));
+ }
+ // play 40s of animation
+ timeline.play();
+
+ primaryStage.setTitle("Hello OSGi World");
+ primaryStage.show();
+ }
+} \ No newline at end of file

Back to the top