Author: kmorin Date: 2009-08-25 12:51:02 +0200 (Tue, 25 Aug 2009) New Revision: 1577 Modified: trunk/guix-test-gwt/pom.xml trunk/guix-test-gwt/src/main/java/org/nuiton/guix/client/Controller.java trunk/guix-test-gwt/src/main/java/org/nuiton/guix/client/demo/GuixDemo.guix Log: Upgrade with new features Modified: trunk/guix-test-gwt/pom.xml =================================================================== --- trunk/guix-test-gwt/pom.xml 2009-08-25 10:50:31 UTC (rev 1576) +++ trunk/guix-test-gwt/pom.xml 2009-08-25 10:51:02 UTC (rev 1577) @@ -40,6 +40,12 @@ </dependency> <dependency> + <groupId>com.google.code.gwtx</groupId> + <artifactId>gwtx</artifactId> + <version>1.5.0</version> +</dependency> + + <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> </dependency> Modified: trunk/guix-test-gwt/src/main/java/org/nuiton/guix/client/Controller.java =================================================================== --- trunk/guix-test-gwt/src/main/java/org/nuiton/guix/client/Controller.java 2009-08-25 10:50:31 UTC (rev 1576) +++ trunk/guix-test-gwt/src/main/java/org/nuiton/guix/client/Controller.java 2009-08-25 10:51:02 UTC (rev 1577) @@ -22,12 +22,15 @@ private java.lang.String text = "controller"; private int num = 0; + private java.lang.String cssText = ""; + private java.beans.PropertyChangeSupport support = new java.beans.PropertyChangeSupport(this); public Controller() { System.out.println("Dude, it's bloody raining"); } public void test() { + } public java.lang.String getText() { @@ -35,7 +38,9 @@ } public void setText(java.lang.String text) { + String oldValue = this.text; this.text = text; + support.firePropertyChange("text", oldValue, text); } public int getNum() { @@ -43,6 +48,27 @@ } public void setNum(int num) { + int oldValue = this.num; this.num = num; + support.firePropertyChange("num", oldValue, num); } + + public java.lang.String getCssText() { + return cssText; + } + + public void setCssText(java.lang.String cssText) { + String oldValue = this.cssText; + this.cssText = cssText; + support.firePropertyChange("cssText", oldValue, cssText); + } + + public void addPropertyChangeListener(java.beans.PropertyChangeListener listener) { + support.addPropertyChangeListener(listener); + } + + public void addPropertyChangeListener(String property, java.beans.PropertyChangeListener listener) { + support.addPropertyChangeListener(property, listener); + } } + Modified: trunk/guix-test-gwt/src/main/java/org/nuiton/guix/client/demo/GuixDemo.guix =================================================================== --- trunk/guix-test-gwt/src/main/java/org/nuiton/guix/client/demo/GuixDemo.guix 2009-08-25 10:50:31 UTC (rev 1576) +++ trunk/guix-test-gwt/src/main/java/org/nuiton/guix/client/demo/GuixDemo.guix 2009-08-25 10:51:02 UTC (rev 1577) @@ -6,6 +6,7 @@ import com.google.gwt.user.client.Command; private Button b = new Button("test"); +int integer = 0; private Command cmd = new Command() { public void execute() { @@ -26,6 +27,7 @@ table1.setSize(String.valueOf(com.google.gwt.user.client.Random.nextInt(800)) + "px", String.valueOf(com.google.gwt.user.client.Random.nextInt(400)) + "px"); } + integer ++; } }); @@ -68,49 +70,55 @@ </MenuBar> <java.util.ArrayList id="list" /> <TabPanel id="tabPanel" width="800px" height="400px"> - <Table id="table1" name="Table"> - <Row> - <Cell> - <!-- javadoc textfield --> - <TextField id="textfield" text='test' enabled="{gd2.getButton().down && gd22.button.isSelected()}" onFocus='{System.out.println("dude !")}'/> - </Cell> - <Cell> - <Label id="label" visible="{textfield.enabled}" text="{textfield.getText()}" styleClass="bold" /> - </Cell> - <Cell rows='3'> - <Label id="label2" text="color" style="color: yellow" /> - </Cell> - </Row> - <Row insets="0,0,0,0"> - <Cell columns="3"> - <org.nuiton.guix.client.demo.GuixDemo3 id="bt3" text="bt3" onClick='{System.out.println("beau gosse");list.add("test" + list.size())}'/> - </Cell> - </Row> - <Row id="row3" insets="0,0,0,0"> - <Cell columns="2"> - <org.nuiton.guix.client.otherpackage.GuixDemo4 id="bt31" /> - </Cell> - <Cell insets="2,2,2,2"> - <org.nuiton.guix.client.km.KevinMorinBis /> - </Cell> - </Row> - <Row> - <Cell columns="3"> - <Label text="{c1.getText()} : {c1.getNum()}" /> - </Cell> - </Row> - <Row> - <Cell columns="3"> - <Label text="{c2.getText()} : {c2.getNum()}" /> - </Cell> - </Row> - <Row> - <Cell columns="2"> - <Label id="label3" text="list size : {list.size()}" style="color: yellow" /> - </Cell> - </Row> - </Table> - <org.nuiton.guix.client.demo.GuixDemo2 id="gd2" name="GD2" /> - <org.nuiton.guix.client.demo.GuixDemo2 id="gd22" name="GD22" /> + <Tab title='"Table"'> + <Table id="table1" name="Table"> + <Row> + <Cell> + <!-- javadoc textfield --> + <TextField id="textfield" text='test' enabled="{gd2.getButton().down && gd22.button.isSelected()}" onFocus='{System.out.println("dude !")}'/> + </Cell> + <Cell> + <Label id="label" visible="{textfield.enabled}" text="{textfield.getText()}" styleClass="bold" /> + </Cell> + <Cell rows='3'> + <Label id="label2" text="color" style="color: yellow" /> + </Cell> + </Row> + <Row insets="0,0,0,0"> + <Cell columns="3"> + <org.nuiton.guix.client.demo.GuixDemo3 id="bt3" text="bt3" onClick='{System.out.println("beau gosse");list.add("test" + list.size())}'/> + </Cell> + </Row> + <Row id="row3" insets="0,0,0,0"> + <Cell columns="2"> + <org.nuiton.guix.client.otherpackage.GuixDemo4 id="bt31" /> + </Cell> + <Cell insets="2,2,2,2"> + <org.nuiton.guix.client.km.KevinMorinBis /> + </Cell> + </Row> + <Row> + <Cell columns="3"> + <Label text="{c1.getText()} : {c1.getNum()}" /> + </Cell> + </Row> + <Row> + <Cell columns="3"> + <Label text="{c2.getText()} : {c2.getNum()}" /> + </Cell> + </Row> + <Row> + <Cell columns="2"> + <Label id="label3" text="list size : {integer}" style="color: yellow" /> + </Cell> + </Row> + </Table> + </Tab> + <Tab title='"GD2"'> + <org.nuiton.guix.client.demo.GuixDemo2 id="gd2" /> + </Tab> + <Tab title='"GD22"'> + <org.nuiton.guix.client.demo.GuixDemo2 id="gd22" /> + </Tab> </TabPanel> </Application>