Reviewers: rdayal,

Description:
HorizontalSplitPanel should use ScheduledCommand instead of Command
Resubmitting issue 1694803
Thanks Patrick!


Please review this at http://gwt-code-reviews.appspot.com/1718803/

Affected files:
  M user/src/com/google/gwt/user/client/ui/HorizontalSplitPanel.java


Index: user/src/com/google/gwt/user/client/ui/HorizontalSplitPanel.java
===================================================================
--- user/src/com/google/gwt/user/client/ui/HorizontalSplitPanel.java (revision 10982) +++ user/src/com/google/gwt/user/client/ui/HorizontalSplitPanel.java (working copy)
@@ -16,13 +16,13 @@
 package com.google.gwt.user.client.ui;

 import com.google.gwt.core.client.GWT;
+import com.google.gwt.core.client.Scheduler;
+import com.google.gwt.core.client.Scheduler.ScheduledCommand;
 import com.google.gwt.i18n.client.LocaleInfo;
 import com.google.gwt.resources.client.ClientBundle;
 import com.google.gwt.resources.client.ImageResource;
 import com.google.gwt.safehtml.shared.SafeHtmlBuilder;
-import com.google.gwt.user.client.Command;
 import com.google.gwt.user.client.DOM;
-import com.google.gwt.user.client.DeferredCommand;
 import com.google.gwt.user.client.Element;
 import com.google.gwt.user.client.Timer;

@@ -301,8 +301,7 @@
           // If one tries to set the width of the LEFT element to
           // before layout completes, the RIGHT element will
           // appear to be blanked out.
-
-          DeferredCommand.addCommand(new Command() {
+          Scheduler.get().scheduleDeferred(new ScheduledCommand() {
             public void execute() {
               setWidth(panel.getElement(LEFT), "0px");
             }
@@ -579,7 +578,7 @@
      * possible.
      */
     setSplitPosition(lastSplitPosition);
-    DeferredCommand.addCommand(new Command() {
+    Scheduler.get().scheduleDeferred(new ScheduledCommand() {
       public void execute() {
         setSplitPosition(lastSplitPosition);
       }


--
http://groups.google.com/group/Google-Web-Toolkit-Contributors

Reply via email to