[kune-commits] r1155 - kune-ws-armor/trunk/src/org/ourproject/kune/ws/armor/client
Vicente J. Ruiz Jurado
vjrj_ at ourproject.org
Mon Dec 6 19:57:07 CET 2010
Author: vjrj_
Date: 2010-12-06 19:57:06 +0100 (Mon, 06 Dec 2010)
New Revision: 1155
Added:
kune-ws-armor/trunk/src/org/ourproject/kune/ws/armor/client/IBody.java
kune-ws-armor/trunk/src/org/ourproject/kune/ws/armor/client/entitytools/
Modified:
kune-ws-armor/trunk/src/org/ourproject/kune/ws/armor/client/Body.java
kune-ws-armor/trunk/src/org/ourproject/kune/ws/armor/client/Body.ui.xml
kune-ws-armor/trunk/src/org/ourproject/kune/ws/armor/client/DefaultStyle.css
kune-ws-armor/trunk/src/org/ourproject/kune/ws/armor/client/WsArmor.java
kune-ws-armor/trunk/src/org/ourproject/kune/ws/armor/client/WsArmorResources.java
Log:
NEW - # 3: New Armor UI Binder based
http://kune.ourproject.org/issues/ticket/3
Modified: kune-ws-armor/trunk/src/org/ourproject/kune/ws/armor/client/Body.java
===================================================================
--- kune-ws-armor/trunk/src/org/ourproject/kune/ws/armor/client/Body.java 2010-12-06 15:42:29 UTC (rev 1154)
+++ kune-ws-armor/trunk/src/org/ourproject/kune/ws/armor/client/Body.java 2010-12-06 18:57:06 UTC (rev 1155)
@@ -5,11 +5,13 @@
import com.google.gwt.uibinder.client.UiField;
import com.google.gwt.user.client.ui.Composite;
import com.google.gwt.user.client.ui.DockLayoutPanel;
-import com.google.gwt.user.client.ui.ProvidesResize;
+import com.google.gwt.user.client.ui.FlowPanel;
+import com.google.gwt.user.client.ui.HasWidgets;
+import com.google.gwt.user.client.ui.SplitLayoutPanel;
+import com.google.gwt.user.client.ui.VerticalPanel;
import com.google.gwt.user.client.ui.Widget;
-public class Body extends Composite implements ProvidesResize {// implements
- // HasText {
+public class Body extends Composite implements IBody {
interface BodyUiBinder extends UiBinder<Widget, Body> {
}
@@ -18,31 +20,80 @@
@UiField
DockLayoutPanel mainpanel;
+ @UiField
+ FlowPanel sitebar;
+ @UiField
+ SplitLayoutPanel split;
+ @UiField
+ DockLayoutPanel splitCenter;
+ @UiField
+ DockLayoutPanel splitEast;
+ @UiField
+ VerticalPanel entityToolsSouth;
+ @UiField
+ VerticalPanel entityToolsNorth;
+ @UiField
+ VerticalPanel entityToolsCenter;
+ @UiField
+ FlowPanel entityHeader;
+ @UiField
+ FlowPanel entityFooter;
+ @UiField
+ FlowPanel docHeader;
+ @UiField
+ FlowPanel docSubheader;
+ @UiField
+ FlowPanel docFooter;
- // @UiField
- // SimplePanel scroll;
-
- // @UiField
- // Layer entitydocpanel;
-
public Body() {
initWidget(uiBinder.createAndBindUi(this));
+ split.setWidgetMinSize(splitEast, 150);
+ // split.setWidgetMinSize(splitCenter, 200);
}
- public void setBorrrSize(final int width, final int height) {
- final String w = String.valueOf(width);
- final String h = String.valueOf(height);
- GWT.log(h);
- // super.setSize(w, h);
- // mainpanel.setSize(w, h);
- // mainpanel.setWidth(w);
- mainpanel.setHeight(h);
- // scroll.setHeight(h);
- mainpanel.forceLayout();
+ @Override
+ public HasWidgets getDocFooter() {
+ return docFooter;
+ }
- // entitydocpanel.setTopHeight(36, Unit.PX, height, Unit.PX);
- // FIXME erase toolbars
- // scroll.setTopHeight(168, Unit.PX, height, Unit.PX);
- // scroll.setSize(w, h);
+ @Override
+ public HasWidgets getDocHeader() {
+ return docHeader;
}
+
+ @Override
+ public HasWidgets getDocSubheader() {
+ return docSubheader;
+ }
+
+ @Override
+ public HasWidgets getEntityFooter() {
+ return entityFooter;
+ }
+
+ @Override
+ public HasWidgets getEntityHeader() {
+ return entityHeader;
+ }
+
+ @Override
+ public HasWidgets getEntityToolsCenter() {
+ return entityToolsCenter;
+ }
+
+ @Override
+ public HasWidgets getEntityToolsNorth() {
+ return entityToolsNorth;
+ }
+
+ @Override
+ public HasWidgets getEntityToolsSouth() {
+ return entityToolsSouth;
+ }
+
+ @Override
+ public HasWidgets getSitebar() {
+ return sitebar;
+ }
+
}
Modified: kune-ws-armor/trunk/src/org/ourproject/kune/ws/armor/client/Body.ui.xml
===================================================================
--- kune-ws-armor/trunk/src/org/ourproject/kune/ws/armor/client/Body.ui.xml 2010-12-06 15:42:29 UTC (rev 1154)
+++ kune-ws-armor/trunk/src/org/ourproject/kune/ws/armor/client/Body.ui.xml 2010-12-06 18:57:06 UTC (rev 1155)
@@ -5,58 +5,41 @@
type='org.ourproject.kune.ws.armor.client.WsArmorResources' />
<ui:style>
.outter-margin {
- border: 5px solid white;
+ border: 7px solid white;
}
-
- .float-l {
- float: left;
- }
-
- .float-r {
- float: right;
- }
</ui:style>
<g:DockLayoutPanel ui:field="mainpanel" styleName='{style.outter-margin}'
unit="PX">
<g:north size="20">
- <g:FlowPanel ui:field="sitebar" height="20px">
- <g:InlineLabel styleName="{style.float-l}" text="icons" />
- <g:Image styleName="{style.float-r}" altText="site logo" />
- <g:InlineLabel styleName="{style.float-r}" text="login" />
+ <g:FlowPanel ui:field="sitebar" height="20px" styleName='{res.style.siteBar}'>
</g:FlowPanel>
</g:north>
<g:center>
- <g:SplitLayoutPanel width="100%" height="100%">
+ <g:SplitLayoutPanel width="100%" height="100%" ui:field="split">
<g:center size="1.0">
- <g:DockLayoutPanel unit="PX" width="100%"
- height="100%">
+ <g:DockLayoutPanel unit="PX" ui:field="splitCenter">
<g:north size="168">
<g:VerticalPanel width="100%" height="168px">
- <g:HorizontalPanel height="70px"
- width="100%" styleName="{res.style.entityHeader}">
- <g:Cell width="100%" height="70px">
- <!--<g:RichTextArea width="100%" height="70px" /> -->
- <g:InlineLabel text="Name of the Initiative" />
- </g:Cell>
- </g:HorizontalPanel>
- <g:HorizontalPanel width="100%"
- height="38px" styleName="{res.style.docTitle}">
- <g:InlineLabel text="Some doc title" />
- </g:HorizontalPanel>
- <g:HorizontalPanel width="100%"
- height="60px" styleName="{res.style.docAuth}">
- <g:InlineLabel text="Editors:" />
- </g:HorizontalPanel>
+ <g:FlowPanel height="70px" width="100%"
+ styleName="{res.style.entityHeader}" ui:field="entityHeader">
+ <!--<g:RichTextArea width="100%" height="70px" /> -->
+ </g:FlowPanel>
+ <g:FlowPanel width="100%" height="38px"
+ styleName="{res.style.docHeader}" ui:field="docHeader">
+ </g:FlowPanel>
+ <g:FlowPanel width="100%" height="60px"
+ styleName="{res.style.docSubheader}" ui:field="docSubheader">
+ </g:FlowPanel>
</g:VerticalPanel>
</g:north>
<g:center>
<g:DockLayoutPanel unit="PX"
styleName="{res.style.docEditorMargin}">
- <g:west size="15">
- <g:HTMLPanel />
+ <g:west size="10">
+ <g:HTMLPanel />
</g:west>
<g:east size="15">
- <g:HTMLPanel />
+ <g:HTMLPanel />
</g:east>
<g:center>
<g:ScrollPanel styleName="{res.style.docEditor}">
@@ -334,32 +317,38 @@
</g:ScrollPanel>
</g:center>
<g:south size="33.0">
- <g:VerticalPanel height="33px" width="100%">
- <g:HorizontalPanel width="100%"
- height="33">
- <g:InlineLabel text="New InlineLabel" />
- </g:HorizontalPanel>
+ <g:VerticalPanel height="33px" width="100%"
+ styleName="{res.style.docFooter}">
+ <g:FlowPanel width="100%"
+ height="33" ui:field="docFooter">
+ </g:FlowPanel>
</g:VerticalPanel>
</g:south>
</g:DockLayoutPanel>
</g:center>
<g:south size="36">
- <g:HorizontalPanel height="36px" width="100%"
- styleName="{res.style.entityFooter}">
- <g:InlineLabel text="New InlineLabel" />
- </g:HorizontalPanel>
+ <g:FlowPanel height="36px" width="100%"
+ styleName="{res.style.entityFooter}" ui:field="entityFooter">
+ </g:FlowPanel>
</g:south>
</g:DockLayoutPanel>
</g:center>
<g:east size="200.0">
- <g:DockLayoutPanel unit="EM" width="100%"
- height="100%">
+ <g:DockLayoutPanel unit="PX"
+ styleName="{res.style.entityTools}" ui:field="splitEast">
+ <g:north size="190">
+ <g:VerticalPanel width="100%" ui:field="entityToolsNorth"
+ styleName="{res.style.entityToolsNorth}"></g:VerticalPanel>
+ </g:north>
<g:center>
- <g:VerticalPanel styleName="{res.style.entityTools}"
- width="100%" height="100%">
- <g:InlineLabel text="Tools" />
+ <g:VerticalPanel width="100%" ui:field="entityToolsCenter"
+ styleName="{res.style.entityToolsCenter}">
</g:VerticalPanel>
</g:center>
+ <g:south size="98">
+ <g:VerticalPanel width="100%"
+ styleName="{res.style.entityToolsSouth}" ui:field="entityToolsSouth"></g:VerticalPanel>
+ </g:south>
</g:DockLayoutPanel>
</g:east>
</g:SplitLayoutPanel>
Modified: kune-ws-armor/trunk/src/org/ourproject/kune/ws/armor/client/DefaultStyle.css
===================================================================
--- kune-ws-armor/trunk/src/org/ourproject/kune/ws/armor/client/DefaultStyle.css 2010-12-06 15:42:29 UTC (rev 1154)
+++ kune-ws-armor/trunk/src/org/ourproject/kune/ws/armor/client/DefaultStyle.css 2010-12-06 18:57:06 UTC (rev 1155)
@@ -1,11 +1,24 @@
@CHARSET "UTF-8";
@external .gwt-*;
+.floatLeft {
+ float: left;
+}
+
+.floatRight {
+ float: right;
+}
+
+.siteBar {
+ overflow: hidden;
+}
+
.entityHeader {
-webkit-border-top-left-radius: 10px;
-moz-border-top-left-radius: 10px;
border-top-left-radius: 10px;
background-color: #f4e3d7;
+ overflow: hidden;
}
.entityFooter {
@@ -13,11 +26,14 @@
-moz-border-bottom-left-radius: 10px;
border-top-bottom-radius: 10px;
background-color: #f7ebe3;
+ padding: 7px 10px 0px 17px;
+ overflow: hidden;
}
.entityFooter span {
color: #784421;
font-size: 16px;
+ font-weight: bold;
}
.entityHeader span {
@@ -28,11 +44,12 @@
font: 'UbuntuBold', Arial;
}
-.docTitle {
+.docHeader {
background-color: #c87137;
+ overflow: hidden;
}
-.docTitle span {
+.docHeader span {
color: #FFF;
font-size: 28px;
font-weight: bold;
@@ -40,37 +57,55 @@
font: 'UbuntuBold', Arial;
}
-.docAuth {
+.docSubheader {
background-color: #f7ebe3;
+ padding: 15px 0 0 15px;
+ overflow: hidden;
}
-.docAuth span {
+.docSubheader span {
color: #784421;
font-size: 20px;
font-weight: bold;
- margin: 15px 0 0 15px;
}
.docEditorMargin {
background-color: #f7ebe3;
- padding: 15px;
}
.docEditor {
background-color: #FFF;
- border: 1px solid #959595;
- -webkit-border-radius: 7px;
- -moz-border-radius: 7px;
- border-radius: 7px;
+ border-left: 1px solid #959595;
+ border-right: 1px solid #959595;
+ border-top: 1px solid #959595;
+ -webkit-border-top-left-radius: 7px;
+ -moz-border-top-left-radius: 7px;
+ border-top-left-radius: 7px;
+ -webkit-border-top-right-radius: 7px;
+ -moz-border-top-right-radius: 7px;
+ border-top-right-radius: 7px;
+ padding: 5px;
}
.docFooter {
+ border-left: 1px solid #959595;
+ border-right: 1px solid #959595;
+ border-bottom: 1px solid #959595;
background-color: #e3dbdb;
+ -webkit-border-bottom-left-radius: 7px;
+ -moz-border-bottom-left-radius: 7px;
+ border-bottom-left-radius: 7px;
+ -webkit-border-bottom-right-radius: 7px;
+ -moz-border-bottom-right-radius: 7px;
+ border-bottom-right-radius: 7px;
+ padding: 7px 7px 0 7px;
+ overflow: hidden;
}
.docFooter span {
color: #784421;
font-size: 16px;
+ font-weight: bold;
}
.entityTools {
@@ -81,4 +116,35 @@
-moz-border-bottom-right-radius: 10px;
border-bottom-right-radius: 10px;
background-color: #DEAA87;
+}
+
+.entityToolsNorth {
+ margin: 10px;
+}
+
+.entityToolsNorth span {
+ color: #a05a2c;
+ font-size: 20px;
+ font-weight: bold;
+}
+
+.entityToolsCenter {
+ margin: 10px;
+}
+
+.entityToolsCenter span {
+ color: #FFF;
+ font-size: 22px;
+ font-weight: bold;
+}
+
+.entityToolsSouth {
+ border-top: 2px solid #FFF;
+ padding: 10px;
+}
+
+.entityToolsSouth span {
+ color: #a05a2c;
+ font-size: 20px;
+ font-weight: bold;
}
\ No newline at end of file
Added: kune-ws-armor/trunk/src/org/ourproject/kune/ws/armor/client/IBody.java
===================================================================
--- kune-ws-armor/trunk/src/org/ourproject/kune/ws/armor/client/IBody.java (rev 0)
+++ kune-ws-armor/trunk/src/org/ourproject/kune/ws/armor/client/IBody.java 2010-12-06 18:57:06 UTC (rev 1155)
@@ -0,0 +1,24 @@
+package org.ourproject.kune.ws.armor.client;
+
+import com.google.gwt.user.client.ui.HasWidgets;
+
+public interface IBody {
+
+ HasWidgets getDocFooter();
+
+ HasWidgets getDocHeader();
+
+ HasWidgets getDocSubheader();
+
+ HasWidgets getEntityFooter();
+
+ HasWidgets getEntityHeader();
+
+ HasWidgets getEntityToolsCenter();
+
+ HasWidgets getEntityToolsNorth();
+
+ HasWidgets getEntityToolsSouth();
+
+ HasWidgets getSitebar();
+}
\ No newline at end of file
Property changes on: kune-ws-armor/trunk/src/org/ourproject/kune/ws/armor/client/IBody.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: kune-ws-armor/trunk/src/org/ourproject/kune/ws/armor/client/WsArmor.java
===================================================================
--- kune-ws-armor/trunk/src/org/ourproject/kune/ws/armor/client/WsArmor.java 2010-12-06 15:42:29 UTC (rev 1154)
+++ kune-ws-armor/trunk/src/org/ourproject/kune/ws/armor/client/WsArmor.java 2010-12-06 18:57:06 UTC (rev 1155)
@@ -1,6 +1,7 @@
package org.ourproject.kune.ws.armor.client;
import com.google.gwt.core.client.EntryPoint;
+import com.google.gwt.user.client.ui.InlineLabel;
import com.google.gwt.user.client.ui.RootLayoutPanel;
/**
@@ -8,29 +9,30 @@
*/
public class WsArmor implements EntryPoint {
public void onModuleLoad() {
- WsArmorResources.INSTANCE.style().ensureInjected();
+ final WsArmorResources resources = WsArmorResources.INSTANCE;
+ resources.style().ensureInjected();
final RootLayoutPanel rootPanel = RootLayoutPanel.get();
final Body armor = new Body();
- // Window.addResizeHandler(new ResizeHandler() {
- // @Override
- // public void onResize(final ResizeEvent event) {
- // resize(armor, event.getWidth(), event.getHeight());
- // }
- // });
+ final InlineLabel icons = new InlineLabel("Icons");
+ final InlineLabel login = new InlineLabel("Login");
+ final InlineLabel logo = new InlineLabel("Logo");
+ icons.setStyleName(resources.style().floatLeft());
+ login.setStyleName(resources.style().floatRight());
+ logo.setStyleName(resources.style().floatRight());
+ armor.getSitebar().add(icons);
+ armor.getSitebar().add(logo);
+ armor.getSitebar().add(login);
+ armor.getEntityToolsNorth().add(new InlineLabel("Group members"));
+ armor.getEntityToolsCenter().add(new InlineLabel("Documents"));
+ armor.getEntityToolsSouth().add(new InlineLabel("Group tags"));
+ armor.getEntityHeader().add(new InlineLabel("Name of the Initiative"));
+ armor.getDocHeader().add(new InlineLabel("Some doc title"));
+ armor.getDocSubheader().add(new InlineLabel("Editors:"));
+ armor.getDocFooter().add(new InlineLabel("Tags:"));
+ armor.getEntityFooter().add(new InlineLabel("Rate it:"));
rootPanel.add(armor);
- // DeferredCommand.addCommand(new Command() {
- // private int w;
- //
- // @Override
- // public void execute() {
- // w = Window.getClientWidth();
- // resize(armor, w, Window.getClientHeight());
- // }
- // });
+
}
- // private void resize(final Body armor, final int w, final int h) {
- // armor.setSize(w, h);
- // }
}
Modified: kune-ws-armor/trunk/src/org/ourproject/kune/ws/armor/client/WsArmorResources.java
===================================================================
--- kune-ws-armor/trunk/src/org/ourproject/kune/ws/armor/client/WsArmorResources.java 2010-12-06 15:42:29 UTC (rev 1154)
+++ kune-ws-armor/trunk/src/org/ourproject/kune/ws/armor/client/WsArmorResources.java 2010-12-06 18:57:06 UTC (rev 1155)
@@ -6,7 +6,6 @@
public interface WsArmorResources extends ClientBundle {
public interface Style extends CssResource {
- String docAuth();
String docEditor();
@@ -14,13 +13,28 @@
String docFooter();
- String docTitle();
+ String docHeader();
+ String docSubheader();
+
String entityFooter();
String entityHeader();
String entityTools();
+
+ String entityToolsCenter();
+
+ String entityToolsNorth();
+
+ String entityToolsSouth();
+
+ String floatLeft();
+
+ String floatRight();
+
+ String siteBar();
+
}
public static final WsArmorResources INSTANCE = GWT.create(WsArmorResources.class);
More information about the kune-commits
mailing list