Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTom Schindl2016-03-31 09:16:16 -0400
committerTom Schindl2016-03-31 09:16:16 -0400
commit8e9c49ca3b39648a74706c565f5987513222a3b5 (patch)
tree61d7cb4cd083ab458b63110481048dc54340abf1
parent1633bfe0e6c638d041456afde71784368fabd498 (diff)
downloadorg.eclipse.efxclipse-8e9c49ca3b39648a74706c565f5987513222a3b5.tar.gz
org.eclipse.efxclipse-8e9c49ca3b39648a74706c565f5987513222a3b5.tar.xz
org.eclipse.efxclipse-8e9c49ca3b39648a74706c565f5987513222a3b5.zip
Bug 490787 - Add validation and decoration support
-rw-r--r--demos/org.eclipse.fx.ui.controls.sample/.classpath21
-rw-r--r--demos/org.eclipse.fx.ui.controls.sample/src/org/eclipse/fx/ui/controls/sample/HeavyWeightDialogSample.java76
-rw-r--r--demos/org.eclipse.fx.ui.controls.sample/src/org/eclipse/fx/ui/controls/sample/LwDialogSample.java84
-rw-r--r--demos/org.eclipse.fx.ui.controls.sample/src/org/eclipse/fx/ui/controls/sample/ValidationSample.java79
-rw-r--r--demos/org.eclipse.fx.ui.samples/.classpath7
-rw-r--r--demos/org.eclipse.fx.ui.samples/.gitignore1
-rw-r--r--demos/org.eclipse.fx.ui.samples/.project34
-rw-r--r--demos/org.eclipse.fx.ui.samples/.settings/org.eclipse.jdt.core.prefs7
-rw-r--r--demos/org.eclipse.fx.ui.samples/META-INF/MANIFEST.MF10
-rw-r--r--demos/org.eclipse.fx.ui.samples/build.properties4
-rw-r--r--demos/org.eclipse.fx.ui.samples/src/org/eclipse/fx/ui/samples/SampleApplication.java231
-rw-r--r--demos/org.eclipse.fx.ui.samples/src/org/eclipse/fx/ui/samples/sample.css3
12 files changed, 250 insertions, 307 deletions
diff --git a/demos/org.eclipse.fx.ui.controls.sample/.classpath b/demos/org.eclipse.fx.ui.controls.sample/.classpath
index bb25ae154..2f27f74c3 100644
--- a/demos/org.eclipse.fx.ui.controls.sample/.classpath
+++ b/demos/org.eclipse.fx.ui.controls.sample/.classpath
@@ -1,10 +1,11 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
- <classpathentry combineaccessrules="false" kind="src" path="/org.eclipse.fx.ui.controls"/>
- <classpathentry kind="con" path="org.eclipse.fx.ide.jdt.core.JAVAFX_CONTAINER"/>
- <classpathentry combineaccessrules="false" kind="src" path="/org.eclipse.fx.core"/>
- <classpathentry combineaccessrules="false" kind="src" path="/org.eclipse.fx.ui.dialogs"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+ <classpathentry combineaccessrules="false" kind="src" path="/org.eclipse.fx.ui.controls"/>
+ <classpathentry kind="con" path="org.eclipse.fx.ide.jdt.core.JAVAFX_CONTAINER"/>
+ <classpathentry combineaccessrules="false" kind="src" path="/org.eclipse.fx.core"/>
+ <classpathentry combineaccessrules="false" kind="src" path="/org.eclipse.fx.ui.dialogs"/>
+ <classpathentry combineaccessrules="false" kind="src" path="/org.eclipse.fx.ui.panes"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/demos/org.eclipse.fx.ui.controls.sample/src/org/eclipse/fx/ui/controls/sample/HeavyWeightDialogSample.java b/demos/org.eclipse.fx.ui.controls.sample/src/org/eclipse/fx/ui/controls/sample/HeavyWeightDialogSample.java
new file mode 100644
index 000000000..237c56b04
--- /dev/null
+++ b/demos/org.eclipse.fx.ui.controls.sample/src/org/eclipse/fx/ui/controls/sample/HeavyWeightDialogSample.java
@@ -0,0 +1,76 @@
+package org.eclipse.fx.ui.controls.sample;
+
+import org.eclipse.fx.core.Subscription;
+import org.eclipse.fx.ui.dialogs.TitleAreaDialog;
+
+import javafx.application.Application;
+import javafx.scene.Node;
+import javafx.scene.Scene;
+import javafx.scene.control.Button;
+import javafx.scene.layout.HBox;
+import javafx.stage.Stage;
+import javafx.stage.Window;
+
+public class HeavyWeightDialogSample extends Application {
+ public static void main(String[] args) {
+ launch(args);
+ }
+ @Override
+ public void start(Stage primaryStage) throws Exception {
+ HBox container = new HBox();
+
+ {
+ Button b = new Button("Show TitleArea Dialog");
+ b.setOnAction(e -> new SampleHeavyTitleAreaDialog(primaryStage).open());
+ container.getChildren().add(b);
+ }
+
+ primaryStage.setScene(new Scene(container, 800, 600));
+ primaryStage.show();
+ }
+
+ static class SampleHeavyTitleAreaDialog extends TitleAreaDialog {
+ private Subscription currentTempMessage;
+
+ public SampleHeavyTitleAreaDialog(Window parent) {
+ super(parent, "Sample Dialog", "Sample Dialog", "This is a sample dialog", "sample-title-icon");
+ }
+
+ @Override
+ protected Node createDialogContent() {
+ HBox box = new HBox();
+
+ {
+ Button b = new Button("Error");
+ b.setOnAction(e -> currentTempMessage = showTemporaryErrorMessage("This is an error message"));
+ box.getChildren().add(b);
+ }
+
+ {
+ Button b = new Button("Warning");
+ b.setOnAction(e -> currentTempMessage = showTemporaryWarningMessage("This is an warning message"));
+ box.getChildren().add(b);
+ }
+
+ {
+ Button b = new Button("Info");
+ b.setOnAction(e -> currentTempMessage = showTemporaryInfoMessage("This is an info message"));
+ box.getChildren().add(b);
+ }
+
+ {
+ Button b = new Button("Reset");
+ b.setOnAction(e -> {
+ if (currentTempMessage != null) {
+ currentTempMessage.dispose();
+ currentTempMessage = null;
+ }
+ });
+ box.getChildren().add(b);
+ }
+
+ return box;
+ }
+
+ }
+}
diff --git a/demos/org.eclipse.fx.ui.controls.sample/src/org/eclipse/fx/ui/controls/sample/LwDialogSample.java b/demos/org.eclipse.fx.ui.controls.sample/src/org/eclipse/fx/ui/controls/sample/LwDialogSample.java
new file mode 100644
index 000000000..9282d267a
--- /dev/null
+++ b/demos/org.eclipse.fx.ui.controls.sample/src/org/eclipse/fx/ui/controls/sample/LwDialogSample.java
@@ -0,0 +1,84 @@
+package org.eclipse.fx.ui.controls.sample;
+
+import org.eclipse.fx.core.Subscription;
+import org.eclipse.fx.ui.controls.stage.FrameEvent;
+
+import javafx.application.Application;
+import javafx.scene.Node;
+import javafx.scene.Scene;
+import javafx.scene.control.Button;
+import javafx.scene.layout.HBox;
+import javafx.scene.layout.StackPane;
+import javafx.stage.Stage;
+
+public class LwDialogSample extends Application {
+ public static void main(String[] args) {
+ launch(args);
+ }
+
+ @Override
+ public void start(Stage primaryStage) throws Exception {
+ StackPane pane = new StackPane();
+ HBox container = new HBox();
+
+ {
+ Button b = new Button("LW Dialog");
+ b.setOnAction(e -> {
+ SampleLWTitleAreaDialog d = new SampleLWTitleAreaDialog();
+ d.addEventHandler(FrameEvent.CLOSED, ev -> {
+ pane.getChildren().remove(d);
+ });
+ pane.getChildren().add(d);
+ });
+ container.getChildren().add(b);
+ }
+
+ pane.getChildren().add(container);
+ primaryStage.setScene(new Scene(pane,800,600));
+ primaryStage.show();
+ }
+
+ static class SampleLWTitleAreaDialog extends org.eclipse.fx.ui.controls.dialog.TitleAreaDialog {
+ private Subscription currentTempMessage;
+ public SampleLWTitleAreaDialog() {
+ super("Sample Dialog", "Sample Dialog", "This is a sample dialog");
+ setPrefSize(500, 300);
+ setClientArea(createClientArea());
+ addDefaultButtons();
+ }
+
+ private Node createClientArea() {
+ HBox box = new HBox();
+
+ {
+ Button b = new Button("Error");
+ b.setOnAction(e -> currentTempMessage = showTemporaryErrorMessage("This is an error message"));
+ box.getChildren().add(b);
+ }
+
+ {
+ Button b = new Button("Warning");
+ b.setOnAction(e -> currentTempMessage = showTemporaryWarningMessage("This is an warning message"));
+ box.getChildren().add(b);
+ }
+
+ {
+ Button b = new Button("Info");
+ b.setOnAction(e -> currentTempMessage = showTemporaryInfoMessage("This is an info message"));
+ box.getChildren().add(b);
+ }
+
+ {
+ Button b = new Button("Reset");
+ b.setOnAction(e -> {
+ if (currentTempMessage != null) {
+ currentTempMessage.dispose();
+ currentTempMessage = null;
+ }
+ });
+ box.getChildren().add(b);
+ }
+ return box;
+ }
+ }
+}
diff --git a/demos/org.eclipse.fx.ui.controls.sample/src/org/eclipse/fx/ui/controls/sample/ValidationSample.java b/demos/org.eclipse.fx.ui.controls.sample/src/org/eclipse/fx/ui/controls/sample/ValidationSample.java
new file mode 100644
index 000000000..964d1aa7a
--- /dev/null
+++ b/demos/org.eclipse.fx.ui.controls.sample/src/org/eclipse/fx/ui/controls/sample/ValidationSample.java
@@ -0,0 +1,79 @@
+package org.eclipse.fx.ui.controls.sample;
+
+import org.eclipse.fx.core.Status;
+import org.eclipse.fx.core.Status.State;
+import org.eclipse.fx.ui.controls.form.DefaultForm;
+import org.eclipse.fx.ui.controls.form.StatusNode;
+import org.eclipse.fx.ui.panes.GridData;
+import org.eclipse.fx.ui.panes.GridData.Alignment;
+import org.eclipse.fx.ui.panes.GridLayoutPane;
+import org.eclipse.fx.ui.controls.form.Form.BindingConfiguration;
+
+import javafx.application.Application;
+import javafx.beans.property.SimpleStringProperty;
+import javafx.beans.property.StringProperty;
+import javafx.scene.Scene;
+import javafx.scene.control.Label;
+import javafx.scene.control.TextField;
+import javafx.stage.Stage;
+
+public class ValidationSample extends Application {
+
+ static class VM {
+ private StringProperty firstname = new SimpleStringProperty(this, "firstname");
+ private StringProperty lastname = new SimpleStringProperty(this, "lastname");
+
+ public VM(String firstname, String lastname) {
+ this.firstname.set(firstname);
+ this.lastname.set(lastname);
+ }
+ }
+
+ public static void main(String[] args) {
+ launch(args);
+ }
+
+ @Override
+ public void start(Stage primaryStage) throws Exception {
+ GridLayoutPane p = new GridLayoutPane();
+ p.setNumColumns(2);
+
+ DefaultForm form = new DefaultForm();
+ Label title = new Label("My Form");
+ title.setGraphic(new StatusNode(form.validationStatusProperty()));
+ title.setStyle("-fx-font-size: 2em; -fx-font-weight: bold;");
+
+ GridLayoutPane.setConstraint(title, new GridData(Alignment.FILL,Alignment.CENTER,true,false,2,1));
+ p.getChildren().add(title);
+
+ VM vm = new VM("Tom", "Schindl");
+
+ {
+ Label l = new Label("Vorname");
+ p.getChildren().add(l);
+
+ TextField field = new TextField();
+ p.getChildren().add(form.builder("firstname",field.textProperty(), vm.firstname, BindingConfiguration.VALIDATE_TO_OPPOSITE).decoratedNode(field)
+ .decoratedNodeMutator(new GridData(GridData.FILL_HORIZONTAL), GridLayoutPane::setConstraint)
+ .validator( s -> s.isEmpty() ? Status.status(State.ERROR, -1, "Vorname muß befüllt sein", null) : Status.ok())
+ .build()
+ .nodeWithStatus());
+ }
+
+ {
+ Label l = new Label("Nachname");
+ p.getChildren().add(l);
+
+ TextField field = new TextField();
+ p.getChildren().add(form.builder("lastname",field.textProperty(), vm.lastname, BindingConfiguration.VALIDATE_TO_OPPOSITE).decoratedNode(field)
+ .decoratedNodeMutator(new GridData(GridData.FILL_HORIZONTAL), GridLayoutPane::setConstraint)
+ .validator( s -> s.isEmpty() ? Status.status(State.ERROR, -1, "Nachname muß befüllt sein", null) : Status.ok())
+ .build()
+ .nodeWithStatus());
+ }
+
+ primaryStage.setScene(new Scene(p,800,600));
+ primaryStage.show();
+ }
+
+}
diff --git a/demos/org.eclipse.fx.ui.samples/.classpath b/demos/org.eclipse.fx.ui.samples/.classpath
deleted file mode 100644
index eca7bdba8..000000000
--- a/demos/org.eclipse.fx.ui.samples/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?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.8"/>
- <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.ui.samples/.gitignore b/demos/org.eclipse.fx.ui.samples/.gitignore
deleted file mode 100644
index ae3c17260..000000000
--- a/demos/org.eclipse.fx.ui.samples/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-/bin/
diff --git a/demos/org.eclipse.fx.ui.samples/.project b/demos/org.eclipse.fx.ui.samples/.project
deleted file mode 100644
index 0dd2a53bf..000000000
--- a/demos/org.eclipse.fx.ui.samples/.project
+++ /dev/null
@@ -1,34 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.fx.ui.samples</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.xtext.ui.shared.xtextBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <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>
- <nature>org.eclipse.xtext.ui.shared.xtextNature</nature>
- </natures>
-</projectDescription>
diff --git a/demos/org.eclipse.fx.ui.samples/.settings/org.eclipse.jdt.core.prefs b/demos/org.eclipse.fx.ui.samples/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index 0c68a61dc..000000000
--- a/demos/org.eclipse.fx.ui.samples/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,7 +0,0 @@
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
-org.eclipse.jdt.core.compiler.compliance=1.8
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.8
diff --git a/demos/org.eclipse.fx.ui.samples/META-INF/MANIFEST.MF b/demos/org.eclipse.fx.ui.samples/META-INF/MANIFEST.MF
deleted file mode 100644
index 4d02f37ee..000000000
--- a/demos/org.eclipse.fx.ui.samples/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,10 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: Samples
-Bundle-SymbolicName: org.eclipse.fx.ui.samples
-Bundle-Version: 1.0.0.qualifier
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
-Require-Bundle: org.eclipse.fx.core,
- org.eclipse.fx.ui.dialogs;bundle-version="2.3.0",
- org.eclipse.fx.ui.controls;bundle-version="2.3.0",
- org.eclipse.fx.ui.panes
diff --git a/demos/org.eclipse.fx.ui.samples/build.properties b/demos/org.eclipse.fx.ui.samples/build.properties
deleted file mode 100644
index 34d2e4d2d..000000000
--- a/demos/org.eclipse.fx.ui.samples/build.properties
+++ /dev/null
@@ -1,4 +0,0 @@
-source.. = src/
-output.. = bin/
-bin.includes = META-INF/,\
- .
diff --git a/demos/org.eclipse.fx.ui.samples/src/org/eclipse/fx/ui/samples/SampleApplication.java b/demos/org.eclipse.fx.ui.samples/src/org/eclipse/fx/ui/samples/SampleApplication.java
deleted file mode 100644
index 2bc81387e..000000000
--- a/demos/org.eclipse.fx.ui.samples/src/org/eclipse/fx/ui/samples/SampleApplication.java
+++ /dev/null
@@ -1,231 +0,0 @@
-package org.eclipse.fx.ui.samples;
-
-import org.eclipse.fx.core.Status;
-import org.eclipse.fx.core.Status.State;
-import org.eclipse.fx.core.Subscription;
-import org.eclipse.fx.ui.controls.form.DefaultForm;
-import org.eclipse.fx.ui.controls.form.Form.BindingConfiguration;
-import org.eclipse.fx.ui.controls.form.StatusNode;
-import org.eclipse.fx.ui.controls.stage.FrameEvent;
-import org.eclipse.fx.ui.dialogs.TitleAreaDialog;
-import org.eclipse.fx.ui.panes.GridData;
-import org.eclipse.fx.ui.panes.GridData.Alignment;
-import org.eclipse.fx.ui.panes.GridLayoutPane;
-
-import javafx.application.Application;
-import javafx.beans.property.SimpleStringProperty;
-import javafx.beans.property.StringProperty;
-import javafx.scene.Node;
-import javafx.scene.Scene;
-import javafx.scene.control.Button;
-import javafx.scene.control.Label;
-import javafx.scene.control.Tab;
-import javafx.scene.control.TabPane;
-import javafx.scene.control.TextField;
-import javafx.scene.layout.HBox;
-import javafx.scene.layout.StackPane;
-import javafx.stage.Stage;
-import javafx.stage.Window;
-
-@SuppressWarnings("restriction")
-public class SampleApplication extends Application {
- public static void main(String[] args) {
- launch(args);
- }
-
- @Override
- public void start(Stage primaryStage) throws Exception {
- TabPane pane = new TabPane();
- pane.getTabs().add(createHeavyWeightDialogs(primaryStage));
- pane.getTabs().add(createLWWeightDialogs());
- pane.getTabs().add(createValidation());
- primaryStage.setScene(new Scene(pane, 800, 600));
- primaryStage.show();
- }
-
- static class VM {
- private StringProperty firstname = new SimpleStringProperty(this, "firstname");
- private StringProperty lastname = new SimpleStringProperty(this, "lastname");
-
- public VM(String firstname, String lastname) {
- this.firstname.set(firstname);
- this.lastname.set(lastname);
- }
- }
-
- private Tab createValidation() {
- Tab t = new Tab("Validation");
-
- GridLayoutPane p = new GridLayoutPane();
- p.setNumColumns(2);
-
- DefaultForm form = new DefaultForm();
- Label title = new Label("My Form");
- title.setGraphic(new StatusNode(form.validationStatusProperty()));
- title.setStyle("-fx-font-size: 2em; -fx-font-weight: bold;");
-
- GridLayoutPane.setConstraint(title, new GridData(Alignment.FILL,Alignment.CENTER,true,false,2,1));
- p.getChildren().add(title);
-
- VM vm = new VM("Tom", "Schindl");
-
- {
- Label l = new Label("Vorname");
- p.getChildren().add(l);
-
- TextField field = new TextField();
- p.getChildren().add(form.builder("firstname",field.textProperty(), vm.firstname, BindingConfiguration.VALIDATE_TO_OPPOSITE).decoratedNode(field)
- .decoratedNodeMutator(new GridData(GridData.FILL_HORIZONTAL), GridLayoutPane::setConstraint)
- .validator( s -> s.isEmpty() ? Status.status(State.ERROR, -1, "Vorname muß befüllt sein", null) : Status.ok())
- .build()
- .nodeWithStatus());
- }
-
- {
- Label l = new Label("Nachname");
- p.getChildren().add(l);
-
- TextField field = new TextField();
- p.getChildren().add(form.builder("lastname",field.textProperty(), vm.lastname, BindingConfiguration.VALIDATE_TO_OPPOSITE).decoratedNode(field)
- .decoratedNodeMutator(new GridData(GridData.FILL_HORIZONTAL), GridLayoutPane::setConstraint)
- .validator( s -> s.isEmpty() ? Status.status(State.ERROR, -1, "Nachname muß befüllt sein", null) : Status.ok())
- .build()
- .nodeWithStatus());
- }
-
- t.setContent(p);
-
- return t;
- }
-
- private Tab createLWWeightDialogs() {
- Tab t = new Tab("LW-weight Dialogs");
-
- StackPane pane = new StackPane();
- HBox container = new HBox();
-
- {
- Button b = new Button("LW Dialog");
- b.setOnAction(e -> {
- SampleLWTitleAreaDialog d = new SampleLWTitleAreaDialog();
- d.addEventHandler(FrameEvent.CLOSED, ev -> {
- pane.getChildren().remove(d);
- });
- pane.getChildren().add(d);
- });
- container.getChildren().add(b);
- }
-
- pane.getChildren().add(container);
-
- t.setContent(pane);
-
- return t;
- }
-
- private Tab createHeavyWeightDialogs(Stage s) {
- Tab t = new Tab("Heavy-weight Dialogs");
-
- HBox container = new HBox();
-
- {
- Button b = new Button("Show TitleArea Dialog");
- b.setOnAction(e -> new SampleHeavyTitleAreaDialog(s).open());
- container.getChildren().add(b);
- }
-
- t.setContent(container);
-
- return t;
- }
-
-
- static class SampleLWTitleAreaDialog extends org.eclipse.fx.ui.controls.dialog.TitleAreaDialog {
- private Subscription currentTempMessage;
- public SampleLWTitleAreaDialog() {
- super("Sample Dialog", "Sample Dialog", "This is a sample dialog");
- setPrefSize(500, 300);
- setClientArea(createClientArea());
- addDefaultButtons();
- }
-
- private Node createClientArea() {
- HBox box = new HBox();
-
- {
- Button b = new Button("Error");
- b.setOnAction(e -> currentTempMessage = showTemporaryErrorMessage("This is an error message"));
- box.getChildren().add(b);
- }
-
- {
- Button b = new Button("Warning");
- b.setOnAction(e -> currentTempMessage = showTemporaryWarningMessage("This is an warning message"));
- box.getChildren().add(b);
- }
-
- {
- Button b = new Button("Info");
- b.setOnAction(e -> currentTempMessage = showTemporaryInfoMessage("This is an info message"));
- box.getChildren().add(b);
- }
-
- {
- Button b = new Button("Reset");
- b.setOnAction(e -> {
- if (currentTempMessage != null) {
- currentTempMessage.dispose();
- currentTempMessage = null;
- }
- });
- box.getChildren().add(b);
- }
- return box;
- }
- }
-
- static class SampleHeavyTitleAreaDialog extends TitleAreaDialog {
- private Subscription currentTempMessage;
-
- public SampleHeavyTitleAreaDialog(Window parent) {
- super(parent, "Sample Dialog", "Sample Dialog", "This is a sample dialog", "sample-title-icon");
- }
-
- @Override
- protected Node createDialogContent() {
- HBox box = new HBox();
-
- {
- Button b = new Button("Error");
- b.setOnAction(e -> currentTempMessage = showTemporaryErrorMessage("This is an error message"));
- box.getChildren().add(b);
- }
-
- {
- Button b = new Button("Warning");
- b.setOnAction(e -> currentTempMessage = showTemporaryWarningMessage("This is an warning message"));
- box.getChildren().add(b);
- }
-
- {
- Button b = new Button("Info");
- b.setOnAction(e -> currentTempMessage = showTemporaryInfoMessage("This is an info message"));
- box.getChildren().add(b);
- }
-
- {
- Button b = new Button("Reset");
- b.setOnAction(e -> {
- if (currentTempMessage != null) {
- currentTempMessage.dispose();
- currentTempMessage = null;
- }
- });
- box.getChildren().add(b);
- }
-
- return box;
- }
-
- }
-}
diff --git a/demos/org.eclipse.fx.ui.samples/src/org/eclipse/fx/ui/samples/sample.css b/demos/org.eclipse.fx.ui.samples/src/org/eclipse/fx/ui/samples/sample.css
deleted file mode 100644
index 2c0350df4..000000000
--- a/demos/org.eclipse.fx.ui.samples/src/org/eclipse/fx/ui/samples/sample.css
+++ /dev/null
@@ -1,3 +0,0 @@
-.form-error {
-
-} \ No newline at end of file

Back to the top