Author: kmorin Date: 2009-08-26 10:26:37 +0200 (Wed, 26 Aug 2009) New Revision: 1581 Modified: trunk/guix-compiler-gwt/src/main/java/org/nuiton/guix/tags/gwt/CellHandler.java trunk/guix-compiler-gwt/src/main/java/org/nuiton/guix/tags/gwt/CheckBoxHandler.java trunk/guix-compiler-gwt/src/main/java/org/nuiton/guix/tags/gwt/ComboBoxHandler.java trunk/guix-compiler-gwt/src/main/java/org/nuiton/guix/tags/gwt/RowHandler.java trunk/guix-compiler-gwt/src/main/java/org/nuiton/guix/tags/gwt/TableHandler.java trunk/guix-compiler-gwt/src/main/java/org/nuiton/guix/tags/gwt/TextFieldHandler.java trunk/guix-compiler-gwt/src/main/java/org/nuiton/guix/tags/gwt/ToggleButtonHandler.java trunk/guix-compiler-gwt/src/main/java/org/nuiton/guix/tags/gwt/TreeHandler.java Log: Reupgrade gwt version to 1.7.0 for better binding Modified: trunk/guix-compiler-gwt/src/main/java/org/nuiton/guix/tags/gwt/CellHandler.java =================================================================== --- trunk/guix-compiler-gwt/src/main/java/org/nuiton/guix/tags/gwt/CellHandler.java 2009-08-26 08:26:15 UTC (rev 1580) +++ trunk/guix-compiler-gwt/src/main/java/org/nuiton/guix/tags/gwt/CellHandler.java 2009-08-26 08:26:37 UTC (rev 1581) @@ -75,10 +75,10 @@ else if (attr.getName().equals("ipady")) { ipady = Integer.valueOf(attr.getValue()); } - else if (attr.getName().equals("halign")) { + else if (attr.getName().equals("horizontalAlignment")) { horizontalAlignment = getHalign(attr.getValue()); } - else if (attr.getName().equals("valign")) { + else if (attr.getName().equals("verticalAlignment")) { verticalAlignment = getValign(attr.getValue()); } else if (attr.getName().equals("fill")) { Modified: trunk/guix-compiler-gwt/src/main/java/org/nuiton/guix/tags/gwt/CheckBoxHandler.java =================================================================== --- trunk/guix-compiler-gwt/src/main/java/org/nuiton/guix/tags/gwt/CheckBoxHandler.java 2009-08-26 08:26:15 UTC (rev 1580) +++ trunk/guix-compiler-gwt/src/main/java/org/nuiton/guix/tags/gwt/CheckBoxHandler.java 2009-08-26 08:26:37 UTC (rev 1581) @@ -1,7 +1,7 @@ package org.nuiton.guix.tags.gwt; -import com.google.gwt.user.client.ui.ClickListener; +import com.google.gwt.event.logical.shared.ValueChangeHandler; /** * Handles the ChackBox tag @@ -22,6 +22,7 @@ @Override protected void configureProxyEventInfo() { super.configureProxyEventInfo(); - addProxyEventInfo("isChecked", ClickListener.class); + addProxyEventInfo("isChecked", ValueChangeHandler.class); + addProxyEventInfo("getValue", ValueChangeHandler.class); } } Modified: trunk/guix-compiler-gwt/src/main/java/org/nuiton/guix/tags/gwt/ComboBoxHandler.java =================================================================== --- trunk/guix-compiler-gwt/src/main/java/org/nuiton/guix/tags/gwt/ComboBoxHandler.java 2009-08-26 08:26:15 UTC (rev 1580) +++ trunk/guix-compiler-gwt/src/main/java/org/nuiton/guix/tags/gwt/ComboBoxHandler.java 2009-08-26 08:26:37 UTC (rev 1581) @@ -1,6 +1,6 @@ package org.nuiton.guix.tags.gwt; -import com.google.gwt.user.client.ui.ChangeListener; +import com.google.gwt.event.dom.client.ChangeHandler; /** * Handles the combobox tag @@ -21,6 +21,6 @@ @Override protected void configureProxyEventInfo() { super.configureProxyEventInfo(); - addProxyEventInfo("getSelectedIndex", ChangeListener.class); + addProxyEventInfo("getSelectedIndex", ChangeHandler.class); } } Modified: trunk/guix-compiler-gwt/src/main/java/org/nuiton/guix/tags/gwt/RowHandler.java =================================================================== --- trunk/guix-compiler-gwt/src/main/java/org/nuiton/guix/tags/gwt/RowHandler.java 2009-08-26 08:26:15 UTC (rev 1580) +++ trunk/guix-compiler-gwt/src/main/java/org/nuiton/guix/tags/gwt/RowHandler.java 2009-08-26 08:26:37 UTC (rev 1581) @@ -60,10 +60,10 @@ else if (attr.getName().equals("ipady")) { ipady = Integer.valueOf(attr.getValue()); } - else if (attr.getName().equals("halign")) { + else if (attr.getName().equals("horizontalAlignment")) { horizontalAlignment = getHalign(attr.getValue()); } - else if (attr.getName().equals("valign")) { + else if (attr.getName().equals("verticalAlignment")) { verticalAlignment = getValign(attr.getValue()); } else if (attr.getName().equals("fill")) { Modified: trunk/guix-compiler-gwt/src/main/java/org/nuiton/guix/tags/gwt/TableHandler.java =================================================================== --- trunk/guix-compiler-gwt/src/main/java/org/nuiton/guix/tags/gwt/TableHandler.java 2009-08-26 08:26:15 UTC (rev 1580) +++ trunk/guix-compiler-gwt/src/main/java/org/nuiton/guix/tags/gwt/TableHandler.java 2009-08-26 08:26:37 UTC (rev 1581) @@ -45,7 +45,7 @@ public static final String DEFAULT_INSETS = "3, 3, 3, 3"; public static final HorizontalAlignment DEFAULT_HORIZONTAL_ALIGNMENT = HorizontalAlignment.ALIGN_DEFAULT; public static final VerticalAlignment DEFAULT_VERTICAL_ALIGNMENT = VerticalAlignment.ALIGN_TOP; - public static final String DEFAULT_FILL = "java.awt.GridBagConstraints.BOTH"; + public static final String DEFAULT_FILL = "both"; public static final Integer DEFAULT_IPADX = 1; public static final Integer DEFAULT_IPADY = 1; public static final Double DEFAULT_WEIGHTX = 0.0; @@ -73,40 +73,40 @@ */ public TableHandler(GuixModelObject table) { for (AttributeDescriptor attr : table.getAttributeDescriptors()) { - if (attr.getName().equals("weightx")) { + if (attr.getName().equalsIgnoreCase("weightx")) { weightx = Double.valueOf(attr.getValue()); } - else if (attr.getName().equals("weighty")) { + else if (attr.getName().equalsIgnoreCase("weighty")) { weighty = Double.valueOf(attr.getValue()); } - else if (attr.getName().equals("ipadx")) { + else if (attr.getName().equalsIgnoreCase("ipadx")) { ipadx = Integer.valueOf(attr.getValue()); } - else if (attr.getName().equals("ipady")) { + else if (attr.getName().equalsIgnoreCase("ipady")) { ipady = Integer.valueOf(attr.getValue()); } - else if (attr.getName().equals("halign")) { + else if (attr.getName().equalsIgnoreCase("horizontalAlignment")) { horizontalAlignment = getHalign(attr.getValue()); if (horizontalAlignment == null) { if (log.isErrorEnabled()) { - log.error(table.getId() + "'s halign attribute has a wrong value : " + attr.getValue()); + log.error(table.getId() + "'s horizontalAlignment attribute has a wrong value : " + attr.getValue()); } horizontalAlignment = HorizontalAlignment.ALIGN_DEFAULT; } } - else if (attr.getName().equals("valign")) { + else if (attr.getName().equalsIgnoreCase("verticalAlignment")) { verticalAlignment = getValign(attr.getValue()); if (verticalAlignment == null) { if (log.isErrorEnabled()) { - log.error(table.getId() + "'s halign attribute has a wrong value : " + attr.getValue()); + log.error(table.getId() + "'s verticalAlignment attribute has a wrong value : " + attr.getValue()); } verticalAlignment = VerticalAlignment.ALIGN_TOP; } } - else if (attr.getName().equals("fill")) { + else if (attr.getName().equalsIgnoreCase("fill")) { fill = attr.getValue(); } - else if (attr.getName().equals("insets")) { + else if (attr.getName().equalsIgnoreCase("insets")) { insets = attr.getValue(); } } @@ -133,7 +133,7 @@ return fill; } - public void setFill(String fill) { + public void setFill (String fill) { this.fill = fill; } @@ -202,7 +202,7 @@ } return null; } - + /** * Creates a cell with the right column and generates the code to add it to the table * Modified: trunk/guix-compiler-gwt/src/main/java/org/nuiton/guix/tags/gwt/TextFieldHandler.java =================================================================== --- trunk/guix-compiler-gwt/src/main/java/org/nuiton/guix/tags/gwt/TextFieldHandler.java 2009-08-26 08:26:15 UTC (rev 1580) +++ trunk/guix-compiler-gwt/src/main/java/org/nuiton/guix/tags/gwt/TextFieldHandler.java 2009-08-26 08:26:37 UTC (rev 1581) @@ -17,7 +17,7 @@ * <http://www.gnu.org/licenses/lgpl-3.0.html>. ##%* */ package org.nuiton.guix.tags.gwt; -import com.google.gwt.user.client.ui.KeyboardListener; +import com.google.gwt.event.dom.client.KeyPressHandler; /** * Handles the Textfield tag @@ -41,6 +41,6 @@ @Override protected void configureProxyEventInfo() { super.configureProxyEventInfo(); - addProxyEventInfo("getText", KeyboardListener.class); + addProxyEventInfo("getText", KeyPressHandler.class); } } Modified: trunk/guix-compiler-gwt/src/main/java/org/nuiton/guix/tags/gwt/ToggleButtonHandler.java =================================================================== --- trunk/guix-compiler-gwt/src/main/java/org/nuiton/guix/tags/gwt/ToggleButtonHandler.java 2009-08-26 08:26:15 UTC (rev 1580) +++ trunk/guix-compiler-gwt/src/main/java/org/nuiton/guix/tags/gwt/ToggleButtonHandler.java 2009-08-26 08:26:37 UTC (rev 1581) @@ -18,7 +18,7 @@ */ package org.nuiton.guix.tags.gwt; -import com.google.gwt.user.client.ui.ClickListener; +import com.google.gwt.event.dom.client.ClickHandler; /** * Handles the ToggleButton tags @@ -40,6 +40,6 @@ @Override public void configureProxyEventInfo() { super.configureProxyEventInfo(); - addProxyEventInfo("isDown", ClickListener.class); + addProxyEventInfo("isDown", ClickHandler.class); } } Modified: trunk/guix-compiler-gwt/src/main/java/org/nuiton/guix/tags/gwt/TreeHandler.java =================================================================== --- trunk/guix-compiler-gwt/src/main/java/org/nuiton/guix/tags/gwt/TreeHandler.java 2009-08-26 08:26:15 UTC (rev 1580) +++ trunk/guix-compiler-gwt/src/main/java/org/nuiton/guix/tags/gwt/TreeHandler.java 2009-08-26 08:26:37 UTC (rev 1581) @@ -1,6 +1,6 @@ package org.nuiton.guix.tags.gwt; -import com.google.gwt.user.client.ui.TreeListener; +import com.google.gwt.event.logical.shared.SelectionHandler; /** * Handles the tree tag @@ -21,6 +21,6 @@ @Override protected void configureProxyEventInfo() { super.configureProxyEventInfo(); - addProxyEventInfo("getSelectedItem", TreeListener.class); + addProxyEventInfo("getSelectedItem", SelectionHandler.class); } }