[kune-commits] r782 - in sandbox3/src/main/java/org/op: client
public
vjrj
vjrj at ourproject.org
Fri Jul 4 12:54:44 CEST 2008
Author: vjrj
Date: 2008-07-04 12:54:42 +0200 (Fri, 04 Jul 2008)
New Revision: 782
Modified:
sandbox3/src/main/java/org/op/client/EntityWorkspace.java
sandbox3/src/main/java/org/op/client/FakeToolbar.java
sandbox3/src/main/java/org/op/client/Sandbox.java
sandbox3/src/main/java/org/op/public/Sandbox.html
Log:
more ext probes
Modified: sandbox3/src/main/java/org/op/client/EntityWorkspace.java
===================================================================
--- sandbox3/src/main/java/org/op/client/EntityWorkspace.java 2008-07-03 02:29:31 UTC (rev 781)
+++ sandbox3/src/main/java/org/op/client/EntityWorkspace.java 2008-07-04 10:54:42 UTC (rev 782)
@@ -3,9 +3,14 @@
import org.ourproject.kune.platf.client.View;
import org.ourproject.kune.platf.client.ui.RoundedBorderDecorator;
-import com.google.gwt.user.client.ui.Widget;
+import com.google.gwt.user.client.Window;
+import com.google.gwt.user.client.ui.Label;
+import com.gwtext.client.core.EventObject;
+import com.gwtext.client.widgets.Button;
import com.gwtext.client.widgets.Panel;
import com.gwtext.client.widgets.Toolbar;
+import com.gwtext.client.widgets.ToolbarButton;
+import com.gwtext.client.widgets.event.ButtonListenerAdapter;
import com.gwtext.client.widgets.layout.AnchorLayout;
import com.gwtext.client.widgets.layout.AnchorLayoutData;
@@ -70,7 +75,20 @@
// contentTopBar = new FakeToolbar();
contentTopBar = createTopBar(content);
+ contentTopBar.addElement((new Label("l")).getElement());
+ contentTopBar.addSeparator();
+ contentTopBar.addElement((new Label("c")).getElement());
+ contentTopBar.addSpacer();
+ contentTopBar.addElement((new Label("r")).getElement());
containerTopBar = new FakeToolbar();
+ final ToolbarButton rula = new ToolbarButton("kkrula?");
+ containerTopBar.add(rula);
+
+ rula.addListener(new ButtonListenerAdapter() {
+ public void onClick(final Button button, final EventObject e) {
+ Window.alert("click");
+ }
+ });
containerBottomBar = new FakeToolbar();
containerTopBar.addClass("faketoolbar-bottom-line");
containerBottomBar.addClass("faketoolbar-top-line");
@@ -88,25 +106,16 @@
add(bottomPanel, DefaultBorderLayout.Position.SOUTH, DEF_TOOLBAR_HEIGHT);
}
- public void addItemToContainerBottomBar(final View view) {
- containerBottomBar.add((Widget) view);
+ public void addItemToContentTopBar(final View view) {
+ setPanel(content, view);
}
- public void addItemToContainerTopBar(final View view) {
- containerTopBar.add((Widget) view);
+ public FakeToolbar getContainerBottomBar() {
+ return containerBottomBar;
}
- public void addItemToContentTopBar(final View view) {
- // final Container container = new Container();
- // final Widget widget = (Widget) view;
- // container.add(widget);
- // component.setEl(widget.getElement());
- // final Adapter adapter = new Adapter(component);
- // final WidgetComponent component = new WidgetComponent((Widget) view);
- // contentTopBar.getElement().appendChild(component.getElement());
- // contentTopBar.getElement().appendChild(container.getElement());
- // contentTopBar.addElement(container.getElement());
- setPanel(content, view);
+ public FakeToolbar getContainerTopBar() {
+ return containerTopBar;
}
public void setBottom(final View view) {
Modified: sandbox3/src/main/java/org/op/client/FakeToolbar.java
===================================================================
--- sandbox3/src/main/java/org/op/client/FakeToolbar.java 2008-07-03 02:29:31 UTC (rev 781)
+++ sandbox3/src/main/java/org/op/client/FakeToolbar.java 2008-07-04 10:54:42 UTC (rev 782)
@@ -1,51 +1,31 @@
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 FakeToolbar {
private final Panel container;
+ private final HorizontalPanel horPanel;
- // private final Panel horPanel;
-
public FakeToolbar() {
container = new Panel();
- // container.setFrame(true);
- // container.setLayout(new FitLayout());
container.setBorder(false);
container.setBodyBorder(false);
container.setHeight(DefaultBorderLayout.DEF_TOOLBAR_HEIGHT);
container.setWidth("100%");
container.setHeader(false);
- // container.addClass("x-toolbar");
- // x-panel-tbar x-panel-tbar-noheader
container.setBaseCls("x-toolbar");
container.addClass("x-panel");
- // container.addClass("x-panel-tbar-noheader");
- // container.setBodyStyle("x-panel-tbar");
-
- // Adapter adapter = new Adapter();
- // 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(horPanel);
- // <div class="x-toolbar x-small-editor" id="ext-gen74" style="height:
- // 17px;"><table cellspacing="0"><tbody><tr/></tbody></table></div>
-
+ horPanel = new HorizontalPanel();
+ container.add(horPanel);
}
public void add(final Widget widget) {
- // horPanel.add(widget);
- container.add(widget);
+ horPanel.add(widget);
if (container.isRendered()) {
- container.doLayout(true);
+ container.doLayout(false);
}
}
@@ -53,8 +33,25 @@
container.addClass(cls);
}
+ 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");
+ horPanel.add(emptyLabel);
+ }
+
+ public void addSpacer() {
+ final Label emptyLabel = new Label("");
+ emptyLabel.setStyleName("ytb-spacer");
+ horPanel.add(emptyLabel);
+ }
+
public Panel getPanel() {
return container;
}
-
}
Modified: sandbox3/src/main/java/org/op/client/Sandbox.java
===================================================================
--- sandbox3/src/main/java/org/op/client/Sandbox.java 2008-07-03 02:29:31 UTC (rev 781)
+++ sandbox3/src/main/java/org/op/client/Sandbox.java 2008-07-04 10:54:42 UTC (rev 782)
@@ -99,9 +99,15 @@
new Viewport(panel);
wk.getEntityWorkspace().addItemToContentTopBar(new MenuBarWrapper());
- wk.getEntityWorkspace().addItemToContainerTopBar(new MenuBarWrapper());
- wk.getEntityWorkspace().addItemToContainerBottomBar(new MenuBarWrapper());
- wk.getEntityWorkspace().addItemToContainerBottomBar(new LabelWrapper("otro"));
+ wk.getEntityWorkspace().getContainerTopBar().add(new MenuBarWrapper());
+ wk.getEntityWorkspace().getContainerTopBar().addFill();
+ wk.getEntityWorkspace().getContainerTopBar().add(new LabelWrapper("uno"));
+ wk.getEntityWorkspace().getContainerTopBar().addSeparator();
+ wk.getEntityWorkspace().getContainerTopBar().add(new LabelWrapper("dos"));
+ wk.getEntityWorkspace().getContainerTopBar().addSpacer();
+ wk.getEntityWorkspace().getContainerTopBar().add(new LabelWrapper("tres"));
+ wk.getEntityWorkspace().getContainerBottomBar().add(new MenuBarWrapper());
+ wk.getEntityWorkspace().getContainerBottomBar().add(new LabelWrapper("otro"));
wk.getEntityWorkspace().setContainer(new LabelWrapper("Container"));
wk.getEntityWorkspace().setContent(new LabelWrapper("Content"));
// wk.getEntityWorkspace().setContent(fooMenu);
Modified: sandbox3/src/main/java/org/op/public/Sandbox.html
===================================================================
--- sandbox3/src/main/java/org/op/public/Sandbox.html 2008-07-03 02:29:31 UTC (rev 781)
+++ sandbox3/src/main/java/org/op/public/Sandbox.html 2008-07-04 10:54:42 UTC (rev 782)
@@ -25,7 +25,7 @@
-->
<script type="text/javascript" language="javascript" src="org.op.Sandbox.nocache.js"></script>
- <link rel="stylesheet" type="text/css" href="http://yui.yahooapis.com/2.5.2/build/base/base-min.css">
+ <!-- <link rel="stylesheet" type="text/css" href="http://yui.yahooapis.com/2.5.2/build/base/base-min.css"> -->
</head>
<!-- -->
More information about the kune-commits
mailing list