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

vjrj vjrj at ourproject.org
Sun Jul 6 02:01:52 CEST 2008


Author: vjrj
Date: 2008-07-06 02:01:47 +0200 (Sun, 06 Jul 2008)
New Revision: 788

Removed:
   sandbox3/src/main/java/org/op/client/WorkspaceModule.java
Modified:
   sandbox3/src/main/java/org/op/client/DefaultBorderLayout.java
   sandbox3/src/main/java/org/op/client/EntitySummary.java
   sandbox3/src/main/java/org/op/client/Sandbox.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/client/WsThemeMenuPanel.java
   sandbox3/src/main/java/org/op/public/css/sandbox.css
Log:
more ext probes

Modified: sandbox3/src/main/java/org/op/client/DefaultBorderLayout.java
===================================================================
--- sandbox3/src/main/java/org/op/client/DefaultBorderLayout.java	2008-07-05 22:17:07 UTC (rev 787)
+++ sandbox3/src/main/java/org/op/client/DefaultBorderLayout.java	2008-07-06 00:01:47 UTC (rev 788)
@@ -28,10 +28,6 @@
 	mainPanel.setBorder(false);
     }
 
-    public void setBorder(final boolean border) {
-	mainPanel.setBorder(border);
-    }
-
     protected void add(final Panel panel, final Position position) {
 	add(panel, position, false);
     }
@@ -114,6 +110,10 @@
 	return mainPanel;
     }
 
+    protected void setBorder(final boolean border) {
+	mainPanel.setBorder(border);
+    }
+
     protected void setCls(final String style) {
 	mainPanel.setCls(style);
     }

Modified: sandbox3/src/main/java/org/op/client/EntitySummary.java
===================================================================
--- sandbox3/src/main/java/org/op/client/EntitySummary.java	2008-07-05 22:17:07 UTC (rev 787)
+++ sandbox3/src/main/java/org/op/client/EntitySummary.java	2008-07-06 00:01:47 UTC (rev 788)
@@ -1,23 +1,46 @@
 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.Toolbar;
-import com.gwtext.client.widgets.ToolbarMenuButton;
+import com.gwtext.client.widgets.ToolbarButton;
 
-public class EntitySummary extends DefaultBorderLayout {
+public class EntitySummary {
+    private final Panel entityTools;
+    private final Panel entitySummary;
+    private final DefaultBorderLayout mainPanel;
     private final Toolbar trayBar;
 
     public EntitySummary() {
-	final Panel entitySummary = new Panel();
+	mainPanel = new DefaultBorderLayout();
+	entityTools = new Panel();
+	entitySummary = new Panel();
+	entitySummary.setCls("k-entity-summary");
+	entityTools.setBorder(false);
 	entitySummary.setBorder(false);
-	entitySummary.add(new Label("Summary"));
-	trayBar = createBottomBar(entitySummary, "k-toolbar-transparent");
-	add(entitySummary, DefaultBorderLayout.Position.CENTER);
+	entityTools.setAutoScroll(false);
+	entitySummary.setAutoScroll(true);
+	trayBar = mainPanel.createBottomBar(entitySummary, "k-site-traybar");
+	mainPanel.add(entityTools, DefaultBorderLayout.Position.NORTH, 30);
+	mainPanel.add(entitySummary, DefaultBorderLayout.Position.CENTER);
     }
 
-    public void addMenuToTrayBar(final ToolbarMenuButton button) {
+    public void addInSummary(final Widget widget) {
+	entitySummary.add(widget);
+	mainPanel.doLayoutIfNeeded();
+    }
+
+    public void addInTools(final Widget widget) {
+	entityTools.add(widget);
+	mainPanel.doLayoutIfNeeded();
+    }
+
+    public void addSiteTrayMenuButton(final ToolbarButton button) {
 	trayBar.addButton(button);
     }
 
+    public Panel getPanel() {
+	return mainPanel.getPanel();
+    }
+
 }

Modified: sandbox3/src/main/java/org/op/client/Sandbox.java
===================================================================
--- sandbox3/src/main/java/org/op/client/Sandbox.java	2008-07-05 22:17:07 UTC (rev 787)
+++ sandbox3/src/main/java/org/op/client/Sandbox.java	2008-07-06 00:01:47 UTC (rev 788)
@@ -4,7 +4,6 @@
 
 import com.google.gwt.core.client.EntryPoint;
 import com.google.gwt.user.client.Command;
-import com.google.gwt.user.client.Window;
 import com.google.gwt.user.client.ui.Composite;
 import com.google.gwt.user.client.ui.Label;
 import com.google.gwt.user.client.ui.MenuBar;
@@ -29,7 +28,7 @@
 	    // Make a command that we will execute from all leaves.
 	    final Command cmd = new Command() {
 		public void execute() {
-		    Window.alert("You selected a menu item!");
+		    // Window.alert("You selected a menu item!");
 		}
 	    };
 
@@ -58,6 +57,16 @@
 	}
     }
 
+    private static final String LOREM = "Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean urna dolor, auctor nec, adipiscing vel, ullamcorper id, arcu. Nunc tempor. Suspendisse eget felis. Phasellus sed mi. Phasellus elit. In lobortis lectus a turpis. Maecenas blandit. Ut consequat adipiscing ipsum. Aliquam justo. Sed vitae metus ac sapien elementum feugiat. Nullam eget eros. Sed ornare justo eget ipsum. Pellentesque quam turpis, lacinia in, sagittis vitae, aliquam in, lorem. Etiam auctor pretium orci.\n"
+	    + "\n"
+	    + "In sed augue. Suspendisse ac urna ut risus vulputate vestibulum. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Proin imperdiet eros vel sapien. Integer ultrices nunc ut nulla. Donec gravida. Ut feugiat. Nunc feugiat cursus ante. Curabitur rutrum, odio sagittis vulputate convallis, arcu erat congue magna, a varius dui nisi sed diam. Nullam suscipit nulla ac mauris. Sed placerat. Integer at ante id orci ultricies tristique. Praesent faucibus lectus ullamcorper ligula. Aliquam facilisis, eros a ornare vestibulum, neque urna consequat magna, at tempor sem velit id est. Sed hendrerit.\n"
+	    + "\n"
+	    + "Proin at quam. Etiam neque diam, laoreet eu, pulvinar a, porta eu, nisi. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Ut ante. Curabitur eleifend, enim vehicula dapibus egestas, quam massa iaculis nulla, eget viverra arcu nisi lobortis leo. Proin quam. Sed fermentum facilisis lacus. Vestibulum luctus purus sit amet magna. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Morbi iaculis, erat ultrices feugiat tincidunt, libero sem suscipit mauris, sit amet dapibus diam nisi feugiat nunc. Quisque porttitor odio a ligula. Vivamus arcu diam, lacinia vitae, adipiscing eget, lobortis in, risus. Integer pharetra tempor augue. Nam sit amet risus. Donec consequat tempus eros. Vestibulum a nibh. Integer mollis sollicitudin tellus. Ut at nisi.\n"
+	    + "\n"
+	    + "Suspendisse volutpat venenatis orci. Nullam a arcu et mi rutrum rhoncus. Suspendisse dictum imperdiet elit. Nullam in justo nec augue varius semper. Quisque sagittis pede a neque. Phasellus ultrices. Mauris odio felis, luctus a, lacinia nec, viverra eget, leo. Nulla congue augue quis magna. Aenean sed nunc quis quam sodales sodales. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Sed placerat. Aliquam a lorem. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Cras mi velit, iaculis vitae, volutpat eu, egestas vel, pede.\n"
+	    + "\n"
+	    + "Aliquam erat volutpat. Nulla ac augue ut ligula dignissim ornare. Ut porttitor consequat magna. Sed tempor. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Integer ipsum. Nam non tellus. Morbi at nulla. Aliquam erat volutpat. Maecenas a dolor. Aliquam nec tellus vitae sapien porttitor facilisis. Integer ipsum. Etiam eget nibh sed nulla tincidunt ultrices. Proin enim. Suspendisse potenti. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Suspendisse ac odio ut libero porta tempus. Vivamus vel purus. Nam mauris magna, bibendum quis, aliquam ac, fermentum nec, elit. Vestibulum justo sapien, sollicitudin non, mattis vitae, facilisis ac, libero.";
+
     /**
      * This is the entry point method.
      */
@@ -98,9 +107,11 @@
 	panel.add(wk.getPanel());
 
 	new Viewport(panel);
-	// wk.getEntityWorkspace().getContentTopBar().add(new MenuBarWrapper());
-	// wk.getEntityWorkspace().getContainerTopBar().add(new
-	// MenuBarWrapper());
+	// final Window w = new Window("test", 600, 480);
+	// panel.setWidth(600);
+	// panel.setHeight(460);
+	// w.add(panel);
+	// w.show();
 
 	wk.getEntityWorkspace().getContainerTopBar().addFill();
 	wk.getEntityWorkspace().getContainerTopBar().add(new LabelWrapper("uno"));
@@ -111,34 +122,12 @@
 	// wk.getEntityWorkspace().getContainerBottomBar().add(new
 	// MenuBarWrapper());
 
-	wk.getEntitySummary().addMenuToTrayBar(new WsThemeMenuPanel());
+	wk.getEntitySummary().addSiteTrayMenuButton(new WsThemeMenuPanel());
 	wk.getEntityWorkspace().getContainerBottomBar().add(new LabelWrapper("otro"));
-	wk
-		.getEntityWorkspace()
-		.setContainer(
-			new LabelWrapper(
-				"Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean urna dolor, auctor nec, adipiscing vel, ullamcorper id, arcu. Nunc tempor. Suspendisse eget felis. Phasellus sed mi. Phasellus elit. In lobortis lectus a turpis. Maecenas blandit. Ut consequat adipiscing ipsum. Aliquam justo. Sed vitae metus ac sapien elementum feugiat. Nullam eget eros. Sed ornare justo eget ipsum. Pellentesque quam turpis, lacinia in, sagittis vitae, aliquam in, lorem. Etiam auctor pretium orci.\n"
-					+ "\n"
-					+ "In sed augue. Suspendisse ac urna ut risus vulputate vestibulum. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Proin imperdiet eros vel sapien. Integer ultrices nunc ut nulla. Donec gravida. Ut feugiat. Nunc feugiat cursus ante. Curabitur rutrum, odio sagittis vulputate convallis, arcu erat congue magna, a varius dui nisi sed diam. Nullam suscipit nulla ac mauris. Sed placerat. Integer at ante id orci ultricies tristique. Praesent faucibus lectus ullamcorper ligula. Aliquam facilisis, eros a ornare vestibulum, neque urna consequat magna, at tempor sem velit id est. Sed hendrerit.\n"
-					+ "\n"
-					+ "Proin at quam. Etiam neque diam, laoreet eu, pulvinar a, porta eu, nisi. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Ut ante. Curabitur eleifend, enim vehicula dapibus egestas, quam massa iaculis nulla, eget viverra arcu nisi lobortis leo. Proin quam. Sed fermentum facilisis lacus. Vestibulum luctus purus sit amet magna. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Morbi iaculis, erat ultrices feugiat tincidunt, libero sem suscipit mauris, sit amet dapibus diam nisi feugiat nunc. Quisque porttitor odio a ligula. Vivamus arcu diam, lacinia vitae, adipiscing eget, lobortis in, risus. Integer pharetra tempor augue. Nam sit amet risus. Donec consequat tempus eros. Vestibulum a nibh. Integer mollis sollicitudin tellus. Ut at nisi.\n"
-					+ "\n"
-					+ "Suspendisse volutpat venenatis orci. Nullam a arcu et mi rutrum rhoncus. Suspendisse dictum imperdiet elit. Nullam in justo nec augue varius semper. Quisque sagittis pede a neque. Phasellus ultrices. Mauris odio felis, luctus a, lacinia nec, viverra eget, leo. Nulla congue augue quis magna. Aenean sed nunc quis quam sodales sodales. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Sed placerat. Aliquam a lorem. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Cras mi velit, iaculis vitae, volutpat eu, egestas vel, pede.\n"
-					+ "\n"
-					+ "Aliquam erat volutpat. Nulla ac augue ut ligula dignissim ornare. Ut porttitor consequat magna. Sed tempor. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Integer ipsum. Nam non tellus. Morbi at nulla. Aliquam erat volutpat. Maecenas a dolor. Aliquam nec tellus vitae sapien porttitor facilisis. Integer ipsum. Etiam eget nibh sed nulla tincidunt ultrices. Proin enim. Suspendisse potenti. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Suspendisse ac odio ut libero porta tempus. Vivamus vel purus. Nam mauris magna, bibendum quis, aliquam ac, fermentum nec, elit. Vestibulum justo sapien, sollicitudin non, mattis vitae, facilisis ac, libero."));
-	wk
-		.getEntityWorkspace()
-		.setContent(
-			new LabelWrapper(
-				"Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean urna dolor, auctor nec, adipiscing vel, ullamcorper id, arcu. Nunc tempor. Suspendisse eget felis. Phasellus sed mi. Phasellus elit. In lobortis lectus a turpis. Maecenas blandit. Ut consequat adipiscing ipsum. Aliquam justo. Sed vitae metus ac sapien elementum feugiat. Nullam eget eros. Sed ornare justo eget ipsum. Pellentesque quam turpis, lacinia in, sagittis vitae, aliquam in, lorem. Etiam auctor pretium orci.\n"
-					+ "\n"
-					+ "In sed augue. Suspendisse ac urna ut risus vulputate vestibulum. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Proin imperdiet eros vel sapien. Integer ultrices nunc ut nulla. Donec gravida. Ut feugiat. Nunc feugiat cursus ante. Curabitur rutrum, odio sagittis vulputate convallis, arcu erat congue magna, a varius dui nisi sed diam. Nullam suscipit nulla ac mauris. Sed placerat. Integer at ante id orci ultricies tristique. Praesent faucibus lectus ullamcorper ligula. Aliquam facilisis, eros a ornare vestibulum, neque urna consequat magna, at tempor sem velit id est. Sed hendrerit.\n"
-					+ "\n"
-					+ "Proin at quam. Etiam neque diam, laoreet eu, pulvinar a, porta eu, nisi. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Ut ante. Curabitur eleifend, enim vehicula dapibus egestas, quam massa iaculis nulla, eget viverra arcu nisi lobortis leo. Proin quam. Sed fermentum facilisis lacus. Vestibulum luctus purus sit amet magna. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Morbi iaculis, erat ultrices feugiat tincidunt, libero sem suscipit mauris, sit amet dapibus diam nisi feugiat nunc. Quisque porttitor odio a ligula. Vivamus arcu diam, lacinia vitae, adipiscing eget, lobortis in, risus. Integer pharetra tempor augue. Nam sit amet risus. Donec consequat tempus eros. Vestibulum a nibh. Integer mollis sollicitudin tellus. Ut at nisi.\n"
-					+ "\n"
-					+ "Suspendisse volutpat venenatis orci. Nullam a arcu et mi rutrum rhoncus. Suspendisse dictum imperdiet elit. Nullam in justo nec augue varius semper. Quisque sagittis pede a neque. Phasellus ultrices. Mauris odio felis, luctus a, lacinia nec, viverra eget, leo. Nulla congue augue quis magna. Aenean sed nunc quis quam sodales sodales. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Sed placerat. Aliquam a lorem. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Cras mi velit, iaculis vitae, volutpat eu, egestas vel, pede.\n"
-					+ "\n"
-					+ "Aliquam erat volutpat. Nulla ac augue ut ligula dignissim ornare. Ut porttitor consequat magna. Sed tempor. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Integer ipsum. Nam non tellus. Morbi at nulla. Aliquam erat volutpat. Maecenas a dolor. Aliquam nec tellus vitae sapien porttitor facilisis. Integer ipsum. Etiam eget nibh sed nulla tincidunt ultrices. Proin enim. Suspendisse potenti. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Suspendisse ac odio ut libero porta tempus. Vivamus vel purus. Nam mauris magna, bibendum quis, aliquam ac, fermentum nec, elit. Vestibulum justo sapien, sollicitudin non, mattis vitae, facilisis ac, libero. "));
+	wk.getEntityWorkspace().setContainer(new LabelWrapper(LOREM));
+	wk.getEntityWorkspace().setContent(new LabelWrapper(LOREM));
+	wk.getEntitySummary().addInTools(new Label("doc"));
+	wk.getEntitySummary().addInSummary(new LabelWrapper(LOREM));
 	wk.getEntityWorkspace().getBottomTitle().addSpacer();
 	wk.getEntityWorkspace().getBottomTitle().add(new LabelWrapper("Bottom"));
 	wk.getEntityWorkspace().getTitle().add(new LabelWrapper("Title"));

Modified: sandbox3/src/main/java/org/op/client/SiteBar.java
===================================================================
--- sandbox3/src/main/java/org/op/client/SiteBar.java	2008-07-05 22:17:07 UTC (rev 787)
+++ sandbox3/src/main/java/org/op/client/SiteBar.java	2008-07-06 00:01:47 UTC (rev 788)
@@ -4,6 +4,7 @@
 
 import com.google.gwt.user.client.ui.Widget;
 import com.gwtext.client.widgets.Panel;
+import com.gwtext.client.widgets.ToolbarButton;
 
 public class SiteBar {
 
@@ -12,16 +13,26 @@
     public SiteBar() {
 	panel = new Panel();
 	panel.setBorder(false);
+	panel.setCls("x-panel");
     }
 
     public void add(final View view) {
 	panel.add((Widget) view);
-	if (panel.isRendered()) {
-	    panel.doLayout(false);
-	}
+	doLayoutIfNeeded();
     }
 
+    public void addMenuButton(final ToolbarButton button) {
+	panel.addButton(button);
+	doLayoutIfNeeded();
+    }
+
     public Panel getPanel() {
 	return panel;
     }
+
+    private void doLayoutIfNeeded() {
+	if (panel.isRendered()) {
+	    panel.doLayout(false);
+	}
+    }
 }

Modified: sandbox3/src/main/java/org/op/client/Workspace.java
===================================================================
--- sandbox3/src/main/java/org/op/client/Workspace.java	2008-07-05 22:17:07 UTC (rev 787)
+++ sandbox3/src/main/java/org/op/client/Workspace.java	2008-07-06 00:01:47 UTC (rev 788)
@@ -26,4 +26,5 @@
     public void setTheme(final WsTheme theme) {
 	entity.setTheme(theme);
     }
+
 }

Deleted: sandbox3/src/main/java/org/op/client/WorkspaceModule.java
===================================================================
--- sandbox3/src/main/java/org/op/client/WorkspaceModule.java	2008-07-05 22:17:07 UTC (rev 787)
+++ sandbox3/src/main/java/org/op/client/WorkspaceModule.java	2008-07-06 00:01:47 UTC (rev 788)
@@ -1,23 +0,0 @@
-package org.op.client;
-
-import com.calclab.suco.client.container.Provider;
-import com.calclab.suco.client.modules.Module;
-import com.calclab.suco.client.modules.ModuleBuilder;
-import com.calclab.suco.client.scopes.SingletonScope;
-
-public class WorkspaceModule implements Module {
-
-    public Class<WorkspaceModule> getType() {
-	return WorkspaceModule.class;
-    }
-
-    public void onLoad(final ModuleBuilder builder) {
-	builder.registerProvider(Workspace.class, new Provider<Workspace>() {
-	    public Workspace get() {
-		return new Workspace();
-	    }
-	}, SingletonScope.class);
-
-    }
-
-}

Modified: sandbox3/src/main/java/org/op/client/WsThemeMenuPanel.java
===================================================================
--- sandbox3/src/main/java/org/op/client/WsThemeMenuPanel.java	2008-07-05 22:17:07 UTC (rev 787)
+++ sandbox3/src/main/java/org/op/client/WsThemeMenuPanel.java	2008-07-06 00:01:47 UTC (rev 788)
@@ -1,10 +1,10 @@
 package org.op.client;
 
-import com.gwtext.client.widgets.ToolbarMenuButton;
+import com.gwtext.client.widgets.ToolbarButton;
 import com.gwtext.client.widgets.menu.Menu;
 import com.gwtext.client.widgets.menu.MenuItem;
 
-public class WsThemeMenuPanel extends ToolbarMenuButton {
+public class WsThemeMenuPanel extends ToolbarButton {
 
     public WsThemeMenuPanel() {
 	final Menu menu = new Menu();

Modified: sandbox3/src/main/java/org/op/public/css/sandbox.css
===================================================================
--- sandbox3/src/main/java/org/op/public/css/sandbox.css	2008-07-05 22:17:07 UTC (rev 787)
+++ sandbox3/src/main/java/org/op/public/css/sandbox.css	2008-07-06 00:01:47 UTC (rev 788)
@@ -1,10 +1,14 @@
 @CHARSET "UTF-8";
 
-.k-toolbar-transparent {
-    background: #EFEFEF none repeat scroll 0% 50%;
-    border-top: 0px;
+.k-site-traybar {
+    background: #FFF none repeat scroll 0% 50%;   
 }
 
+.k-entity-summary {
+	border-left-color: #FFF;
+	border-left-width: 5px;
+}
+
 .k-entity-def .x-layout-split {
     background: #DD8A3D none repeat scroll 0% 50%;
 }




More information about the kune-commits mailing list