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

vjrj vjrj at ourproject.org
Sun Jul 6 00:02:23 CEST 2008


Author: vjrj
Date: 2008-07-06 00:02:17 +0200 (Sun, 06 Jul 2008)
New Revision: 786

Added:
   sandbox3/src/main/java/org/op/client/AbstractBar.java
   sandbox3/src/main/java/org/op/client/TitleBar.java
Modified:
   sandbox3/
   sandbox3/src/main/java/org/op/client/EntityWorkspace.java
   sandbox3/src/main/java/org/op/client/Sandbox.java
   sandbox3/src/main/java/org/op/client/Toolbar.java
   sandbox3/src/main/java/org/op/public/css/sandbox.css
Log:
more ext probes


Property changes on: sandbox3
___________________________________________________________________
Name: svn:ignore
   - .gwt-cache
.classpath
www
.project
gwt-out
target
tomcat
bin
Sandbox3.launch
.settings

   + .gwt-cache
.classpath
www
.project
gwt-out
target
tomcat
bin
Sandbox3.launch
.settings
Sandbox4.launch


Added: sandbox3/src/main/java/org/op/client/AbstractBar.java
===================================================================
--- sandbox3/src/main/java/org/op/client/AbstractBar.java	2008-07-05 19:59:54 UTC (rev 785)
+++ sandbox3/src/main/java/org/op/client/AbstractBar.java	2008-07-05 22:02:17 UTC (rev 786)
@@ -0,0 +1,40 @@
+package org.op.client;
+
+import com.google.gwt.user.client.ui.Composite;
+import com.google.gwt.user.client.ui.HorizontalPanel;
+import com.google.gwt.user.client.ui.Label;
+import com.google.gwt.user.client.ui.Widget;
+
+public class AbstractBar extends Composite {
+    private final HorizontalPanel horPanel;
+
+    public AbstractBar() {
+	horPanel = new HorizontalPanel();
+	horPanel.setWidth("100%");
+	initWidget(horPanel);
+    }
+
+    public void add(final Widget widget) {
+	horPanel.add(widget);
+    }
+
+    public void addFill() {
+	final Label emptyLabel = new Label("");
+	horPanel.add(emptyLabel);
+	horPanel.setCellWidth(emptyLabel, "100%");
+    }
+
+    public void addSeparator() {
+	final Label emptyLabel = new Label("");
+	emptyLabel.setStyleName("ytb-sep");
+	emptyLabel.addStyleName("k-toolbar-sep");
+	horPanel.add(emptyLabel);
+    }
+
+    public void addSpacer() {
+	final Label emptyLabel = new Label("");
+	emptyLabel.setStyleName("ytb-spacer");
+	horPanel.add(emptyLabel);
+    }
+
+}

Modified: sandbox3/src/main/java/org/op/client/EntityWorkspace.java
===================================================================
--- sandbox3/src/main/java/org/op/client/EntityWorkspace.java	2008-07-05 19:59:54 UTC (rev 785)
+++ sandbox3/src/main/java/org/op/client/EntityWorkspace.java	2008-07-05 22:02:17 UTC (rev 786)
@@ -2,7 +2,6 @@
 
 import org.ourproject.kune.platf.client.View;
 
-import com.google.gwt.user.client.ui.HorizontalPanel;
 import com.google.gwt.user.client.ui.Widget;
 import com.gwtext.client.widgets.Panel;
 import com.gwtext.client.widgets.layout.AnchorLayout;
@@ -11,9 +10,9 @@
 public class EntityWorkspace extends DefaultBorderLayout {
     private final Panel content;
     private final Panel container;
-    private final HorizontalPanel title;
-    private final HorizontalPanel subTitle;
-    private final HorizontalPanel bottom;
+    private final TitleBar title;
+    private final TitleBar subTitle;
+    private final TitleBar bottom;
     private final Toolbar contentTopBar;
     private final Toolbar contentBottomBar;
     private final Toolbar containerTopBar;
@@ -30,15 +29,12 @@
 	bottomPanel.setBorder(false);
 	bottomPanel.setLayout(new AnchorLayout());
 
-	title = new HorizontalPanel();
-	title.setWidth("100%");
+	title = new TitleBar();
 	title.setHeight("" + (DEF_TOOLBAR_HEIGHT - 2));
 	title.setStylePrimaryName("entity-title");
-	subTitle = new HorizontalPanel();
-	subTitle.setWidth("100%");
+	subTitle = new TitleBar();
 	subTitle.setStylePrimaryName("entity-subtitle");
-	bottom = new HorizontalPanel();
-	bottom.setWidth("100%");
+	bottom = new TitleBar();
 	bottom.setHeight("" + (DEF_TOOLBAR_HEIGHT - 2));
 	bottom.setStylePrimaryName("entity-bottom");
 
@@ -84,6 +80,10 @@
 	add(bottomPanel, DefaultBorderLayout.Position.SOUTH, DEF_TOOLBAR_HEIGHT + 2);
     }
 
+    public TitleBar getBottomTitle() {
+	return bottom;
+    }
+
     public Toolbar getContainerBottomBar() {
 	return containerBottomBar;
     }
@@ -100,11 +100,14 @@
 	return contentTopBar;
     }
 
-    public void setBottom(final View view) {
-	bottom.clear();
-	bottom.add((Widget) view);
+    public TitleBar getSubTitle() {
+	return subTitle;
     }
 
+    public TitleBar getTitle() {
+	return title;
+    }
+
     public void setContainer(final View view) {
 	setPanel(container, (Widget) view);
     }
@@ -113,11 +116,6 @@
 	setPanel(content, (Widget) view);
     }
 
-    public void setSubtitle(final View view) {
-	subTitle.clear();
-	subTitle.add((Widget) view);
-    }
-
     public void setTheme(final WsTheme theme) {
 	final String themeS = theme.toString();
 	super.setCls("entityworkspace-" + theme);
@@ -129,9 +127,4 @@
 	container.setStyleName("entity-container-" + theme);
     }
 
-    public void setTitle(final View view) {
-	title.clear();
-	title.add((Widget) view);
-    }
-
 }

Modified: sandbox3/src/main/java/org/op/client/Sandbox.java
===================================================================
--- sandbox3/src/main/java/org/op/client/Sandbox.java	2008-07-05 19:59:54 UTC (rev 785)
+++ sandbox3/src/main/java/org/op/client/Sandbox.java	2008-07-05 22:02:17 UTC (rev 786)
@@ -139,45 +139,16 @@
 					+ "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(fooMenu);
-	wk.getEntityWorkspace().setBottom(new LabelWrapper("Bottom"));
-	wk.getEntityWorkspace().setTitle(new LabelWrapper("Title"));
-	wk.getEntityWorkspace().setSubtitle(new LabelWrapper("Subtitle"));
+	wk.getEntityWorkspace().getBottomTitle().addSpacer();
+	wk.getEntityWorkspace().getBottomTitle().add(new LabelWrapper("Bottom"));
+	wk.getEntityWorkspace().getTitle().add(new LabelWrapper("Title"));
+	wk.getEntityWorkspace().getTitle().addSeparator();
+	wk.getEntityWorkspace().getTitle().addFill();
+	wk.getEntityWorkspace().getTitle().add(new LabelWrapper("Title2"));
+	wk.getEntityWorkspace().getSubTitle().addFill();
+	wk.getEntityWorkspace().getSubTitle().add(new LabelWrapper("Subtitle"));
 	wk.getSiteBar().add(new LabelWrapper("sitebar-right"));
 	wk.setTheme(WsTheme.def);
-
-	// final TabItem item1 = new TabItem();
-	// item1.setText("Nose que1");
-	// item1.add(new Label("Hola 1"));
-	// tabPanel.addTabItem(item1);
-	//
-	// final TabItem item2 = new TabItem();
-	// item2.setText("Nose que2");
-	// item2.add(new Label("Hola 2"));
-	// tabPanel.addTabItem(item2);
-	// final TextField field1 = new TextField();
-	// final TextField field2 = new TextField();
-	// field1.setFieldLabel("Nombre");
-	// field2.setFieldLabel("App");
-	// item1.add(field1);
-	// item2.add(field2);
-	//
-	// final Window window = new Window();
-	// window.add(tabPanel.getTabPanel());
-	// RootPanel.get().add(panel);
-	// window.setTitle("Layout Window");
-	// window.setClosable(true);
-	// window.setWidth(600);
-	// window.setHeight(350);
-	// window.setPlain(true);
-	// window.setLayout(new BorderLayout());
-	// final BorderLayoutData centerData = new
-	// BorderLayoutData(RegionPosition.CENTER);
-	// // final Panel panel = new Panel();
-	// // panel.add(form.getForm());
-	// window.add(form.getForm(), centerData);
-	// window.setCloseAction(Window.HIDE);
-	// RootPanel.get("slot1").add(window);
-	// window.show();
+	wk.setTheme(WsTheme.green);
     }
 }

Added: sandbox3/src/main/java/org/op/client/TitleBar.java
===================================================================
--- sandbox3/src/main/java/org/op/client/TitleBar.java	2008-07-05 19:59:54 UTC (rev 785)
+++ sandbox3/src/main/java/org/op/client/TitleBar.java	2008-07-05 22:02:17 UTC (rev 786)
@@ -0,0 +1,5 @@
+package org.op.client;
+
+public class TitleBar extends AbstractBar {
+
+}

Modified: sandbox3/src/main/java/org/op/client/Toolbar.java
===================================================================
--- sandbox3/src/main/java/org/op/client/Toolbar.java	2008-07-05 19:59:54 UTC (rev 785)
+++ sandbox3/src/main/java/org/op/client/Toolbar.java	2008-07-05 22:02:17 UTC (rev 786)
@@ -1,13 +1,11 @@
 package org.op.client;
 
-import com.google.gwt.user.client.ui.HorizontalPanel;
-import com.google.gwt.user.client.ui.Label;
 import com.google.gwt.user.client.ui.Widget;
 import com.gwtext.client.widgets.Panel;
 
 public class Toolbar {
     private final Panel container;
-    private final HorizontalPanel horPanel;
+    private final AbstractBar horPanel;
 
     public Toolbar() {
 	container = new Panel();
@@ -18,7 +16,7 @@
 	container.setHeader(false);
 	container.setBaseCls("x-toolbar");
 	container.addClass("x-panel");
-	horPanel = new HorizontalPanel();
+	horPanel = new AbstractBar();
 	container.add(horPanel);
     }
 
@@ -34,25 +32,19 @@
     }
 
     public void addFill() {
-	final Label emptyLabel = new Label("");
-	horPanel.add(emptyLabel);
-	horPanel.setCellWidth(emptyLabel, "100%");
+	horPanel.addFill();
     }
 
     public void addSeparator() {
-	final Label emptyLabel = new Label("");
-	emptyLabel.setStyleName("ytb-sep");
-	emptyLabel.addStyleName("k-toolbar-sep");
-	horPanel.add(emptyLabel);
+	horPanel.addSeparator();
     }
 
     public void addSpacer() {
-	final Label emptyLabel = new Label("");
-	emptyLabel.setStyleName("ytb-spacer");
-	horPanel.add(emptyLabel);
+	horPanel.addSpacer();
     }
 
     public Panel getPanel() {
 	return container;
     }
+
 }

Modified: sandbox3/src/main/java/org/op/public/css/sandbox.css
===================================================================
--- sandbox3/src/main/java/org/op/public/css/sandbox.css	2008-07-05 19:59:54 UTC (rev 785)
+++ sandbox3/src/main/java/org/op/public/css/sandbox.css	2008-07-05 22:02:17 UTC (rev 786)
@@ -52,6 +52,7 @@
 .entity-title-green {
     background: #AFA none repeat scroll 0% 50%;
     color: #250;
+	border-left-color: #5FD35F;
 }
 
 .entity-subtitle-def {
@@ -76,7 +77,7 @@
     background: #FFD09D none repeat scroll 0% 50%;
 }
 
-.entity-container-green {
+.entity-container-green div {
     background: #CFA none repeat scroll 0% 50%;
 }
 




More information about the kune-commits mailing list