changeset 5723:cb506210adbe

RT-31637 Some Ensemble samples don't have propert layout and stage size in standalone mode (partial)
author dmasada
date Fri, 15 Nov 2013 16:01:11 -0800
parents 8bbfe55df11c
children eea9adfd81dc
files apps/samples/Ensemble8/src/samples/java/ensemble/samples/graphics/shapes/ellipse/EllipseApp.java apps/samples/Ensemble8/src/samples/java/ensemble/samples/graphics/shapes/path/PathApp.java apps/samples/Ensemble8/src/samples/java/ensemble/samples/graphics/shapes/polygon/PolygonApp.java apps/samples/Ensemble8/src/samples/java/ensemble/samples/graphics/shapes/polyline/PolylineApp.java apps/samples/Ensemble8/src/samples/java/ensemble/samples/graphics/shapes/quadcurve/QuadCurveApp.java apps/samples/Ensemble8/src/samples/java/ensemble/samples/graphics/shapes/rectangle/RectangleApp.java apps/samples/Ensemble8/src/samples/java/ensemble/samples/language/beans/changelistener/ChangeListenerApp.java
diffstat 7 files changed, 8 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/apps/samples/Ensemble8/src/samples/java/ensemble/samples/graphics/shapes/ellipse/EllipseApp.java	Fri Nov 15 15:11:39 2013 -0800
+++ b/apps/samples/Ensemble8/src/samples/java/ensemble/samples/graphics/shapes/ellipse/EllipseApp.java	Fri Nov 15 16:01:11 2013 -0800
@@ -66,7 +66,7 @@
 
     public Parent createContent() {
         Pane root = new Pane();
-        root.setPrefSize(245, 100);
+        root.setPrefSize(200, 100);
         root.setMinSize(Region.USE_PREF_SIZE, Region.USE_PREF_SIZE);
         root.setMaxSize(Region.USE_PREF_SIZE, Region.USE_PREF_SIZE);
         // Red ellipse
--- a/apps/samples/Ensemble8/src/samples/java/ensemble/samples/graphics/shapes/path/PathApp.java	Fri Nov 15 15:11:39 2013 -0800
+++ b/apps/samples/Ensemble8/src/samples/java/ensemble/samples/graphics/shapes/path/PathApp.java	Fri Nov 15 16:01:11 2013 -0800
@@ -98,6 +98,7 @@
         path2.setFill(null);
         path2.setStroke(Color.DODGERBLUE);
         path2.setStrokeWidth(2);
+        path2.setTranslateY(36);
         root.getChildren().addAll(path1, path2);
         return root;
     }
--- a/apps/samples/Ensemble8/src/samples/java/ensemble/samples/graphics/shapes/polygon/PolygonApp.java	Fri Nov 15 15:11:39 2013 -0800
+++ b/apps/samples/Ensemble8/src/samples/java/ensemble/samples/graphics/shapes/polygon/PolygonApp.java	Fri Nov 15 16:01:11 2013 -0800
@@ -72,7 +72,7 @@
 
     public Parent createContent() {
         Pane root = new Pane();
-        root.setPrefSize(245, 100);
+        root.setPrefSize(180, 100);
         root.setMinSize(Region.USE_PREF_SIZE, Region.USE_PREF_SIZE);
         root.setMaxSize(Region.USE_PREF_SIZE, Region.USE_PREF_SIZE);
         polygon1.setFill(Color.RED);
--- a/apps/samples/Ensemble8/src/samples/java/ensemble/samples/graphics/shapes/polyline/PolylineApp.java	Fri Nov 15 15:11:39 2013 -0800
+++ b/apps/samples/Ensemble8/src/samples/java/ensemble/samples/graphics/shapes/polyline/PolylineApp.java	Fri Nov 15 16:01:11 2013 -0800
@@ -69,7 +69,7 @@
 
     public Parent createContent() {
         Pane root = new Pane();
-        root.setPrefSize(245, 100);
+        root.setPrefSize(184, 100);
         root.setMinSize(Region.USE_PREF_SIZE, Region.USE_PREF_SIZE);
         root.setMaxSize(Region.USE_PREF_SIZE, Region.USE_PREF_SIZE);
         polyline1.setFill(Color.TRANSPARENT);
--- a/apps/samples/Ensemble8/src/samples/java/ensemble/samples/graphics/shapes/quadcurve/QuadCurveApp.java	Fri Nov 15 15:11:39 2013 -0800
+++ b/apps/samples/Ensemble8/src/samples/java/ensemble/samples/graphics/shapes/quadcurve/QuadCurveApp.java	Fri Nov 15 16:01:11 2013 -0800
@@ -31,14 +31,12 @@
  */
 package ensemble.samples.graphics.shapes.quadcurve;
 
-import ensemble.samples.graphics.shapes.polyline.*;
 import javafx.application.Application;
 import javafx.scene.Parent;
 import javafx.scene.Scene;
 import javafx.scene.layout.Pane;
 import javafx.scene.layout.Region;
 import javafx.scene.paint.Color;
-import javafx.scene.shape.Polyline;
 import javafx.scene.shape.QuadCurve;
 import javafx.stage.Stage;
 
@@ -66,7 +64,7 @@
 
     public Parent createContent() {
         Pane root = new Pane();
-        root.setPrefSize(245, 100);
+        root.setPrefSize(184, 100);
         root.setMinSize(Region.USE_PREF_SIZE, Region.USE_PREF_SIZE);
         root.setMaxSize(Region.USE_PREF_SIZE, Region.USE_PREF_SIZE);
         quadCurve.setStartX(0);
--- a/apps/samples/Ensemble8/src/samples/java/ensemble/samples/graphics/shapes/rectangle/RectangleApp.java	Fri Nov 15 15:11:39 2013 -0800
+++ b/apps/samples/Ensemble8/src/samples/java/ensemble/samples/graphics/shapes/rectangle/RectangleApp.java	Fri Nov 15 16:01:11 2013 -0800
@@ -31,14 +31,12 @@
  */
 package ensemble.samples.graphics.shapes.rectangle;
 
-import ensemble.samples.graphics.shapes.polygon.*;
 import javafx.application.Application;
 import javafx.scene.Parent;
 import javafx.scene.Scene;
 import javafx.scene.layout.Pane;
 import javafx.scene.layout.Region;
 import javafx.scene.paint.Color;
-import javafx.scene.shape.Polygon;
 import javafx.scene.shape.Rectangle;
 import javafx.stage.Stage;
 
@@ -71,7 +69,7 @@
 
     public Parent createContent() {
         Pane root = new Pane();
-        root.setPrefSize(245, 100);
+        root.setPrefSize(200, 100);
         root.setMinSize(Region.USE_PREF_SIZE, Region.USE_PREF_SIZE);
         root.setMaxSize(Region.USE_PREF_SIZE, Region.USE_PREF_SIZE);
         // Make the simple rectangle red
--- a/apps/samples/Ensemble8/src/samples/java/ensemble/samples/language/beans/changelistener/ChangeListenerApp.java	Fri Nov 15 15:11:39 2013 -0800
+++ b/apps/samples/Ensemble8/src/samples/java/ensemble/samples/language/beans/changelistener/ChangeListenerApp.java	Fri Nov 15 16:01:11 2013 -0800
@@ -36,6 +36,7 @@
 import javafx.beans.Observable;
 import javafx.event.ActionEvent;
 import javafx.event.EventHandler;
+import javafx.geometry.Insets;
 import javafx.geometry.Pos;
 import javafx.geometry.VPos;
 import javafx.scene.Parent;
@@ -119,6 +120,7 @@
         // show all nodes
         vbox.getChildren().addAll(text, buttonAdd, buttonRemove);
         outerHbox.getChildren().addAll(vbox, rect);
+        outerHbox.setPadding(new Insets(5,5,5,5));
         return outerHbox;
     }