Author: dongxu
Date: Thu Sep 12 03:40:31 2013
New Revision: 1522233
URL: http://svn.apache.org/r1522233
Log:
refactoring
Added:
james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/HupaOverallLayout.java
- copied, changed from r1522232,
james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/HupaLayoutable.java
james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/HupaOverallLayout.ui.xml
Modified:
james/hupa/trunk/client/src/main/java/org/apache/hupa/client/HupaController.java
james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ioc/AppGinModule.java
james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/HupaLayoutable.java
Modified:
james/hupa/trunk/client/src/main/java/org/apache/hupa/client/HupaController.java
URL:
http://svn.apache.org/viewvc/james/hupa/trunk/client/src/main/java/org/apache/hupa/client/HupaController.java?rev=1522233&r1=1522232&r2=1522233&view=diff
==============================================================================
---
james/hupa/trunk/client/src/main/java/org/apache/hupa/client/HupaController.java
(original)
+++
james/hupa/trunk/client/src/main/java/org/apache/hupa/client/HupaController.java
Thu Sep 12 03:40:31 2013
@@ -52,7 +52,7 @@ import org.apache.hupa.client.place.Mail
import org.apache.hupa.client.rf.CheckSessionRequest;
import org.apache.hupa.client.rf.HupaRequestFactory;
import org.apache.hupa.client.ui.AppLayout;
-import org.apache.hupa.client.ui.HupaLayout;
+import org.apache.hupa.client.ui.HupaLayoutable;
>>>>>>> move new theme ui from experiment to hupa evo
import com.google.gwt.dom.client.StyleInjector;
@@ -97,7 +97,7 @@ import com.google.web.bindery.requestfac
public class HupaController {
@Inject private PlaceHistoryHandler placeHistoryHandler;
- @Inject private HupaLayout hupaLayout;
+ @Inject private HupaLayoutable hupaLayout;
@Inject private PlaceController placeController;
@Inject private HupaRequestFactory requestFactory;
private Place currentPlace;
Modified:
james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ioc/AppGinModule.java
URL:
http://svn.apache.org/viewvc/james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ioc/AppGinModule.java?rev=1522233&r1=1522232&r2=1522233&view=diff
==============================================================================
---
james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ioc/AppGinModule.java
(original)
+++
james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ioc/AppGinModule.java
Thu Sep 12 03:40:31 2013
@@ -169,8 +169,8 @@ import org.apache.hupa.client.rf.HupaReq
import org.apache.hupa.client.ui.AppLayout;
import org.apache.hupa.client.ui.AppLayoutImpl;
import org.apache.hupa.client.ui.FoldersTreeViewModel;
-import org.apache.hupa.client.ui.HupaLayout;
-import org.apache.hupa.client.ui.HupaLayoutView;
+import org.apache.hupa.client.ui.HupaLayoutable;
+import org.apache.hupa.client.ui.HupaOverallLayout;
import org.apache.hupa.client.ui.IMAPMessageListView;
<<<<<<< HEAD
<<<<<<< HEAD
@@ -237,6 +237,7 @@ public class AppGinModule extends Abstra
<<<<<<< HEAD
<<<<<<< HEAD
<<<<<<< HEAD
+<<<<<<< HEAD
bind(HupaLayoutable.class).to(HupaLayout.class).in(Singleton.class);
bind(LoginLayoutable.class).to(LoginLayout.class).in(Singleton.class);
@@ -399,6 +400,9 @@ public class AppGinModule extends Abstra
=======
bind(HupaLayout.class).to(HupaLayoutView.class).in(Singleton.class);
>>>>>>> move new theme ui from experiment to hupa evo
+=======
+
bind(HupaLayoutable.class).to(HupaOverallLayout.class).in(Singleton.class);
+>>>>>>> refactoring
// Activities
bind(LoginActivity.Displayable.class).to(LoginView.class);
Modified:
james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/HupaLayoutable.java
URL:
http://svn.apache.org/viewvc/james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/HupaLayoutable.java?rev=1522233&r1=1522232&r2=1522233&view=diff
==============================================================================
---
james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/HupaLayoutable.java
(original)
+++
james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/HupaLayoutable.java
Thu Sep 12 03:40:31 2013
@@ -19,6 +19,7 @@
package org.apache.hupa.client.ui;
+<<<<<<< HEAD
import org.apache.hupa.client.place.SettingPlace;
import com.google.gwt.user.client.ui.AcceptsOneWidget;
@@ -64,4 +65,10 @@ public interface HupaLayoutable extends
AcceptsOneWidget getSettingNavView();
void arrangeSettingLayout(SettingPlace sp);
+=======
+import com.google.gwt.user.client.ui.LayoutPanel;
+
+public interface HupaLayoutable {
+ LayoutPanel get();
+>>>>>>> refactoring
}
Copied:
james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/HupaOverallLayout.java
(from r1522232,
james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/HupaLayoutable.java)
URL:
http://svn.apache.org/viewvc/james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/HupaOverallLayout.java?p2=james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/HupaOverallLayout.java&p1=james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/HupaLayoutable.java&r1=1522232&r2=1522233&rev=1522233&view=diff
==============================================================================
---
james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/HupaLayoutable.java
(original)
+++
james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/HupaOverallLayout.java
Thu Sep 12 03:40:31 2013
@@ -19,49 +19,21 @@
package org.apache.hupa.client.ui;
-import org.apache.hupa.client.place.SettingPlace;
+import com.google.gwt.core.client.GWT;
+import com.google.gwt.uibinder.client.UiBinder;
+import com.google.gwt.user.client.ui.LayoutPanel;
+
+public class HupaOverallLayout implements HupaLayoutable {
+
+ @Override
+ public LayoutPanel get() {
+ return binder.createAndBindUi(this);
+ }
-import com.google.gwt.user.client.ui.AcceptsOneWidget;
+ interface HupaLayoutUiBinder extends UiBinder<LayoutPanel,
HupaOverallLayout> {
+ }
-public interface HupaLayoutable extends Layoutable {
- AcceptsOneWidget getTopBarView();
+ private static HupaLayoutUiBinder binder = GWT
+ .create(HupaLayoutUiBinder.class);
- AcceptsOneWidget getLogoView();
-
- AcceptsOneWidget getNavigationView();
-
- AcceptsOneWidget getToolBarView();
-
- AcceptsOneWidget getFolderListView();
-
- AcceptsOneWidget getMessageListView();
-
- AcceptsOneWidget getMessageListFooterView();
-
- AcceptsOneWidget getMessageContentView();
-
- AcceptsOneWidget getStatusView();
-
- AcceptsOneWidget getComposeToolBarView();
-
- AcceptsOneWidget getComposeView();
-
- AcceptsOneWidget getNotificationView();
-
- AcceptsOneWidget getLabelListView();
- AcceptsOneWidget getContactListView();
-
- AcceptsOneWidget getLabelPropertiesView();
-
- void switchTo(int layout);
-
- AcceptsOneWidget getContactPropertiesView();
-
- AcceptsOneWidget getContactsListView();
-
- AcceptsOneWidget getSearchBoxView();
-
- AcceptsOneWidget getSettingNavView();
-
- void arrangeSettingLayout(SettingPlace sp);
}
Added:
james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/HupaOverallLayout.ui.xml
URL:
http://svn.apache.org/viewvc/james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/HupaOverallLayout.ui.xml?rev=1522233&view=auto
==============================================================================
---
james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/HupaOverallLayout.ui.xml
(added)
+++
james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/HupaOverallLayout.ui.xml
Thu Sep 12 03:40:31 2013
@@ -0,0 +1,468 @@
+<ui:UiBinder xmlns:ui='urn:ui:com.google.gwt.uibinder'
+ xmlns:g='urn:import:com.google.gwt.user.client.ui'>
+ <ui:image field="linen_header" />
+ <ui:image field="roundcube_logo" />
+ <ui:image field="buttons" />
+ <ui:image field="hupa_logo_49_transparent"></ui:image>
+ <ui:style>
+ .minWidth {
+ min-width: 1150px;
+ }
+
+ @sprite .topBar {
+ gwt-image: 'linen_header';
+ width: 100%;
+ height: 100%;
+ background-repeat: repeat-x;
+ text-decoration: none;
+ border-bottom: 1px solid #4F4F4F;
+ padding: 2px 0 2px 10px;
+ color: #AAA;
+ height: 18px;
+ }
+
+ .topLeft {
+ float: left;
+ }
+
+ .about-link {
+ display: inline-block;
+ padding: 4px 0.8em 0 10px;
+ color: #AAA;
+ text-decoration: none;
+ cursor: pointer;
+ }
+
+ .topNav {
+ height: 46px;
+ margin-bottom: 10px;
+ padding: 0 0 0 10px;
+ background: -moz-linear-gradient(top, #404040 0%,
#060606 100%);
+ background: -webkit-gradient(linear, left top, left
bottom, color-stop(0%, #404040),
+ color-stop(100%, #060606) );
+ background: -o-linear-gradient(top, #404040 0%, #060606
100%);
+ background: -ms-linear-gradient(top, #404040 0%,
#060606 100%);
+ background: linear-gradient(top, #404040 0%, #060606
100%);
+ }
+
+ .main {
+
+ }
+
+ .right {
+ float: right;
+ }
+
+ .topRight {
+ float: right;
+ }
+
+ @sprite .button-logout {
+ gwt-image: 'buttons';
+ display: inline-block;
+ padding: 4px 8px 2px 20px;
+ color: white;
+ background-position: -4px -191px;
+ cursor: pointer;
+ }
+
+ .username {
+ padding-top: 4px;
+ padding-right: 1em;
+ }
+
+ .eastPanel {
+ border-radius: 4px;
+ background-color: #F60;
+ }
+
+ .westPanel {
+ border-radius: 4px;
+ background-color: #EEE;
+ }
+
+ .northPanel {
+ border-radius: 4px;
+ background-color: #39F;
+ }
+
+ .southPanel {
+ border-radius: 4px;
+ background-color: #99C;
+ }
+
+ .centerPanel {
+ border-radius: 4px;
+ background-color: #FFC;
+ }
+
+ /*** taskbar ***/
+ .taskbar {
+ display: inline-block;
+ height: 34px;
+ padding: 12px 10px 0 6px;
+ }
+
+ @sprite .taskbar .button-inner {
+ gwt-image: 'buttons';
+ display: inline-block;
+ font-size: 110%;
+ font-weight: normal;
+ text-shadow: 0px 1px 1px black;
+ padding: 5px 0 0 34px;
+ height: 19px;
+ cursor: pointer;
+ color: #eee;
+ }
+
+ .button-selected {
+ background-color: #2c2c2c;
+ }
+
+ .taskbar .button-mail-button-inner {
+ background-position: 0 -22px;
+ color: #3cf;
+ /*background-position: 0 2px;*/
+ }
+
+ .taskbar button-mail-button-inner:hover,.taskbar
.button-mail-button-inner.button-selected
+ {
+ background-position: 0 -22px;
+ }
+
+ .taskbar .button-addressbook-button-inner {
+ background-position: 0 -48px;
+ }
+
+ .taskbar a.button-addressbook:hover span.button-inner,.taskbar
a.button-addressbook.button-selected span.button-inner
+ {
+ background-position: 0 -72px;
+ }
+
+ .taskbar .button-settings-button-inner {
+ background-position: 0 -96px;
+ }
+
+ .taskbar a.button-settings:hover span.button-inner,.taskbar
a.button-settings.button-selected span.button-inner
+ {
+ background-position: 0 -120px;
+ }
+
+ .taskbar a.button-calendar span.button-inner {
+ background-position: 0 -144px;
+ }
+
+ .taskbar a.button-calendar:hover span.button-inner,.taskbar
a.button-calendar.button-selected span.button-inner
+ {
+ background-position: 0 -168px;
+ }
+
+ .topLogo {
+ padding-top: 2px;
+ }
+
+ .toolsBar {
+ position: absolute;
+ top: -6px;
+ right: 390px;
+ left: 0;
+ height: 40px;
+ white-space: nowrap;
+ z-index: 10;
+ }
+
+ @sprite .toolsBarButton {
+ gwt-image: 'buttons';
+ text-align: center;
+ font-size: 10px;
+ color: #555;
+ min-width: 50px;
+ max-width: 75px;
+ height: 13px;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+ padding: 24px 2px 0 2px;
+ text-shadow: 0px 1px 1px #EEE;
+ box-shadow: none;
+ -webkit-box-shadow: none;
+ background-position: -100px 0;
+ border: 0;
+ display: inline-block;
+ margin: 0 2px;
+ border-radius: 4px;
+ text-decoration: none;
+ cursor: pointer;
+ }
+
+ .checkMail {
+ background-position: center -1180px;
+ }
+
+ .compose {
+ background-position: center -534px;
+ }
+
+ .spacer {
+ display: inline-block;
+ width: 24px;
+ height: 36px;
+ padding: 0;
+ }
+
+ .reply {
+ background-position: center -574px;
+ }
+
+ .dropButton {
+ display: inline-block;
+ position: relative;
+ }
+
+ .dropButton .toolsBarButton {
+ margin-left: 0;
+ padding-left: 0;
+ margin-right: 0;
+ padding-right: 0;
+ }
+
+ .replyAll {
+ min-width: 64px;
+ background-position: left -614px;
+ }
+
+ @sprite .dropButton .dropButtonTip {
+ gwt-image: 'buttons';
+ display: block;
+ position: absolute;
+ right: 0;
+ top: 0;
+ height: 42px;
+ width: 18px;
+ background-position: 0 -1259px;
+ cursor: pointer;
+ }
+
+ .forward {
+ min-width: 64px;
+ background-position: left -654px;
+ }
+
+ .delete {
+ background-position: center -694px;
+ }
+
+ .mark {
+ background-position: center -1098px;
+ }
+
+ .more {
+ background-position: center -854px;
+ }
+
+ .folderList {
+ position: absolute;
+ top: 0;
+ left: 0;
+ width: 100%;
+ bottom: 0;
+ overflow-x: hidden;
+ overflow-y: auto;
+ }
+
+ .uibox {
+ border: 1px solid #A3A3A3;
+ border-radius: 4px;
+ overflow: hidden;
+ box-shadow: 0 0 2px #999;
+ -o-box-shadow: 0 0 2px #999;
+ -webkit-box-shadow: 0 0 2px #999;
+ -moz-box-shadow: 0 0 2px #999;
+ background: white;
+ }
+
+ .listbox {
+ background: #D9ECF4;
+ overflow: hidden;
+ }
+
+ .uibox .boxfooter {
+ border-radius: 0 0 4px 4px;
+ }
+
+ .listbox .boxfooter {
+ position: absolute;
+ bottom: 0;
+ left: 0;
+ width: 100%;
+ height: 42px;
+ border-top: 1px solid #CCDDE4;
+ background: #D9ECF4;
+ -webkit-box-shadow: inset 0 1px 0 0 white;
+ -moz-box-shadow: inset 0 1px 0 0 #fff;
+ box-shadow: inset 0 1px 0 0 white;
+ white-space: nowrap;
+ overflow: hidden;
+ }
+
+ </ui:style>
+ <g:LayoutPanel addStyleNames="{style.minWidth}">
+ <g:layer left='0' right='0' top='0' height='92px'>
+ <g:DockLayoutPanel unit="PX">
+ <g:north size="23">
+ <g:DockLayoutPanel unit="PX"
addStyleNames="{style.topBar}">
+ <g:west size="60">
+ <g:SimplePanel
addStyleNames="{style.topLeft}">
+ <g:Anchor
styleName="{style.about-link}">About</g:Anchor>
+ </g:SimplePanel>
+ </g:west>
+ <g:center>
+ <g:FlowPanel>
+ <g:Anchor
addStyleNames="{style.topRight} {style.button-logout}">Logout</g:Anchor>
+ <g:HTMLPanel
tag="span" addStyleNames="{style.topRight} {style.username}">[email protected]
+ </g:HTMLPanel>
+ </g:FlowPanel>
+
+ </g:center>
+ </g:DockLayoutPanel>
+
+
+ </g:north>
+ <g:center>
+ <g:LayoutPanel
addStyleNames="{style.topNav}">
+ <g:layer width="177px"
left="10px">
+ <!-- <g:Image
resource='{roundcube_logo}' /> -->
+ <g:SimplePanel>
+ <g:Image
resource='{hupa_logo_49_transparent}' />
+ </g:SimplePanel>
+
+ </g:layer>
+ <g:layer width="301px"
right="0">
+ <g:DockLayoutPanel
unit="PX">
+ <g:west
size="74">
+
<g:SimplePanel addStyleNames="{style.taskbar} {style.button-selected}">
+
<g:Anchor
+
addStyleNames="
+ {style.button-mail-button-inner}
{style.button-inner}">
+
Mail
+
</g:Anchor>
+
</g:SimplePanel>
+ </g:west>
+ <g:center>
+
<g:SimplePanel addStyleNames="{style.taskbar}">
+
<g:Anchor
+
addStyleNames="
+ {style.button-addressbook-button-inner}
{style.button-inner}">
+
Contacts
+
</g:Anchor>
+
</g:SimplePanel>
+ </g:center>
+ <g:east
size="97">
+
<g:SimplePanel addStyleNames="{style.taskbar}">
+
<g:Anchor
+
addStyleNames="
+ {style.button-settings-button-inner}
{style.button-inner}">
+
Settings
+
</g:Anchor>
+
</g:SimplePanel>
+ </g:east>
+ </g:DockLayoutPanel>
+ </g:layer>
+ </g:LayoutPanel>
+ </g:center>
+ </g:DockLayoutPanel>
+ </g:layer>
+ <g:layer left='10px' right='10px' top='88px' bottom="20px">
+ <g:DockLayoutPanel ui:field="mainSplitLayoutPanel">
+ <g:north size="40">
+ <g:FlowPanel
addStyleNames="{style.toolsBar}">
+ <g:Anchor
addStyleNames="{style.toolsBarButton} {style.checkMail}">Refresh</g:Anchor>
+ <g:Anchor
addStyleNames="{style.toolsBarButton} {style.compose}">Compose</g:Anchor>
+ <g:HTMLPanel tag="span"
addStyleNames="{style.spacer}"></g:HTMLPanel>
+ <g:Anchor
addStyleNames="{style.toolsBarButton} {style.reply}">Reply</g:Anchor>
+ <g:HTMLPanel tag="span"
addStyleNames="{style.dropButton}">
+ <g:Anchor
addStyleNames="{style.toolsBarButton} {style.replyAll}">Reply all</g:Anchor>
+ <g:HTMLPanel tag="span"
addStyleNames="{style.dropButtonTip}"></g:HTMLPanel>
+ </g:HTMLPanel>
+ <g:HTMLPanel tag="span"
addStyleNames="{style.dropButton}">
+ <g:Anchor
addStyleNames="{style.toolsBarButton} {style.forward}">Forward</g:Anchor>
+ <g:HTMLPanel tag="span"
addStyleNames="{style.dropButtonTip}"></g:HTMLPanel>
+ </g:HTMLPanel>
+ <g:Anchor
addStyleNames="{style.toolsBarButton} {style.delete}">Delete</g:Anchor>
+ <g:Anchor
addStyleNames="{style.toolsBarButton} {style.mark}">Mark</g:Anchor>
+ <g:Anchor
addStyleNames="{style.toolsBarButton} {style.more}">More</g:Anchor>
+ </g:FlowPanel>
+ </g:north>
+ <g:center>
+ <g:SplitLayoutPanel>
+ <g:west size="373">
+ <g:LayoutPanel
+
addStyleNames="{style.folderList} {style.uibox} {style.listbox}">
+ <g:layer
top="0" height="100%">
+
<g:SimplePanel>
+
<g:HTMLPanel></g:HTMLPanel>
+
</g:SimplePanel>
+ </g:layer>
+ <g:layer
bottom="0" height="41px">
+
<g:SimplePanel styleName="{style.boxfooter}">
+
<g:HTMLPanel tag="span"></g:HTMLPanel>
+
</g:SimplePanel>
+ </g:layer>
+ </g:LayoutPanel>
+
+ </g:west>
+ <g:center>
+ <g:DockLayoutPanel
unit="PCT">
+ <g:west
size="100"><!-- dynamic layout -->
+
<g:SplitLayoutPanel>
+
<g:north size="200">
+
<g:LayoutPanel addStyleNames="{style.uibox}">
+
<g:layer>
+
<g:HTMLPanel styleName="{style.southPanel}">MessageList
+
</g:HTMLPanel>
+
</g:layer>
+
<g:layer bottom="0" height="25px">
+
<g:HTMLPanel>MessageListFooter
+
</g:HTMLPanel>
+
</g:layer>
+
</g:LayoutPanel>
+
</g:north>
+
<g:center>
+
<g:LayoutPanel addStyleNames="{style.uibox}">
+
<g:layer>
+
<g:HTMLPanel>MessageContent</g:HTMLPanel>
+
</g:layer>
+
<g:layer bottom="0" height="25px">
+
<g:HTMLPanel
styleName="{style.centerPanel}">StatusBar</g:HTMLPanel>
+
</g:layer>
+
</g:LayoutPanel>
+
</g:center>
+
</g:SplitLayoutPanel>
+ </g:west>
+ <g:center
size="0"><!-- dynamic layout -->
+
<g:SplitLayoutPanel>
+
<g:west size="150">
+
<g:HTMLPanel addStyleNames="{style.uibox}">Address</g:HTMLPanel>
+
</g:west>
+
<g:center size="100">
+
<g:LayoutPanel addStyleNames="{style.uibox}">
+
<g:layer>
+
<g:HTMLPanel
styleName="{style.southPanel}">MessageContent
+
</g:HTMLPanel>
+
</g:layer>
+
<g:layer bottom="0" height="25px">
+
<g:HTMLPanel
styleName="{style.centerPanel}">StatusBar</g:HTMLPanel>
+
</g:layer>
+
</g:LayoutPanel>
+
</g:center>
+
</g:SplitLayoutPanel>
+ </g:center>
+ </g:DockLayoutPanel>
+ </g:center>
+
+ </g:SplitLayoutPanel>
+ </g:center>
+ </g:DockLayoutPanel>
+ </g:layer>
+ </g:LayoutPanel>
+</ui:UiBinder>
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]