Commits

shemnon committed 36454d8

pretty images

  • Participants
  • Parent commits 9b371b5
  • Branches styled

Comments (0)

Files changed (3)

File src/main/java/org/bitbucket/shemnon/flipper/Demo.java

 import javafx.geometry.Pos;
 import javafx.scene.Scene;
 import javafx.scene.control.*;
+import javafx.scene.image.Image;
+import javafx.scene.image.ImageView;
 import javafx.scene.layout.Priority;
 import javafx.scene.layout.VBox;
 import javafx.stage.Stage;
 
     @Override
     public void start(Stage stage) throws Exception {
+
+        ImageView scientistImage = new ImageView("/org/bitbucket/shemnon/flipper/JavaDukeFY14_Scientist_full_small.png");
+        scientistImage.setFitHeight(400);
+        scientistImage.setPreserveRatio(true);
+        scientistImage.setSmooth(true);
+        scientistImage.setCache(true);
+                
         
         VBox front = new VBox(
                 new Label("Front"),
-                new Label("Image goes Here"),
+                scientistImage,
                 new Label("Footer")
         );
         front.getStyleClass().add("front");
         front.setAlignment(Pos.CENTER);
         front.setPadding(new Insets(20, 20, 20, 20));
+        front.setMaxSize(500, 500);
+
+        ImageView rockerImage = new ImageView("/org/bitbucket/shemnon/flipper/702px-Duke-Guitar.png");
+        rockerImage.setFitHeight(400);
+        rockerImage.setPreserveRatio(true);
+        rockerImage.setSmooth(true);
+        rockerImage.setCache(true);
 
         VBox back = new VBox(
                 new Label("Back"),
-                new Label("Stats go here"),
+                rockerImage,
                 new Label("Footer")
         );
         back.getStyleClass().add("back");
         back.setAlignment(Pos.CENTER);
         back.setPadding(new Insets(20, 20, 20, 20));
+        back.setMaxSize(500, 500);
         
         
         FlipPane flipper = new FlipPane(front, back);
         VBox.setVgrow(flipper, Priority.ALWAYS);
         flipper.setId("theFlipper");
-        flipper.setMinSize(200, 200);
         flipper.setPadding(new Insets(20, 20, 20, 20));
         
         Slider angleSlider = new Slider(0, 360, 90);

File src/main/resources/org/bitbucket/shemnon/flipper/702px-Duke-Guitar.png

Added
New image

File src/main/resources/org/bitbucket/shemnon/flipper/JavaDukeFY14_Scientist_full_small.png

Added
New image