[kune-commits] r1472 - in trunk: script src/main/java/cc/kune/core/client/dnd src/main/java/cc/kune/core/public src/main/java/cc/kune/gspace/client

Vicente J. Ruiz Jurado vjrj_ at ourproject.org
Fri Jul 29 03:24:35 CEST 2011


Author: vjrj_
Date: 2011-07-29 03:24:35 +0200 (Fri, 29 Jul 2011)
New Revision: 1472

Modified:
   trunk/script/css-update.sh
   trunk/src/main/java/cc/kune/core/client/dnd/KuneDragController.java
   trunk/src/main/java/cc/kune/core/public/ws.css
   trunk/src/main/java/cc/kune/core/public/ws.html
   trunk/src/main/java/cc/kune/gspace/client/GSpaceArmor.java
   trunk/src/main/java/cc/kune/gspace/client/GSpaceArmorImpl.java
   trunk/src/main/java/cc/kune/gspace/client/GSpaceArmorImpl.ui.xml
Log:
CLOSED - # 76: RootPanel setSize for drag and d. arise height problems in chrommium 
http://kune.ourproject.org/issues/ticket/76

Modified: trunk/script/css-update.sh
===================================================================
--- trunk/script/css-update.sh	2011-07-28 23:36:39 UTC (rev 1471)
+++ trunk/script/css-update.sh	2011-07-29 01:24:35 UTC (rev 1472)
@@ -9,7 +9,7 @@
 #rsync -aC $APPPUB/css/ $WEBAPP/css
 #rsync -aC $APPPUB/images/ $WEBAPP/images
 
-VERSION=0.0.8
+VERSION=0.1.0-SNAPSHOT
 
 cp src/main/java/cc/kune/chat/public/kune-chat.css target/kune-$VERSION/ws/
 cp src/main/java/cc/kune/chat/public/kune-hablar.css target/kune-$VERSION/ws/

Modified: trunk/src/main/java/cc/kune/core/client/dnd/KuneDragController.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/dnd/KuneDragController.java	2011-07-28 23:36:39 UTC (rev 1471)
+++ trunk/src/main/java/cc/kune/core/client/dnd/KuneDragController.java	2011-07-29 01:24:35 UTC (rev 1472)
@@ -1,5 +1,7 @@
 package cc.kune.core.client.dnd;
 
+import cc.kune.gspace.client.GSpaceArmor;
+
 import com.allen_sauer.gwt.dnd.client.PickupDragController;
 import com.google.gwt.core.client.Scheduler;
 import com.google.gwt.core.client.Scheduler.ScheduledCommand;
@@ -7,11 +9,17 @@
 import com.google.gwt.event.logical.shared.ResizeHandler;
 import com.google.gwt.user.client.Window;
 import com.google.gwt.user.client.ui.RootPanel;
+import com.google.gwt.user.client.ui.Widget;
+import com.google.inject.Inject;
 
 public class KuneDragController extends PickupDragController {
 
-  public KuneDragController() {
+  private final Widget mainPanel;
+
+  @Inject
+  public KuneDragController(final GSpaceArmor armor) {
     super(RootPanel.get(), false);
+    mainPanel = (Widget) armor.getMainpanel();
     setBehaviorDragProxy(true);
     setBehaviorMultipleSelection(false);
     setBehaviorScrollIntoView(false);
@@ -20,18 +28,11 @@
 
       @Override
       public void onResize(final ResizeEvent event) {
-        final int width = event.getWidth();
-        final int height = event.getHeight();
-        setRootPanelSize(width, height);
+        setRootPanelSize();
       }
 
     });
-    Scheduler.get().scheduleDeferred(new ScheduledCommand() {
-      @Override
-      public void execute() {
-        setRootPanelSize(Window.getClientWidth(), Window.getClientHeight());
-      }
-    });
+    setRootPanelSize();
   }
 
   @Override
@@ -40,8 +41,14 @@
     clearSelection();
   }
 
-  private void setRootPanelSize(final int width, final int height) {
-    RootPanel.get().setPixelSize(width, height);
+  private void setRootPanelSize() {
+    Scheduler.get().scheduleDeferred(new ScheduledCommand() {
+      @Override
+      public void execute() {
+        // - 100 because of problems in chrommium (issue #76), not needed in ff
+        RootPanel.get().setPixelSize(mainPanel.getOffsetWidth(), mainPanel.getOffsetHeight() - 100);
+      }
+    });
   }
 
 }

Modified: trunk/src/main/java/cc/kune/core/public/ws.css
===================================================================
--- trunk/src/main/java/cc/kune/core/public/ws.css	2011-07-28 23:36:39 UTC (rev 1471)
+++ trunk/src/main/java/cc/kune/core/public/ws.css	2011-07-29 01:24:35 UTC (rev 1472)
@@ -1,4 +1,6 @@
-CHARSET              "UTF-8             "; body {
+CHARSET              "UTF-8             ";
+
+body {
   background-color: transparent;
   color: black;
   font-family: 'Ubuntu', Arial;

Modified: trunk/src/main/java/cc/kune/core/public/ws.html
===================================================================
--- trunk/src/main/java/cc/kune/core/public/ws.html	2011-07-28 23:36:39 UTC (rev 1471)
+++ trunk/src/main/java/cc/kune/core/public/ws.html	2011-07-29 01:24:35 UTC (rev 1472)
@@ -62,6 +62,7 @@
 <script type="text/javascript" src="http://wave.google.com/gadgets/js/core:rpc.js?c=1"></script>
 
 <style type="text/css">
+
 body {
   background-color: white;
   color: black;

Modified: trunk/src/main/java/cc/kune/gspace/client/GSpaceArmor.java
===================================================================
--- trunk/src/main/java/cc/kune/gspace/client/GSpaceArmor.java	2011-07-28 23:36:39 UTC (rev 1471)
+++ trunk/src/main/java/cc/kune/gspace/client/GSpaceArmor.java	2011-07-29 01:24:35 UTC (rev 1472)
@@ -22,6 +22,7 @@
 import cc.kune.common.client.actions.ui.IsActionExtensible;
 
 import com.google.gwt.user.client.ui.InsertPanel.ForIsWidget;
+import com.google.gwt.user.client.ui.IsWidget;
 import com.google.gwt.user.client.ui.SimplePanel;
 
 public interface GSpaceArmor {
@@ -52,6 +53,8 @@
 
   IsActionExtensible getHeaderToolbar();
 
+  IsWidget getMainpanel();
+
   SimplePanel getPublicSpace();
 
   ForIsWidget getSitebar();

Modified: trunk/src/main/java/cc/kune/gspace/client/GSpaceArmorImpl.java
===================================================================
--- trunk/src/main/java/cc/kune/gspace/client/GSpaceArmorImpl.java	2011-07-28 23:36:39 UTC (rev 1471)
+++ trunk/src/main/java/cc/kune/gspace/client/GSpaceArmorImpl.java	2011-07-29 01:24:35 UTC (rev 1472)
@@ -35,6 +35,7 @@
 import com.google.gwt.user.client.ui.DockLayoutPanel;
 import com.google.gwt.user.client.ui.FlowPanel;
 import com.google.gwt.user.client.ui.InsertPanel.ForIsWidget;
+import com.google.gwt.user.client.ui.IsWidget;
 import com.google.gwt.user.client.ui.RootPanel;
 import com.google.gwt.user.client.ui.ScrollPanel;
 import com.google.gwt.user.client.ui.SimplePanel;
@@ -75,7 +76,7 @@
   @UiField
   FlowPanel entityToolsNorth;
   @UiField
-  VerticalPanel entityToolsSouth;
+  FlowPanel entityToolsSouth;
   private final ActionFlowPanel footerToolbar;
   @UiField
   SplitLayoutPanel groupSpace;
@@ -194,6 +195,11 @@
   }
 
   @Override
+  public IsWidget getMainpanel() {
+    return mainpanel;
+  }
+
+  @Override
   public SimplePanel getPublicSpace() {
     return publicSpace;
   }

Modified: trunk/src/main/java/cc/kune/gspace/client/GSpaceArmorImpl.ui.xml
===================================================================
--- trunk/src/main/java/cc/kune/gspace/client/GSpaceArmorImpl.ui.xml	2011-07-28 23:36:39 UTC (rev 1471)
+++ trunk/src/main/java/cc/kune/gspace/client/GSpaceArmorImpl.ui.xml	2011-07-29 01:24:35 UTC (rev 1472)
@@ -99,8 +99,7 @@
                 </g:FlowPanel>
                 </g:center>
                 <g:south size="98">
-                  <g:VerticalPanel width="100%"
-                    styleName="{res.style.entityToolsSouth}" ui:field="entityToolsSouth"></g:VerticalPanel>
+                  <g:FlowPanel styleName="{res.style.entityToolsSouth}" ui:field="entityToolsSouth" width="100%" />
                 </g:south>
               </g:DockLayoutPanel>
             </g:west>




More information about the kune-commits mailing list