]> source.dussan.org Git - vaadin-framework.git/commitdiff
-Loading throbbers should now be cleared after updates (all three timers).
authorJouni Koivuviita <jouni.koivuviita@itmill.com>
Mon, 10 Dec 2007 13:26:46 +0000 (13:26 +0000)
committerJouni Koivuviita <jouni.koivuviita@itmill.com>
Mon, 10 Dec 2007 13:26:46 +0000 (13:26 +0000)
-ITwinColSelect won't wrap elements anymore.
-ITree won't wrap it's texts anymore.

svn changeset:3202/svn branch:trunk

src/com/itmill/toolkit/terminal/gwt/client/ApplicationConnection.java
src/com/itmill/toolkit/terminal/gwt/client/ui/ITwinColSelect.java
src/com/itmill/toolkit/terminal/gwt/public/default/tree/tree.css

index 923dbab3d6282f752f37f0d596e086edbf92e063..0ca9967421d6794e9bfda7aae3e663a9ce4c45b7 100755 (executable)
@@ -52,6 +52,8 @@ public class ApplicationConnection {
     private ContextMenu contextMenu = null;
 
     private Timer loadTimer;
+    private Timer loadTimer2;
+    private Timer loadTimer3;
     private Element loadElement;
 
     private final IView view;
@@ -161,23 +163,23 @@ public class ApplicationConnection {
                                 + "px");
 
                 // Initialize other timers
-                final Timer delay = new Timer() {
+                loadTimer2 = new Timer() {
                     public void run() {
                         DOM.setElementProperty(loadElement, "className",
                                 "i-loading-indicator-delay");
                     }
                 };
                 // Second one kicks in at 1500ms
-                delay.schedule(1200);
+                loadTimer2.schedule(1200);
 
-                final Timer wait = new Timer() {
+                loadTimer3 = new Timer() {
                     public void run() {
                         DOM.setElementProperty(loadElement, "className",
                                 "i-loading-indicator-wait");
                     }
                 };
                 // Third one kicks in at 5000ms
-                wait.schedule(4700);
+                loadTimer3.schedule(4700);
             }
         };
         // First one kicks in at 300ms
@@ -187,6 +189,10 @@ public class ApplicationConnection {
     private void hideLoadingIndicator() {
         if (loadTimer != null) {
             loadTimer.cancel();
+            if(loadTimer2 != null) {
+                loadTimer2.cancel();
+                loadTimer3.cancel();
+            }
         }
         if (loadElement != null) {
             DOM.setStyleAttribute(loadElement, "display", "none");
index 31ec923f162c98f2b1b99c35135731cf8abb9167..de4165719ff8c2f0f2bca33be1d03b4b5dedb5ad 100644 (file)
@@ -19,8 +19,8 @@ public class ITwinColSelect extends IOptionGroupBase {
     private static final String CLASSNAME = "i-select-twincol";\r
 \r
     private static final int VISIBLE_COUNT = 10;\r
-\r
-    private static final String DEFAULT_WIDTH = "10em";\r
+    \r
+    private static final int DEFAULT_COLUMN_COUNT = 10;\r
 \r
     private final ListBox options;\r
 \r
@@ -83,9 +83,11 @@ public class ITwinColSelect extends IOptionGroupBase {
         if (getColumns() > 0) {\r
             options.setWidth(getColumns() + "em");\r
             selections.setWidth(getColumns() + "em");\r
+            optionsContainer.setWidth((getColumns()*2 + 3) + "em");\r
         } else {\r
-            options.setWidth(DEFAULT_WIDTH);\r
-            selections.setWidth(DEFAULT_WIDTH);\r
+            options.setWidth(DEFAULT_COLUMN_COUNT + "em");\r
+            selections.setWidth(DEFAULT_COLUMN_COUNT + "em");\r
+            optionsContainer.setWidth((DEFAULT_COLUMN_COUNT*2 + 2) + "em");\r
         }\r
         if (getRows() > 0) {\r
             options.setVisibleItemCount(getRows());\r
index c3382b7ffe52ba44319118ad538c4e18c10fade8..f627e082c3558fbee11045b17a86e571901eb3b7 100644 (file)
@@ -13,6 +13,7 @@
 .i-tree-node span {
        padding: 0 2px;
        cursor: pointer;
+       white-space: nowrap;
 }
 .i-tree-node-selected span {
        background: #5daee8;