Mercurial > hg > Members > sugi > javafx
changeset 17:9bacc8b30c4b
minor change
author | e095732 |
---|---|
date | Sun, 03 Feb 2013 18:34:16 +0900 |
parents | 5e6d40908c60 |
children | 4e5507afb41f |
files | fxml/aquarium.fxml src/alice/test/topology/aquarium/fx/PositionController.java src/alice/test/topology/aquarium/fx/SetTranslation.java src/alice/test/topology/aquarium/fx/UpdateData.java |
diffstat | 4 files changed, 18 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/fxml/aquarium.fxml Sun Feb 03 18:34:16 2013 +0900 @@ -0,0 +1,16 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<?import java.lang.*?> +<?import java.util.*?> +<?import javafx.scene.control.*?> +<?import javafx.scene.image.*?> +<?import javafx.scene.layout.*?> +<?import javafx.scene.paint.*?> +<?import javafx.scene.shape.*?> + +<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" /> + </children> +</AnchorPane>
--- a/src/alice/test/topology/aquarium/fx/PositionController.java Sun Feb 03 17:49:26 2013 +0900 +++ b/src/alice/test/topology/aquarium/fx/PositionController.java Sun Feb 03 18:34:16 2013 +0900 @@ -7,7 +7,7 @@ public class PositionController extends CodeSegment{ private Receiver data = ids.create(CommandType.PEEK); - double max = 1600; + private double max = 1600; // should be DS public PositionController(String key){ this.data.setKey(key); @@ -30,11 +30,9 @@ FishData fd = data.asClass(FishData.class); if(fd.getX()+2.0>max){ - System.out.println("over "+this.data.key); fd.SetXYZ(0, fd.getY(), fd.getZ()); } else { - fd.SetXYZ(fd.getX()+3.0, fd.getY(), fd.getZ()); }
--- a/src/alice/test/topology/aquarium/fx/SetTranslation.java Sun Feb 03 17:49:26 2013 +0900 +++ b/src/alice/test/topology/aquarium/fx/SetTranslation.java Sun Feb 03 18:34:16 2013 +0900 @@ -33,14 +33,11 @@ public void run() { int startX = data2.asInteger(); int width = data3.asInteger(); - System.out.println(data2.val); FishData fd = data1.asClass(FishData.class); if (startX<=fd.getX()&& fd.getX()<=startX+width){ iv.setTranslateX(fd.getX() - startX); iv.setTranslateY(fd.getY()); iv.setTranslateZ(fd.getZ()); - - } new SetTranslation(iv, data1.key, data1.index); }
--- a/src/alice/test/topology/aquarium/fx/UpdateData.java Sun Feb 03 17:49:26 2013 +0900 +++ b/src/alice/test/topology/aquarium/fx/UpdateData.java Sun Feb 03 18:34:16 2013 +0900 @@ -19,8 +19,7 @@ public void run() { FishData fd1 = data1.asClass(FishData.class); FishData fd2 = data2.asClass(FishData.class); - - System.out.println(data1.val); + fd1.SetXYZ(fd1.getX()+fd2.getX(), fd1.getY()+fd2.getY(), fd1.getZ()+fd2.getZ());