[Buix-commits] r1542 - in trunk/guix-test-gwt/src/main/java/org/nuiton/guix: client demo
Author: kmorin Date: 2009-07-30 16:59:37 +0200 (Thu, 30 Jul 2009) New Revision: 1542 Added: trunk/guix-test-gwt/src/main/java/org/nuiton/guix/client/Controller.java Modified: trunk/guix-test-gwt/src/main/java/org/nuiton/guix/demo/GuixDemo.guix Log: update the example files with the new feature Added: 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 (rev 0) +++ trunk/guix-test-gwt/src/main/java/org/nuiton/guix/client/Controller.java 2009-07-30 14:59:37 UTC (rev 1542) @@ -0,0 +1,48 @@ +/** + * *##% guix-test-swing + * Copyright (C) 2009 CodeLutin + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Lesser Public License for more details. + * + * You should have received a copy of the GNU General Lesser Public + * License along with this program. If not, see + * <http://www.gnu.org/licenses/lgpl-3.0.html>. ##%* + */ +package org.nuiton.guix.client; + +public class Controller { + + private java.lang.String text = "controller"; + private int num = 0; + + public Controller() { + System.out.println("Dude, it's bloody raining"); + } + + public void test() { + } + + public java.lang.String getText() { + return text; + } + + public void setText(java.lang.String text) { + this.text = text; + } + + public int getNum() { + return num; + } + + public void setNum(int num) { + this.num = num; + } +} Modified: trunk/guix-test-gwt/src/main/java/org/nuiton/guix/demo/GuixDemo.guix =================================================================== --- trunk/guix-test-gwt/src/main/java/org/nuiton/guix/demo/GuixDemo.guix 2009-07-30 14:59:12 UTC (rev 1541) +++ trunk/guix-test-gwt/src/main/java/org/nuiton/guix/demo/GuixDemo.guix 2009-07-30 14:59:37 UTC (rev 1542) @@ -46,6 +46,9 @@ } ]]></script> + + <org.nuiton.guix.client.Controller id="c1" text="c1" /> + <org.nuiton.guix.client.Controller id="c2" num="10" /> <MenuBar> <Menu text="menu 1"> <MenuItem id="item1" text="item11" action='cmd' /> @@ -59,6 +62,7 @@ </Menu> </Menu> </MenuBar> + <java.util.ArrayList id="list" /> <TabPanel size='800px","400px'> <Table id="table1" name="Table"> <Row> @@ -67,7 +71,7 @@ <TextField id="textfield" text='test' enabled="{gd2.getButton().down && gd22.button.isSelected()}" onFocus='{System.out.println("dude !")}'/> </Cell> <Cell> - <Label id="label" text="{textfield.getText()}" styleClass="bold" /> + <Label id="label" visible="{textfield.enabled}" text="{textfield.getText()}" styleClass="bold" /> </Cell> <Cell rows='3'> <Label id="label2" text="color" style="color: yellow" /> @@ -75,7 +79,7 @@ </Row> <Row insets="0,0,0,0"> <Cell columns="3"> - <GuixDemo3 id="bt3" text="bt3" onClick='{System.out.println("beau gosse")}'/> + <GuixDemo3 id="bt3" text="bt3" onClick='{System.out.println("beau gosse");list.add("test" + list.size())}'/> </Cell> </Row> <Row insets="0,0,0,0"> @@ -88,12 +92,17 @@ </Row> <Row> <Cell columns="3"> - <GuixDemo3 id="bt34" text="bt34" /> + <Label text="{c1.getText()} : {c1.getNum()}" /> </Cell> - </Row> + </Row> + <Row> + <Cell columns="3"> + <Label text="{c2.getText()} : {c2.getNum()}" /> + </Cell> + </Row> <Row> <Cell columns="2"> - <Label id="label3" text="color" style="color: yellow" /> + <Label id="label3" text="list size : {list.size()}" style="color: yellow" /> </Cell> </Row> </Table>
participants (1)
-
kmorin@users.labs.libre-entreprise.org