]> source.dussan.org Git - vaadin-framework.git/commitdiff
"Force layout" -button added.
authorMarc Englund <marc.englund@itmill.com>
Tue, 2 Dec 2008 09:47:46 +0000 (09:47 +0000)
committerMarc Englund <marc.englund@itmill.com>
Tue, 2 Dec 2008 09:47:46 +0000 (09:47 +0000)
svn changeset:6063/svn branch:trunk

src/com/itmill/toolkit/terminal/gwt/client/IDebugConsole.java

index facc3f3b2ed767f9ad59090cdab3f624dd948310..c6464df23d8fd9e88e0bb667a03ec07f8448f1dd 100755 (executable)
@@ -42,6 +42,7 @@ public final class IDebugConsole extends IToolkitOverlay implements Console {
 
     private Button clear = new Button("Clear console");
     private Button restart = new Button("Restart app");
+    private Button forceLayout = new Button("Force layout");
     private HorizontalPanel actions;
     private boolean collapsed = false;
 
@@ -57,6 +58,8 @@ public final class IDebugConsole extends IToolkitOverlay implements Console {
 
     private int origLeft;
 
+    private ApplicationConnection client;
+
     private static final String help = "Drag=move, shift-drag=resize, doubleclick=min/max."
             + "Use debug=quiet to log only to browser console.";
 
@@ -64,6 +67,8 @@ public final class IDebugConsole extends IToolkitOverlay implements Console {
             ApplicationConfiguration cnf, boolean showWindow) {
         super(false, false);
 
+        this.client = client;
+
         panel = new FlowPanel();
         if (showWindow) {
             DOM.appendChild(getContainerElement(), caption);
@@ -89,6 +94,7 @@ public final class IDebugConsole extends IToolkitOverlay implements Console {
             actions = new HorizontalPanel();
             actions.add(clear);
             actions.add(restart);
+            actions.add(forceLayout);
 
             panel.add(actions);
 
@@ -127,6 +133,12 @@ public final class IDebugConsole extends IToolkitOverlay implements Console {
 
                 }
             });
+
+            forceLayout.addClickListener(new ClickListener() {
+                public void onClick(Widget sender) {
+                    IDebugConsole.this.client.forceLayout();
+                }
+            });
         }
 
         log("Toolkit application servlet version: " + cnf.getSerletVersion());