]> source.dussan.org Git - vaadin-framework.git/commitdiff
Ported TkTable from GWT 1.4 to 1.3
authorJoonas Lehtinen <joonas.lehtinen@itmill.com>
Wed, 13 Jun 2007 11:57:55 +0000 (11:57 +0000)
committerJoonas Lehtinen <joonas.lehtinen@itmill.com>
Wed, 13 Jun 2007 11:57:55 +0000 (11:57 +0000)
svn changeset:1692/svn branch:trunk

src/com/itmill/toolkit/terminal/gwt/client/ui/TkTable.java

index 9c6b90157c87a299c9aed1cfa6b2c874f44c078c..d788c266c78aa53c582194e5a4016d89ba71e8e2 100644 (file)
@@ -90,7 +90,7 @@ public class TkTable extends Composite implements Paintable {
                updateBody(rowData);
                
                if(!colWidthsInitialized) {
-                       DeferredCommand.addCommand(new Command() {
+                       DeferredCommand.add(new Command() {
                                public void execute() {
                                        initSize();
                                        updateSpacers();
@@ -114,7 +114,7 @@ public class TkTable extends Composite implements Paintable {
                        int colIndex = getColIndexByKey(cid);
                        if(colIndex > -1)
                                setHeaderText(colIndex, col.getStringAttribute("caption"));
-                       DOM.setElementProperty(tHead.getFlexCellFormatter().getElement(0, colIndex), "cid", cid);
+                       DOM.setAttribute(tHead.getFlexCellFormatter().getElement(0, colIndex), "cid", cid);
                }
        }
        
@@ -161,7 +161,7 @@ public class TkTable extends Composite implements Paintable {
        }
        
        private String getColKeyByIndex(int index) {
-               return DOM.getElementProperty(tHead.getCellFormatter().getElement(0, index), "cid");
+               return DOM.getAttribute(tHead.getCellFormatter().getElement(0, index), "cid");
        }
 
        public void setHeaderText(int colIndex, String text) {
@@ -190,8 +190,8 @@ public class TkTable extends Composite implements Paintable {
                for (int i = 0; i < cols; i++) {
                        Element hCell = hf.getElement(0, i);
                        Element bCell = bf.getElement(1, i);
-                       int hw = DOM.getElementPropertyInt(hCell, "offsetWidth");
-                       int cw = DOM.getElementPropertyInt(bCell, "offsetWidth");
+                       int hw = DOM.getIntAttribute(hCell, "offsetWidth");
+                       int cw = DOM.getIntAttribute(bCell, "offsetWidth");
                        setColWidth(i , hw > cw ? hw : cw);
                }