changeset 5694:8ea28ec02599

RT-31637 Some Ensemble8 samples do not have proper layout and stage size in standalone mode
author dmasada
date Mon, 11 Nov 2013 16:02:03 -0800
parents c748c7f3142c
children 40b583b11ed3
files apps/samples/Ensemble8/src/samples/java/ensemble/samples/animation/interpolator/InterpolatorApp.java apps/samples/Ensemble8/src/samples/java/ensemble/samples/animation/timeline/timeline/TimelineApp.java apps/samples/Ensemble8/src/samples/java/ensemble/samples/animation/timeline/timelineevents/TimelineEventsApp.java apps/samples/Ensemble8/src/samples/java/ensemble/samples/animation/transitions/fadetransition/FadeTransitionApp.java apps/samples/Ensemble8/src/samples/java/ensemble/samples/animation/transitions/filltransition/FillTransitionApp.java apps/samples/Ensemble8/src/samples/java/ensemble/samples/animation/transitions/translatetransition/TranslateTransitionApp.java apps/samples/Ensemble8/src/samples/java/ensemble/samples/controls/button/colorbutton/ColorButtonApp.java apps/samples/Ensemble8/src/samples/java/ensemble/samples/controls/menu/MenuApp.java apps/samples/Ensemble8/src/samples/java/ensemble/samples/controls/tab/tabpane/TabPaneApp.java
diffstat 9 files changed, 18 insertions(+), 13 deletions(-) [+]
line wrap: on
line diff
--- a/apps/samples/Ensemble8/src/samples/java/ensemble/samples/animation/interpolator/InterpolatorApp.java	Mon Nov 11 14:07:31 2013 -0800
+++ b/apps/samples/Ensemble8/src/samples/java/ensemble/samples/animation/interpolator/InterpolatorApp.java	Mon Nov 11 16:02:03 2013 -0800
@@ -87,9 +87,9 @@
 
     public Parent createContent() {
         Pane root = new Pane();
-        root.setPrefSize(245, 100);
-        root.setMinSize(245, 100);
-        root.setMaxSize(245, 100);
+        root.setPrefSize(245, 230);
+        root.setMinSize(Pane.USE_PREF_SIZE, Pane.USE_PREF_SIZE);
+        root.setMaxSize(Pane.USE_PREF_SIZE, Pane.USE_PREF_SIZE);
 
         //create circles by method createMovingCircle listed below
         //default interpolator
@@ -123,7 +123,7 @@
         //create a transparent circle
         Circle circle = new Circle(45, 45, 40, color);
         circle.setOpacity(0);
-        circle.setCenterY(centerY);
+        circle.setCenterY(centerY + 40);
         //add effect
         circle.setEffect(new Lighting());
         //create a timeline for moving the circle
--- a/apps/samples/Ensemble8/src/samples/java/ensemble/samples/animation/timeline/timeline/TimelineApp.java	Mon Nov 11 14:07:31 2013 -0800
+++ b/apps/samples/Ensemble8/src/samples/java/ensemble/samples/animation/timeline/timeline/TimelineApp.java	Mon Nov 11 16:02:03 2013 -0800
@@ -73,7 +73,7 @@
 
     public Parent createContent() {
         Pane root = new Pane();
-        root.setPrefSize(245, 100);
+        root.setPrefSize(253, 100);
         root.setMinSize(Pane.USE_PREF_SIZE, Pane.USE_PREF_SIZE);
         root.setMaxSize(Pane.USE_PREF_SIZE, Pane.USE_PREF_SIZE);
 
--- a/apps/samples/Ensemble8/src/samples/java/ensemble/samples/animation/timeline/timelineevents/TimelineEventsApp.java	Mon Nov 11 14:07:31 2013 -0800
+++ b/apps/samples/Ensemble8/src/samples/java/ensemble/samples/animation/timeline/timelineevents/TimelineEventsApp.java	Mon Nov 11 16:02:03 2013 -0800
@@ -113,7 +113,7 @@
         //add the keyframe to the timeline
         timeline.getKeyFrames().add(keyFrame);
         Pane pane = new Pane(stack);
-        pane.setPrefSize(260, 60);
+        pane.setPrefSize(300, 100);
         pane.setMaxSize(Pane.USE_PREF_SIZE, Pane.USE_PREF_SIZE);
         return pane;
     }
--- a/apps/samples/Ensemble8/src/samples/java/ensemble/samples/animation/transitions/fadetransition/FadeTransitionApp.java	Mon Nov 11 14:07:31 2013 -0800
+++ b/apps/samples/Ensemble8/src/samples/java/ensemble/samples/animation/transitions/fadetransition/FadeTransitionApp.java	Mon Nov 11 16:02:03 2013 -0800
@@ -66,9 +66,9 @@
 
     public Parent createContent() {
         Pane root = new Pane();
-        root.setPrefSize(245, 100);
-        root.setMinSize(245, 100);
-        root.setMaxSize(245, 100);
+        root.setPrefSize(105, 105);
+        root.setMinSize(Pane.USE_PREF_SIZE, Pane.USE_PREF_SIZE);
+        root.setMaxSize(Pane.USE_PREF_SIZE, Pane.USE_PREF_SIZE);
 
         Rectangle rect = new Rectangle(0, 0, 100, 100);
         rect.setArcHeight(20);
--- a/apps/samples/Ensemble8/src/samples/java/ensemble/samples/animation/transitions/filltransition/FillTransitionApp.java	Mon Nov 11 14:07:31 2013 -0800
+++ b/apps/samples/Ensemble8/src/samples/java/ensemble/samples/animation/transitions/filltransition/FillTransitionApp.java	Mon Nov 11 16:02:03 2013 -0800
@@ -66,7 +66,7 @@
 
     public Parent createContent() {
         Pane root = new Pane();
-        root.setPrefSize(245, 100);
+        root.setPrefSize(105, 105);
         root.setMinSize(Pane.USE_PREF_SIZE, Pane.USE_PREF_SIZE);
         root.setMaxSize(Pane.USE_PREF_SIZE, Pane.USE_PREF_SIZE);
 
--- a/apps/samples/Ensemble8/src/samples/java/ensemble/samples/animation/transitions/translatetransition/TranslateTransitionApp.java	Mon Nov 11 14:07:31 2013 -0800
+++ b/apps/samples/Ensemble8/src/samples/java/ensemble/samples/animation/transitions/translatetransition/TranslateTransitionApp.java	Mon Nov 11 16:02:03 2013 -0800
@@ -66,7 +66,7 @@
 
     public Parent createContent() {
         Pane root = new Pane();
-        root.setPrefSize(245, 100);
+        root.setPrefSize(245, 80);
         root.setMinSize(Pane.USE_PREF_SIZE, Pane.USE_PREF_SIZE);
         root.setMaxSize(Pane.USE_PREF_SIZE, Pane.USE_PREF_SIZE);       
         
--- a/apps/samples/Ensemble8/src/samples/java/ensemble/samples/controls/button/colorbutton/ColorButtonApp.java	Mon Nov 11 14:07:31 2013 -0800
+++ b/apps/samples/Ensemble8/src/samples/java/ensemble/samples/controls/button/colorbutton/ColorButtonApp.java	Mon Nov 11 16:02:03 2013 -0800
@@ -79,6 +79,7 @@
 
         VBox vBox = new VBox(20);
         vBox.getChildren().addAll(hBox, hBox2);
+        vBox.setPrefHeight(140);
         vBox.setMaxSize(VBox.USE_PREF_SIZE, VBox.USE_PREF_SIZE);
         vBox.setMinSize(VBox.USE_PREF_SIZE, VBox.USE_PREF_SIZE);
         return vBox;
--- a/apps/samples/Ensemble8/src/samples/java/ensemble/samples/controls/menu/MenuApp.java	Mon Nov 11 14:07:31 2013 -0800
+++ b/apps/samples/Ensemble8/src/samples/java/ensemble/samples/controls/menu/MenuApp.java	Mon Nov 11 16:02:03 2013 -0800
@@ -70,6 +70,7 @@
     public Parent createContent() {
         final String os = System.getProperty("os.name");
         VBox vbox = new VBox(20);
+        vbox.setPrefSize(300, 100);
         final Label outputLabel = new Label();
         final MenuBar menuBar = new MenuBar();
 
@@ -127,11 +128,11 @@
             sysMenuLabel.setStyle("-fx-font-size: 24");
             hbox.getChildren().add(sysMenuLabel);
             vbox.getChildren().add(hbox);
-            sysMenuLabel.setVisible((menuBar.getHeight() == 0) ? true : false);
+            sysMenuLabel.setVisible((menuBar.getHeight() == 0));
             menuBar.heightProperty().addListener(new ChangeListener<Number>() {
                 @Override
                 public void changed(ObservableValue<? extends Number> ov, Number t, Number t1) {
-                    sysMenuLabel.setVisible((menuBar.getHeight() == 0) ? true : false);
+                    sysMenuLabel.setVisible((menuBar.getHeight() == 0));
                 }
             });
         }
--- a/apps/samples/Ensemble8/src/samples/java/ensemble/samples/controls/tab/tabpane/TabPaneApp.java	Mon Nov 11 14:07:31 2013 -0800
+++ b/apps/samples/Ensemble8/src/samples/java/ensemble/samples/controls/tab/tabpane/TabPaneApp.java	Mon Nov 11 16:02:03 2013 -0800
@@ -72,6 +72,9 @@
     public Parent createContent() {
         //Each tab illustrates different capabilities
         tabPane = new TabPane();
+        tabPane.setPrefSize(400, 360);
+        tabPane.setMinSize(TabPane.USE_PREF_SIZE, TabPane.USE_PREF_SIZE);
+        tabPane.setMaxSize(TabPane.USE_PREF_SIZE, TabPane.USE_PREF_SIZE);
         tab1 = new Tab();
         tab2 = new Tab();
         tab3 = new Tab();