You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-dev@james.apache.org by do...@apache.org on 2013/08/21 16:08:29 UTC
svn commit: r1516164 [10/20] - in /james/hupa/trunk: ./ client/
client/src/main/java/com/ client/src/main/java/com/google/
client/src/main/java/com/google/web/
client/src/main/java/com/google/web/bindery/
client/src/main/java/com/google/web/bindery/req...
Added: james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/ToolBarView.ui.xml
URL: http://svn.apache.org/viewvc/james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/ToolBarView.ui.xml?rev=1516164&view=auto
==============================================================================
--- james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/ToolBarView.ui.xml (added)
+++ james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/ToolBarView.ui.xml Wed Aug 21 14:08:19 2013
@@ -0,0 +1,207 @@
+<!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor
+ license agreements. See the NOTICE file distributed with this work for additional
+ information regarding copyright ownership. The ASF licenses this file to
+ you under the Apache License, Version 2.0 (the "License"); you may not use
+ this file except in compliance with the License. You may obtain a copy of
+ the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required
+ by applicable law or agreed to in writing, software distributed under the
+ License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS
+ OF ANY KIND, either express or implied. See the License for the specific
+ language governing permissions and limitations under the License. -->
+
+<ui:UiBinder xmlns:ui='urn:ui:com.google.gwt.uibinder'
+ xmlns:g='urn:import:com.google.gwt.user.client.ui'>
+ <ui:image field="buttons" src="res/buttons.png" />
+ <ui:image field="listicons" src="res/listicons.png" />
+ <ui:style type="org.apache.hupa.client.ui.ToolBarView.Style">
+ .bar {
+ position: absolute;
+ display: block;
+ top: -2px;
+ right: 390px;
+ left: 0;
+ height: 40px;
+ white-space: nowrap;
+ z-index: 10;
+ }
+
+ @sprite .listicon {
+ gwt-image: 'listicons';
+ display: block;
+ min-height: 14px;
+ padding: 4px 4px 1px 24px;
+ height: 17px;
+ background-position: -100px 0;
+ opacity: 0.99;
+ }
+
+ @sprite .button {
+ 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: 28px 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;
+ }
+
+ .checkMail {
+ background-position: center -1176px;
+ }
+
+ .compose {
+ background-position: center -530px;
+ }
+
+ .spacer {
+ display: inline-block;
+ width: 24px;
+ height: 36px;
+ padding: 0;
+ }
+
+ .reply {
+ background-position: center -570px;
+ }
+
+ .dropButton {
+ display: inline-block;
+ position: relative;
+ }
+
+ .dropButton .button {
+ margin-left: 0;
+ padding-left: 0;
+ margin-right: 0;
+ padding-right: 0;
+ }
+
+ .replyAll {
+ min-width: 64px;
+ background-position: left -610px;
+ }
+
+ @sprite .dropButton .dropButtonTip {
+ gwt-image: 'buttons';
+ display: block;
+ position: absolute;
+ right: 0;
+ top: 0;
+ height: 42px;
+ width: 18px;
+ background-position: 0 -1255px;
+ }
+
+ .handCursor{
+ cursor: pointer;
+ }
+ .forward {
+ min-width: 64px;
+ background-position: left -650px;
+ }
+
+ .delete {
+ background-position: center -690px;
+ }
+
+ .mark {
+ background-position: center -1094px;
+ }
+
+ .more {
+ background-position: center -850px;
+ }
+
+ .disabledButton {
+ opacity: 0.4;
+ cursor: default;
+ }
+
+ .popupMenu {
+ width: auto;
+ background: #444;
+ border: 1px solid #999;
+ z-index: 240;
+ border-radius: 4px;
+ box-shadow: 0 2px 6px 0 #333;
+ -moz-box-shadow: 0 2px 6px 0 #333;
+ -webkit-box-shadow: 0 2px 6px 0 #333;
+ -o-box-shadow: 0 2px 6px 0 #333;
+ }
+
+ .toolBarMenu {
+ margin: 0;
+ padding: 0;
+ }
+
+ .toolBarMenu td {
+ border-top: 1px solid #5a5a5a;
+ border-bottom: 1px solid #333;
+ padding: 3px 8px;
+ }
+
+ .toolBarMenu td:hover {
+ background-color: #0186ba;
+
+ }
+
+ .activeIcon {
+ display: block;
+ white-space: nowrap;
+ color: #666;
+ text-shadow: 0px 1px 1px #333;
+ text-decoration: none;
+ min-height: 14px;
+ color: #eee;
+ padding: 2px 25px;
+ cursor: default;
+ }
+
+ .read {
+ background-position: 0 -1222px;
+ }
+
+ .unread {
+ background-position: 0 -1198px;
+ }
+ </ui:style>
+
+ <g:FlowPanel addStyleNames="{style.bar}" ui:field="ToolBar">
+ <g:Anchor ui:field="refresh" addStyleNames="{style.button} {style.checkMail} {style.handCursor}">Refresh</g:Anchor>
+ <g:Anchor ui:field="compose" addStyleNames="{style.button} {style.compose} {style.handCursor}">Compose</g:Anchor>
+ <g:HTMLPanel tag="span" addStyleNames="{style.spacer}"></g:HTMLPanel>
+ <g:Anchor ui:field="reply"
+ addStyleNames="{style.button} {style.reply} {style.handCursor}">Reply</g:Anchor>
+ <g:HTMLPanel ui:field="replyAllGroup" tag="span"
+ addStyleNames="{style.dropButton} {style.handCursor}">
+ <g:Anchor ui:field="replyAll" addStyleNames="{style.button} {style.replyAll}">Reply all
+ </g:Anchor>
+ <g:HTMLPanel ui:field="replyAllTip" tag="span" addStyleNames="{style.dropButtonTip}" />
+ </g:HTMLPanel>
+ <g:HTMLPanel ui:field="forwardGroup" tag="span"
+ addStyleNames="{style.dropButton} {style.handCursor}">
+ <g:Anchor ui:field="forward" addStyleNames="{style.button} {style.forward}">Forward
+ </g:Anchor>
+ <g:HTMLPanel ui:field="forwardTip" tag="span" addStyleNames="{style.dropButtonTip}" />
+ </g:HTMLPanel>
+ <g:Anchor ui:field="delete"
+ addStyleNames="{style.button} {style.delete} {style.handCursor}">Delete</g:Anchor>
+ <g:Anchor ui:field="mark"
+ addStyleNames="{style.button} {style.mark} {style.handCursor}">Mark</g:Anchor>
+ <g:Anchor ui:field="more"
+ addStyleNames="{style.button} {style.more} {style.handCursor}">More</g:Anchor>
+ </g:FlowPanel>
+</ui:UiBinder>
\ No newline at end of file
Added: james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/TopBarView.java
URL: http://svn.apache.org/viewvc/james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/TopBarView.java?rev=1516164&view=auto
==============================================================================
--- james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/TopBarView.java (added)
+++ james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/TopBarView.java Wed Aug 21 14:08:19 2013
@@ -0,0 +1,98 @@
+/****************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one *
+ * or more contributor license agreements. See the NOTICE file *
+ * distributed with this work for additional information *
+ * regarding copyright ownership. The ASF licenses this file *
+ * to you under the Apache License, Version 2.0 (the *
+ * "License"); you may not use this file except in compliance *
+ * with the License. You may obtain a copy of the License at *
+ * *
+ * http://www.apache.org/licenses/LICENSE-2.0 *
+ * *
+ * Unless required by applicable law or agreed to in writing, *
+ * software distributed under the License is distributed on an *
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY *
+ * KIND, either express or implied. See the License for the *
+ * specific language governing permissions and limitations *
+ * under the License. *
+ ****************************************************************/
+
+package org.apache.hupa.client.ui;
+
+import org.apache.hupa.client.activity.TopBarActivity;
+
+import com.google.gwt.core.client.GWT;
+import com.google.gwt.event.dom.client.ClickEvent;
+import com.google.gwt.event.dom.client.HasClickHandlers;
+import com.google.gwt.resources.client.CssResource;
+import com.google.gwt.uibinder.client.UiBinder;
+import com.google.gwt.uibinder.client.UiField;
+import com.google.gwt.uibinder.client.UiHandler;
+import com.google.gwt.user.client.Window;
+import com.google.gwt.user.client.ui.Anchor;
+import com.google.gwt.user.client.ui.Composite;
+import com.google.gwt.user.client.ui.DockLayoutPanel;
+import com.google.gwt.user.client.ui.HTML;
+import com.google.gwt.user.client.ui.HTMLPanel;
+import com.google.gwt.user.client.ui.SimplePanel;
+
+public class TopBarView extends Composite implements TopBarActivity.Displayable {
+
+ @UiField Anchor about;
+ @UiField Anchor logout;
+ @UiField HTMLPanel userLabel;
+ @UiField SimplePanel loading;
+ @UiField HTML loadingRegion;
+
+ @UiField Style style;
+
+ interface Style extends CssResource {
+ String hideLoading();
+ }
+
+ public TopBarView() {
+ initWidget(binder.createAndBindUi(this));
+ }
+
+ @UiHandler("about")
+ void handleAboutClick(ClickEvent e){
+ Window.alert("// TODO show about model view");
+ }
+
+ @Override
+ public void showLoading(String message){
+ loadingRegion.setHTML(message);
+ loading.removeStyleName(style.hideLoading());
+ }
+
+ @Override
+ public void hideLoading(){
+ loadingRegion.setHTML("");
+ loading.addStyleName(style.hideLoading());
+ }
+
+ @Override
+ public HasClickHandlers getLogoutClick() {
+ return logout;
+ }
+
+ @Override
+ public HTMLPanel getUserLabel() {
+ return userLabel;
+ }
+
+ @Override
+ public void showUserName(String userName){
+<<<<<<< HEAD
+=======
+ userLabel.clear();
+>>>>>>> 7635f4a0e76a4bbbeb6a4029aff92087f00eb09f
+ userLabel.add(new HTML(userName));
+ }
+
+ interface TopBarUiBinder extends UiBinder<DockLayoutPanel, TopBarView> {
+ }
+
+ private static TopBarUiBinder binder = GWT.create(TopBarUiBinder.class);
+
+}
Added: james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/TopBarView.ui.xml
URL: http://svn.apache.org/viewvc/james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/TopBarView.ui.xml?rev=1516164&view=auto
==============================================================================
--- james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/TopBarView.ui.xml (added)
+++ james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/TopBarView.ui.xml Wed Aug 21 14:08:19 2013
@@ -0,0 +1,110 @@
+<!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor
+ license agreements. See the NOTICE file distributed with this work for additional
+ information regarding copyright ownership. The ASF licenses this file to
+ you under the Apache License, Version 2.0 (the "License"); you may not use
+ this file except in compliance with the License. You may obtain a copy of
+ the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required
+ by applicable law or agreed to in writing, software distributed under the
+ License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS
+ OF ANY KIND, either express or implied. See the License for the specific
+ language governing permissions and limitations under the License. -->
+
+<ui:UiBinder xmlns:ui='urn:ui:com.google.gwt.uibinder'
+ xmlns:g='urn:import:com.google.gwt.user.client.ui'>
+ <ui:image field="topBarBackgroundImg" src="res/linen_header.jpg" />
+ <ui:image field="buttons" src="res/buttons.png" />
+ <ui:style type="org.apache.hupa.client.ui.TopBarView.Style">
+ @sprite .self {
+ gwt-image: 'topBarBackgroundImg';
+ 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;
+ }
+
+ @sprite .logout {
+ gwt-image: 'buttons';
+ display: inline-block;
+ padding: 4px 8px 2px 20px;
+ color: white;
+ background-position: -4px -191px;
+ cursor: pointer;
+ }
+
+ .about {
+ display: inline-block;
+ padding: 4px 0.8em 0 10px;
+ color: #AAA;
+ text-decoration: none;
+ cursor: pointer;
+ }
+
+ .username {
+ padding-top: 4px;
+ padding-right: 1em;
+ }
+
+ .left {
+ float: left;
+ }
+
+ .right {
+ float: right;
+ }
+
+ .textCenter {
+ text-align: center;
+ }
+
+ .loadingPosition {
+ position: absolute;
+ left: 0;
+ top: 0;
+ width: 100%;
+ height: 100%;
+ }
+
+ .fontFeel {
+ display: inline-block;
+ border-color: #f0c36d;
+ background-color: #f9edbe;
+ padding: 0 10px;
+ border: 1px solid transparent;
+ border-radius: 2px;
+ -webkit-border-radius: 2px;
+ -webkit-box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
+ box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
+ color: black;
+ font-weight: bold;
+ }
+
+ .hideLoading {
+ visibility: hidden;
+ }
+ </ui:style>
+ <g:DockLayoutPanel ui:field="TopBar" unit="PX"
+ addStyleNames="{style.self} ">
+ <g:west size="300">
+ <g:SimplePanel addStyleNames="{style.left}">
+ <g:Anchor ui:field="about" styleName="{style.about}">About</g:Anchor>
+ </g:SimplePanel>
+ </g:west>
+ <g:center>
+ <g:SimplePanel addStyleNames="{style.hideLoading} {style.loadingPosition} {style.textCenter}" ui:field="loading">
+ <g:HTML ui:field="loadingRegion" addStyleNames="{style.fontFeel}">Loading...
+ </g:HTML>
+ </g:SimplePanel>
+ </g:center>
+ <g:east size="300">
+ <g:FlowPanel>
+ <g:Anchor ui:field="logout" addStyleNames="{style.right} {style.logout}">Logout</g:Anchor>
+ <g:HTMLPanel ui:field="userLabel" tag="span"
+ addStyleNames="{style.right} {style.username}" />
+ </g:FlowPanel>
+ </g:east>
+ </g:DockLayoutPanel>
+</ui:UiBinder>
\ No newline at end of file
Added: james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/TopView.java
URL: http://svn.apache.org/viewvc/james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/TopView.java?rev=1516164&view=auto
==============================================================================
--- james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/TopView.java (added)
+++ james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/TopView.java Wed Aug 21 14:08:19 2013
@@ -0,0 +1,139 @@
+/****************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one *
+ * or more contributor license agreements. See the NOTICE file *
+ * distributed with this work for additional information *
+ * regarding copyright ownership. The ASF licenses this file *
+ * to you under the Apache License, Version 2.0 (the *
+ * "License"); you may not use this file except in compliance *
+ * with the License. You may obtain a copy of the License at *
+ * *
+ * http://www.apache.org/licenses/LICENSE-2.0 *
+ * *
+ * Unless required by applicable law or agreed to in writing, *
+ * software distributed under the License is distributed on an *
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY *
+ * KIND, either express or implied. See the License for the *
+ * specific language governing permissions and limitations *
+ * under the License. *
+ ****************************************************************/
+
+package org.apache.hupa.client.ui;
+
+import org.apache.hupa.client.HupaCSS;
+import org.apache.hupa.client.HupaConstants;
+import org.apache.hupa.client.activity.TopActivity;
+import org.apache.hupa.shared.events.ServerStatusEvent.ServerStatus;
+import org.apache.hupa.widgets.ui.RndPanel;
+
+import com.google.gwt.core.client.GWT;
+import com.google.gwt.event.dom.client.HasClickHandlers;
+import com.google.gwt.uibinder.client.UiBinder;
+import com.google.gwt.uibinder.client.UiField;
+import com.google.gwt.user.client.Timer;
+import com.google.gwt.user.client.ui.Anchor;
+import com.google.gwt.user.client.ui.Composite;
+import com.google.gwt.user.client.ui.FlowPanel;
+import com.google.gwt.user.client.ui.HasText;
+import com.google.gwt.user.client.ui.HorizontalPanel;
+import com.google.gwt.user.client.ui.Label;
+import com.google.inject.Inject;
+
+public class TopView extends Composite implements TopActivity.Displayable {
+ @UiField HorizontalPanel buttonContainer;
+ @UiField HorizontalPanel infoContainer;
+ @UiField HorizontalPanel loginInfoPanel;
+ private Label loginLabel = new Label();
+ @UiField Label loginUserLabel;
+ @UiField Anchor mainButton;
+ private Anchor contactsButton;
+ @UiField Anchor logoutButton;
+ @UiField Label appnameLabel;
+
+ private RndPanel flashContainer = new RndPanel();
+ private Label flashLabel = new Label();
+ @UiField Label extraLabel;
+
+ @Inject
+ public TopView(HupaConstants constants) {
+ initWidget(binder.createAndBindUi(this));
+ mainButton.setText(constants.mailTab());
+ contactsButton = new Anchor(constants.contactsTab());
+ logoutButton.setText(constants.logoutButton());
+ loginLabel.addStyleName(HupaCSS.C_login_info_label);
+ logoutButton.addStyleName(HupaCSS.C_menu_button);
+ appnameLabel.addStyleName(HupaCSS.C_header);
+ flashContainer.addStyleName(HupaCSS.C_flash);
+ loginLabel.setText(constants.loginAs() + ": ");
+ appnameLabel.setText(constants.productName());
+ infoContainer.add(appnameLabel);
+ infoContainer.add(extraLabel);
+ flashContainer.add(flashLabel);
+ showTopNavigation(false);
+ }
+
+ @Override
+ public HasClickHandlers getLogoutClick() {
+ return logoutButton;
+ }
+
+ @Override
+ public HasClickHandlers getContactsClick() {
+ return contactsButton;
+ }
+
+ @Override
+ public HasClickHandlers getMainClick() {
+ return mainButton;
+ }
+
+ @Override
+ public void showTopNavigation(boolean show) {
+ buttonContainer.setVisible(show);
+ }
+
+ @Override
+ public void showContactsButton() {
+ mainButton.setVisible(false);
+ contactsButton.setVisible(true);
+ }
+
+ @Override
+ public void showMainButton() {
+ mainButton.setVisible(true);
+ contactsButton.setVisible(false);
+ }
+
+ @Override
+ public HasText getUserText() {
+ return loginUserLabel;
+ }
+
+ @Override
+ public void setServerStatus(ServerStatus status) {
+ if (status == ServerStatus.Available)
+ showMessage("Server available.", 20000);
+ else
+ showMessage("Server unavailable", 0);
+ }
+
+ @Override
+ public void showMessage(String message, int millisecs) {
+ flashLabel.setText(message);
+ flashContainer.setVisible(true);
+ if (millisecs > 0)
+ hideMessage.schedule(millisecs);
+ }
+
+ private final Timer hideMessage = new Timer() {
+ public void run() {
+ flashContainer.setVisible(false);
+ flashLabel.setText("");
+ }
+ };
+
+ interface TopViewUiBinder extends UiBinder<FlowPanel, TopView> {
+ }
+
+ private static TopViewUiBinder binder = GWT.create(TopViewUiBinder.class);
+
+}
Added: james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/TopView.ui.xml
URL: http://svn.apache.org/viewvc/james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/TopView.ui.xml?rev=1516164&view=auto
==============================================================================
--- james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/TopView.ui.xml (added)
+++ james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/TopView.ui.xml Wed Aug 21 14:08:19 2013
@@ -0,0 +1,34 @@
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+
+<ui:UiBinder xmlns:ui='urn:ui:com.google.gwt.uibinder'
+ xmlns:g='urn:import:com.google.gwt.user.client.ui'>
+ <g:FlowPanel ui:field="topWrapper">
+ <g:HorizontalPanel ui:field="buttonContainer">
+ <g:HorizontalPanel ui:field="loginInfoPanel"></g:HorizontalPanel>
+ <g:Label ui:field="loginUserLabel"></g:Label>
+ <g:Anchor ui:field="mainButton"></g:Anchor>
+ <g:Anchor ui:field="logoutButton"></g:Anchor>
+ </g:HorizontalPanel>
+ <g:HorizontalPanel ui:field="infoContainer">
+ <g:Label ui:field="appnameLabel"></g:Label>
+ <g:Label ui:field="extraLabel"></g:Label>
+ </g:HorizontalPanel>
+ </g:FlowPanel>
+</ui:UiBinder>
\ No newline at end of file
Added: james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/WestView.java
URL: http://svn.apache.org/viewvc/james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/WestView.java?rev=1516164&view=auto
==============================================================================
--- james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/WestView.java (added)
+++ james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/WestView.java Wed Aug 21 14:08:19 2013
@@ -0,0 +1,78 @@
+/****************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one *
+ * or more contributor license agreements. See the NOTICE file *
+ * distributed with this work for additional information *
+ * regarding copyright ownership. The ASF licenses this file *
+ * to you under the Apache License, Version 2.0 (the *
+ * "License"); you may not use this file except in compliance *
+ * with the License. You may obtain a copy of the License at *
+ * *
+ * http://www.apache.org/licenses/LICENSE-2.0 *
+ * *
+ * Unless required by applicable law or agreed to in writing, *
+ * software distributed under the License is distributed on an *
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY *
+ * KIND, either express or implied. See the License for the *
+ * specific language governing permissions and limitations *
+ * under the License. *
+ ****************************************************************/
+
+package org.apache.hupa.client.ui;
+
+import org.apache.hupa.client.activity.WestActivity;
+import org.apache.hupa.shared.domain.ImapFolder;
+import org.apache.hupa.shared.domain.User;
+import org.apache.hupa.shared.events.LoadMessagesEvent;
+
+import com.google.gwt.core.client.GWT;
+import com.google.gwt.event.shared.EventBus;
+import com.google.gwt.user.cellview.client.CellTree;
+import com.google.gwt.user.client.ui.Composite;
+import com.google.gwt.user.client.ui.Widget;
+import com.google.gwt.view.client.ProvidesKey;
+import com.google.gwt.view.client.SelectionChangeEvent;
+import com.google.gwt.view.client.SingleSelectionModel;
+import com.google.inject.Inject;
+
+/**
+ * MainView acts like a container of other widgets which will get displayed
+ * after the user successfully logged in
+ *
+ *
+ */
+public class WestView extends Composite implements WestActivity.Displayable {
+
+ protected User user;
+ private CellTree cellTree;
+
+ @Inject
+ public WestView(final EventBus eventBus) {
+ selectionModel.addSelectionChangeHandler(new SelectionChangeEvent.Handler() {
+ @SuppressWarnings("unchecked")
+ @Override
+ public void onSelectionChange(SelectionChangeEvent event) {
+ SingleSelectionModel<ImapFolder> selectionModel = (SingleSelectionModel<ImapFolder>) event.getSource();
+ eventBus.fireEvent(new LoadMessagesEvent(user, selectionModel.getSelectedObject()));
+ }
+ });
+// viewModel.setSelectionModel(selectionModel);
+
+ CellTree.Resources res = GWT.create(CellTree.BasicResources.class);
+ cellTree = new CellTree(null, res);
+ cellTree.setAnimationEnabled(true);
+ initWidget(cellTree);
+
+ }
+
+ private final SingleSelectionModel<ImapFolder> selectionModel = new SingleSelectionModel<ImapFolder>(
+ new ProvidesKey<ImapFolder>() {
+ @Override
+ public Object getKey(ImapFolder item) {
+ return item == null ? null : item.getFullName();
+ }
+ });
+
+ public Widget asWidget() {
+ return this;
+ }
+}
Copied: james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/WidgetContainerDisplayable.java (from r1375909, james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/rpc/Idle.java)
URL: http://svn.apache.org/viewvc/james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/WidgetContainerDisplayable.java?p2=james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/WidgetContainerDisplayable.java&p1=james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/rpc/Idle.java&r1=1375909&r2=1516164&rev=1516164&view=diff
==============================================================================
--- james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/rpc/Idle.java (original)
+++ james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/WidgetContainerDisplayable.java Wed Aug 21 14:08:19 2013
@@ -1,31 +1,38 @@
-/****************************************************************
- * Licensed to the Apache Software Foundation (ASF) under one *
- * or more contributor license agreements. See the NOTICE file *
- * distributed with this work for additional information *
- * regarding copyright ownership. The ASF licenses this file *
- * to you under the Apache License, Version 2.0 (the *
- * "License"); you may not use this file except in compliance *
- * with the License. You may obtain a copy of the License at *
- * *
- * http://www.apache.org/licenses/LICENSE-2.0 *
- * *
- * Unless required by applicable law or agreed to in writing, *
- * software distributed under the License is distributed on an *
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY *
- * KIND, either express or implied. See the License for the *
- * specific language governing permissions and limitations *
- * under the License. *
- ****************************************************************/
-
-package org.apache.hupa.shared.rpc;
-
-import java.io.Serializable;
-
-import net.customware.gwt.dispatch.shared.Action;
-
-
-public class Idle implements Action<IdleResult>, Serializable {
-
- private static final long serialVersionUID = 4076791577558340559L;
-
-}
+/****************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one *
+ * or more contributor license agreements. See the NOTICE file *
+ * distributed with this work for additional information *
+ * regarding copyright ownership. The ASF licenses this file *
+ * to you under the Apache License, Version 2.0 (the *
+ * "License"); you may not use this file except in compliance *
+ * with the License. You may obtain a copy of the License at *
+ * *
+ * http://www.apache.org/licenses/LICENSE-2.0 *
+ * *
+ * Unless required by applicable law or agreed to in writing, *
+ * software distributed under the License is distributed on an *
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY *
+ * KIND, either express or implied. See the License for the *
+ * specific language governing permissions and limitations *
+ * under the License. *
+ ****************************************************************/
+
+package org.apache.hupa.client.ui;
+
+<<<<<<< HEAD
+import com.google.gwt.user.client.ui.Widget;
+
+public interface WidgetContainerDisplayable extends WidgetDisplayable {
+=======
+import com.google.gwt.user.client.ui.IsWidget;
+import com.google.gwt.user.client.ui.Widget;
+
+public interface WidgetContainerDisplayable extends IsWidget {
+>>>>>>> 7635f4a0e76a4bbbeb6a4029aff92087f00eb09f
+
+ void addWidget( Widget widget );
+
+ void removeWidget( Widget widget );
+
+ void showWidget( Widget widget );
+}
Copied: james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/WidgetDisplayable.java (from r1375909, james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/rpc/MoveMessageResult.java)
URL: http://svn.apache.org/viewvc/james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/WidgetDisplayable.java?p2=james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/WidgetDisplayable.java&p1=james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/rpc/MoveMessageResult.java&r1=1375909&r2=1516164&rev=1516164&view=diff
==============================================================================
--- james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/rpc/MoveMessageResult.java (original)
+++ james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/WidgetDisplayable.java Wed Aug 21 14:08:19 2013
@@ -1,29 +1,27 @@
-/****************************************************************
- * Licensed to the Apache Software Foundation (ASF) under one *
- * or more contributor license agreements. See the NOTICE file *
- * distributed with this work for additional information *
- * regarding copyright ownership. The ASF licenses this file *
- * to you under the Apache License, Version 2.0 (the *
- * "License"); you may not use this file except in compliance *
- * with the License. You may obtain a copy of the License at *
- * *
- * http://www.apache.org/licenses/LICENSE-2.0 *
- * *
- * Unless required by applicable law or agreed to in writing, *
- * software distributed under the License is distributed on an *
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY *
- * KIND, either express or implied. See the License for the *
- * specific language governing permissions and limitations *
- * under the License. *
- ****************************************************************/
-
-package org.apache.hupa.shared.rpc;
-
-public class MoveMessageResult extends GenericResult{
-
- /**
- *
- */
- private static final long serialVersionUID = 341407423455525004L;
-
-}
+/****************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one *
+ * or more contributor license agreements. See the NOTICE file *
+ * distributed with this work for additional information *
+ * regarding copyright ownership. The ASF licenses this file *
+ * to you under the Apache License, Version 2.0 (the *
+ * "License"); you may not use this file except in compliance *
+ * with the License. You may obtain a copy of the License at *
+ * *
+ * http://www.apache.org/licenses/LICENSE-2.0 *
+ * *
+ * Unless required by applicable law or agreed to in writing, *
+ * software distributed under the License is distributed on an *
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY *
+ * KIND, either express or implied. See the License for the *
+ * specific language governing permissions and limitations *
+ * under the License. *
+ ****************************************************************/
+
+package org.apache.hupa.client.ui;
+
+import com.google.gwt.user.client.ui.Widget;
+
+public interface WidgetDisplayable extends Displayable {
+ Widget asWidget();
+
+}
Added: james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/_CenterComposePanel.java
URL: http://svn.apache.org/viewvc/james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/_CenterComposePanel.java?rev=1516164&view=auto
==============================================================================
--- james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/_CenterComposePanel.java (added)
+++ james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/_CenterComposePanel.java Wed Aug 21 14:08:19 2013
@@ -0,0 +1,65 @@
+/****************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one *
+ * or more contributor license agreements. See the NOTICE file *
+ * distributed with this work for additional information *
+ * regarding copyright ownership. The ASF licenses this file *
+ * to you under the Apache License, Version 2.0 (the *
+ * "License"); you may not use this file except in compliance *
+ * with the License. You may obtain a copy of the License at *
+ * *
+ * http://www.apache.org/licenses/LICENSE-2.0 *
+ * *
+ * Unless required by applicable law or agreed to in writing, *
+ * software distributed under the License is distributed on an *
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY *
+ * KIND, either express or implied. See the License for the *
+ * specific language governing permissions and limitations *
+ * under the License. *
+ ****************************************************************/
+
+package org.apache.hupa.client.ui;
+
+import com.google.gwt.core.client.GWT;
+import com.google.gwt.uibinder.client.UiBinder;
+import com.google.gwt.uibinder.client.UiField;
+import com.google.gwt.user.client.ui.AcceptsOneWidget;
+import com.google.gwt.user.client.ui.Composite;
+import com.google.gwt.user.client.ui.IsWidget;
+import com.google.gwt.user.client.ui.SimpleLayoutPanel;
+import com.google.gwt.user.client.ui.SplitLayoutPanel;
+import com.google.gwt.user.client.ui.Widget;
+
+public class _CenterComposePanel extends Composite {
+
+ @UiField protected SplitLayoutPanel thisPanel;
+ @UiField protected __OutlineComposePanel outlinePanel;
+ @UiField protected SimpleLayoutPanel composeContainer;
+
+ public _CenterComposePanel() {
+ initWidget(binder.createAndBindUi(this));
+ thisPanel.setWidgetMinSize(outlinePanel, 144);
+ }
+
+ public AcceptsOneWidget getContactListView() {
+ return outlinePanel.getContactListView();
+ }
+
+
+ interface _CenterPanelUiBinder extends
+ UiBinder<SplitLayoutPanel, _CenterComposePanel> {
+ }
+
+ private static _CenterPanelUiBinder binder = GWT
+ .create(_CenterPanelUiBinder.class);
+
+
+ public AcceptsOneWidget getComposeView() {
+ return new AcceptsOneWidget() {
+ @Override
+ public void setWidget(IsWidget w) {
+ composeContainer.setWidget(Widget.asWidgetOrNull(w));
+ }
+ };
+ }
+
+}
Added: james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/_CenterComposePanel.ui.xml
URL: http://svn.apache.org/viewvc/james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/_CenterComposePanel.ui.xml?rev=1516164&view=auto
==============================================================================
--- james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/_CenterComposePanel.ui.xml (added)
+++ james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/_CenterComposePanel.ui.xml Wed Aug 21 14:08:19 2013
@@ -0,0 +1,24 @@
+<!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor
+ license agreements. See the NOTICE file distributed with this work for additional
+ information regarding copyright ownership. The ASF licenses this file to
+ you under the Apache License, Version 2.0 (the "License"); you may not use
+ this file except in compliance with the License. You may obtain a copy of
+ the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required
+ by applicable law or agreed to in writing, software distributed under the
+ License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS
+ OF ANY KIND, either express or implied. See the License for the specific
+ language governing permissions and limitations under the License. -->
+
+<ui:UiBinder xmlns:ui='urn:ui:com.google.gwt.uibinder'
+ xmlns:g='urn:import:com.google.gwt.user.client.ui' xmlns:hupa='urn:import:org.apache.hupa.client.ui'>
+ <ui:style src="res/CssSplitLayoutPanel.css" />
+ <g:SplitLayoutPanel ui:field="thisPanel"
+ addStyleNames="{style.splitLayoutPanel}">
+ <g:west size="220">
+ <hupa:__OutlineComposePanel ui:field="outlinePanel" />
+ </g:west>
+ <g:center>
+ <g:SimpleLayoutPanel ui:field="composeContainer" />
+ </g:center>
+ </g:SplitLayoutPanel>
+</ui:UiBinder>
\ No newline at end of file
Added: james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/_CenterContactPanel.java
URL: http://svn.apache.org/viewvc/james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/_CenterContactPanel.java?rev=1516164&view=auto
==============================================================================
--- james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/_CenterContactPanel.java (added)
+++ james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/_CenterContactPanel.java Wed Aug 21 14:08:19 2013
@@ -0,0 +1,117 @@
+/****************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one *
+ * or more contributor license agreements. See the NOTICE file *
+ * distributed with this work for additional information *
+ * regarding copyright ownership. The ASF licenses this file *
+ * to you under the Apache License, Version 2.0 (the *
+ * "License"); you may not use this file except in compliance *
+ * with the License. You may obtain a copy of the License at *
+ * *
+ * http://www.apache.org/licenses/LICENSE-2.0 *
+ * *
+ * Unless required by applicable law or agreed to in writing, *
+ * software distributed under the License is distributed on an *
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY *
+ * KIND, either express or implied. See the License for the *
+ * specific language governing permissions and limitations *
+ * under the License. *
+ ****************************************************************/
+
+package org.apache.hupa.client.ui;
+
+import java.util.Arrays;
+import java.util.List;
+
+import com.google.gwt.cell.client.AbstractCell;
+import com.google.gwt.core.client.GWT;
+import com.google.gwt.safehtml.shared.SafeHtmlBuilder;
+import com.google.gwt.uibinder.client.UiBinder;
+import com.google.gwt.uibinder.client.UiField;
+import com.google.gwt.user.cellview.client.CellList;
+import com.google.gwt.user.cellview.client.HasKeyboardSelectionPolicy.KeyboardSelectionPolicy;
+import com.google.gwt.user.client.ui.AcceptsOneWidget;
+import com.google.gwt.user.client.ui.Composite;
+import com.google.gwt.user.client.ui.IsWidget;
+import com.google.gwt.user.client.ui.SimpleLayoutPanel;
+import com.google.gwt.user.client.ui.SimplePanel;
+import com.google.gwt.user.client.ui.SplitLayoutPanel;
+import com.google.gwt.user.client.ui.Widget;
+import com.google.gwt.view.client.SelectionChangeEvent;
+import com.google.gwt.view.client.SingleSelectionModel;
+
+public class _CenterContactPanel extends Composite {
+
+ @UiField SplitLayoutPanel thisPanel;
+
+ @UiField SimpleLayoutPanel settingsTab;
+
+ @UiField SimpleLayoutPanel labelListContainer;
+ @UiField SimplePanel labelPropertiesContainer;
+
+ public _CenterContactPanel() {
+
+ initWidget(binder.createAndBindUi(this));
+ settingsTab.setWidget(createTabList());
+ }
+
+ private static final List<String> TABS = Arrays.asList("Folders");
+
+ private CellList<String> createTabList() {
+ CellList<String> cellList = new CellList<String>(new SpanCell());
+ cellList.setKeyboardSelectionPolicy(KeyboardSelectionPolicy.ENABLED);
+ final SingleSelectionModel<String> selectionModel = new SingleSelectionModel<String>();
+ cellList.setSelectionModel(selectionModel);
+ selectionModel.addSelectionChangeHandler(new SelectionChangeEvent.Handler() {
+ public void onSelectionChange(SelectionChangeEvent event) {
+ String selected = selectionModel.getSelectedObject();
+ if (selected != null) {
+ // Window.alert("You selected: " + selected);
+ }
+ }
+ });
+ cellList.setRowCount(TABS.size(), true);
+
+ // Push the data into the widget.
+ cellList.setRowData(0, TABS);
+ return cellList;
+ }
+
+ static class SpanCell extends AbstractCell<String> {
+
+ public SpanCell() {
+ }
+
+ @Override
+ public void render(Context context, String value, SafeHtmlBuilder sb) {
+ if (value == null) {
+ return;
+ }
+ sb.appendHtmlConstant("<span style='display: block;color: #376572;text-shadow: 0px 1px 1px #fff;text-decoration: none;cursor: default;padding: 6px 8px 2px 8px;height: 17px;white-space: nowrap;'>");
+ sb.appendHtmlConstant(value);
+ sb.appendHtmlConstant("</span>");
+ }
+ }
+
+ interface _CeterSettingPanelUiBinder extends UiBinder<SplitLayoutPanel, _CenterContactPanel> {
+ }
+
+ private static _CeterSettingPanelUiBinder binder = GWT.create(_CeterSettingPanelUiBinder.class);
+
+ public AcceptsOneWidget getContactListView() {
+ return new AcceptsOneWidget() {
+ @Override
+ public void setWidget(IsWidget w) {
+ labelListContainer.setWidget(Widget.asWidgetOrNull(w));
+ }
+ };
+ }
+
+ public AcceptsOneWidget getContactPropertiesView() {
+ return new AcceptsOneWidget() {
+ @Override
+ public void setWidget(IsWidget w) {
+ labelPropertiesContainer.setWidget(Widget.asWidgetOrNull(w));
+ }
+ };
+ }
+}
Added: james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/_CenterContactPanel.ui.xml
URL: http://svn.apache.org/viewvc/james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/_CenterContactPanel.ui.xml?rev=1516164&view=auto
==============================================================================
--- james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/_CenterContactPanel.ui.xml (added)
+++ james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/_CenterContactPanel.ui.xml Wed Aug 21 14:08:19 2013
@@ -0,0 +1,147 @@
+<!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor
+ license agreements. See the NOTICE file distributed with this work for additional
+ information regarding copyright ownership. The ASF licenses this file to
+ you under the Apache License, Version 2.0 (the "License"); you may not use
+ this file except in compliance with the License. You may obtain a copy of
+ the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required
+ by applicable law or agreed to in writing, software distributed under the
+ License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS
+ OF ANY KIND, either express or implied. See the License for the specific
+ language governing permissions and limitations under the License. -->
+<ui:UiBinder xmlns:ui='urn:ui:com.google.gwt.uibinder'
+ xmlns:g='urn:import:com.google.gwt.user.client.ui' xmlns:hupa='urn:import:org.apache.hupa.client.ui'>
+
+ <ui:style src="res/CssSplitLayoutPanel.css">
+ .scroller {
+ overflow: 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: #fff;
+ }
+
+ .listbox {
+ background: #d9ecf4;
+ overflow: hidden;
+ }
+
+ .listbox .scroller {
+ position: absolute;
+ top: 0;
+ left: 0;
+ width: 100%;
+ bottom: 0;
+ overflow-x: hidden;
+ overflow-y: auto;
+ }
+
+ .listbox .scroller.withfooter {
+ bottom: 42px;
+ }
+
+ .listbox .boxtitle+.scroller {
+ top: 34px;
+ }
+
+ .boxtitle,.uibox .listing thead td {
+ font-size: 12px;
+ font-weight: bold;
+ padding: 10px 8px 3px 8px;
+ height: 20px; /* doesn't affect table-cells in FF */
+ margin: 0;
+ text-shadow: 0px 1px 1px #fff;
+ border-bottom: 1px solid #bbd3da;
+ white-space: nowrap;
+ }
+
+ .uibox .boxtitle,.uibox .listing thead td {
+ background: #b0ccd7;
+ color: #004458;
+ border-radius: 4px 4px 0 0;
+ }
+
+ .contentbox .boxtitle {
+ color: #777;
+ background: #eee;
+ background: -moz-linear-gradient(top, #eee 0%, #dfdfdf 100%);
+ background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #eee),
+ color-stop(100%, #dfdfdf) );
+ background: -o-linear-gradient(top, #eee 0%, #dfdfdf 100%);
+ background: -ms-linear-gradient(top, #eee 0%, #dfdfdf 100%);
+ background: linear-gradient(top, #eee 0%, #dfdfdf 100%);
+ border-bottom: 1px solid #ccc;
+ }
+
+ .contentbox .scroller {
+ position: absolute;
+ top: 34px;
+ left: 0;
+ right: 0;
+ bottom: 28px;
+ overflow: auto;
+ }
+
+ body.iframe .boxtitle {
+ position: fixed;
+ top: 0;
+ left: 0;
+ width: 100%;
+ z-index: 100;
+ }
+
+ .boxcontent {
+ padding: 10px;
+ }
+ </ui:style>
+
+ <g:SplitLayoutPanel ui:field="thisPanel"
+ addStyleNames="{style.splitLayoutPanel}">
+ <g:west size="220">
+ <g:DockLayoutPanel addStyleNames="{style.listbox} {style.uibox}">
+ <g:north size="34">
+ <g:HTML>
+ <h2 class="{style.boxtitle}">Groups</h2>
+ </g:HTML>
+ </g:north>
+ <g:center>
+ <g:SimpleLayoutPanel ui:field="settingsTab"
+ addStyleNames="{style.scroller}" />
+ </g:center>
+ </g:DockLayoutPanel>
+ </g:west>
+ <g:center>
+ <g:SplitLayoutPanel>
+ <g:west size="260">
+ <g:DockLayoutPanel addStyleNames="{style.listbox} {style.uibox}">
+ <g:north size="34">
+ <g:HTML>
+ <h2 class="{style.boxtitle}">Contacts</h2>
+ </g:HTML>
+ </g:north>
+ <g:center>
+ <g:SimpleLayoutPanel ui:field="labelListContainer" />
+ </g:center>
+ </g:DockLayoutPanel>
+ </g:west>
+ <g:center>
+ <g:SimpleLayoutPanel addStyleNames="{style.uibox} {style.contentbox}">
+ <g:HTMLPanel>
+ <h2 class="{style.boxtitle}">Folder properties</h2>
+ <g:FlowPanel addStyleNames="{style.boxcontent}">
+ <g:SimplePanel ui:field="labelPropertiesContainer"></g:SimplePanel>
+ </g:FlowPanel>
+ <div class="{style.statusbar}" />
+ </g:HTMLPanel>
+ </g:SimpleLayoutPanel>
+ </g:center>
+ </g:SplitLayoutPanel>
+ </g:center>
+ </g:SplitLayoutPanel>
+</ui:UiBinder>
\ No newline at end of file
Added: james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/_CenterPanel.java
URL: http://svn.apache.org/viewvc/james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/_CenterPanel.java?rev=1516164&view=auto
==============================================================================
--- james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/_CenterPanel.java (added)
+++ james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/_CenterPanel.java Wed Aug 21 14:08:19 2013
@@ -0,0 +1,67 @@
+/****************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one *
+ * or more contributor license agreements. See the NOTICE file *
+ * distributed with this work for additional information *
+ * regarding copyright ownership. The ASF licenses this file *
+ * to you under the Apache License, Version 2.0 (the *
+ * "License"); you may not use this file except in compliance *
+ * with the License. You may obtain a copy of the License at *
+ * *
+ * http://www.apache.org/licenses/LICENSE-2.0 *
+ * *
+ * Unless required by applicable law or agreed to in writing, *
+ * software distributed under the License is distributed on an *
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY *
+ * KIND, either express or implied. See the License for the *
+ * specific language governing permissions and limitations *
+ * under the License. *
+ ****************************************************************/
+
+package org.apache.hupa.client.ui;
+
+import com.google.gwt.core.client.GWT;
+import com.google.gwt.uibinder.client.UiBinder;
+import com.google.gwt.uibinder.client.UiField;
+import com.google.gwt.user.client.ui.AcceptsOneWidget;
+import com.google.gwt.user.client.ui.Composite;
+import com.google.gwt.user.client.ui.SplitLayoutPanel;
+
+public class _CenterPanel extends Composite {
+
+ @UiField protected SplitLayoutPanel thisPanel;
+ @UiField protected __OutlinePanel outlinePanel;
+ @UiField protected __ContentPanel contentPanel;
+
+ public _CenterPanel() {
+ initWidget(binder.createAndBindUi(this));
+ thisPanel.setWidgetMinSize(outlinePanel, 144);
+ }
+
+ public AcceptsOneWidget getFolderListView() {
+ return outlinePanel.getFolderListView();
+ }
+
+ public AcceptsOneWidget getMessageListView() {
+ return contentPanel.getMessageListView();
+ }
+
+ public AcceptsOneWidget getMessageListFooterView() {
+ return contentPanel.getMessageListFooterView();
+ }
+
+ public AcceptsOneWidget getMessageContentView() {
+ return contentPanel.getMessageContentView();
+ }
+
+ public AcceptsOneWidget getStatusView() {
+ return contentPanel.getStatusView();
+ }
+
+ interface _CenterPanelUiBinder extends
+ UiBinder<SplitLayoutPanel, _CenterPanel> {
+ }
+
+ private static _CenterPanelUiBinder binder = GWT
+ .create(_CenterPanelUiBinder.class);
+
+}
Added: james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/_CenterPanel.ui.xml
URL: http://svn.apache.org/viewvc/james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/_CenterPanel.ui.xml?rev=1516164&view=auto
==============================================================================
--- james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/_CenterPanel.ui.xml (added)
+++ james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/_CenterPanel.ui.xml Wed Aug 21 14:08:19 2013
@@ -0,0 +1,24 @@
+<!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor
+ license agreements. See the NOTICE file distributed with this work for additional
+ information regarding copyright ownership. The ASF licenses this file to
+ you under the Apache License, Version 2.0 (the "License"); you may not use
+ this file except in compliance with the License. You may obtain a copy of
+ the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required
+ by applicable law or agreed to in writing, software distributed under the
+ License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS
+ OF ANY KIND, either express or implied. See the License for the specific
+ language governing permissions and limitations under the License. -->
+
+<ui:UiBinder xmlns:ui='urn:ui:com.google.gwt.uibinder'
+ xmlns:g='urn:import:com.google.gwt.user.client.ui' xmlns:hupa='urn:import:org.apache.hupa.client.ui'>
+ <ui:style src="res/CssSplitLayoutPanel.css" />
+ <g:SplitLayoutPanel ui:field="thisPanel"
+ addStyleNames="{style.splitLayoutPanel}">
+ <g:west size="220">
+ <hupa:__OutlinePanel ui:field="outlinePanel" />
+ </g:west>
+ <g:center>
+ <hupa:__ContentPanel ui:field="contentPanel" />
+ </g:center>
+ </g:SplitLayoutPanel>
+</ui:UiBinder>
\ No newline at end of file
Added: james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/_CenterSettingPanel.java
URL: http://svn.apache.org/viewvc/james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/_CenterSettingPanel.java?rev=1516164&view=auto
==============================================================================
--- james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/_CenterSettingPanel.java (added)
+++ james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/_CenterSettingPanel.java Wed Aug 21 14:08:19 2013
@@ -0,0 +1,175 @@
+/****************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one *
+ * or more contributor license agreements. See the NOTICE file *
+ * distributed with this work for additional information *
+ * regarding copyright ownership. The ASF licenses this file *
+ * to you under the Apache License, Version 2.0 (the *
+ * "License"); you may not use this file except in compliance *
+ * with the License. You may obtain a copy of the License at *
+ * *
+ * http://www.apache.org/licenses/LICENSE-2.0 *
+ * *
+ * Unless required by applicable law or agreed to in writing, *
+ * software distributed under the License is distributed on an *
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY *
+ * KIND, either express or implied. See the License for the *
+ * specific language governing permissions and limitations *
+ * under the License. *
+ ****************************************************************/
+
+package org.apache.hupa.client.ui;
+
+<<<<<<< HEAD
+import java.util.Arrays;
+import java.util.List;
+
+import org.apache.hupa.client.ui.FolderListView.Resources;
+
+import com.google.gwt.cell.client.AbstractCell;
+import com.google.gwt.core.client.GWT;
+import com.google.gwt.resources.client.ClientBundle.Source;
+import com.google.gwt.safehtml.shared.SafeHtmlBuilder;
+import com.google.gwt.uibinder.client.UiBinder;
+import com.google.gwt.uibinder.client.UiField;
+import com.google.gwt.user.cellview.client.CellList;
+import com.google.gwt.user.cellview.client.HasKeyboardSelectionPolicy.KeyboardSelectionPolicy;
+=======
+import com.google.gwt.core.client.GWT;
+import com.google.gwt.resources.client.CssResource;
+import com.google.gwt.uibinder.client.UiBinder;
+import com.google.gwt.uibinder.client.UiField;
+import com.google.gwt.user.cellview.client.CellList;
+>>>>>>> 7635f4a0e76a4bbbeb6a4029aff92087f00eb09f
+import com.google.gwt.user.client.ui.AcceptsOneWidget;
+import com.google.gwt.user.client.ui.Composite;
+import com.google.gwt.user.client.ui.IsWidget;
+import com.google.gwt.user.client.ui.SimpleLayoutPanel;
+import com.google.gwt.user.client.ui.SimplePanel;
+import com.google.gwt.user.client.ui.SplitLayoutPanel;
+import com.google.gwt.user.client.ui.Widget;
+<<<<<<< HEAD
+import com.google.gwt.view.client.SelectionChangeEvent;
+import com.google.gwt.view.client.SingleSelectionModel;
+
+public class _CenterSettingPanel extends Composite {
+
+ @UiField SplitLayoutPanel thisPanel;
+
+ @UiField SimpleLayoutPanel settingsTab;
+
+ @UiField SimpleLayoutPanel labelListContainer;
+ @UiField SimplePanel labelPropertiesContainer;
+
+ public _CenterSettingPanel() {
+
+ initWidget(binder.createAndBindUi(this));
+ settingsTab.setWidget(createTabList());
+ }
+
+ private static final List<String> TABS = Arrays.asList("Folders");
+
+=======
+
+public class _CenterSettingPanel extends Composite {
+
+
+ @UiField SplitLayoutPanel thisPanel;
+
+ @UiField SimpleLayoutPanel settingNavContainer;
+
+ @UiField SimpleLayoutPanel labelListContainer;
+ @UiField SimplePanel labelPropertiesContainer;
+
+ @UiField protected Style style;
+
+ interface Style extends CssResource {
+
+ }
+
+ public _CenterSettingPanel() {
+
+ initWidget(binder.createAndBindUi(this));
+ }
+
+>>>>>>> 7635f4a0e76a4bbbeb6a4029aff92087f00eb09f
+ public interface Resources extends CellList.Resources {
+
+ Resources INSTANCE = GWT.create(Resources.class);
+
+ @Source("res/CssLabelListView.css")
+ public CellList.Style cellListStyle();
+ }
+<<<<<<< HEAD
+ private CellList<String> createTabList() {
+ CellList<String> cellList = new CellList<String>(new SpanCell(), Resources.INSTANCE);
+ cellList.setKeyboardSelectionPolicy(KeyboardSelectionPolicy.ENABLED);
+ final SingleSelectionModel<String> selectionModel = new SingleSelectionModel<String>();
+ cellList.setSelectionModel(selectionModel);
+ selectionModel.addSelectionChangeHandler(new SelectionChangeEvent.Handler() {
+ public void onSelectionChange(SelectionChangeEvent event) {
+ String selected = selectionModel.getSelectedObject();
+ if (selected != null) {
+ // Window.alert("You selected: " + selected);
+ }
+ }
+ });
+ cellList.setRowCount(TABS.size(), true);
+
+ // Push the data into the widget.
+ cellList.setRowData(0, TABS);
+ return cellList;
+ }
+
+ static class SpanCell extends AbstractCell<String> {
+
+ public SpanCell() {
+ }
+
+ @Override
+ public void render(Context context, String value, SafeHtmlBuilder sb) {
+ if (value == null) {
+ return;
+ }
+ sb.appendHtmlConstant("<span >");
+ sb.appendHtmlConstant(value);
+ sb.appendHtmlConstant("</span>");
+ }
+ }
+=======
+>>>>>>> 7635f4a0e76a4bbbeb6a4029aff92087f00eb09f
+
+ interface _CeterSettingPanelUiBinder extends UiBinder<SplitLayoutPanel, _CenterSettingPanel> {
+ }
+
+ private static _CeterSettingPanelUiBinder binder = GWT.create(_CeterSettingPanelUiBinder.class);
+
+ public AcceptsOneWidget getLabelListView() {
+ return new AcceptsOneWidget() {
+ @Override
+ public void setWidget(IsWidget w) {
+ labelListContainer.setWidget(Widget.asWidgetOrNull(w));
+ }
+ };
+ }
+
+ public AcceptsOneWidget getLabelPropertiesView() {
+ return new AcceptsOneWidget() {
+ @Override
+ public void setWidget(IsWidget w) {
+ labelPropertiesContainer.setWidget(Widget.asWidgetOrNull(w));
+ }
+ };
+ }
+<<<<<<< HEAD
+=======
+
+ public AcceptsOneWidget getSettingNavView() {
+ return new AcceptsOneWidget() {
+ @Override
+ public void setWidget(IsWidget w) {
+ settingNavContainer.setWidget(Widget.asWidgetOrNull(w));
+ }
+ };
+ }
+>>>>>>> 7635f4a0e76a4bbbeb6a4029aff92087f00eb09f
+}
Added: james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/_CenterSettingPanel.ui.xml
URL: http://svn.apache.org/viewvc/james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/_CenterSettingPanel.ui.xml?rev=1516164&view=auto
==============================================================================
--- james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/_CenterSettingPanel.ui.xml (added)
+++ james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/_CenterSettingPanel.ui.xml Wed Aug 21 14:08:19 2013
@@ -0,0 +1,250 @@
+<!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor
+ license agreements. See the NOTICE file distributed with this work for additional
+ information regarding copyright ownership. The ASF licenses this file to
+ you under the Apache License, Version 2.0 (the "License"); you may not use
+ this file except in compliance with the License. You may obtain a copy of
+ the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required
+ by applicable law or agreed to in writing, software distributed under the
+ License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS
+ OF ANY KIND, either express or implied. See the License for the specific
+ language governing permissions and limitations under the License. -->
+<ui:UiBinder xmlns:ui='urn:ui:com.google.gwt.uibinder'
+ xmlns:g='urn:import:com.google.gwt.user.client.ui' xmlns:hupa='urn:import:org.apache.hupa.client.ui'>
+
+<<<<<<< HEAD
+ <ui:style src="res/CssSplitLayoutPanel.css">
+ .scroller {
+ overflow: 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: #fff;
+ }
+
+ .listbox {
+ background: #d9ecf4;
+ overflow: hidden;
+ }
+
+ .listbox .scroller {
+ position: absolute;
+ top: 0;
+ left: 0;
+ width: 100%;
+ bottom: 0;
+ overflow-x: hidden;
+ overflow-y: auto;
+ }
+
+ .listbox .scroller.withfooter {
+ bottom: 42px;
+ }
+
+ .listbox .boxtitle+.scroller {
+ top: 34px;
+ }
+
+ .boxtitle,.uibox .listing thead td {
+ font-size: 12px;
+ font-weight: bold;
+ padding: 10px 8px 3px 8px;
+ height: 20px; /* doesn't affect table-cells in FF */
+ margin: 0;
+ text-shadow: 0px 1px 1px #fff;
+ border-bottom: 1px solid #bbd3da;
+ white-space: nowrap;
+ }
+
+ .uibox .boxtitle,.uibox .listing thead td {
+ background: #b0ccd7;
+ color: #004458;
+ border-radius: 4px 4px 0 0;
+ }
+
+ .contentbox .boxtitle {
+ color: #777;
+ background: #eee;
+ background: -moz-linear-gradient(top, #eee 0%, #dfdfdf 100%);
+ background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #eee),
+ color-stop(100%, #dfdfdf) );
+ background: -o-linear-gradient(top, #eee 0%, #dfdfdf 100%);
+ background: -ms-linear-gradient(top, #eee 0%, #dfdfdf 100%);
+ background: linear-gradient(top, #eee 0%, #dfdfdf 100%);
+ border-bottom: 1px solid #ccc;
+ }
+
+ .contentbox .scroller {
+ position: absolute;
+ top: 34px;
+ left: 0;
+ right: 0;
+ bottom: 28px;
+ overflow: auto;
+ }
+
+ body.iframe .boxtitle {
+ position: fixed;
+ top: 0;
+ left: 0;
+ width: 100%;
+ z-index: 100;
+ }
+
+ .boxcontent {
+ padding: 10px;
+ }
+ </ui:style>
+=======
+ <ui:style src="res/CssSplitLayoutPanel.css"
+ type="org.apache.hupa.client.ui._CenterSettingPanel.Style">
+ .scroller {
+ overflow: 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: #fff;
+ }
+
+ .listbox {
+ background: #d9ecf4;
+ overflow: hidden;
+ }
+
+ .listbox .scroller {
+ position: absolute;
+ top: 0;
+ left: 0;
+ width: 100%;
+ bottom: 0;
+ overflow-x: hidden;
+ overflow-y: auto;
+ }
+
+ .listbox .scroller.withfooter {
+ bottom: 42px;
+ }
+
+ .listbox .boxtitle+.scroller {
+ top: 34px;
+ }
+
+ .boxtitle,.uibox .listing thead td {
+ font-size: 12px;
+ font-weight: bold;
+ padding: 10px 8px 3px 8px;
+ height: 20px; /* doesn't affect table-cells in FF */
+ margin: 0;
+ text-shadow: 0px 1px 1px #fff;
+ border-bottom: 1px solid #bbd3da;
+ white-space: nowrap;
+ }
+
+ .uibox .boxtitle,.uibox .listing thead td {
+ background: #b0ccd7;
+ color: #004458;
+ border-radius: 4px 4px 0 0;
+ }
+
+ .contentbox .boxtitle {
+ color: #777;
+ background: #eee;
+ background: -moz-linear-gradient(top, #eee 0%, #dfdfdf 100%);
+ background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #eee),
+ color-stop(100%, #dfdfdf) );
+ background: -o-linear-gradient(top, #eee 0%, #dfdfdf 100%);
+ background: -ms-linear-gradient(top, #eee 0%, #dfdfdf 100%);
+ background: linear-gradient(top, #eee 0%, #dfdfdf 100%);
+ border-bottom: 1px solid #ccc;
+ }
+
+ .contentbox .scroller {
+ position: absolute;
+ top: 34px;
+ left: 0;
+ right: 0;
+ bottom: 28px;
+ overflow: auto;
+ }
+
+ body.iframe .boxtitle {
+ position: fixed;
+ top: 0;
+ left: 0;
+ width: 100%;
+ z-index: 100;
+ }
+
+ .boxcontent {
+ padding: 10px;
+ }
+ </ui:style>
+>>>>>>> 7635f4a0e76a4bbbeb6a4029aff92087f00eb09f
+
+ <g:SplitLayoutPanel ui:field="thisPanel"
+ addStyleNames="{style.splitLayoutPanel}">
+ <g:west size="220">
+ <g:DockLayoutPanel addStyleNames="{style.listbox} {style.uibox}">
+<<<<<<< HEAD
+ <g:north size="34">
+=======
+ <g:north size="0">
+>>>>>>> 7635f4a0e76a4bbbeb6a4029aff92087f00eb09f
+ <g:HTML>
+ <h2 class="{style.boxtitle}">Settings</h2>
+ </g:HTML>
+ </g:north>
+ <g:center>
+<<<<<<< HEAD
+ <g:SimpleLayoutPanel ui:field="settingsTab"
+ addStyleNames="{style.scroller}" />
+=======
+ <g:SimpleLayoutPanel ui:field="settingNavContainer"
+ addStyleNames="{style.scroller}">
+ </g:SimpleLayoutPanel>
+>>>>>>> 7635f4a0e76a4bbbeb6a4029aff92087f00eb09f
+ </g:center>
+ </g:DockLayoutPanel>
+ </g:west>
+ <g:center>
+ <g:SplitLayoutPanel>
+ <g:west size="260">
+ <g:DockLayoutPanel addStyleNames="{style.listbox} {style.uibox}">
+ <g:north size="34">
+ <g:HTML>
+ <h2 class="{style.boxtitle}">Folders</h2>
+ </g:HTML>
+ </g:north>
+ <g:center>
+ <g:SimpleLayoutPanel ui:field="labelListContainer" />
+ </g:center>
+ </g:DockLayoutPanel>
+ </g:west>
+ <g:center>
+ <g:SimpleLayoutPanel addStyleNames="{style.uibox} {style.contentbox}">
+ <g:HTMLPanel>
+ <h2 class="{style.boxtitle}">Folder properties</h2>
+ <g:FlowPanel addStyleNames="{style.boxcontent}">
+ <g:SimplePanel ui:field="labelPropertiesContainer"></g:SimplePanel>
+ </g:FlowPanel>
+ <div class="{style.statusbar}" />
+ </g:HTMLPanel>
+ </g:SimpleLayoutPanel>
+ </g:center>
+ </g:SplitLayoutPanel>
+ </g:center>
+ </g:SplitLayoutPanel>
+</ui:UiBinder>
\ No newline at end of file
Added: james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/_ToolPanel.java
URL: http://svn.apache.org/viewvc/james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/_ToolPanel.java?rev=1516164&view=auto
==============================================================================
--- james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/_ToolPanel.java (added)
+++ james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/_ToolPanel.java Wed Aug 21 14:08:19 2013
@@ -0,0 +1,99 @@
+/****************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one *
+ * or more contributor license agreements. See the NOTICE file *
+ * distributed with this work for additional information *
+ * regarding copyright ownership. The ASF licenses this file *
+ * to you under the Apache License, Version 2.0 (the *
+ * "License"); you may not use this file except in compliance *
+ * with the License. You may obtain a copy of the License at *
+ * *
+ * http://www.apache.org/licenses/LICENSE-2.0 *
+ * *
+ * Unless required by applicable law or agreed to in writing, *
+ * software distributed under the License is distributed on an *
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY *
+ * KIND, either express or implied. See the License for the *
+ * specific language governing permissions and limitations *
+ * under the License. *
+ ****************************************************************/
+
+package org.apache.hupa.client.ui;
+
+import com.google.gwt.core.client.GWT;
+import com.google.gwt.uibinder.client.UiBinder;
+import com.google.gwt.uibinder.client.UiField;
+import com.google.gwt.user.client.ui.AcceptsOneWidget;
+import com.google.gwt.user.client.ui.Composite;
+import com.google.gwt.user.client.ui.DockLayoutPanel;
+import com.google.gwt.user.client.ui.IsWidget;
+import com.google.gwt.user.client.ui.SimplePanel;
+import com.google.gwt.user.client.ui.Widget;
+
+public class _ToolPanel extends Composite {
+
+ @UiField protected DockLayoutPanel thisPanel;
+ @UiField protected SimplePanel toolBarContainer;
+ @UiField protected SimplePanel composeToolBarContainer;
+ @UiField protected SimplePanel searchBoxContainer;
+
+ public _ToolPanel() {
+ initWidget(binder.createAndBindUi(this));
+ }
+
+ void toggleTo(int layout) {
+ switch (layout) {
+ case HupaLayout.LAYOUT_MESSAGE:
+ this.toggleToCompose(false);break;
+ case HupaLayout.LAYOUT_COMPOSE:
+ this.toggleToCompose(true);break;
+ //TODO compose button should be shown when setting
+ default:
+ hideAll();
+ }
+ }
+
+ private void hideAll() {
+ toolBarContainer.setVisible(false);
+ searchBoxContainer.setVisible(false);
+ composeToolBarContainer.setVisible(false);
+ }
+
+ protected void toggleToCompose(boolean visible) {
+ toolBarContainer.setVisible(!visible);
+ searchBoxContainer.setVisible(!visible);
+ composeToolBarContainer.setVisible(visible);
+ }
+
+ public AcceptsOneWidget getToolBarView() {
+ return new AcceptsOneWidget() {
+ @Override
+ public void setWidget(IsWidget w) {
+ toolBarContainer.setWidget(Widget.asWidgetOrNull(w));
+ }
+ };
+ }
+
+ public AcceptsOneWidget getComposeToolBarView() {
+ return new AcceptsOneWidget() {
+ @Override
+ public void setWidget(IsWidget w) {
+ composeToolBarContainer.setWidget(Widget.asWidgetOrNull(w));
+ }
+ };
+ }
+
+ public AcceptsOneWidget getSearchBoxView() {
+ return new AcceptsOneWidget() {
+ @Override
+ public void setWidget(IsWidget w) {
+ searchBoxContainer.setWidget(Widget.asWidgetOrNull(w));
+ }
+ };
+ }
+
+ interface _ToolPanelUiBinder extends UiBinder<DockLayoutPanel, _ToolPanel> {
+ }
+
+ private static _ToolPanelUiBinder binder = GWT.create(_ToolPanelUiBinder.class);
+
+}
Added: james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/_ToolPanel.ui.xml
URL: http://svn.apache.org/viewvc/james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/_ToolPanel.ui.xml?rev=1516164&view=auto
==============================================================================
--- james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/_ToolPanel.ui.xml (added)
+++ james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/_ToolPanel.ui.xml Wed Aug 21 14:08:19 2013
@@ -0,0 +1,26 @@
+<!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor
+ license agreements. See the NOTICE file distributed with this work for additional
+ information regarding copyright ownership. The ASF licenses this file to
+ you under the Apache License, Version 2.0 (the "License"); you may not use
+ this file except in compliance with the License. You may obtain a copy of
+ the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required
+ by applicable law or agreed to in writing, software distributed under the
+ License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS
+ OF ANY KIND, either express or implied. See the License for the specific
+ language governing permissions and limitations under the License. -->
+
+<ui:UiBinder xmlns:ui='urn:ui:com.google.gwt.uibinder'
+ xmlns:g='urn:import:com.google.gwt.user.client.ui'>
+ <g:DockLayoutPanel unit="PX" ui:field="thisPanel">
+ <g:west size="518">
+ <g:SimplePanel ui:field="toolBarContainer" />
+ </g:west>
+ <g:center>
+ <g:SimplePanel ui:field="composeToolBarContainer" />
+ </g:center>
+ <g:east size="210">
+ <g:SimplePanel ui:field="searchBoxContainer">
+ </g:SimplePanel>
+ </g:east>
+ </g:DockLayoutPanel>
+</ui:UiBinder>
\ No newline at end of file
Added: james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/__ComposePanel.java
URL: http://svn.apache.org/viewvc/james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/__ComposePanel.java?rev=1516164&view=auto
==============================================================================
--- james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/__ComposePanel.java (added)
+++ james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/__ComposePanel.java Wed Aug 21 14:08:19 2013
@@ -0,0 +1,77 @@
+/****************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one *
+ * or more contributor license agreements. See the NOTICE file *
+ * distributed with this work for additional information *
+ * regarding copyright ownership. The ASF licenses this file *
+ * to you under the Apache License, Version 2.0 (the *
+ * "License"); you may not use this file except in compliance *
+ * with the License. You may obtain a copy of the License at *
+ * *
+ * http://www.apache.org/licenses/LICENSE-2.0 *
+ * *
+ * Unless required by applicable law or agreed to in writing, *
+ * software distributed under the License is distributed on an *
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY *
+ * KIND, either express or implied. See the License for the *
+ * specific language governing permissions and limitations *
+ * under the License. *
+ ****************************************************************/
+
+package org.apache.hupa.client.ui;
+
+import com.google.gwt.core.client.GWT;
+import com.google.gwt.uibinder.client.UiBinder;
+import com.google.gwt.uibinder.client.UiField;
+import com.google.gwt.user.client.ui.AcceptsOneWidget;
+import com.google.gwt.user.client.ui.Composite;
+import com.google.gwt.user.client.ui.DockLayoutPanel;
+import com.google.gwt.user.client.ui.IsWidget;
+import com.google.gwt.user.client.ui.SimpleLayoutPanel;
+import com.google.gwt.user.client.ui.SimplePanel;
+import com.google.gwt.user.client.ui.Widget;
+
+public class __ComposePanel extends Composite {
+
+ @UiField protected SimplePanel composeHeaderContainer;
+ @UiField protected SimpleLayoutPanel composeContentContainer;
+ @UiField protected SimplePanel composeStatusContainer;
+
+ public __ComposePanel() {
+ initWidget(binder.createAndBindUi(this));
+ }
+
+ interface __ComposePanelUiBinder extends
+ UiBinder<DockLayoutPanel, __ComposePanel> {
+ }
+
+ private static __ComposePanelUiBinder binder = GWT
+ .create(__ComposePanelUiBinder.class);
+
+ public AcceptsOneWidget getComposeHeaderContainer() {
+ return new AcceptsOneWidget() {
+ @Override
+ public void setWidget(IsWidget w) {
+ composeHeaderContainer.setWidget(Widget.asWidgetOrNull(w));
+ }
+ };
+ }
+
+ public AcceptsOneWidget getComposeContentContainer() {
+ return new AcceptsOneWidget() {
+ @Override
+ public void setWidget(IsWidget w) {
+ composeContentContainer.setWidget(Widget.asWidgetOrNull(w));
+ }
+ };
+ }
+
+ public AcceptsOneWidget getComposeStatusContainer() {
+ return new AcceptsOneWidget() {
+ @Override
+ public void setWidget(IsWidget w) {
+ composeStatusContainer.setWidget(Widget.asWidgetOrNull(w));
+ }
+ };
+ }
+
+}
Added: james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/__ComposePanel.ui.xml
URL: http://svn.apache.org/viewvc/james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/__ComposePanel.ui.xml?rev=1516164&view=auto
==============================================================================
--- james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/__ComposePanel.ui.xml (added)
+++ james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/__ComposePanel.ui.xml Wed Aug 21 14:08:19 2013
@@ -0,0 +1,80 @@
+<!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor
+ license agreements. See the NOTICE file distributed with this work for additional
+ information regarding copyright ownership. The ASF licenses this file to
+ you under the Apache License, Version 2.0 (the "License"); you may not use
+ this file except in compliance with the License. You may obtain a copy of
+ the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required
+ by applicable law or agreed to in writing, software distributed under the
+ License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS
+ OF ANY KIND, either express or implied. See the License for the specific
+ language governing permissions and limitations under the License. -->
+
+<ui:UiBinder xmlns:ui='urn:ui:com.google.gwt.uibinder'
+ xmlns:g='urn:import:com.google.gwt.user.client.ui'>
+ <ui:style>
+ .box {
+ 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;
+ }
+
+ .composeHeader {
+ border-radius: 4px 4px 0 0;
+ -webkit-box-shadow: 0 2px 3px 0 #999;
+ -moz-box-shadow: 0 2px 3px 0 #999;
+ box-shadow: 0 2px 3px 0 #999;
+ border-bottom: 0;
+ position: relative;
+ padding: 3px 0;
+ background: #f9f9f9;
+ background: -moz-linear-gradient(top, #fff 0%, #f0f0f0 100%);
+ background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #fff),
+ color-stop(100%, #f0f0f0) );
+ background: -o-linear-gradient(top, #fff 0%, #f0f0f0 100%);
+ background: -ms-linear-gradient(top, #fff 0%, #f0f0f0 100%);
+ background: linear-gradient(top, #fff 0%, #f0f0f0 100%);
+ border-bottom: 1px solid #dfdfdf;
+ }
+
+ .composeHeader td {
+ padding: 3px 8px;
+ }
+
+ .composeHeader td textarea,.composeHeader td input {
+ width: 100%;
+ height: 13px;
+ resize: none;
+ font-family: "Lucida Grande", Verdana, Arial, Helvetica, sans-serif;
+ font-size: 11px;
+ }
+
+ .mailviewbottom {
+ position: absolute;
+ left: 0;
+ bottom: 0;
+ width: 100%;
+ height: 26px;
+ }
+ </ui:style>
+ <g:DockLayoutPanel ui:field="thisPanel" unit="PX"
+ addStyleNames="{style.box}">
+ <g:north size="135">
+ <g:SimplePanel ui:field="composeHeaderContainer"
+ addStyleNames="{style.composeHeader}">
+ </g:SimplePanel>
+ </g:north>
+ <g:center>
+ <g:SimpleLayoutPanel ui:field="composeContentContainer">
+ </g:SimpleLayoutPanel>
+ </g:center>
+ <g:south size="28">
+ <g:SimplePanel ui:field="composeStatusContainer"
+ addStyleNames="{style.mailviewbottom}{style.box}" />
+ </g:south>
+ </g:DockLayoutPanel>
+</ui:UiBinder>
\ No newline at end of file
Added: james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/__ContentPanel.java
URL: http://svn.apache.org/viewvc/james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/__ContentPanel.java?rev=1516164&view=auto
==============================================================================
--- james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/__ContentPanel.java (added)
+++ james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/__ContentPanel.java Wed Aug 21 14:08:19 2013
@@ -0,0 +1,94 @@
+/****************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one *
+ * or more contributor license agreements. See the NOTICE file *
+ * distributed with this work for additional information *
+ * regarding copyright ownership. The ASF licenses this file *
+ * to you under the Apache License, Version 2.0 (the *
+ * "License"); you may not use this file except in compliance *
+ * with the License. You may obtain a copy of the License at *
+ * *
+ * http://www.apache.org/licenses/LICENSE-2.0 *
+ * *
+ * Unless required by applicable law or agreed to in writing, *
+ * software distributed under the License is distributed on an *
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY *
+ * KIND, either express or implied. See the License for the *
+ * specific language governing permissions and limitations *
+ * under the License. *
+ ****************************************************************/
+
+package org.apache.hupa.client.ui;
+
+import com.google.gwt.core.client.GWT;
+import com.google.gwt.uibinder.client.UiBinder;
+import com.google.gwt.uibinder.client.UiField;
+import com.google.gwt.user.client.ui.AcceptsOneWidget;
+import com.google.gwt.user.client.ui.Composite;
+import com.google.gwt.user.client.ui.DockLayoutPanel;
+import com.google.gwt.user.client.ui.HTMLPanel;
+import com.google.gwt.user.client.ui.IsWidget;
+import com.google.gwt.user.client.ui.SimpleLayoutPanel;
+import com.google.gwt.user.client.ui.SimplePanel;
+import com.google.gwt.user.client.ui.SplitLayoutPanel;
+import com.google.gwt.user.client.ui.Widget;
+
+public class __ContentPanel extends Composite{
+ @UiField SplitLayoutPanel thisPanel;
+ @UiField DockLayoutPanel messageListBox;
+ @UiField SimpleLayoutPanel messageListContainer;
+ @UiField SimplePanel messageListFooterContainer;
+ @UiField SimpleLayoutPanel messageContentContainer;
+ @UiField SimplePanel statusContainer;
+
+ @UiField HTMLPanel contactBox;
+
+ public __ContentPanel() {
+ initWidget(binder.createAndBindUi(this));
+ thisPanel.setWidgetHidden(contactBox, true);
+ thisPanel.setWidgetMinSize(messageListBox, 130);
+ }
+
+ public AcceptsOneWidget getMessageListView() {
+ return new AcceptsOneWidget() {
+ @Override
+ public void setWidget(IsWidget w) {
+ messageListContainer.setWidget(Widget.asWidgetOrNull(w));
+ }
+ };
+ }
+
+ public AcceptsOneWidget getMessageListFooterView() {
+ return new AcceptsOneWidget() {
+ @Override
+ public void setWidget(IsWidget w) {
+ messageListFooterContainer.setWidget(Widget.asWidgetOrNull(w));
+ }
+ };
+ }
+
+ public AcceptsOneWidget getMessageContentView() {
+ return new AcceptsOneWidget() {
+ @Override
+ public void setWidget(IsWidget w) {
+ messageContentContainer.setWidget(Widget.asWidgetOrNull(w));
+ }
+ };
+ }
+
+ public AcceptsOneWidget getStatusView() {
+ return new AcceptsOneWidget() {
+ @Override
+ public void setWidget(IsWidget w) {
+ statusContainer.setWidget(Widget.asWidgetOrNull(w));
+ }
+ };
+ }
+
+ interface __ContentPanelUiBinder extends
+ UiBinder<SplitLayoutPanel, __ContentPanel> {
+ }
+
+ private static __ContentPanelUiBinder binder = GWT
+ .create(__ContentPanelUiBinder.class);
+
+}
Added: james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/__ContentPanel.ui.xml
URL: http://svn.apache.org/viewvc/james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/__ContentPanel.ui.xml?rev=1516164&view=auto
==============================================================================
--- james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/__ContentPanel.ui.xml (added)
+++ james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/__ContentPanel.ui.xml Wed Aug 21 14:08:19 2013
@@ -0,0 +1,99 @@
+<!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor
+ license agreements. See the NOTICE file distributed with this work for additional
+ information regarding copyright ownership. The ASF licenses this file to
+ you under the Apache License, Version 2.0 (the "License"); you may not use
+ this file except in compliance with the License. You may obtain a copy of
+ the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required
+ by applicable law or agreed to in writing, software distributed under the
+ License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS
+ OF ANY KIND, either express or implied. See the License for the specific
+ language governing permissions and limitations under the License. -->
+
+<ui:UiBinder xmlns:ui='urn:ui:com.google.gwt.uibinder'
+ xmlns:g='urn:import:com.google.gwt.user.client.ui'>
+ <ui:image field="originLogo" src="res/hupa-logo-original-transparent.png" />
+ <ui:style>
+ .box {
+ 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;
+ }
+
+ .messageListFooter {
+ position: absolute;
+ bottom: 0;
+ left: 0;
+ right: 0;
+ height: 22px;
+ padding: 4px 8px;
+ border-top: 1px solid #ddd;
+ background: #ebebeb;
+ background: -moz-linear-gradient(top, #ebebeb 0%, #c6c6c6 100%);
+ background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #ebebeb),
+ color-stop(100%, #c6c6c6) );
+ background: -o-linear-gradient(top, #ebebeb 0%, #c6c6c6 100%);
+ background: -ms-linear-gradient(top, #ebebeb 0%, #c6c6c6 100%);
+ background: linear-gradient(top, #ebebeb 0%, #c6c6c6 100%);
+ border-radius: 0 0 4px 4px;
+ }
+
+ @sprite .messageContent {
+ margin: 8px;
+ gwt-image: 'originLogo';
+ background-position: center center;
+ width: auto;
+ height: auto;
+ filter: grayscale(100%);
+ -webkit-filter: grayscale(100%);
+ -moz-filter: grayscale(100%);
+ -ms-filter: grayscale(100%);
+ -o-filter: grayscale(100%);
+ opacity: 0.7;
+ }
+
+ @sprite .messageContentWorkAround {
+ margin: 8px 0 8px 8px;
+ padding-right: 8px;
+ gwt-image: 'originLogo';
+ background-position: center center;
+ width: auto;
+ height: auto;
+ }
+ </ui:style>
+ <g:SplitLayoutPanel ui:field="thisPanel">
+ <g:north size="200">
+ <g:DockLayoutPanel unit="PX" addStyleNames="{style.box}"
+ ui:field="messageListBox">
+ <g:center>
+ <g:SimpleLayoutPanel ui:field="messageListContainer" />
+ </g:center>
+ <g:south size="31">
+ <g:SimplePanel ui:field="messageListFooterContainer"
+ addStyleNames="{style.messageListFooter}" />
+ </g:south>
+ </g:DockLayoutPanel>
+ </g:north>
+ <g:west size="200">
+ <g:HTMLPanel ui:field="contactBox" addStyleNames="{style.box}">
+ Address
+ </g:HTMLPanel>
+ </g:west>
+ <g:center>
+ <g:DockLayoutPanel unit="PX" addStyleNames="{style.box}"
+ ui:field="messageContentBox">
+ <g:center>
+ <g:SimpleLayoutPanel ui:field="messageContentContainer"
+ addStyleNames="{style.messageContentWorkAround}" />
+ </g:center>
+ <g:south size="0">
+ <g:SimplePanel ui:field="statusContainer" />
+ </g:south>
+ </g:DockLayoutPanel>
+ </g:center>
+ </g:SplitLayoutPanel>
+</ui:UiBinder>
\ No newline at end of file
---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org