[kune-commits] r769 - in sandbox4: . src/main/java/org/op/client

vjrj vjrj at ourproject.org
Fri May 30 17:20:25 CEST 2008


Author: vjrj
Date: 2008-05-30 17:20:21 +0200 (Fri, 30 May 2008)
New Revision: 769

Removed:
   sandbox4/src/main/java/org/op/client/TestBorderLayout.java
Modified:
   sandbox4/pom.xml
   sandbox4/src/main/java/org/op/client/BasicDialogExtended.java
   sandbox4/src/main/java/org/op/client/BasicDialogForm.java
   sandbox4/src/main/java/org/op/client/DefaultBorderLayout.java
   sandbox4/src/main/java/org/op/client/DefaultPanel.java
   sandbox4/src/main/java/org/op/client/DefaultTabbedForm.java
   sandbox4/src/main/java/org/op/client/Entity.java
   sandbox4/src/main/java/org/op/client/EntitySummary.java
   sandbox4/src/main/java/org/op/client/EntityWorkspace.java
   sandbox4/src/main/java/org/op/client/Sandbox.java
   sandbox4/src/main/java/org/op/client/Sandbox2.java
   sandbox4/src/main/java/org/op/client/SandboxCollapse.java
Log:
gxt 1.0beta3 sandbox tests (not working with gwt1.5rc and with gwt1.5M2 better than beta2 but it's not ready to use) 

Modified: sandbox4/pom.xml
===================================================================
--- sandbox4/pom.xml	2008-05-14 01:29:09 UTC (rev 768)
+++ sandbox4/pom.xml	2008-05-30 15:20:21 UTC (rev 769)
@@ -100,13 +100,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 -->
@@ -127,7 +127,7 @@
     <dependency>
       <groupId>com.extjs</groupId>
       <artifactId>gxt</artifactId>
-      <version>1.0-beta2</version>
+      <version>1.0-beta3</version>
     </dependency>
 
     <dependency>

Modified: sandbox4/src/main/java/org/op/client/BasicDialogExtended.java
===================================================================
--- sandbox4/src/main/java/org/op/client/BasicDialogExtended.java	2008-05-14 01:29:09 UTC (rev 768)
+++ sandbox4/src/main/java/org/op/client/BasicDialogExtended.java	2008-05-30 15:20:21 UTC (rev 769)
@@ -61,8 +61,9 @@
     }
 
     @Override
-    public void add(final Widget widget) {
-        super.add(widget);
+    public boolean add(final Widget widget) {
+        boolean value = super.add(widget);
         super.renderIfNeeded();
+        return value;
     }
 }

Modified: sandbox4/src/main/java/org/op/client/BasicDialogForm.java
===================================================================
--- sandbox4/src/main/java/org/op/client/BasicDialogForm.java	2008-05-14 01:29:09 UTC (rev 768)
+++ sandbox4/src/main/java/org/op/client/BasicDialogForm.java	2008-05-30 15:20:21 UTC (rev 769)
@@ -33,14 +33,13 @@
         // formPanel.setLayout(new FillLayout(10));
         // formPanel.setFrame(true);
         formPanel.setBorders(false);
-        formPanel.setBorder(false);
         formPanel.setHeaderVisible(false);
         formPanel.setScrollMode(scroll);
         formPanel.setLabelWidth(100);
         formPanel.setWidth(width - 10);
     }
 
-    public void addField(final Field field) {
+    public void addField(final Field<?> field) {
         field.setValidateOnBlur(false);
         formPanel.add(field);
         renderIfNeeded();

Modified: sandbox4/src/main/java/org/op/client/DefaultBorderLayout.java
===================================================================
--- sandbox4/src/main/java/org/op/client/DefaultBorderLayout.java	2008-05-14 01:29:09 UTC (rev 768)
+++ sandbox4/src/main/java/org/op/client/DefaultBorderLayout.java	2008-05-30 15:20:21 UTC (rev 769)
@@ -3,7 +3,7 @@
 import com.extjs.gxt.ui.client.Style.LayoutRegion;
 import com.extjs.gxt.ui.client.util.Margins;
 import com.extjs.gxt.ui.client.widget.Component;
-import com.extjs.gxt.ui.client.widget.Container;
+import com.extjs.gxt.ui.client.widget.LayoutContainer;
 import com.extjs.gxt.ui.client.widget.layout.BorderLayout;
 import com.extjs.gxt.ui.client.widget.layout.BorderLayoutData;
 import com.extjs.gxt.ui.client.widget.layout.FitLayout;
@@ -20,10 +20,10 @@
     private static final int NO_SIZE = -1;
     private static LayoutRegion[] regionPositions = new LayoutRegion[] { LayoutRegion.NORTH, LayoutRegion.CENTER,
             LayoutRegion.SOUTH, LayoutRegion.EAST, LayoutRegion.WEST };
-    private final Container<DefaultPanel> container;
+    private final LayoutContainer container;
 
     public DefaultBorderLayout() {
-        container = new Container<DefaultPanel>();
+        container = new LayoutContainer();
         container.setData("layout", new FitLayout());
         container.setLayout(new BorderLayout());
         container.setBorders(false);
@@ -31,7 +31,7 @@
 
     public Component getPanel() {
         return container;
-    }
+    };
 
     public void setStyleName(final String style) {
         container.setStyleName(style);
@@ -54,28 +54,29 @@
         } else {
             borderLayoutData = new BorderLayoutData(regionPosition);
         }
-        borderLayoutData.split = split;
-        borderLayoutData.collapsible = collapsible;
+        borderLayoutData.setSplit(split);
+        borderLayoutData.setCollapsible(collapsible);
         if (split) {
-            borderLayoutData.collapseMode = "mini";
+            // Not implemented yet:
+            // borderLayoutData.collapseMode = "mini";
             switch (position) {
             case EAST:
-                borderLayoutData.margins = new Margins(0, 0, 0, 5);
+                borderLayoutData.setMargins(new Margins(0, 0, 0, 5));
                 break;
             case WEST:
-                borderLayoutData.margins = new Margins(0, 5, 0, 0);
+                borderLayoutData.setMargins(new Margins(0, 5, 0, 0));
                 break;
             case NORTH:
-                borderLayoutData.margins = new Margins(0, 0, 5, 0);
+                borderLayoutData.setMargins(new Margins(0, 0, 5, 0));
                 break;
             case SOUTH:
-                borderLayoutData.margins = new Margins(5, 0, 0, 0);
+                borderLayoutData.setMargins(new Margins(5, 0, 0, 0));
                 break;
             default:
                 break;
             }
         } else {
-            borderLayoutData.margins = new Margins(0, 0, 0, 0);
+            borderLayoutData.setMargins(new Margins(0, 0, 0, 0));
         }
         container.add(panel, borderLayoutData);
         doLayoutIfNeeded();

Modified: sandbox4/src/main/java/org/op/client/DefaultPanel.java
===================================================================
--- sandbox4/src/main/java/org/op/client/DefaultPanel.java	2008-05-14 01:29:09 UTC (rev 768)
+++ sandbox4/src/main/java/org/op/client/DefaultPanel.java	2008-05-30 15:20:21 UTC (rev 769)
@@ -5,6 +5,7 @@
 public class DefaultPanel extends ContentPanel {
     public DefaultPanel() {
         setBorders(false);
+        setBodyBorder(false);
         setHeaderVisible(false);
     }
 

Modified: sandbox4/src/main/java/org/op/client/DefaultTabbedForm.java
===================================================================
--- sandbox4/src/main/java/org/op/client/DefaultTabbedForm.java	2008-05-14 01:29:09 UTC (rev 768)
+++ sandbox4/src/main/java/org/op/client/DefaultTabbedForm.java	2008-05-30 15:20:21 UTC (rev 769)
@@ -12,34 +12,34 @@
     private final TabPanel tabPanel;
 
     public DefaultTabbedForm(final int width, final int labelWidth) {
-	formPanel = new FormPanel();
-	formPanel.setFrame(true);
-	formPanel.setLabelWidth(labelWidth);
-	formPanel.setBorder(false);
-	formPanel.setWidth(width);
-	formPanel.setButtonAlign(HorizontalAlignment.RIGHT);
+        formPanel = new FormPanel();
+        formPanel.setFrame(true);
+        formPanel.setLabelWidth(labelWidth);
+        formPanel.setBorders(false);
+        formPanel.setWidth(width);
+        formPanel.setButtonAlign(HorizontalAlignment.RIGHT);
 
-	tabPanel = new TabPanel();
-	formPanel.add(tabPanel);
+        tabPanel = new TabPanel();
+        formPanel.add(tabPanel);
     }
 
     public void addButton(final Button button) {
-	formPanel.addButton(button);
+        formPanel.addButton(button);
     }
 
     public void addTab(final String title, final TabItem tab) {
-	tab.setTitle(title);
-	tab.setLayout(new FormLayout());
-	tab.setAutoHeight(true);
-	// tab.setPaddings(10);
-	tabPanel.add(tab);
-	if (tabPanel.isRendered()) {
-	    tabPanel.render(tab.getElement());
-	}
+        tab.setTitle(title);
+        tab.setLayout(new FormLayout());
+        tab.setAutoHeight(true);
+        // tab.setPaddings(10);
+        tabPanel.add(tab);
+        if (tabPanel.isRendered()) {
+            tabPanel.render(tab.getElement());
+        }
     }
 
     public FormPanel getForm() {
-	return formPanel;
+        return formPanel;
     }
 
 }

Modified: sandbox4/src/main/java/org/op/client/Entity.java
===================================================================
--- sandbox4/src/main/java/org/op/client/Entity.java	2008-05-14 01:29:09 UTC (rev 768)
+++ sandbox4/src/main/java/org/op/client/Entity.java	2008-05-30 15:20:21 UTC (rev 769)
@@ -9,7 +9,7 @@
 
     public Entity() {
         ContentPanel entityMainHeader = new ContentPanel();
-        entityMainHeader.setBorder(false);
+        entityMainHeader.setBorders(false);
         entityMainHeader.setHeaderVisible(false);
         entityMainHeader.add(new Label("Group logo"));
         EntitySummary entitySummary = new EntitySummary();

Modified: sandbox4/src/main/java/org/op/client/EntitySummary.java
===================================================================
--- sandbox4/src/main/java/org/op/client/EntitySummary.java	2008-05-14 01:29:09 UTC (rev 768)
+++ sandbox4/src/main/java/org/op/client/EntitySummary.java	2008-05-30 15:20:21 UTC (rev 769)
@@ -5,7 +5,7 @@
 public class EntitySummary extends DefaultBorderLayout {
     public EntitySummary() {
         DefaultPanel entitySummary = new DefaultPanel();
-        entitySummary.setBorder(false);
+        entitySummary.setBorders(false);
         entitySummary.setHeaderVisible(false);
         entitySummary.add(new Label("Summary"));
         // entitySummary.setCtCls("entity-separator");

Modified: sandbox4/src/main/java/org/op/client/EntityWorkspace.java
===================================================================
--- sandbox4/src/main/java/org/op/client/EntityWorkspace.java	2008-05-14 01:29:09 UTC (rev 768)
+++ sandbox4/src/main/java/org/op/client/EntityWorkspace.java	2008-05-30 15:20:21 UTC (rev 769)
@@ -21,19 +21,20 @@
         super.setStyleName("entityworkspace");
         DefaultPanel titles = new DefaultPanel();
         titles.setHeaderVisible(false);
-        titles.setBorder(false);
+        titles.setBorders(false);
         titles.setLayout(new AnchorLayout());
 
         title = new DefaultPanel();
-        title.setBorder(false);
+        title.setBorders(false);
+        title.setBodyBorder(false);
         title.setHeaderVisible(false);
         title.setStyleName("entity-title");
         subTitle = new DefaultPanel();
-        subTitle.setBorder(false);
+        subTitle.setBorders(false);
         subTitle.setHeaderVisible(false);
         subTitle.setStyleName("entity-subtitle");
         bottom = new DefaultPanel();
-        bottom.setBorder(false);
+        bottom.setBorders(false);
         bottom.setHeaderVisible(false);
         bottom.setStyleName("entity-bottom");
 
@@ -61,7 +62,7 @@
         // container.setPaddings(5);
 
         DefaultPanel bottomPanel = new DefaultPanel();
-        bottomPanel.setBorder(false);
+        bottomPanel.setBorders(false);
         bottomPanel.setHeaderVisible(false);
         bottomPanel.setLayout(new AnchorLayout());
         bottomPanel.add(roundedBottom); // , new AnchorData("100% -" +

Modified: sandbox4/src/main/java/org/op/client/Sandbox.java
===================================================================
--- sandbox4/src/main/java/org/op/client/Sandbox.java	2008-05-14 01:29:09 UTC (rev 768)
+++ sandbox4/src/main/java/org/op/client/Sandbox.java	2008-05-30 15:20:21 UTC (rev 769)
@@ -129,7 +129,8 @@
         BasicDialog chatDialog = new BasicDialog("Emite chat", false, Scroll.NONE, 600, 415, 300, 300);
         chatDialog.setMaximizable(true);
         // chatDialog.setBodyBorder(false);
-        chatDialog.setBorder(false);
+        chatDialog.setBorders(false);
+        // chatDialog.setBodyBorder(false);
         // chatDialog.setBorders(false);
         chatDialog.setLayout(new FitLayout());
         Button sendBtn = new Button("Send");

Modified: sandbox4/src/main/java/org/op/client/Sandbox2.java
===================================================================
--- sandbox4/src/main/java/org/op/client/Sandbox2.java	2008-05-14 01:29:09 UTC (rev 768)
+++ sandbox4/src/main/java/org/op/client/Sandbox2.java	2008-05-30 15:20:21 UTC (rev 769)
@@ -129,7 +129,7 @@
         BasicDialog chatDialog = new BasicDialog("Emite chat", false, Scroll.NONE, 600, 415, 300, 300);
         chatDialog.setMaximizable(true);
         // chatDialog.setBodyBorder(false);
-        chatDialog.setBorder(false);
+        chatDialog.setBorders(false);
         // chatDialog.setBorders(false);
         chatDialog.setLayout(new FitLayout());
         Button sendBtn = new Button("Send");

Modified: sandbox4/src/main/java/org/op/client/SandboxCollapse.java
===================================================================
--- sandbox4/src/main/java/org/op/client/SandboxCollapse.java	2008-05-14 01:29:09 UTC (rev 768)
+++ sandbox4/src/main/java/org/op/client/SandboxCollapse.java	2008-05-30 15:20:21 UTC (rev 769)
@@ -16,10 +16,10 @@
         viewport.setLayout(new BorderLayout());
 
         BorderLayoutData westData = new BorderLayoutData(LayoutRegion.WEST, 125, 0, 200);
-        westData.split = true;
-        westData.collapsible = true;
-        westData.collapseMode = "mini";
-        westData.margins = new Margins(5, 5, 5, 5);
+        westData.setSplit(true);
+        westData.setCollapsible(true);
+        // westData.collapseMode = "mini";
+        westData.setMargins(new Margins(5, 5, 5, 5));
         BorderLayoutData centerData = new BorderLayoutData(LayoutRegion.CENTER);
 
         ContentPanel west = new ContentPanel();

Deleted: sandbox4/src/main/java/org/op/client/TestBorderLayout.java
===================================================================
--- sandbox4/src/main/java/org/op/client/TestBorderLayout.java	2008-05-14 01:29:09 UTC (rev 768)
+++ sandbox4/src/main/java/org/op/client/TestBorderLayout.java	2008-05-30 15:20:21 UTC (rev 769)
@@ -1,56 +0,0 @@
-package org.op.client;
-
-import com.extjs.gxt.ui.client.Style.LayoutRegion;
-import com.extjs.gxt.ui.client.util.Margins;
-import com.extjs.gxt.ui.client.widget.Container;
-import com.extjs.gxt.ui.client.widget.ContentPanel;
-import com.extjs.gxt.ui.client.widget.layout.BorderLayout;
-import com.extjs.gxt.ui.client.widget.layout.BorderLayoutData;
-import com.extjs.gxt.ui.client.widget.layout.FitLayout;
-import com.google.gwt.user.client.Element;
-
-public class TestBorderLayout extends Container<ContentPanel> {
-    public TestBorderLayout() {
-        setData("layout", new FitLayout());
-    }
-
-    @Override
-    protected void onRender(final Element parent, final int pos) {
-        super.onRender(parent, pos);
-        setLayout(new BorderLayout());
-
-        ContentPanel north = new ContentPanel();
-        ContentPanel west = new ContentPanel();
-        ContentPanel center = new ContentPanel();
-        ContentPanel east = new ContentPanel();
-        ContentPanel south = new ContentPanel();
-
-        BorderLayoutData northData = new BorderLayoutData(LayoutRegion.NORTH, 100);
-        northData.split = true;
-        northData.margins = new Margins(5, 5, 0, 5);
-
-        BorderLayoutData westData = new BorderLayoutData(LayoutRegion.WEST, 200);
-        westData.split = true;
-        westData.collapsible = true;
-        westData.margins = new Margins(5, 5, 5, 5);
-
-        BorderLayoutData centerData = new BorderLayoutData(LayoutRegion.CENTER);
-        centerData.margins = new Margins(5, 0, 5, 0);
-
-        BorderLayoutData eastData = new BorderLayoutData(LayoutRegion.EAST, 200);
-        eastData.split = true;
-        eastData.collapsible = true;
-        eastData.margins = new Margins(5, 5, 5, 5);
-
-        BorderLayoutData southData = new BorderLayoutData(LayoutRegion.SOUTH, 100);
-        southData.split = true;
-        southData.margins = new Margins(0, 5, 5, 5);
-
-        add(north, northData);
-        add(west, westData);
-        add(center, centerData);
-        add(east, eastData);
-        add(south, southData);
-    }
-
-}




More information about the kune-commits mailing list