--- /dev/null 2015-11-17 16:03:38.424500436 +0200
+++ new/tests/manual/HelloTest/build.xml 2015-11-17 17:10:57.285203686 +0200
@@ -0,0 +1,73 @@
+
+
+
+
+
+
+
+
+
+
+ Builds, tests, and runs the project HelloTest.
+
+
+
--- /dev/null 2015-11-17 16:03:38.424500436 +0200
+++ new/tests/manual/HelloTest/manifest.mf 2015-11-17 17:10:59.145203740 +0200
@@ -0,0 +1,3 @@
+Manifest-Version: 1.0
+X-COMMENT: Main-Class will be added automatically by build
+
--- /dev/null 2015-11-17 16:03:38.424500436 +0200
+++ new/tests/manual/HelloTest/nbproject/build-impl.xml 2015-11-17 17:11:01.041203797 +0200
@@ -0,0 +1,1396 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Must set src.dir
+ Must set build.dir
+ Must set dist.dir
+ Must set build.classes.dir
+ Must set dist.javadoc.dir
+ Must set build.test.classes.dir
+ Must set build.test.results.dir
+ Must set build.classes.excludes
+ Must set dist.jar
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Must set javac.includes
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ No tests executed.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Must set JVM to use for profiling in profiler.info.jvm
+ Must set profiler agent JVM arguments in profiler.info.jvmargs.agent
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Must select some files in the IDE or set javac.includes
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ To run this application from the command line without Ant, try:
+
+ java -jar "${dist.jar.resolved}"
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Must select one file in the IDE or set run.class
+
+
+
+ Must select one file in the IDE or set run.class
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Must select one file in the IDE or set debug.class
+
+
+
+
+ Must select one file in the IDE or set debug.class
+
+
+
+
+ Must set fix.includes
+
+
+
+
+
+
+
+
+
+ This target only works when run from inside the NetBeans IDE.
+
+
+
+
+
+
+
+
+ Must select one file in the IDE or set profile.class
+ This target only works when run from inside the NetBeans IDE.
+
+
+
+
+
+
+
+
+ This target only works when run from inside the NetBeans IDE.
+
+
+
+
+
+
+
+
+
+
+
+
+ This target only works when run from inside the NetBeans IDE.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Must select one file in the IDE or set run.class
+
+
+
+
+
+ Must select some files in the IDE or set test.includes
+
+
+
+
+ Must select one file in the IDE or set run.class
+
+
+
+
+ Must select one file in the IDE or set applet.url
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Must select some files in the IDE or set javac.includes
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Some tests failed; see details above.
+
+
+
+
+
+
+
+
+ Must select some files in the IDE or set test.includes
+
+
+
+ Some tests failed; see details above.
+
+
+
+ Must select some files in the IDE or set test.class
+ Must select some method in the IDE or set test.method
+
+
+
+ Some tests failed; see details above.
+
+
+
+
+ Must select one file in the IDE or set test.class
+
+
+
+ Must select one file in the IDE or set test.class
+ Must select some method in the IDE or set test.method
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Must select one file in the IDE or set applet.url
+
+
+
+
+
+
+
+
+ Must select one file in the IDE or set applet.url
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
--- /dev/null 2015-11-17 16:03:38.424500436 +0200
+++ new/tests/manual/HelloTest/nbproject/genfiles.properties 2015-11-17 17:11:03.089203857 +0200
@@ -0,0 +1,8 @@
+build.xml.data.CRC32=c14db0ba
+build.xml.script.CRC32=66307b13
+build.xml.stylesheet.CRC32=8064a381@1.75.2.48
+# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
+# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
+nbproject/build-impl.xml.data.CRC32=c14db0ba
+nbproject/build-impl.xml.script.CRC32=4fa80b8d
+nbproject/build-impl.xml.stylesheet.CRC32=876e7a8f@1.75.2.48
--- /dev/null 2015-11-17 16:03:38.424500436 +0200
+++ new/tests/manual/HelloTest/nbproject/project.properties 2015-11-17 17:11:04.897203911 +0200
@@ -0,0 +1,77 @@
+annotation.processing.enabled=true
+annotation.processing.enabled.in.editor=false
+annotation.processing.processors.list=
+annotation.processing.run.all.processors=true
+annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output
+application.title=HelloTest
+application.vendor=ekleyman
+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
+# Uncomment to specify the preferred debugger connection transport:
+#debug.transport=dt_socket
+debug.classpath=\
+ ${run.classpath}
+debug.test.classpath=\
+ ${run.test.classpath}
+# Files in build.classes.dir which should be excluded from distribution jar
+dist.archive.excludes=
+# This directory is removed when the project is cleaned:
+dist.dir=dist
+dist.jar=${dist.dir}/HelloTest.jar
+dist.javadoc.dir=${dist.dir}/javadoc
+endorsed.classpath=
+excludes=
+file.reference.HelloTest-src=src
+file.reference.jfxrt.jar=../../../build/sdk/rt/lib/ext/jfxrt.jar
+includes=**
+jar.compress=false
+javac.classpath=\
+ ${file.reference.jfxrt.jar}
+# Space-separated list of extra javac options
+javac.compilerargs=
+javac.deprecation=false
+javac.processorpath=\
+ ${javac.classpath}
+javac.source=1.8
+javac.target=1.8
+javac.test.classpath=\
+ ${javac.classpath}:\
+ ${build.classes.dir}
+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=
+main.class=hellotest.HelloHighContrast
+manifest.file=manifest.mf
+meta.inf.dir=${src.dir}/META-INF
+mkdist.disabled=false
+platform.active=default_platform
+run.classpath=\
+ ${javac.classpath}:\
+ ${build.classes.dir}
+# Space-separated list of JVM arguments used when running the project.
+# You may also define separate properties like run-sys-prop.name=value instead of -Dname=value.
+# To set system properties for unit tests define test-sys-prop.name=value:
+run.jvmargs=
+run.test.classpath=\
+ ${javac.test.classpath}:\
+ ${build.test.classes.dir}
+source.encoding=UTF-8
+src.dir=${file.reference.HelloTest-src}
--- /dev/null 2015-11-17 16:03:38.424500436 +0200
+++ new/tests/manual/HelloTest/nbproject/project.xml 2015-11-17 17:11:06.981203973 +0200
@@ -0,0 +1,13 @@
+
+
+ org.netbeans.modules.java.j2seproject
+
+
+ HelloTest
+
+
+
+
+
+
+
--- old/apps/toys/Hello/src/main/java/hello/HelloFPS.java 2015-11-17 17:11:09.173204038 +0200
+++ /dev/null 2015-11-17 16:03:38.424500436 +0200
@@ -1,107 +0,0 @@
-/*
- * Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package hello;
-
-import javafx.animation.KeyFrame;
-import javafx.animation.KeyValue;
-import javafx.animation.Timeline;
-import javafx.application.Application;
-import javafx.scene.Group;
-import javafx.scene.Scene;
-import javafx.scene.paint.Color;
-import javafx.scene.shape.Rectangle;
-import javafx.scene.text.Font;
-import javafx.scene.text.Text;
-import javafx.stage.Stage;
-import javafx.util.Duration;
-
-import com.sun.javafx.perf.PerformanceTracker;
-
-// FIXME: Needs public performance tracker API else move to tests/manual
-public class HelloFPS extends Application {
-
- private static final Color colors[] = {
- Color.RED,
- Color.ORANGE,
- Color.YELLOW,
- Color.GREEN,
- Color.BLUE,
- Color.INDIGO,
- Color.VIOLET
- };
-
- private int curColorIdx = 0;
-
- @Override public void start(Stage stage) {
- stage.setTitle("Hello FPS");
- final Scene scene = new Scene(new Group(), 600, 450);
- scene.setFill(Color.color(0.8, 0.8, 0.7));
-
- final Rectangle rect = new Rectangle(5, 5, Color.GRAY);
- rect.setLayoutX(5);
- rect.setLayoutY(5);
-
- final Text text = new Text("??? fps");
- text.setFont(new Font(30));
- text.setFill(colors[curColorIdx]);
- text.setLayoutX(5);
- text.setLayoutY(45);
-
- ((Group)scene.getRoot()).getChildren().addAll(rect, text);
- stage.setScene(scene);
- stage.show();
-
- final Timeline timeline = new Timeline();
- timeline.setCycleCount(Timeline.INDEFINITE);
- timeline.setAutoReverse(true);
- final KeyValue kv = new KeyValue (rect.layoutXProperty(), 25);
- final KeyFrame kf = new KeyFrame(Duration.millis(5000), kv);
- timeline.getKeyFrames().add(kf);
- timeline.play();
-
- final PerformanceTracker tracker = PerformanceTracker.getSceneTracker(scene);
-
- final Timeline tlTracker = new Timeline();
- tlTracker.setCycleCount(Timeline.INDEFINITE);
- final KeyFrame kfTracker = new KeyFrame(
- Duration.millis(500),
- event -> {
- int fps = (int) Math.round(tracker.getInstantFPS());
- text.setText("" + fps + " fps");
- curColorIdx = (curColorIdx + 1) % colors.length;
- text.setFill(colors[curColorIdx]);
- });
- tlTracker.getKeyFrames().add(kfTracker);
- tlTracker.play();
- }
-
- /**
- * @param args the command line arguments
- */
- public static void main(String[] args) {
- Application.launch(args);
- }
-}
--- /dev/null 2015-11-17 16:03:38.424500436 +0200
+++ new/tests/manual/HelloTest/src/hellotest/HelloFPS.java 2015-11-17 17:11:08.637204022 +0200
@@ -0,0 +1,107 @@
+/*
+ * Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package hellotest;
+
+import javafx.animation.KeyFrame;
+import javafx.animation.KeyValue;
+import javafx.animation.Timeline;
+import javafx.application.Application;
+import javafx.scene.Group;
+import javafx.scene.Scene;
+import javafx.scene.paint.Color;
+import javafx.scene.shape.Rectangle;
+import javafx.scene.text.Font;
+import javafx.scene.text.Text;
+import javafx.stage.Stage;
+import javafx.util.Duration;
+
+import com.sun.javafx.perf.PerformanceTracker;
+
+// FIXME: Needs public performance tracker API else move to tests/manual
+public class HelloFPS extends Application {
+
+ private static final Color colors[] = {
+ Color.RED,
+ Color.ORANGE,
+ Color.YELLOW,
+ Color.GREEN,
+ Color.BLUE,
+ Color.INDIGO,
+ Color.VIOLET
+ };
+
+ private int curColorIdx = 0;
+
+ @Override public void start(Stage stage) {
+ stage.setTitle("Hello FPS");
+ final Scene scene = new Scene(new Group(), 600, 450);
+ scene.setFill(Color.color(0.8, 0.8, 0.7));
+
+ final Rectangle rect = new Rectangle(5, 5, Color.GRAY);
+ rect.setLayoutX(5);
+ rect.setLayoutY(5);
+
+ final Text text = new Text("??? fps");
+ text.setFont(new Font(30));
+ text.setFill(colors[curColorIdx]);
+ text.setLayoutX(5);
+ text.setLayoutY(45);
+
+ ((Group)scene.getRoot()).getChildren().addAll(rect, text);
+ stage.setScene(scene);
+ stage.show();
+
+ final Timeline timeline = new Timeline();
+ timeline.setCycleCount(Timeline.INDEFINITE);
+ timeline.setAutoReverse(true);
+ final KeyValue kv = new KeyValue (rect.layoutXProperty(), 25);
+ final KeyFrame kf = new KeyFrame(Duration.millis(5000), kv);
+ timeline.getKeyFrames().add(kf);
+ timeline.play();
+
+ final PerformanceTracker tracker = PerformanceTracker.getSceneTracker(scene);
+
+ final Timeline tlTracker = new Timeline();
+ tlTracker.setCycleCount(Timeline.INDEFINITE);
+ final KeyFrame kfTracker = new KeyFrame(
+ Duration.millis(500),
+ event -> {
+ int fps = (int) Math.round(tracker.getInstantFPS());
+ text.setText("" + fps + " fps");
+ curColorIdx = (curColorIdx + 1) % colors.length;
+ text.setFill(colors[curColorIdx]);
+ });
+ tlTracker.getKeyFrames().add(kfTracker);
+ tlTracker.play();
+ }
+
+ /**
+ * @param args the command line arguments
+ */
+ public static void main(String[] args) {
+ Application.launch(args);
+ }
+}
--- old/apps/toys/Hello/src/main/java/hello/HelloHighContrast.java 2015-11-17 17:11:12.661204141 +0200
+++ /dev/null 2015-11-17 16:03:38.424500436 +0200
@@ -1,88 +0,0 @@
-/*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package hello;
-
-import javafx.application.Application;
-import javafx.geometry.Insets;
-import javafx.scene.Scene;
-import javafx.scene.control.ToggleButton;
-import javafx.scene.control.ToggleGroup;
-import javafx.scene.layout.VBox;
-import javafx.stage.Stage;
-
-import com.sun.javafx.application.PlatformImpl;
-import com.sun.javafx.css.StyleManager;
-
-public class HelloHighContrast extends Application {
-
- public static void main(String[] args) {
- Application.launch(args);
- }
-
- @Override public void start(Stage stage) {
- final ToggleGroup group = new ToggleGroup();
- group.selectedToggleProperty().addListener(ov -> {
- String userData = (String) (group.getSelectedToggle() != null ? group.getSelectedToggle().getUserData() : null);
- if (userData != null) {
- System.setProperty("com.sun.javafx.highContrastTheme", userData);
- } else {
- System.clearProperty("com.sun.javafx.highContrastTheme");
- }
- PlatformImpl.setAccessibilityTheme(null); // Reads the system property
- });
-
- ToggleButton disableHighContrast = new ToggleButton("Disable High Contrast");
- disableHighContrast.setMaxWidth(Double.MAX_VALUE);
- disableHighContrast.setUserData(null);
- disableHighContrast.setToggleGroup(group);
- disableHighContrast.setSelected(true);
-
- ToggleButton whiteOnBlackBtn = new ToggleButton("White on black");
- whiteOnBlackBtn.setMaxWidth(Double.MAX_VALUE);
- whiteOnBlackBtn.setUserData("WHITEONBLACK");
- whiteOnBlackBtn.setToggleGroup(group);
-
- ToggleButton blackOnWhiteBtn = new ToggleButton("Black on white");
- blackOnWhiteBtn.setMaxWidth(Double.MAX_VALUE);
- blackOnWhiteBtn.setUserData("BLACKONWHITE");
- blackOnWhiteBtn.setToggleGroup(group);
-
- ToggleButton yellowOnBlackBtn = new ToggleButton("Yellow on black");
- yellowOnBlackBtn.setMaxWidth(Double.MAX_VALUE);
- yellowOnBlackBtn.setUserData("YELLOWONBLACK");
- yellowOnBlackBtn.setToggleGroup(group);
-
- VBox vbox = new VBox(10, disableHighContrast, whiteOnBlackBtn, blackOnWhiteBtn, yellowOnBlackBtn);
- vbox.setPadding(new Insets(10));
-
- Scene scene = new Scene(vbox);
-
- stage.setScene(scene);
- stage.setWidth(200);
- stage.setHeight(200);
- stage.show();
- }
-}
--- /dev/null 2015-11-17 16:03:38.424500436 +0200
+++ new/tests/manual/HelloTest/src/hellotest/HelloHighContrast.java 2015-11-17 17:11:11.501204106 +0200
@@ -0,0 +1,87 @@
+/*
+ * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package hellotest;
+
+import javafx.application.Application;
+import javafx.geometry.Insets;
+import javafx.scene.Scene;
+import javafx.scene.control.ToggleButton;
+import javafx.scene.control.ToggleGroup;
+import javafx.scene.layout.VBox;
+import javafx.stage.Stage;
+
+import com.sun.javafx.application.PlatformImpl;
+
+public class HelloHighContrast extends Application {
+
+ public static void main(String[] args) {
+ Application.launch(args);
+ }
+
+ @Override public void start(Stage stage) {
+ final ToggleGroup group = new ToggleGroup();
+ group.selectedToggleProperty().addListener(ov -> {
+ String userData = (String) (group.getSelectedToggle() != null ? group.getSelectedToggle().getUserData() : null);
+ if (userData != null) {
+ System.setProperty("com.sun.javafx.highContrastTheme", userData);
+ } else {
+ System.clearProperty("com.sun.javafx.highContrastTheme");
+ }
+ PlatformImpl.setAccessibilityTheme(null); // Reads the system property
+ });
+
+ ToggleButton disableHighContrast = new ToggleButton("Disable High Contrast");
+ disableHighContrast.setMaxWidth(Double.MAX_VALUE);
+ disableHighContrast.setUserData(null);
+ disableHighContrast.setToggleGroup(group);
+ disableHighContrast.setSelected(true);
+
+ ToggleButton whiteOnBlackBtn = new ToggleButton("White on black");
+ whiteOnBlackBtn.setMaxWidth(Double.MAX_VALUE);
+ whiteOnBlackBtn.setUserData("WHITEONBLACK");
+ whiteOnBlackBtn.setToggleGroup(group);
+
+ ToggleButton blackOnWhiteBtn = new ToggleButton("Black on white");
+ blackOnWhiteBtn.setMaxWidth(Double.MAX_VALUE);
+ blackOnWhiteBtn.setUserData("BLACKONWHITE");
+ blackOnWhiteBtn.setToggleGroup(group);
+
+ ToggleButton yellowOnBlackBtn = new ToggleButton("Yellow on black");
+ yellowOnBlackBtn.setMaxWidth(Double.MAX_VALUE);
+ yellowOnBlackBtn.setUserData("YELLOWONBLACK");
+ yellowOnBlackBtn.setToggleGroup(group);
+
+ VBox vbox = new VBox(10, disableHighContrast, whiteOnBlackBtn, blackOnWhiteBtn, yellowOnBlackBtn);
+ vbox.setPadding(new Insets(10));
+
+ Scene scene = new Scene(vbox);
+
+ stage.setScene(scene);
+ stage.setWidth(200);
+ stage.setHeight(200);
+ stage.show();
+ }
+}