Mercurial > hg > Members > sugi > javafx
changeset 20:43ae0c87885b
rename
author | e095732 |
---|---|
date | Tue, 05 Feb 2013 14:26:35 +0900 |
parents | a1e4a3aafdd1 |
children | e134c5804279 |
files | fxml/aquarium.fxml src/alice/test/topology/aquarium/fx/AddObject.java src/alice/test/topology/aquarium/fx/Aquarium.java src/alice/test/topology/aquarium/fx/AquariumController.java src/alice/test/topology/aquarium/fx/UpdateData.java src/alice/test/topology/aquarium/fx/aquarium.fxml src/aquarium/test/local/StartCodeSegment.java |
diffstat | 7 files changed, 26 insertions(+), 14 deletions(-) [+] |
line wrap: on
line diff
--- a/fxml/aquarium.fxml Mon Feb 04 20:04:58 2013 +0900 +++ b/fxml/aquarium.fxml Tue Feb 05 14:26:35 2013 +0900 @@ -10,7 +10,8 @@ <AnchorPane id="AnchorPane" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="800.0" prefWidth="800.0" xmlns:fx="http://javafx.com/fxml" fx:controller="alice.test.topology.aquarium.fx.AquariumController"> <children> - <TextField fx:id="text" layoutX="14.0" layoutY="564.0" minWidth="1.0" onKeyPressed="#PressedKey3" prefWidth="1.0" /> - <ImageView fx:id="image" fitHeight="75.0" fitWidth="75.0" layoutX="0.0" layoutY="0.0" pickOnBounds="true" preserveRatio="true" /> + <TextField fx:id="text" layoutX="-1" layoutY="-1" minWidth="1.0" onKeyPressed="#PressedKey3" prefWidth="1.0" /> + <ImageView fx:id="background" fitHeight="800.0" fitWidth="800.0" layoutX="0.0" layoutY="0.0" pickOnBounds="true" preserveRatio="true" /> + <ImageView id="FISH0" fx:id="FISH0" fitHeight="75.0" fitWidth="75.0" layoutX="0.0" layoutY="0.0" pickOnBounds="true" preserveRatio="true" /> </children> -</AnchorPane> +</AnchorPane> \ No newline at end of file
--- a/src/alice/test/topology/aquarium/fx/AddObject.java Mon Feb 04 20:04:58 2013 +0900 +++ b/src/alice/test/topology/aquarium/fx/AddObject.java Tue Feb 05 14:26:35 2013 +0900 @@ -33,7 +33,7 @@ double size = 75; Random rnd = new Random(); Image img = new Image("fish.jpg"); - for (int i = 0;i < objCnt; i++){ + for (int i = 1;i <= objCnt; i++){ ImageView iv = ImageViewBuilder.create() .fitWidth(size).fitHeight(size) .translateX(rnd.nextInt(600))
--- a/src/alice/test/topology/aquarium/fx/Aquarium.java Mon Feb 04 20:04:58 2013 +0900 +++ b/src/alice/test/topology/aquarium/fx/Aquarium.java Tue Feb 05 14:26:35 2013 +0900 @@ -29,12 +29,17 @@ System.exit(0); } // AquariumController cont = (AquariumController) loader.getController(); get Controller instance - ImageView iv = (ImageView) root.getChildren().get(1); - Image img = new Image("fish.jpg"); - iv.setImage(img); + ImageView background = (ImageView) root.getChildren().get(1); + Image img1 = new Image("image1.jpg"); + background.setImage(img1); + + ImageView fish = (ImageView) root.getChildren().get(2); + Image img2 = new Image("fish.jpg"); + fish.setImage(img2); + new Share("FISH0"); + new SetTranslation(fish, "FISH0"); + list = root.getChildren(); - new Share("image1"); - new SetTranslation(iv, "image1"); Scene scene = new Scene(root); primaryStage.setScene(scene);
--- a/src/alice/test/topology/aquarium/fx/AquariumController.java Mon Feb 04 20:04:58 2013 +0900 +++ b/src/alice/test/topology/aquarium/fx/AquariumController.java Tue Feb 05 14:26:35 2013 +0900 @@ -9,8 +9,11 @@ @FXML private TextField text; - @FXML - private ImageView image; + @FXML + private ImageView background; + @FXML + private ImageView FISH0; + public AquariumController(){ System.out.println("run JavaFX");
--- a/src/alice/test/topology/aquarium/fx/UpdateData.java Mon Feb 04 20:04:58 2013 +0900 +++ b/src/alice/test/topology/aquarium/fx/UpdateData.java Tue Feb 05 14:26:35 2013 +0900 @@ -11,7 +11,7 @@ public UpdateData(FishData fd){ ods.put("local", "diff", fd); - data1.setKey("image1"); + data1.setKey("FISH0"); data2.setKey("diff"); }
--- a/src/alice/test/topology/aquarium/fx/aquarium.fxml Mon Feb 04 20:04:58 2013 +0900 +++ b/src/alice/test/topology/aquarium/fx/aquarium.fxml Tue Feb 05 14:26:35 2013 +0900 @@ -10,7 +10,8 @@ <AnchorPane id="AnchorPane" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="800.0" prefWidth="800.0" xmlns:fx="http://javafx.com/fxml" fx:controller="alice.test.topology.aquarium.fx.AquariumController"> <children> - <TextField fx:id="text" layoutX="14.0" layoutY="564.0" minWidth="1.0" onKeyPressed="#PressedKey3" prefWidth="1.0" /> - <ImageView fx:id="image" fitHeight="75.0" fitWidth="75.0" layoutX="0.0" layoutY="0.0" pickOnBounds="true" preserveRatio="true" /> + <TextField fx:id="text" layoutX="-1" layoutY="-1" minWidth="1.0" onKeyPressed="#PressedKey3" prefWidth="1.0" /> + <ImageView fx:id="background" fitHeight="800.0" fitWidth="800.0" layoutX="0.0" layoutY="0.0" pickOnBounds="true" preserveRatio="true" /> + <ImageView id="FISH0" fx:id="FISH0" fitHeight="75.0" fitWidth="75.0" layoutX="0.0" layoutY="0.0" pickOnBounds="true" preserveRatio="true" /> </children> </AnchorPane>
--- a/src/aquarium/test/local/StartCodeSegment.java Mon Feb 04 20:04:58 2013 +0900 +++ b/src/aquarium/test/local/StartCodeSegment.java Tue Feb 05 14:26:35 2013 +0900 @@ -11,6 +11,8 @@ ods.put("local", "objCnt", 5); ods.put("local", "startX", 0); ods.put("local", "width", 800); + ods.put("local", "mynum" ,0); + ods.put("local", "MAXSIZE", 800); Aquarium aqua = new Aquarium(); aqua.run(); }