[kune-commits] r776 - in sandbox3: . src/main/java/org/op src/main/java/org/op/client src/main/java/org/op/public

vjrj vjrj at ourproject.org
Thu Jun 5 21:21:47 CEST 2008


Author: vjrj
Date: 2008-06-05 21:21:44 +0200 (Thu, 05 Jun 2008)
New Revision: 776

Added:
   sandbox3/src/main/java/org/op/client/FakeToolbar.java
Modified:
   sandbox3/pom.xml
   sandbox3/src/main/java/org/op/Sandbox.gwt.xml
   sandbox3/src/main/java/org/op/client/DefaultBorderLayout.java
   sandbox3/src/main/java/org/op/client/Entity.java
   sandbox3/src/main/java/org/op/client/EntitySummary.java
   sandbox3/src/main/java/org/op/client/EntityWorkspace.java
   sandbox3/src/main/java/org/op/client/SiteBar.java
   sandbox3/src/main/java/org/op/client/Workspace.java
   sandbox3/src/main/java/org/op/public/Sandbox.html
   sandbox3/src/main/java/org/op/public/sandbox.css
Log:
more tests

Modified: sandbox3/pom.xml
===================================================================
--- sandbox3/pom.xml	2008-06-05 18:17:41 UTC (rev 775)
+++ sandbox3/pom.xml	2008-06-05 19:21:44 UTC (rev 776)
@@ -49,7 +49,7 @@
         <configuration>
           <!-- <logLevel>INFO</logLevel> -->
           <!--<style>OBF</style>-->
-          <style>PRETTY</style>
+          <style>OBF</style>
           <runTarget>
             org.op.Sandbox/Sandbox.html
           </runTarget>
@@ -60,11 +60,10 @@
             <compileTarget>org.op.Sandbox</compileTarget>
           </compileTargets>
           <generatorRootClasses>
-            <value>com.calclab.emite.MyBean</value>
             <value>foo.pkg.MyBean2</value>
           </generatorRootClasses>
           <generatorDestinationPackage>
-            com.calclab.examplechat.EmiteUI
+            org.op.Sandbox
           </generatorDestinationPackage>
           <generateGettersAndSetters>true</generateGettersAndSetters>
           <generatePropertyChangeSupport>
@@ -100,13 +99,13 @@
     <dependency>
       <groupId>com.google.gwt</groupId>
       <artifactId>gwt-user</artifactId>
-      <version>0.0.2415</version>
+      <version>1.5.0</version>
       <scope>provided</scope>
     </dependency>
     <dependency>
       <groupId>com.google.gwt</groupId>
       <artifactId>gwt-servlet</artifactId>
-      <version>0.0.2415</version>
+      <version>1.5.0</version>
     </dependency>
 
     <!-- other -->
@@ -133,7 +132,7 @@
     <dependency>
       <groupId>com.gwtext</groupId>
       <artifactId>gwtext</artifactId>
-      <version>2.0.4-beta1</version>
+      <version>2.0.4-beta2</version>
     </dependency>
 
     <dependency>
@@ -142,6 +141,12 @@
       <version>0.0.4</version>
     </dependency>
 
+     <dependency>
+      <groupId>com.calclab.emite</groupId>
+      <artifactId>emite-modular</artifactId>
+      <version>0.2.4</version>
+    </dependency>
+
     <!--  TESTING -->
     <dependency>
       <groupId>junit</groupId>

Modified: sandbox3/src/main/java/org/op/Sandbox.gwt.xml
===================================================================
--- sandbox3/src/main/java/org/op/Sandbox.gwt.xml	2008-06-05 18:17:41 UTC (rev 775)
+++ sandbox3/src/main/java/org/op/Sandbox.gwt.xml	2008-06-05 19:21:44 UTC (rev 776)
@@ -12,6 +12,8 @@
   <stylesheet src="css/ext-all.css" />
   <stylesheet src="css/xtheme-gray.css" />
 
+  <stylesheet src="js/ext/resources/css/ext-all.css"/>
+  <stylesheet src="js/ext/resources/css/xtheme-gray.css"/>
   <stylesheet src="sandbox.css" />
 
   <inherits name="com.allen_sauer.gwt.log.gwt-log" />

Modified: sandbox3/src/main/java/org/op/client/DefaultBorderLayout.java
===================================================================
--- sandbox3/src/main/java/org/op/client/DefaultBorderLayout.java	2008-06-05 18:17:41 UTC (rev 775)
+++ sandbox3/src/main/java/org/op/client/DefaultBorderLayout.java	2008-06-05 19:21:44 UTC (rev 776)
@@ -12,7 +12,7 @@
 public class DefaultBorderLayout {
 
     public enum Position {
-        north, center, south, east, west
+        NORTH, CENTER, SOUTH, EAST, WEST
     }
 
     protected static final int DEF_TOOLBAR_HEIGHT = 22;
@@ -48,12 +48,12 @@
         }
         if (size != NO_SIZE) {
             switch (position) {
-            case north:
-            case south:
+            case NORTH:
+            case SOUTH:
                 panel.setHeight(size);
                 break;
-            case east:
-            case west:
+            case EAST:
+            case WEST:
                 panel.setWidth(size);
             }
         }

Modified: sandbox3/src/main/java/org/op/client/Entity.java
===================================================================
--- sandbox3/src/main/java/org/op/client/Entity.java	2008-06-05 18:17:41 UTC (rev 775)
+++ sandbox3/src/main/java/org/op/client/Entity.java	2008-06-05 19:21:44 UTC (rev 776)
@@ -15,9 +15,9 @@
         entityWorkspace = new EntityWorkspace();
         super.setCls("entity");
 
-        add(entityMainHeader, DefaultBorderLayout.Position.north, 65);
-        add(entityWorkspace.getPanel(), DefaultBorderLayout.Position.center);
-        add(entitySummary.getPanel(), DefaultBorderLayout.Position.east, true, 150);
+        add(entityMainHeader, DefaultBorderLayout.Position.NORTH, 65);
+        add(entityWorkspace.getPanel(), DefaultBorderLayout.Position.CENTER);
+        add(entitySummary.getPanel(), DefaultBorderLayout.Position.EAST, true, 150);
     }
 
     public EntityWorkspace getEntityWorkspace() {

Modified: sandbox3/src/main/java/org/op/client/EntitySummary.java
===================================================================
--- sandbox3/src/main/java/org/op/client/EntitySummary.java	2008-06-05 18:17:41 UTC (rev 775)
+++ sandbox3/src/main/java/org/op/client/EntitySummary.java	2008-06-05 19:21:44 UTC (rev 776)
@@ -16,7 +16,7 @@
         // separator.setBorder(false);
         // entitySummary.setCls("entity-separator");
 
-        add(entitySummary, DefaultBorderLayout.Position.center);
+        add(entitySummary, DefaultBorderLayout.Position.CENTER);
         // add(separator, DefaultBorderLayout.Position.west, 3);
     }
 }

Modified: sandbox3/src/main/java/org/op/client/EntityWorkspace.java
===================================================================
--- sandbox3/src/main/java/org/op/client/EntityWorkspace.java	2008-06-05 18:17:41 UTC (rev 775)
+++ sandbox3/src/main/java/org/op/client/EntityWorkspace.java	2008-06-05 19:21:44 UTC (rev 776)
@@ -11,9 +11,11 @@
 
 public class EntityWorkspace extends DefaultBorderLayout {
     private static final String SAMPLE_COLOR = "blue";
-    private final Toolbar contentTopBar;
-    private final Toolbar containerTopBar;
+    private final FakeToolbar contentTopBar;
+    private final FakeToolbar containerTopBar;
+    @SuppressWarnings("unused")
     private final Toolbar contentBottomBar;
+    @SuppressWarnings("unused")
     private final Toolbar containerBottomBar;
     private final Panel container;
     private final Panel content;
@@ -50,6 +52,8 @@
         titles.add(roundedTitle, new AnchorLayoutData("100% -" + DEF_TOOLBAR_HEIGHT));
         titles.add(subTitle, new AnchorLayoutData("100% -" + DEF_TOOLBAR_HEIGHT));
 
+        DefaultBorderLayout contentWrap = new DefaultBorderLayout();
+        DefaultBorderLayout containerWrap = new DefaultBorderLayout();
         content = new Panel();
         container = new Panel();
         container.setCollapsible(true);
@@ -61,19 +65,23 @@
         bottomPanel.setLayout(new AnchorLayout());
         bottomPanel.add(roundedBottom, new AnchorLayoutData("100% -" + DEF_TOOLBAR_HEIGHT));
 
-        contentTopBar = createTopBar(content);
-        containerTopBar = createTopBar(container);
+        contentTopBar = new FakeToolbar();
+        containerTopBar = new FakeToolbar();
+        contentWrap.add(contentTopBar.getPanel(), Position.NORTH, false, DEF_TOOLBAR_HEIGHT);
+        containerWrap.add(containerTopBar.getPanel(), Position.NORTH, false, DEF_TOOLBAR_HEIGHT);
+        contentWrap.add(content, Position.CENTER);
+        containerWrap.add(container, Position.CENTER);
         contentBottomBar = createBottomBar(content);
         containerBottomBar = createBottomBar(container);
 
-        add(titles, DefaultBorderLayout.Position.north, DEF_TOOLBAR_HEIGHT * 2);
-        add(content, DefaultBorderLayout.Position.center);
-        add(container, DefaultBorderLayout.Position.east, true, 175);
-        add(bottomPanel, DefaultBorderLayout.Position.south, DEF_TOOLBAR_HEIGHT);
+        add(titles, DefaultBorderLayout.Position.NORTH, DEF_TOOLBAR_HEIGHT * 2);
+        add(contentWrap.getPanel(), DefaultBorderLayout.Position.CENTER);
+        add(containerWrap.getPanel(), DefaultBorderLayout.Position.EAST, true, 175);
+        add(bottomPanel, DefaultBorderLayout.Position.SOUTH, DEF_TOOLBAR_HEIGHT);
     }
 
     public void addItemToContentTopBar(final View view) {
-        contentTopBar.addElement(((Widget) view).getElement());
+        contentTopBar.add((Widget) view);
     }
 
     public void setBottom(final View view) {

Added: sandbox3/src/main/java/org/op/client/FakeToolbar.java
===================================================================
--- sandbox3/src/main/java/org/op/client/FakeToolbar.java	2008-06-05 18:17:41 UTC (rev 775)
+++ sandbox3/src/main/java/org/op/client/FakeToolbar.java	2008-06-05 19:21:44 UTC (rev 776)
@@ -0,0 +1,50 @@
+package org.op.client;
+
+import com.google.gwt.user.client.ui.Label;
+import com.google.gwt.user.client.ui.Widget;
+import com.gwtext.client.widgets.Panel;
+import com.gwtext.client.widgets.layout.FitLayout;
+
+public class FakeToolbar {
+    private final Panel container;
+
+    // private final Panel horPanel;
+
+    public FakeToolbar() {
+        container = new Panel();
+        container.setLayout(new FitLayout());
+        container.setBorder(false);
+        container.setHeight(DefaultBorderLayout.DEF_TOOLBAR_HEIGHT);
+        container.setWidth("100%");
+        container.setCls("x-toolbar");
+        // x-panel-tbar x-panel-tbar-noheader
+        container.setCls("x-panel-tbar");
+        // container.setCls("x-panel-tbar-noheader");
+        // container.setCls("x-panel-header");
+        // container.setCls("x-panel-header-noborder");
+        // container.setCls("x-unselectable");
+        // horPanel = new Panel();
+        // horPanel.setLayout(new HorizontalLayout(3));
+        // horPanel.setBorder(false);
+        // horPanel.setCls("x-toolbar");
+        // horPanel.setHeight(DefaultBorderLayout.DEF_TOOLBAR_HEIGHT);
+        // horPanel.setWidth("100%");
+        container.add(new Label("testkk"));
+        // container.add(horPanel);
+        // <div class="x-toolbar x-small-editor" id="ext-gen74" style="height:
+        // 17px;"><table cellspacing="0"><tbody><tr/></tbody></table></div>
+
+    }
+
+    public void add(final Widget widget) {
+        // horPanel.add(widget);
+        if (container.isRendered()) {
+            container.doLayout(true);
+        }
+    }
+
+    public Panel getPanel() {
+        return container;
+    }
+
+}

Modified: sandbox3/src/main/java/org/op/client/SiteBar.java
===================================================================
--- sandbox3/src/main/java/org/op/client/SiteBar.java	2008-06-05 18:17:41 UTC (rev 775)
+++ sandbox3/src/main/java/org/op/client/SiteBar.java	2008-06-05 19:21:44 UTC (rev 776)
@@ -2,6 +2,7 @@
 
 import org.ourproject.kune.platf.client.View;
 
+import com.google.gwt.user.client.ui.Label;
 import com.gwtext.client.widgets.Panel;
 
 public class SiteBar extends DefaultBorderLayout {
@@ -12,9 +13,9 @@
         rightPanel = createDefPanel();
         // rightPanel.setAutoWidth(true);
         Panel centerPanel = createDefPanel();
-        add(centerPanel, Position.center);
-        add(rightPanel, Position.east);
-
+        add(centerPanel, Position.CENTER);
+        add(rightPanel, Position.EAST);
+        rightPanel.add(new Label("Site"));
     }
 
     public void add(final View view) {
@@ -26,7 +27,7 @@
         // panel.setLayout(new HorizontalLayout(3));
         panel.setAutoWidth(true);
         panel.setHeight(DEF_TOOLBAR_HEIGHT);
-        // panel.setBorder(false);
+        panel.setBorder(false);
         return panel;
     }
 }

Modified: sandbox3/src/main/java/org/op/client/Workspace.java
===================================================================
--- sandbox3/src/main/java/org/op/client/Workspace.java	2008-06-05 18:17:41 UTC (rev 775)
+++ sandbox3/src/main/java/org/op/client/Workspace.java	2008-06-05 19:21:44 UTC (rev 776)
@@ -7,8 +7,8 @@
     public Workspace() {
         sitebar = new SiteBar();
         entity = new Entity();
-        add(sitebar.getPanel(), DefaultBorderLayout.Position.north, DEF_TOOLBAR_HEIGHT);
-        add(entity.getPanel(), DefaultBorderLayout.Position.center);
+        add(sitebar.getPanel(), DefaultBorderLayout.Position.NORTH, DEF_TOOLBAR_HEIGHT);
+        add(entity.getPanel(), DefaultBorderLayout.Position.CENTER);
     }
 
     public EntityWorkspace getEntityWorkspace() {

Modified: sandbox3/src/main/java/org/op/public/Sandbox.html
===================================================================
--- sandbox3/src/main/java/org/op/public/Sandbox.html	2008-06-05 18:17:41 UTC (rev 775)
+++ sandbox3/src/main/java/org/op/public/Sandbox.html	2008-06-05 19:21:44 UTC (rev 776)
@@ -16,7 +16,7 @@
     <!--                                           -->
     <!-- Any title is fine                         -->
     <!--                                           -->
-    <title>Wrapper HTML for Sandbox</title>
+    <title>Wrapper HTML for Sandbox 3</title>
 
     <!--                                           -->
     <!-- Use normal html, such as style            -->
@@ -34,9 +34,10 @@
     <!-- If you add any GWT meta tags, they must   -->
     <!-- be added before this line.                -->
     <!--                                           -->
-
+<!--
     <link rel="stylesheet" type="text/css" href="js/ext/resources/css/ext-all.css"/>
     <link id="theme" rel="stylesheet" type="text/css" href="js/ext/resources/css/xtheme-gray.css"/>
+ -->
 
     <script type="text/javascript" language="javascript" src="org.op.Sandbox.nocache.js"></script>
   </head>
@@ -61,7 +62,7 @@
       without starting from scratch.
     </p>
  -->
-    <table>
+    <table summary="">
     <tr>
       <td id="slot1"></td>
       <td id="slot2"></td>

Modified: sandbox3/src/main/java/org/op/public/sandbox.css
===================================================================
--- sandbox3/src/main/java/org/op/public/sandbox.css	2008-06-05 18:17:41 UTC (rev 775)
+++ sandbox3/src/main/java/org/op/public/sandbox.css	2008-06-05 19:21:44 UTC (rev 776)
@@ -2,6 +2,7 @@
 
 .toolbar-transparent {
   background: #EFEFEF none repeat scroll 0% 50%;
+  border-top: 0px;
 }
 
 .entity .x-layout-split {




More information about the kune-commits mailing list