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 ma...@apache.org on 2014/03/20 09:16:10 UTC
svn commit: r1579559 [6/23] - in /james/hupa/trunk: ./ client/
client/src/main/java/com/google/web/bindery/requestfactory/server/
client/src/main/java/org/apache/hupa/
client/src/main/java/org/apache/hupa/client/
client/src/main/java/org/apache/hupa/cl...
Modified: james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/ComposeView.ui.xml
URL: http://svn.apache.org/viewvc/james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/ComposeView.ui.xml?rev=1579559&r1=1579558&r2=1579559&view=diff
==============================================================================
--- james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/ComposeView.ui.xml (original)
+++ james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/ComposeView.ui.xml Thu Mar 20 08:16:02 2014
@@ -1,289 +1,289 @@
-<!-- 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. -->
+<!-- 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" />
+ xmlns:g='urn:import:com.google.gwt.user.client.ui'>
+ <ui:image field="buttons" src="res/buttons.png" />
- <ui:style type="org.apache.hupa.client.ui.ComposeView.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;
- }
-
- .header {
- 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;
- }
-
- .header td {
- padding: 3px 8px;
- }
-
- .header td textarea,.header td input[type="text"] {
- 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;
- }
-
- @sprite .iconlink {
- gwt-image: 'buttons';
- background-position: -1000px 0;
- width: auto;
- height: auto;
- display: inline-block;
- color: #888;
- text-decoration: none;
- white-space: nowrap;
- }
-
- .left {
- float: left;
- }
-
- .right {
- float: right;
- }
-
- .operation {
- margin: 0 -1px;
- }
-
- .add {
- background-position: -7px -357px;
- margin-right: 6px;
- padding: 2px 8px 2px 20px;
- }
-
- .cancel {
- background-position: -7px -377px;
- float: right;
- position: relative;
- text-indent: -5000px;
- top: -2px;
- width: 15px;
- height: 17px;
- }
-
- .formlinks {
- padding: 0 4px;
- }
-
- .hide {
- display: none;
- }
-
- .show {
- display: inner-block;
- }
-
- .headerTable {
- display: table;
- border-collapse: separate;
- border-spacing: 2px;
- border-color: gray;
- width: 99%;
- margin: 4px 0;
- }
-
- .headerTable td {
- color: #666;
- cursor: default;
- }
-
- .composeoptionsbox {
- padding: 4px 8px 0 8px;
- background: #d2d2d2;
- border-bottom: 1px solid #e8e8e8;
- -webkit-box-shadow: 0 2px 3px 0 #999;
- -moz-box-shadow: 0 2px 3px 0 #999;
- box-shadow: 0 2px 3px 0 #999;
- white-space: nowrap;
- }
-
- .composeattachments {
- position: absolute;
- right: 0;
- top: 1px;
- bottom: 0;
- width: 240px;
- background: #f0f0f0;
- border-left: 1px solid #ddd;
- padding: 8px;
- overflow: auto;
- }
-
- .composebodycontainer {
- position: absolute;
- top: 0;
- left: 0;
- right: 260px;
- bottom: 0;
- }
-
- .statusbar {
- position: absolute;
- bottom: 0;
- left: 0;
- right: 0;
- height: 27px;
- padding-left: 8px;
- border-top: 1px solid #ddd;
- border-radius: 0 0 4px 4px;
- white-space: nowrap;
- overflow: hidden;
- text-overflow: ellipsis;
- }
-
- @external .gwt-RichTextToolbar;
- .gwt-RichTextToolbar,.statusbar {
- background: #eaeaea;
- background: -moz-linear-gradient(top, #eaeaea 0%, #c8c8c8 100%);
- background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #eaeaea),
- color-stop(100%, #c8c8c8) );
- background: -o-linear-gradient(top, #eaeaea 0%, #c8c8c8 100%);
- background: -ms-linear-gradient(top, #eaeaea 0%, #c8c8c8 100%);
- background: linear-gradient(top, #eaeaea 0%, #c8c8c8 100%);
- }
-
- .uploader {
-
- }
-
- .uploaderCancel {
-
- }
-
- .uploaderFilename {
-
- }
-
- .attachButton {
- width: 130px;
- height: 27px;
- outline: none;
- }
-
- @sprite .attachImage {
- gwt-image: 'buttons';
- background-position: -7px -353px;
- width: 26px;
- }
-
- @sprite .attachClip {
- gwt-image: 'buttons';
- background-position: center -890px;
- width: 24px;
- margin-left: 6px;
- margin-top: -4px;
- }
-
- .attachImage,.attachText {
- height: 27px;
- cursor: pointer;
- color: blue;
- float: left;
- padding-top: 7px;
- }
-
- .attachClip,.attachClipText {
- height: 27px;
- cursor: pointer;
- float: left;
- padding-top: 7px;
- }
- </ui:style>
-
- <g:SplitLayoutPanel ui:field="thisPanel">
- <g:north size="150">
- <g:SimplePanel ui:field="header" addStyleNames="{style.header}">
- <g:FlexTable ui:field="headerTable" addStyleNames="{style.headerTable}" />
- </g:SimplePanel>
- </g:north>
- <g:center>
- <g:DockLayoutPanel unit="PX" addStyleNames="{style.box}">
- <!-- <g:north size="23"> -->
- <!-- <g:HTMLPanel addStyleNames="{style.composeoptionsbox}">composeOption</g:HTMLPanel> -->
- <!-- </g:north> -->
- <g:east size="257">
- <g:DockLayoutPanel>
- <g:north size="25">
- <g:HTMLPanel addStyleNames="{style.statusbar}">
- <div class="{style.attachClip}" />
- <div class="{style.attachClipText}">Attachments</div>
- </g:HTMLPanel>
- </g:north>
- <g:center>
- <g:FlowPanel ui:field="attach" addStyleNames="{style.composeattachments}">
- <g:VerticalPanel>
- <g:FocusPanel ui:field="attachButton"
- addStyleNames="{style.attachButton}">
- <g:HTMLPanel>
- <div class="{style.attachImage}" />
- <div class="{style.attachText}">Attach a File ...</div>
- </g:HTMLPanel>
- </g:FocusPanel>
- </g:VerticalPanel>
- </g:FlowPanel>
- </g:center>
- </g:DockLayoutPanel>
- </g:east>
- <g:center>
- <g:DockLayoutPanel>
- <g:north size="23">
- <g:SimplePanel ui:field="editorToolBar" />
- </g:north>
- <g:center>
- <g:SimplePanel ui:field="composeEditor"
- addStyleNames="{style.composebodycontainer}" />
- </g:center>
- </g:DockLayoutPanel>
- </g:center>
- <g:south size="28">
- <g:SimplePanel ui:field="composeStatusContainer"
- addStyleNames="{style.mailviewbottom} {style.box}">
- <g:HTMLPanel addStyleNames="{style.statusbar}"></g:HTMLPanel>
- </g:SimplePanel>
- </g:south>
- </g:DockLayoutPanel>
- </g:center>
+ <ui:style type="org.apache.hupa.client.ui.ComposeView.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;
+ }
- </g:SplitLayoutPanel>
+ .header {
+ 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;
+ }
+
+ .header td {
+ padding: 3px 8px;
+ }
+
+ .header td textarea,.header td input[type="text"] {
+ 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;
+ }
+
+ @sprite .iconlink {
+ gwt-image: 'buttons';
+ background-position: -1000px 0;
+ width: auto;
+ height: auto;
+ display: inline-block;
+ color: #888;
+ text-decoration: none;
+ white-space: nowrap;
+ }
+
+ .left {
+ float: left;
+ }
+
+ .right {
+ float: right;
+ }
+
+ .operation {
+ margin: 0 -1px;
+ }
+
+ .add {
+ background-position: -7px -357px;
+ margin-right: 6px;
+ padding: 2px 8px 2px 20px;
+ }
+
+ .cancel {
+ background-position: -7px -377px;
+ float: right;
+ position: relative;
+ text-indent: -5000px;
+ top: -2px;
+ width: 15px;
+ height: 17px;
+ }
+
+ .formlinks {
+ padding: 0 4px;
+ }
+
+ .hide {
+ display: none;
+ }
+
+ .show {
+ display: inner-block;
+ }
+
+ .headerTable {
+ display: table;
+ border-collapse: separate;
+ border-spacing: 2px;
+ border-color: gray;
+ width: 99%;
+ margin: 4px 0;
+ }
+
+ .headerTable td {
+ color: #666;
+ cursor: default;
+ }
+
+ .composeoptionsbox {
+ padding: 4px 8px 0 8px;
+ background: #d2d2d2;
+ border-bottom: 1px solid #e8e8e8;
+ -webkit-box-shadow: 0 2px 3px 0 #999;
+ -moz-box-shadow: 0 2px 3px 0 #999;
+ box-shadow: 0 2px 3px 0 #999;
+ white-space: nowrap;
+ }
+
+ .composeattachments {
+ position: absolute;
+ right: 0;
+ top: 1px;
+ bottom: 0;
+ width: 240px;
+ background: #f0f0f0;
+ border-left: 1px solid #ddd;
+ padding: 8px;
+ overflow: auto;
+ }
+
+ .composebodycontainer {
+ position: absolute;
+ top: 0;
+ left: 0;
+ right: 260px;
+ bottom: 0;
+ }
+
+ .statusbar {
+ position: absolute;
+ bottom: 0;
+ left: 0;
+ right: 0;
+ height: 27px;
+ padding-left: 8px;
+ border-top: 1px solid #ddd;
+ border-radius: 0 0 4px 4px;
+ white-space: nowrap;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ }
+
+ @external .gwt-RichTextToolbar;
+ .gwt-RichTextToolbar,.statusbar {
+ background: #eaeaea;
+ background: -moz-linear-gradient(top, #eaeaea 0%, #c8c8c8 100%);
+ background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #eaeaea),
+ color-stop(100%, #c8c8c8) );
+ background: -o-linear-gradient(top, #eaeaea 0%, #c8c8c8 100%);
+ background: -ms-linear-gradient(top, #eaeaea 0%, #c8c8c8 100%);
+ background: linear-gradient(top, #eaeaea 0%, #c8c8c8 100%);
+ }
+
+ .uploader {
+
+ }
+
+ .uploaderCancel {
+
+ }
+
+ .uploaderFilename {
+
+ }
+
+ .attachButton {
+ width: 130px;
+ height: 27px;
+ outline: none;
+ }
+
+ @sprite .attachImage {
+ gwt-image: 'buttons';
+ background-position: -7px -353px;
+ width: 26px;
+ }
+
+ @sprite .attachClip {
+ gwt-image: 'buttons';
+ background-position: center -890px;
+ width: 24px;
+ margin-left: 6px;
+ margin-top: -4px;
+ }
+
+ .attachImage,.attachText {
+ height: 27px;
+ cursor: pointer;
+ color: blue;
+ float: left;
+ padding-top: 7px;
+ }
+
+ .attachClip,.attachClipText {
+ height: 27px;
+ cursor: pointer;
+ float: left;
+ padding-top: 7px;
+ }
+ </ui:style>
+
+ <g:SplitLayoutPanel ui:field="thisPanel">
+ <g:north size="150">
+ <g:SimplePanel ui:field="header" addStyleNames="{style.header}">
+ <g:FlexTable ui:field="headerTable" addStyleNames="{style.headerTable}" />
+ </g:SimplePanel>
+ </g:north>
+ <g:center>
+ <g:DockLayoutPanel unit="PX" addStyleNames="{style.box}">
+ <!-- <g:north size="23"> -->
+ <!-- <g:HTMLPanel addStyleNames="{style.composeoptionsbox}">composeOption</g:HTMLPanel> -->
+ <!-- </g:north> -->
+ <g:east size="257">
+ <g:DockLayoutPanel>
+ <g:north size="25">
+ <g:HTMLPanel addStyleNames="{style.statusbar}">
+ <div class="{style.attachClip}" />
+ <div class="{style.attachClipText}">Attachments</div>
+ </g:HTMLPanel>
+ </g:north>
+ <g:center>
+ <g:FlowPanel ui:field="attach" addStyleNames="{style.composeattachments}">
+ <g:VerticalPanel>
+ <g:FocusPanel ui:field="attachButton"
+ addStyleNames="{style.attachButton}">
+ <g:HTMLPanel>
+ <div class="{style.attachImage}" />
+ <div class="{style.attachText}">Attach a File ...</div>
+ </g:HTMLPanel>
+ </g:FocusPanel>
+ </g:VerticalPanel>
+ </g:FlowPanel>
+ </g:center>
+ </g:DockLayoutPanel>
+ </g:east>
+ <g:center>
+ <g:DockLayoutPanel>
+ <g:north size="23">
+ <g:SimplePanel ui:field="editorToolBar" />
+ </g:north>
+ <g:center>
+ <g:SimplePanel ui:field="composeEditor"
+ addStyleNames="{style.composebodycontainer}" />
+ </g:center>
+ </g:DockLayoutPanel>
+ </g:center>
+ <g:south size="28">
+ <g:SimplePanel ui:field="composeStatusContainer"
+ addStyleNames="{style.mailviewbottom} {style.box}">
+ <g:HTMLPanel addStyleNames="{style.statusbar}"></g:HTMLPanel>
+ </g:SimplePanel>
+ </g:south>
+ </g:DockLayoutPanel>
+ </g:center>
+
+ </g:SplitLayoutPanel>
</ui:UiBinder>
Modified: james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/ContactPropertiesView.java
URL: http://svn.apache.org/viewvc/james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/ContactPropertiesView.java?rev=1579559&r1=1579558&r2=1579559&view=diff
==============================================================================
--- james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/ContactPropertiesView.java (original)
+++ james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/ContactPropertiesView.java Thu Mar 20 08:16:02 2014
@@ -44,38 +44,38 @@ import com.google.inject.Inject;
public class ContactPropertiesView extends Composite implements ContactPropertiesActivity.Displayable {
- @Inject HupaRequestFactory rf;
- @Inject HupaController hc;
- @Inject EventBus eventBus;
+ @Inject HupaRequestFactory rf;
+ @Inject HupaController hc;
+ @Inject EventBus eventBus;
- @UiField TextBox name;
+ @UiField TextBox name;
- @UiField ListBox parent;
- @UiField Button save;
+ @UiField ListBox parent;
+ @UiField Button save;
- @UiField VerticalPanel propContainer;
- @UiField CaptionPanel information;
+ @UiField VerticalPanel propContainer;
+ @UiField CaptionPanel information;
- ImapFolder folder;
+ ImapFolder folder;
- @UiHandler("save")
- void handleSave(ClickEvent e) {}
- public ContactPropertiesView() {
- initWidget(binder.createAndBindUi(this));
- }
+ @UiHandler("save")
+ void handleSave(ClickEvent e) {}
+ public ContactPropertiesView() {
+ initWidget(binder.createAndBindUi(this));
+ }
- interface Binder extends UiBinder<DecoratorPanel, ContactPropertiesView> {
- }
+ interface Binder extends UiBinder<DecoratorPanel, ContactPropertiesView> {
+ }
- private static Binder binder = GWT.create(Binder.class);
+ private static Binder binder = GWT.create(Binder.class);
- @Override
- public void cascade(LabelNode labelNode, List<LabelNode> wholeList, int type) {}
+ @Override
+ public void cascade(LabelNode labelNode, List<LabelNode> wholeList, int type) {}
- @Override
- public HasClickHandlers getSave() {
- return save;
- }
+ @Override
+ public HasClickHandlers getSave() {
+ return save;
+ }
}
Modified: james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/ContactPropertiesView.ui.xml
URL: http://svn.apache.org/viewvc/james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/ContactPropertiesView.ui.xml?rev=1579559&r1=1579558&r2=1579559&view=diff
==============================================================================
--- james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/ContactPropertiesView.ui.xml (original)
+++ james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/ContactPropertiesView.ui.xml Thu Mar 20 08:16:02 2014
@@ -1,92 +1,92 @@
-<!-- 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. -->
+<!-- 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:generateFormat='com.google.gwt.i18n.rebind.format.PropertiesFormat'
- ui:generateLocales='default'>
- <ui:style>
- .propform fieldset {
- margin-bottom: 20px;
- border: 0;
- padding: 0;
- }
-
- .propform fieldset legend {
- display: block;
- font-size: 14px;
- font-weight: bold;
- padding-bottom: 10px;
- margin-bottom: 0;
- }
-
- .propform fieldset fieldset legend {
- color: #666;
- font-size: 12px;
- }
-
- fieldset.floating {
- float: left;
- margin-right: 10px;
- margin-bottom: 10px;
- }
-
- table {
- border-collapse: collapse;
- border-spacing: 0;
- }
-
- table.attribute {
- border-spacing: 0;
- border-collapse: collapse;
- }
-
- table.attribute td {
- width: 80%;
- padding: 4px 10px;
- background: #eee;
- border-bottom: 2px solid #fff;
- }
-
- table.noBorder td {
- border: 0;
- }
- </ui:style>
- <g:DecoratorPanel addStyleNames="{style.propform}">
- <g:CaptionPanel captionText="Properties">
- <g:VerticalPanel ui:field="propContainer">
- <g:CaptionPanel captionText="Location">
- <g:VerticalPanel addStyleNames="{style.attribute}">
- <g:HorizontalPanel addStyleNames="{style.noBorder}">
- <g:Label>
- <ui:msg key='folderName'>Folder Name:</ui:msg>
- </g:Label>
- <g:TextBox ui:field='name' name="_name" />
- </g:HorizontalPanel>
- <g:HorizontalPanel addStyleNames="{style.noBorder}">
- <g:Label>
- <ui:msg key='parentFolder'>Parent Folder:</ui:msg>
- </g:Label>
- <g:ListBox ui:field='parent'>
- <g:item value="1">---</g:item>
- </g:ListBox>
- </g:HorizontalPanel>
- </g:VerticalPanel>
- </g:CaptionPanel>
- <g:CaptionPanel ui:field="information" captionText="Information">
- <g:VerticalPanel addStyleNames="{style.attribute}">
- </g:VerticalPanel>
- </g:CaptionPanel>
- <g:Button ui:field="save">Save</g:Button>
- </g:VerticalPanel>
- </g:CaptionPanel>
- </g:DecoratorPanel>
+ xmlns:g='urn:import:com.google.gwt.user.client.ui' ui:generateFormat='com.google.gwt.i18n.rebind.format.PropertiesFormat'
+ ui:generateLocales='default'>
+ <ui:style>
+ .propform fieldset {
+ margin-bottom: 20px;
+ border: 0;
+ padding: 0;
+ }
+
+ .propform fieldset legend {
+ display: block;
+ font-size: 14px;
+ font-weight: bold;
+ padding-bottom: 10px;
+ margin-bottom: 0;
+ }
+
+ .propform fieldset fieldset legend {
+ color: #666;
+ font-size: 12px;
+ }
+
+ fieldset.floating {
+ float: left;
+ margin-right: 10px;
+ margin-bottom: 10px;
+ }
+
+ table {
+ border-collapse: collapse;
+ border-spacing: 0;
+ }
+
+ table.attribute {
+ border-spacing: 0;
+ border-collapse: collapse;
+ }
+
+ table.attribute td {
+ width: 80%;
+ padding: 4px 10px;
+ background: #eee;
+ border-bottom: 2px solid #fff;
+ }
+
+ table.noBorder td {
+ border: 0;
+ }
+ </ui:style>
+ <g:DecoratorPanel addStyleNames="{style.propform}">
+ <g:CaptionPanel captionText="Properties">
+ <g:VerticalPanel ui:field="propContainer">
+ <g:CaptionPanel captionText="Location">
+ <g:VerticalPanel addStyleNames="{style.attribute}">
+ <g:HorizontalPanel addStyleNames="{style.noBorder}">
+ <g:Label>
+ <ui:msg key='folderName'>Folder Name:</ui:msg>
+ </g:Label>
+ <g:TextBox ui:field='name' name="_name" />
+ </g:HorizontalPanel>
+ <g:HorizontalPanel addStyleNames="{style.noBorder}">
+ <g:Label>
+ <ui:msg key='parentFolder'>Parent Folder:</ui:msg>
+ </g:Label>
+ <g:ListBox ui:field='parent'>
+ <g:item value="1">---</g:item>
+ </g:ListBox>
+ </g:HorizontalPanel>
+ </g:VerticalPanel>
+ </g:CaptionPanel>
+ <g:CaptionPanel ui:field="information" captionText="Information">
+ <g:VerticalPanel addStyleNames="{style.attribute}">
+ </g:VerticalPanel>
+ </g:CaptionPanel>
+ <g:Button ui:field="save">Save</g:Button>
+ </g:VerticalPanel>
+ </g:CaptionPanel>
+ </g:DecoratorPanel>
</ui:UiBinder>
\ No newline at end of file
Modified: james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/ContactsListView.java
URL: http://svn.apache.org/viewvc/james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/ContactsListView.java?rev=1579559&r1=1579558&r2=1579559&view=diff
==============================================================================
--- james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/ContactsListView.java (original)
+++ james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/ContactsListView.java Thu Mar 20 08:16:02 2014
@@ -50,170 +50,170 @@ import com.google.web.bindery.requestfac
public class ContactsListView extends Composite implements ContactsListActivity.Displayable {
- @UiField ScrollPanel thisView;
+ @UiField ScrollPanel thisView;
- @UiField Button add;
- @UiField Button delete;
+ @UiField Button add;
+ @UiField Button delete;
- public interface Resources extends CellList.Resources {
+ public interface Resources extends CellList.Resources {
- Resources INSTANCE = GWT.create(Resources.class);
+ Resources INSTANCE = GWT.create(Resources.class);
- @Source("res/CssLabelListView.css")
- public CellList.Style cellListStyle();
- }
- @UiHandler("add")
- public void handleAdd(ClickEvent e) {
- }
-
- private final ImapLabelListDataProvider data;
-
- @Inject
- public ContactsListView(final HupaRequestFactory rf) {
- initWidget(binder.createAndBindUi(this));
- data = new ImapLabelListDataProvider(rf);
- CellList<LabelNode> cellList = new CellList<LabelNode>(new LabelCell(), Resources.INSTANCE);
- cellList.setPageSize(100);// assume one's labels are under one hundred, otherwise we need a pager
- cellList.setSelectionModel(selectionModel);
- selectionModel.addSelectionChangeHandler(new SelectionChangeEvent.Handler() {
- public void onSelectionChange(SelectionChangeEvent event) {
- }
- });
- data.addDataDisplay(cellList);
- thisView.setWidget(cellList);
- }
-
- @Override
- public SingleSelectionModel<LabelNode> getSelectionModel() {
- return this.selectionModel;
- }
-
- public final SingleSelectionModel<LabelNode> selectionModel = new SingleSelectionModel<LabelNode>(
- new ProvidesKey<LabelNode>() {
- @Override
- public Object getKey(LabelNode item) {
- return item == null ? null : item.getPath();
- }
- });
-
- static class LabelCell extends AbstractCell<LabelNode> {
-
- public LabelCell() {
- }
-
- @Override
- public void render(com.google.gwt.cell.client.Cell.Context context, LabelNode value, SafeHtmlBuilder sb) {
- if (value == null) {
- return;
- }
-
- if (value.getFolder().getSubscribed()) {
- sb.appendHtmlConstant(value.getNameForDisplay());
- } else {
- sb.appendHtmlConstant("<span style='color:gray;'>");
- sb.appendHtmlConstant(value.getNameForDisplay());
- sb.appendHtmlConstant("</span>");
- }
- }
- }
-
- public class ImapLabelListDataProvider extends AsyncDataProvider<LabelNode> implements HasRefresh {
-
- private HupaRequestFactory rf;
- private List<LabelNode> folderNodes = new ArrayList<LabelNode>();
- HasData<LabelNode> display;
-
- public List<LabelNode> getDataList() {
- return folderNodes;
- }
-
- public ImapLabelListDataProvider(HupaRequestFactory rf) {
- this.rf = rf;
- }
-
- @Override
- public void addDataDisplay(HasData<LabelNode> display) {
- super.addDataDisplay(display);
- this.display = display;
- }
-
- @Override
- protected void onRangeChanged(HasData<LabelNode> display) {
-
- final int start = display.getVisibleRange().getStart();
-
- rf.fetchFoldersRequest().fetch(null, Boolean.TRUE).fire(new Receiver<List<ImapFolder>>() {
-
- private String INTENTS = " ";
-
- @Override
- public void onSuccess(List<ImapFolder> response) {
- folderNodes.clear();
- if (response == null || response.size() == 0) {
- updateRowCount(-1, true);
- } else {
- for (ImapFolder folder : response) {
- fillCellList(folderNodes, folder, LabelNode.ROOT, "");
- }
- updateRowData(start, folderNodes);
- }
- }
-
- private void fillCellList(List<LabelNode> folderNodes, ImapFolder curFolder, LabelNode parent,
- String intents) {
- LabelNode labelNode = new LabelNode();
- labelNode.setFolder(curFolder);
- labelNode.setName(curFolder.getName());
- labelNode.setNameForDisplay(intents + curFolder.getName());
- labelNode.setParent(parent);
- labelNode.setPath(curFolder.getFullName());
- folderNodes.add(labelNode);
- if("inbox".equalsIgnoreCase(curFolder.getName())){
- if(selectionModel.getSelectedObject() == null){
- selectionModel.setSelected(labelNode, true);
- }
- }
- if (curFolder.getHasChildren()) {
- for (ImapFolder subFolder : curFolder.getChildren()) {
- fillCellList(folderNodes, subFolder, labelNode, intents + INTENTS);
- }
- }
- }
-
- @Override
- public void onFailure(ServerFailure error) {
- if (error.isFatal()) {
- throw new RuntimeException(error.getMessage());
- }
- }
-
- });
- }
-
- @Override
- public void refresh() {
- this.onRangeChanged(display);
- }
- }
-
- interface Binder extends UiBinder<DockLayoutPanel, ContactsListView> {
- }
-
- private static Binder binder = GWT.create(Binder.class);
-
- @Override
- public HasClickHandlers getAdd() {
- return add;
- }
-
- @Override
- public HasClickHandlers getDelete() {
- return delete;
- }
-
- @Override
- public void refresh() {
- data.refresh();
- }
+ @Source("res/CssLabelListView.css")
+ public CellList.Style cellListStyle();
+ }
+ @UiHandler("add")
+ public void handleAdd(ClickEvent e) {
+ }
+
+ private final ImapLabelListDataProvider data;
+
+ @Inject
+ public ContactsListView(final HupaRequestFactory rf) {
+ initWidget(binder.createAndBindUi(this));
+ data = new ImapLabelListDataProvider(rf);
+ CellList<LabelNode> cellList = new CellList<LabelNode>(new LabelCell(), Resources.INSTANCE);
+ cellList.setPageSize(100);// assume one's labels are under one hundred, otherwise we need a pager
+ cellList.setSelectionModel(selectionModel);
+ selectionModel.addSelectionChangeHandler(new SelectionChangeEvent.Handler() {
+ public void onSelectionChange(SelectionChangeEvent event) {
+ }
+ });
+ data.addDataDisplay(cellList);
+ thisView.setWidget(cellList);
+ }
+
+ @Override
+ public SingleSelectionModel<LabelNode> getSelectionModel() {
+ return this.selectionModel;
+ }
+
+ public final SingleSelectionModel<LabelNode> selectionModel = new SingleSelectionModel<LabelNode>(
+ new ProvidesKey<LabelNode>() {
+ @Override
+ public Object getKey(LabelNode item) {
+ return item == null ? null : item.getPath();
+ }
+ });
+
+ static class LabelCell extends AbstractCell<LabelNode> {
+
+ public LabelCell() {
+ }
+
+ @Override
+ public void render(com.google.gwt.cell.client.Cell.Context context, LabelNode value, SafeHtmlBuilder sb) {
+ if (value == null) {
+ return;
+ }
+
+ if (value.getFolder().getSubscribed()) {
+ sb.appendHtmlConstant(value.getNameForDisplay());
+ } else {
+ sb.appendHtmlConstant("<span style='color:gray;'>");
+ sb.appendHtmlConstant(value.getNameForDisplay());
+ sb.appendHtmlConstant("</span>");
+ }
+ }
+ }
+
+ public class ImapLabelListDataProvider extends AsyncDataProvider<LabelNode> implements HasRefresh {
+
+ private HupaRequestFactory rf;
+ private List<LabelNode> folderNodes = new ArrayList<LabelNode>();
+ HasData<LabelNode> display;
+
+ public List<LabelNode> getDataList() {
+ return folderNodes;
+ }
+
+ public ImapLabelListDataProvider(HupaRequestFactory rf) {
+ this.rf = rf;
+ }
+
+ @Override
+ public void addDataDisplay(HasData<LabelNode> display) {
+ super.addDataDisplay(display);
+ this.display = display;
+ }
+
+ @Override
+ protected void onRangeChanged(HasData<LabelNode> display) {
+
+ final int start = display.getVisibleRange().getStart();
+
+ rf.fetchFoldersRequest().fetch(null, Boolean.TRUE).fire(new Receiver<List<ImapFolder>>() {
+
+ private String INTENTS = " ";
+
+ @Override
+ public void onSuccess(List<ImapFolder> response) {
+ folderNodes.clear();
+ if (response == null || response.size() == 0) {
+ updateRowCount(-1, true);
+ } else {
+ for (ImapFolder folder : response) {
+ fillCellList(folderNodes, folder, LabelNode.ROOT, "");
+ }
+ updateRowData(start, folderNodes);
+ }
+ }
+
+ private void fillCellList(List<LabelNode> folderNodes, ImapFolder curFolder, LabelNode parent,
+ String intents) {
+ LabelNode labelNode = new LabelNode();
+ labelNode.setFolder(curFolder);
+ labelNode.setName(curFolder.getName());
+ labelNode.setNameForDisplay(intents + curFolder.getName());
+ labelNode.setParent(parent);
+ labelNode.setPath(curFolder.getFullName());
+ folderNodes.add(labelNode);
+ if("inbox".equalsIgnoreCase(curFolder.getName())){
+ if(selectionModel.getSelectedObject() == null){
+ selectionModel.setSelected(labelNode, true);
+ }
+ }
+ if (curFolder.getHasChildren()) {
+ for (ImapFolder subFolder : curFolder.getChildren()) {
+ fillCellList(folderNodes, subFolder, labelNode, intents + INTENTS);
+ }
+ }
+ }
+
+ @Override
+ public void onFailure(ServerFailure error) {
+ if (error.isFatal()) {
+ throw new RuntimeException(error.getMessage());
+ }
+ }
+
+ });
+ }
+
+ @Override
+ public void refresh() {
+ this.onRangeChanged(display);
+ }
+ }
+
+ interface Binder extends UiBinder<DockLayoutPanel, ContactsListView> {
+ }
+
+ private static Binder binder = GWT.create(Binder.class);
+
+ @Override
+ public HasClickHandlers getAdd() {
+ return add;
+ }
+
+ @Override
+ public HasClickHandlers getDelete() {
+ return delete;
+ }
+
+ @Override
+ public void refresh() {
+ data.refresh();
+ }
}
Modified: james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/ContactsListView.ui.xml
URL: http://svn.apache.org/viewvc/james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/ContactsListView.ui.xml?rev=1579559&r1=1579558&r2=1579559&view=diff
==============================================================================
--- james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/ContactsListView.ui.xml (original)
+++ james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/ContactsListView.ui.xml Thu Mar 20 08:16:02 2014
@@ -1,25 +1,25 @@
-<!-- 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. -->
+<!-- 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>
- <g:center>
- <g:ScrollPanel ui:field="thisView" />
- </g:center>
- <g:south size="43">
- <g:FlowPanel ui:field="folderOpButtons">
- <g:Button ui:field="add">Add</g:Button>
- <g:Button ui:field="delete">Delete</g:Button>
- </g:FlowPanel>
- </g:south>
- </g:DockLayoutPanel>
+ xmlns:g='urn:import:com.google.gwt.user.client.ui'>
+ <g:DockLayoutPanel>
+ <g:center>
+ <g:ScrollPanel ui:field="thisView" />
+ </g:center>
+ <g:south size="43">
+ <g:FlowPanel ui:field="folderOpButtons">
+ <g:Button ui:field="add">Add</g:Button>
+ <g:Button ui:field="delete">Delete</g:Button>
+ </g:FlowPanel>
+ </g:south>
+ </g:DockLayoutPanel>
</ui:UiBinder>
\ No newline at end of file
Modified: james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/FolderListView.java
URL: http://svn.apache.org/viewvc/james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/FolderListView.java?rev=1579559&r1=1579558&r2=1579559&view=diff
==============================================================================
--- james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/FolderListView.java (original)
+++ james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/FolderListView.java Thu Mar 20 08:16:02 2014
@@ -51,31 +51,31 @@ import com.google.gwt.view.client.Single
import com.google.inject.Inject;
public class FolderListView extends Composite implements FolderListActivity.Displayable {
- @UiField SimplePanel thisView;
- @Inject private HupaController controller;
- @Inject private ToolBarActivity.Displayable toolBar;
- @Inject private MessageListActivity.Displayable msgListDisplay;
- @Inject private PlaceController placeController;
- @Inject private HupaStorage hupaStorage;
-
- private CellList<LabelNode> cellList;
- private ShowMorePagerPanel pagerPanel;
-
- public interface Resources extends CellList.Resources {
-
- Resources INSTANCE = GWT.create(Resources.class);
-
- @Source("res/CssLabelListView.css")
- public CellList.Style cellListStyle();
- }
-
- public static final ProvidesKey<LabelNode> KEY_PROVIDER = new ProvidesKey<LabelNode>() {
- @Override
- public Object getKey(LabelNode item) {
- return item == null ? null : item.getPath();
- }
- };
-
+ @UiField SimplePanel thisView;
+ @Inject private HupaController controller;
+ @Inject private ToolBarActivity.Displayable toolBar;
+ @Inject private MessageListActivity.Displayable msgListDisplay;
+ @Inject private PlaceController placeController;
+ @Inject private HupaStorage hupaStorage;
+
+ private CellList<LabelNode> cellList;
+ private ShowMorePagerPanel pagerPanel;
+
+ public interface Resources extends CellList.Resources {
+
+ Resources INSTANCE = GWT.create(Resources.class);
+
+ @Source("res/CssLabelListView.css")
+ public CellList.Style cellListStyle();
+ }
+
+ public static final ProvidesKey<LabelNode> KEY_PROVIDER = new ProvidesKey<LabelNode>() {
+ @Override
+ public Object getKey(LabelNode item) {
+ return item == null ? null : item.getPath();
+ }
+ };
+
protected void onAttach() {
super.onAttach();
// Delay getting data until the widget has been attached, to use injected objects.
@@ -84,87 +84,87 @@ public class FolderListView extends Comp
}
};
- public FolderListView() {
- initWidget(binder.createAndBindUi(this));
+ public FolderListView() {
+ initWidget(binder.createAndBindUi(this));
+
+ data = new ImapLabelListDataProvider();
+ pagerPanel = new ShowMorePagerPanel();
+ cellList = new CellList<LabelNode>(new FolderCell(), Resources.INSTANCE, KEY_PROVIDER);
+ cellList.setKeyboardPagingPolicy(KeyboardPagingPolicy.INCREASE_RANGE);
+ cellList.setKeyboardSelectionPolicy(KeyboardSelectionPolicy.BOUND_TO_SELECTION);
+ cellList.setPageSize(100);// ShowMorePagerPanel does not work at present. Therefore, assume one's labels are under one hundred
+ cellList.setSelectionModel(selectionModel);
+ selectionModel.addSelectionChangeHandler(new SelectionChangeEvent.Handler() {
+ public void onSelectionChange(SelectionChangeEvent event) {
+ controller.showTopLoading("Loading...");
+ toolBar.enableAllTools(false);
+ placeController.goTo(new FolderPlace(selectionModel.getSelectedObject().getFolder().getFullName()));
+ msgListDisplay.refresh();
+ }
+ });
+ pagerPanel.setDisplay(cellList);
+ thisView.setWidget(pagerPanel);
+ }
+
+ @Override
+ public void refresh() {
+ data.refresh();
+ }
+
+ public final SingleSelectionModel<LabelNode> selectionModel = new SingleSelectionModel<LabelNode>(
+ new ProvidesKey<LabelNode>() {
+ @Override
+ public Object getKey(LabelNode item) {
+ return item == null ? null : item.getPath();
+ }
+ });
+
+ class FolderCell extends AbstractCell<LabelNode> {
+ public FolderCell(String... consumedEvents) {
+ super(consumedEvents);
+ }
+ // TODO different images for each folder
+ @Override
+ public void render(Context context, LabelNode value, SafeHtmlBuilder sb) {
+ if (value != null) {
+// if (value.getFolder().getUnseenMessageCount() > 0) {
+// sb.appendHtmlConstant("<span style='right:6px;top:3px;font-weight:bold;'>");
+// sb.appendHtmlConstant(value.getNameForDisplay());
+// sb.appendHtmlConstant(" (" + value.getFolder().getUnseenMessageCount());
+// sb.appendHtmlConstant(")</span>");
+// } else {
+ sb.appendHtmlConstant(value.getNameForDisplay());
+// }
+ }
+ }
+ }
+
+ private final ImapLabelListDataProvider data;
- data = new ImapLabelListDataProvider();
- pagerPanel = new ShowMorePagerPanel();
- cellList = new CellList<LabelNode>(new FolderCell(), Resources.INSTANCE, KEY_PROVIDER);
- cellList.setKeyboardPagingPolicy(KeyboardPagingPolicy.INCREASE_RANGE);
- cellList.setKeyboardSelectionPolicy(KeyboardSelectionPolicy.BOUND_TO_SELECTION);
- cellList.setPageSize(100);// ShowMorePagerPanel does not work at present. Therefore, assume one's labels are under one hundred
- cellList.setSelectionModel(selectionModel);
- selectionModel.addSelectionChangeHandler(new SelectionChangeEvent.Handler() {
- public void onSelectionChange(SelectionChangeEvent event) {
- controller.showTopLoading("Loading...");
- toolBar.enableAllTools(false);
- placeController.goTo(new FolderPlace(selectionModel.getSelectedObject().getFolder().getFullName()));
- msgListDisplay.refresh();
- }
- });
- pagerPanel.setDisplay(cellList);
- thisView.setWidget(pagerPanel);
- }
-
- @Override
- public void refresh() {
- data.refresh();
- }
-
- public final SingleSelectionModel<LabelNode> selectionModel = new SingleSelectionModel<LabelNode>(
- new ProvidesKey<LabelNode>() {
- @Override
- public Object getKey(LabelNode item) {
- return item == null ? null : item.getPath();
- }
- });
-
- class FolderCell extends AbstractCell<LabelNode> {
- public FolderCell(String... consumedEvents) {
- super(consumedEvents);
- }
- // TODO different images for each folder
- @Override
- public void render(Context context, LabelNode value, SafeHtmlBuilder sb) {
- if (value != null) {
-// if (value.getFolder().getUnseenMessageCount() > 0) {
-// sb.appendHtmlConstant("<span style='right:6px;top:3px;font-weight:bold;'>");
-// sb.appendHtmlConstant(value.getNameForDisplay());
-// sb.appendHtmlConstant(" (" + value.getFolder().getUnseenMessageCount());
-// sb.appendHtmlConstant(")</span>");
-// } else {
- sb.appendHtmlConstant(value.getNameForDisplay());
-// }
- }
- }
- }
-
- private final ImapLabelListDataProvider data;
-
- public class ImapLabelListDataProvider extends AsyncDataProvider<LabelNode> implements HasRefresh {
-
- private List<LabelNode> folderNodes = new ArrayList<LabelNode>();
- HasData<LabelNode> display;
-
- public List<LabelNode> getDataList() {
- return folderNodes;
- }
-
- @Override
- public void addDataDisplay(HasData<LabelNode> display) {
- super.addDataDisplay(display);
- this.display = display;
- }
-
- protected void onRangeChanged(HasData<LabelNode> display) {
- onRangeChanged(display, false);
- }
-
- protected void onRangeChanged(HasData<LabelNode> display, boolean skipCache) {
- hupaStorage
- .gettingFolders(skipCache)
- .done(new Function(){public void f() {
- List<ImapFolder> response = arguments(0);
+ public class ImapLabelListDataProvider extends AsyncDataProvider<LabelNode> implements HasRefresh {
+
+ private List<LabelNode> folderNodes = new ArrayList<LabelNode>();
+ HasData<LabelNode> display;
+
+ public List<LabelNode> getDataList() {
+ return folderNodes;
+ }
+
+ @Override
+ public void addDataDisplay(HasData<LabelNode> display) {
+ super.addDataDisplay(display);
+ this.display = display;
+ }
+
+ protected void onRangeChanged(HasData<LabelNode> display) {
+ onRangeChanged(display, false);
+ }
+
+ protected void onRangeChanged(HasData<LabelNode> display, boolean skipCache) {
+ hupaStorage
+ .gettingFolders(skipCache)
+ .done(new Function(){public void f() {
+ List<ImapFolder> response = arguments(0);
folderNodes.clear();
for (ImapFolder folder : response) {
fillCellList(folderNodes, folder, LabelNode.ROOT, "");
@@ -172,41 +172,41 @@ public class FolderListView extends Comp
// For some reason removing a row does not update the display correctly
updateRowCount(folderNodes.size(), true);
updateRowData(0, folderNodes);
- }});
- }
-
- private void fillCellList(List<LabelNode> folderNodes, ImapFolder curFolder, LabelNode parent, String intents) {
- LabelNode labelNode = new LabelNode();
- labelNode.setFolder(curFolder);
- labelNode.setName(curFolder.getName());
- labelNode.setNameForDisplay(intents + curFolder.getName());
- labelNode.setParent(parent);
- labelNode.setPath(curFolder.getFullName());
- folderNodes.add(labelNode);
- if (curFolder.getHasChildren()) {
- for (ImapFolder subFolder : curFolder.getChildren()) {
- // FIXME: don't use intents, it will be much better user experience to use cellTree
- fillCellList(folderNodes, subFolder, labelNode, intents + " ");
- }
- }
- }
-
- Double last = 0d;
- @Override
- public void refresh(){
- Double now = Duration.currentTimeMillis();
- if (now - last > 1 * 60 * 1000) {
- this.onRangeChanged(display, true);
- last = now;
- }
- }
- }
-
+ }});
+ }
+
+ private void fillCellList(List<LabelNode> folderNodes, ImapFolder curFolder, LabelNode parent, String intents) {
+ LabelNode labelNode = new LabelNode();
+ labelNode.setFolder(curFolder);
+ labelNode.setName(curFolder.getName());
+ labelNode.setNameForDisplay(intents + curFolder.getName());
+ labelNode.setParent(parent);
+ labelNode.setPath(curFolder.getFullName());
+ folderNodes.add(labelNode);
+ if (curFolder.getHasChildren()) {
+ for (ImapFolder subFolder : curFolder.getChildren()) {
+ // FIXME: don't use intents, it will be much better user experience to use cellTree
+ fillCellList(folderNodes, subFolder, labelNode, intents + " ");
+ }
+ }
+ }
+
+ Double last = 0d;
+ @Override
+ public void refresh(){
+ Double now = Duration.currentTimeMillis();
+ if (now - last > 1 * 60 * 1000) {
+ this.onRangeChanged(display, true);
+ last = now;
+ }
+ }
+ }
+
- interface FolderListUiBinder extends UiBinder<SimplePanel, FolderListView> {
- }
+ interface FolderListUiBinder extends UiBinder<SimplePanel, FolderListView> {
+ }
- private static FolderListUiBinder binder = GWT.create(FolderListUiBinder.class);
+ private static FolderListUiBinder binder = GWT.create(FolderListUiBinder.class);
}
Modified: james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/FolderListView.ui.xml
URL: http://svn.apache.org/viewvc/james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/FolderListView.ui.xml?rev=1579559&r1=1579558&r2=1579559&view=diff
==============================================================================
--- james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/FolderListView.ui.xml (original)
+++ james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/FolderListView.ui.xml Thu Mar 20 08:16:02 2014
@@ -1,15 +1,15 @@
-<!-- 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. -->
+<!-- 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:SimplePanel ui:field="thisView" />
+ xmlns:g='urn:import:com.google.gwt.user.client.ui'>
+ <g:SimplePanel ui:field="thisView" />
</ui:UiBinder>
\ No newline at end of file
Modified: james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/HasRefresh.java
URL: http://svn.apache.org/viewvc/james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/HasRefresh.java?rev=1579559&r1=1579558&r2=1579559&view=diff
==============================================================================
--- james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/HasRefresh.java (original)
+++ james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/HasRefresh.java Thu Mar 20 08:16:02 2014
@@ -1,5 +1,5 @@
package org.apache.hupa.client.ui;
public interface HasRefresh{
- void refresh();
+ void refresh();
}
\ No newline at end of file
Modified: james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/HupaLayout.java
URL: http://svn.apache.org/viewvc/james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/HupaLayout.java?rev=1579559&r1=1579558&r2=1579559&view=diff
==============================================================================
--- james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/HupaLayout.java (original)
+++ james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/HupaLayout.java Thu Mar 20 08:16:02 2014
@@ -34,181 +34,181 @@ import com.google.gwt.user.client.ui.Wid
public class HupaLayout implements HupaLayoutable {
- /*
- * The flag of layout can be defined as any single bit. such as: 0b0001
- * 0b0010 0b0100, namely, 0x01 0x02 0x04 respectively
- */
- public static final int LAYOUT_MESSAGE = 0x01;
- public static final int LAYOUT_COMPOSE = 0x02;
- public static final int LAYOUT_CONTACT = 0x04;
- public static final int LAYOUT_SETTING = 0x08;
-
- @UiField public SimplePanel topBarContainer;
- @UiField public SimplePanel logoContainer;
- @UiField public SimplePanel notificationContainer;
- @UiField public SimpleLayoutPanel navigationContainer;
- @UiField public _ToolPanel toolPanel;
-
- @UiField public LayoutPanel mainBox;
-
- @UiField public _CenterPanel centerPanel;
- @UiField public _CenterComposePanel composePanel;
- @UiField public _CenterSettingPanel settingPanel;
- @UiField public _CenterContactPanel contactPanel;
-
- protected LayoutPanel hupaMainPanel;
-
- interface HupaLayoutUiBinder extends UiBinder<LayoutPanel, HupaLayout> {
- }
-
- @SuppressWarnings("rawtypes")
- protected static UiBinder binder;
-
- @SuppressWarnings("unchecked")
- public HupaLayout() {
- initBinder();
- hupaMainPanel = (LayoutPanel) binder.createAndBindUi(this);
- }
-
- protected void initBinder() {
- binder = GWT.create(HupaLayoutUiBinder.class);
- }
-
- @Override
- public LayoutPanel get() {
- return hupaMainPanel;
- }
-
- @Override
- public void switchTo(int layout) {
- arrangeLayout(layout);
- }
-
- @Override
- public AcceptsOneWidget getTopBarView() {
- return new AcceptsOneWidget() {
- @Override
- public void setWidget(IsWidget w) {
- topBarContainer.setWidget(Widget.asWidgetOrNull(w));
- }
- };
- }
-
- @Override
- public AcceptsOneWidget getLogoView() {
- return new AcceptsOneWidget() {
- @Override
- public void setWidget(IsWidget w) {
- logoContainer.setWidget(Widget.asWidgetOrNull(w));
- }
- };
- }
-
- @Override
- public AcceptsOneWidget getNotificationView() {
- return new AcceptsOneWidget() {
- @Override
- public void setWidget(IsWidget w) {
- notificationContainer.setWidget(Widget.asWidgetOrNull(w));
- }
- };
- }
- @Override
- public AcceptsOneWidget getNavigationView() {
- return new AcceptsOneWidget() {
- @Override
- public void setWidget(IsWidget w) {
- navigationContainer.setWidget(Widget.asWidgetOrNull(w));
- }
- };
- }
-
- @Override
- public AcceptsOneWidget getToolBarView() {
- return toolPanel.getToolBarView();
- }
-
- @Override
- public AcceptsOneWidget getComposeView() {
- return composePanel.getComposeView();
- }
-
- @Override
- public AcceptsOneWidget getComposeToolBarView() {
- return toolPanel.getComposeToolBarView();
- }
-
- @Override
- public AcceptsOneWidget getSearchBoxView() {
- return toolPanel.getSearchBoxView();
- }
- @Override
- public AcceptsOneWidget getFolderListView() {
- return centerPanel.getFolderListView();
- }
- @Override
- public AcceptsOneWidget getAddressListView() {
- return composePanel.getAddressListView();
- }
-
- @Override
- public AcceptsOneWidget getMessageListView() {
- return centerPanel.getMessageListView();
- }
-
- @Override
- public AcceptsOneWidget getMessageListFooterView() {
- return centerPanel.getMessageListFooterView();
- }
-
- @Override
- public AcceptsOneWidget getMessageContentView() {
- return centerPanel.getMessageContentView();
- }
-
- @Override
- public AcceptsOneWidget getStatusView() {
- return centerPanel.getStatusView();
- }
-
- @Override
- public AcceptsOneWidget getLabelListView() {
- return settingPanel.getLabelListView();
- }
-
- @Override
- public AcceptsOneWidget getSettingNavView() {
- return settingPanel.getSettingNavView();
- }
-
- @Override
- public AcceptsOneWidget getLabelPropertiesView() {
- return settingPanel.getLabelPropertiesView();
- }
-
- @Override
- public AcceptsOneWidget getContactsListView() {
- return contactPanel.getContactListView();
- }
-
- @Override
- public AcceptsOneWidget getContactPropertiesView() {
- return contactPanel.getContactPropertiesView();
- }
-
- private void arrangeLayout(int lyt) {
- GQuery.console.log("HupaLayout arrangeLayout " + lyt);
- toolPanel.toggleTo(lyt);
+ /*
+ * The flag of layout can be defined as any single bit. such as: 0b0001
+ * 0b0010 0b0100, namely, 0x01 0x02 0x04 respectively
+ */
+ public static final int LAYOUT_MESSAGE = 0x01;
+ public static final int LAYOUT_COMPOSE = 0x02;
+ public static final int LAYOUT_CONTACT = 0x04;
+ public static final int LAYOUT_SETTING = 0x08;
+
+ @UiField public SimplePanel topBarContainer;
+ @UiField public SimplePanel logoContainer;
+ @UiField public SimplePanel notificationContainer;
+ @UiField public SimpleLayoutPanel navigationContainer;
+ @UiField public _ToolPanel toolPanel;
+
+ @UiField public LayoutPanel mainBox;
+
+ @UiField public _CenterPanel centerPanel;
+ @UiField public _CenterComposePanel composePanel;
+ @UiField public _CenterSettingPanel settingPanel;
+ @UiField public _CenterContactPanel contactPanel;
+
+ protected LayoutPanel hupaMainPanel;
+
+ interface HupaLayoutUiBinder extends UiBinder<LayoutPanel, HupaLayout> {
+ }
+
+ @SuppressWarnings("rawtypes")
+ protected static UiBinder binder;
+
+ @SuppressWarnings("unchecked")
+ public HupaLayout() {
+ initBinder();
+ hupaMainPanel = (LayoutPanel) binder.createAndBindUi(this);
+ }
+
+ protected void initBinder() {
+ binder = GWT.create(HupaLayoutUiBinder.class);
+ }
+
+ @Override
+ public LayoutPanel get() {
+ return hupaMainPanel;
+ }
+
+ @Override
+ public void switchTo(int layout) {
+ arrangeLayout(layout);
+ }
+
+ @Override
+ public AcceptsOneWidget getTopBarView() {
+ return new AcceptsOneWidget() {
+ @Override
+ public void setWidget(IsWidget w) {
+ topBarContainer.setWidget(Widget.asWidgetOrNull(w));
+ }
+ };
+ }
+
+ @Override
+ public AcceptsOneWidget getLogoView() {
+ return new AcceptsOneWidget() {
+ @Override
+ public void setWidget(IsWidget w) {
+ logoContainer.setWidget(Widget.asWidgetOrNull(w));
+ }
+ };
+ }
+
+ @Override
+ public AcceptsOneWidget getNotificationView() {
+ return new AcceptsOneWidget() {
+ @Override
+ public void setWidget(IsWidget w) {
+ notificationContainer.setWidget(Widget.asWidgetOrNull(w));
+ }
+ };
+ }
+ @Override
+ public AcceptsOneWidget getNavigationView() {
+ return new AcceptsOneWidget() {
+ @Override
+ public void setWidget(IsWidget w) {
+ navigationContainer.setWidget(Widget.asWidgetOrNull(w));
+ }
+ };
+ }
+
+ @Override
+ public AcceptsOneWidget getToolBarView() {
+ return toolPanel.getToolBarView();
+ }
+
+ @Override
+ public AcceptsOneWidget getComposeView() {
+ return composePanel.getComposeView();
+ }
+
+ @Override
+ public AcceptsOneWidget getComposeToolBarView() {
+ return toolPanel.getComposeToolBarView();
+ }
+
+ @Override
+ public AcceptsOneWidget getSearchBoxView() {
+ return toolPanel.getSearchBoxView();
+ }
+ @Override
+ public AcceptsOneWidget getFolderListView() {
+ return centerPanel.getFolderListView();
+ }
+ @Override
+ public AcceptsOneWidget getAddressListView() {
+ return composePanel.getAddressListView();
+ }
+
+ @Override
+ public AcceptsOneWidget getMessageListView() {
+ return centerPanel.getMessageListView();
+ }
+
+ @Override
+ public AcceptsOneWidget getMessageListFooterView() {
+ return centerPanel.getMessageListFooterView();
+ }
+
+ @Override
+ public AcceptsOneWidget getMessageContentView() {
+ return centerPanel.getMessageContentView();
+ }
+
+ @Override
+ public AcceptsOneWidget getStatusView() {
+ return centerPanel.getStatusView();
+ }
+
+ @Override
+ public AcceptsOneWidget getLabelListView() {
+ return settingPanel.getLabelListView();
+ }
+
+ @Override
+ public AcceptsOneWidget getSettingNavView() {
+ return settingPanel.getSettingNavView();
+ }
+
+ @Override
+ public AcceptsOneWidget getLabelPropertiesView() {
+ return settingPanel.getLabelPropertiesView();
+ }
+
+ @Override
+ public AcceptsOneWidget getContactsListView() {
+ return contactPanel.getContactListView();
+ }
+
+ @Override
+ public AcceptsOneWidget getContactPropertiesView() {
+ return contactPanel.getContactPropertiesView();
+ }
+
+ private void arrangeLayout(int lyt) {
+ GQuery.console.log("HupaLayout arrangeLayout " + lyt);
+ toolPanel.toggleTo(lyt);
mainBox.setWidgetVisible(contactPanel, lyt == LAYOUT_CONTACT);
mainBox.setWidgetVisible(settingPanel, lyt == LAYOUT_SETTING);
mainBox.setWidgetVisible(composePanel, lyt == LAYOUT_COMPOSE);
mainBox.setWidgetVisible(centerPanel, lyt == LAYOUT_MESSAGE);
- }
+ }
- @Override
- public void arrangeSettingLayout(SettingPlace sp) {
+ @Override
+ public void arrangeSettingLayout(SettingPlace sp) {
GQuery.console.log("HupaLayout arrangeSettingLayout " + sp);
- settingPanel.swithTo(sp);
- }
+ settingPanel.swithTo(sp);
+ }
}
Modified: james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/HupaLayout.ui.xml
URL: http://svn.apache.org/viewvc/james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/HupaLayout.ui.xml?rev=1579559&r1=1579558&r2=1579559&view=diff
==============================================================================
--- james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/HupaLayout.ui.xml (original)
+++ james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/HupaLayout.ui.xml Thu Mar 20 08:16:02 2014
@@ -1,69 +1,69 @@
<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:image field="buttons" src="res/buttons.png" />
- <ui:image field="originLogo" src="res/hupa-logo-original-transparent.png" />
- <ui:style>
- .minWidth {
- min-width: 700px;
- }
-
- .feature {
- 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%);
- }
- </ui:style>
- <g:LayoutPanel addStyleNames="{style.minWidth}">
- <g:layer left='0' right='0' top='0' height='92px'>
- <g:DockLayoutPanel unit="PX" ui:field="Header">
- <g:north size="23">
- <g:SimplePanel ui:field="topBarContainer" />
- </g:north>
- <g:center>
- <g:LayoutPanel addStyleNames="{style.feature}"
- ui:field="HupaFeature">
+ xmlns:g='urn:import:com.google.gwt.user.client.ui' xmlns:hupa='urn:import:org.apache.hupa.client.ui'>
+ <ui:image field="buttons" src="res/buttons.png" />
+ <ui:image field="originLogo" src="res/hupa-logo-original-transparent.png" />
+ <ui:style>
+ .minWidth {
+ min-width: 700px;
+ }
- <g:layer width="177px" left="10px">
- <g:SimplePanel ui:field="logoContainer" />
- </g:layer>
- <g:layer>
- <g:SimplePanel ui:field="notificationContainer" />
- </g:layer>
- <g:layer width="171px" right="0">
- <g:SimpleLayoutPanel ui:field="navigationContainer" />
- </g:layer>
- </g:LayoutPanel>
- </g:center>
- </g:DockLayoutPanel>
- </g:layer>
- <g:layer left='10px' right='10px' top='84px' bottom="20px">
- <g:DockLayoutPanel>
- <g:north size="44">
- <hupa:_ToolPanel ui:field="toolPanel" />
- </g:north>
- <g:center>
- <g:LayoutPanel ui:field="mainBox">
- <g:layer left="0%" width="100%" top="0%" height="100%">
- <hupa:_CenterPanel ui:field="centerPanel" />
- </g:layer>
- <g:layer left="0%" width="100%" top="0%" height="100%">
- <hupa:_CenterSettingPanel ui:field="settingPanel" />
- </g:layer>
+ .feature {
+ 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%);
+ }
+ </ui:style>
+ <g:LayoutPanel addStyleNames="{style.minWidth}">
+ <g:layer left='0' right='0' top='0' height='92px'>
+ <g:DockLayoutPanel unit="PX" ui:field="Header">
+ <g:north size="23">
+ <g:SimplePanel ui:field="topBarContainer" />
+ </g:north>
+ <g:center>
+ <g:LayoutPanel addStyleNames="{style.feature}"
+ ui:field="HupaFeature">
+
+ <g:layer width="177px" left="10px">
+ <g:SimplePanel ui:field="logoContainer" />
+ </g:layer>
+ <g:layer>
+ <g:SimplePanel ui:field="notificationContainer" />
+ </g:layer>
+ <g:layer width="171px" right="0">
+ <g:SimpleLayoutPanel ui:field="navigationContainer" />
+ </g:layer>
+ </g:LayoutPanel>
+ </g:center>
+ </g:DockLayoutPanel>
+ </g:layer>
+ <g:layer left='10px' right='10px' top='84px' bottom="20px">
+ <g:DockLayoutPanel>
+ <g:north size="44">
+ <hupa:_ToolPanel ui:field="toolPanel" />
+ </g:north>
+ <g:center>
+ <g:LayoutPanel ui:field="mainBox">
+ <g:layer left="0%" width="100%" top="0%" height="100%">
+ <hupa:_CenterPanel ui:field="centerPanel" />
+ </g:layer>
+ <g:layer left="0%" width="100%" top="0%" height="100%">
+ <hupa:_CenterSettingPanel ui:field="settingPanel" />
+ </g:layer>
<g:layer left="0%" width="100%" top="0%" height="100%">
<hupa:_CenterContactPanel ui:field="contactPanel" />
</g:layer>
<g:layer left="0%" width="100%" top="0%" height="100%">
<hupa:_CenterComposePanel ui:field="composePanel" />
</g:layer>
- </g:LayoutPanel>
- </g:center>
- </g:DockLayoutPanel>
- </g:layer>
- </g:LayoutPanel>
+ </g:LayoutPanel>
+ </g:center>
+ </g:DockLayoutPanel>
+ </g:layer>
+ </g:LayoutPanel>
</ui:UiBinder>
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=1579559&r1=1579558&r2=1579559&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 Mar 20 08:16:02 2014
@@ -24,44 +24,44 @@ import org.apache.hupa.client.place.Sett
import com.google.gwt.user.client.ui.AcceptsOneWidget;
public interface HupaLayoutable extends Layoutable {
- AcceptsOneWidget getTopBarView();
+ AcceptsOneWidget getTopBarView();
- AcceptsOneWidget getLogoView();
+ AcceptsOneWidget getLogoView();
- AcceptsOneWidget getNavigationView();
+ AcceptsOneWidget getNavigationView();
- AcceptsOneWidget getToolBarView();
+ AcceptsOneWidget getToolBarView();
- AcceptsOneWidget getFolderListView();
+ AcceptsOneWidget getFolderListView();
- AcceptsOneWidget getMessageListView();
+ AcceptsOneWidget getMessageListView();
- AcceptsOneWidget getMessageListFooterView();
+ AcceptsOneWidget getMessageListFooterView();
- AcceptsOneWidget getMessageContentView();
+ AcceptsOneWidget getMessageContentView();
- AcceptsOneWidget getStatusView();
+ AcceptsOneWidget getStatusView();
- AcceptsOneWidget getComposeToolBarView();
+ AcceptsOneWidget getComposeToolBarView();
- AcceptsOneWidget getComposeView();
+ AcceptsOneWidget getComposeView();
- AcceptsOneWidget getNotificationView();
+ AcceptsOneWidget getNotificationView();
- AcceptsOneWidget getLabelListView();
- AcceptsOneWidget getAddressListView();
+ AcceptsOneWidget getLabelListView();
+ AcceptsOneWidget getAddressListView();
- AcceptsOneWidget getLabelPropertiesView();
+ AcceptsOneWidget getLabelPropertiesView();
- void switchTo(int layout);
+ void switchTo(int layout);
- AcceptsOneWidget getContactPropertiesView();
+ AcceptsOneWidget getContactPropertiesView();
- AcceptsOneWidget getContactsListView();
+ AcceptsOneWidget getContactsListView();
- AcceptsOneWidget getSearchBoxView();
+ AcceptsOneWidget getSearchBoxView();
- AcceptsOneWidget getSettingNavView();
+ AcceptsOneWidget getSettingNavView();
- void arrangeSettingLayout(SettingPlace sp);
+ void arrangeSettingLayout(SettingPlace sp);
}
Modified: james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/HupaPlugins.java
URL: http://svn.apache.org/viewvc/james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/HupaPlugins.java?rev=1579559&r1=1579558&r2=1579559&view=diff
==============================================================================
--- james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/HupaPlugins.java (original)
+++ james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/HupaPlugins.java Thu Mar 20 08:16:02 2014
@@ -1,12 +1,12 @@
package org.apache.hupa.client.ui;
public interface HupaPlugins {
-
+
public static class HupaDefaultPlugins implements HupaPlugins {
-
+
}
-
-
-
+
+
+
}
Modified: james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/LabelCell.java
URL: http://svn.apache.org/viewvc/james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/LabelCell.java?rev=1579559&r1=1579558&r2=1579559&view=diff
==============================================================================
--- james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/LabelCell.java (original)
+++ james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/LabelCell.java Thu Mar 20 08:16:02 2014
@@ -5,21 +5,21 @@ import com.google.gwt.safehtml.shared.Sa
public class LabelCell extends AbstractCell<LabelNode> {
- public LabelCell() {
- }
+ public LabelCell() {
+ }
- @Override
- public void render(com.google.gwt.cell.client.Cell.Context context, LabelNode value, SafeHtmlBuilder sb) {
- if (value == null) {
- return;
- }
+ @Override
+ public void render(com.google.gwt.cell.client.Cell.Context context, LabelNode value, SafeHtmlBuilder sb) {
+ if (value == null) {
+ return;
+ }
- if (value.getFolder().getSubscribed()) {
- sb.appendHtmlConstant(value.getNameForDisplay());
- } else {
- sb.appendHtmlConstant("<span style='color:gray;'>");
- sb.appendHtmlConstant(value.getNameForDisplay());
- sb.appendHtmlConstant("</span>");
- }
- }
+ if (value.getFolder().getSubscribed()) {
+ sb.appendHtmlConstant(value.getNameForDisplay());
+ } else {
+ sb.appendHtmlConstant("<span style='color:gray;'>");
+ sb.appendHtmlConstant(value.getNameForDisplay());
+ sb.appendHtmlConstant("</span>");
+ }
+ }
}
Modified: james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/LabelListView.java
URL: http://svn.apache.org/viewvc/james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/LabelListView.java?rev=1579559&r1=1579558&r2=1579559&view=diff
==============================================================================
--- james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/LabelListView.java (original)
+++ james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/LabelListView.java Thu Mar 20 08:16:02 2014
@@ -49,28 +49,28 @@ import com.google.inject.Inject;
public class LabelListView extends Composite implements LabelListActivity.Displayable {
- @Inject LabelPropertiesActivity.Displayable labelProperties;
+ @Inject LabelPropertiesActivity.Displayable labelProperties;
@Inject private HupaStorage hupaStorage;
- @UiField ScrollPanel thisView;
+ @UiField ScrollPanel thisView;
- @UiField Button add;
- @UiField Button delete;
+ @UiField Button add;
+ @UiField Button delete;
private CellList<LabelNode> cellList;
- public interface Resources extends CellList.Resources {
+ public interface Resources extends CellList.Resources {
- Resources INSTANCE = GWT.create(Resources.class);
+ Resources INSTANCE = GWT.create(Resources.class);
- @Source("res/CssLabelListView.css")
- public CellList.Style cellListStyle();
- }
- @UiHandler("add")
- public void handleAdd(ClickEvent e) {
- labelProperties.cascade(selectionModel.getSelectedObject(), data.getDataList(), CASCADE_TYPE_ADD);
- }
+ @Source("res/CssLabelListView.css")
+ public CellList.Style cellListStyle();
+ }
+ @UiHandler("add")
+ public void handleAdd(ClickEvent e) {
+ labelProperties.cascade(selectionModel.getSelectedObject(), data.getDataList(), CASCADE_TYPE_ADD);
+ }
+
+ private final ImapLabelListDataProvider data;
- private final ImapLabelListDataProvider data;
-
protected void onAttach() {
super.onAttach();
// Delay getting data until the widget has been attached, to use injected objects.
@@ -79,36 +79,36 @@ public class LabelListView extends Compo
}
};
- @Inject
- public LabelListView(final HupaRequestFactory rf) {
- initWidget(binder.createAndBindUi(this));
- data = new ImapLabelListDataProvider();
- cellList = new CellList<LabelNode>(new LabelCell(), Resources.INSTANCE);
- cellList.setPageSize(100);// assume one's labels are under one hundred, otherwise we need a pager
- cellList.setSelectionModel(selectionModel);
- selectionModel.addSelectionChangeHandler(new SelectionChangeEvent.Handler() {
- public void onSelectionChange(SelectionChangeEvent event) {
- labelProperties.cascade(selectionModel.getSelectedObject(), data.getDataList(), CASCADE_TYPE_RENAME);
- }
- });
- thisView.setWidget(cellList);
- }
-
- @Override
- public SingleSelectionModel<LabelNode> getSelectionModel() {
- return this.selectionModel;
- }
-
- public final SingleSelectionModel<LabelNode> selectionModel = new SingleSelectionModel<LabelNode>(
- new ProvidesKey<LabelNode>() {
- @Override
- public Object getKey(LabelNode item) {
- return item == null ? null : item.getPath();
- }
- });
+ @Inject
+ public LabelListView(final HupaRequestFactory rf) {
+ initWidget(binder.createAndBindUi(this));
+ data = new ImapLabelListDataProvider();
+ cellList = new CellList<LabelNode>(new LabelCell(), Resources.INSTANCE);
+ cellList.setPageSize(100);// assume one's labels are under one hundred, otherwise we need a pager
+ cellList.setSelectionModel(selectionModel);
+ selectionModel.addSelectionChangeHandler(new SelectionChangeEvent.Handler() {
+ public void onSelectionChange(SelectionChangeEvent event) {
+ labelProperties.cascade(selectionModel.getSelectedObject(), data.getDataList(), CASCADE_TYPE_RENAME);
+ }
+ });
+ thisView.setWidget(cellList);
+ }
+
+ @Override
+ public SingleSelectionModel<LabelNode> getSelectionModel() {
+ return this.selectionModel;
+ }
+
+ public final SingleSelectionModel<LabelNode> selectionModel = new SingleSelectionModel<LabelNode>(
+ new ProvidesKey<LabelNode>() {
+ @Override
+ public Object getKey(LabelNode item) {
+ return item == null ? null : item.getPath();
+ }
+ });
- // FIXME: almost the code in this class is identical to FolderListView, duplicated code in GWT is bad
- // because explodes js size !!!
+ // FIXME: almost the code in this class is identical to FolderListView, duplicated code in GWT is bad
+ // because explodes js size !!!
public class ImapLabelListDataProvider extends AsyncDataProvider<LabelNode> implements HasRefresh {
private List<LabelNode> folderNodes = new ArrayList<LabelNode>();
@@ -139,7 +139,7 @@ public class LabelListView extends Compo
updateRowData(0, folderNodes);
}});
}
-
+
private void fillCellList(List<LabelNode> folderNodes, ImapFolder curFolder, LabelNode parent, String intents) {
LabelNode labelNode = new LabelNode();
labelNode.setFolder(curFolder);
@@ -162,26 +162,26 @@ public class LabelListView extends Compo
}
}
- interface LabelListUiBinder extends UiBinder<DockLayoutPanel, LabelListView> {
- }
+ interface LabelListUiBinder extends UiBinder<DockLayoutPanel, LabelListView> {
+ }
+
+ private static LabelListUiBinder binder = GWT.create(LabelListUiBinder.class);
- private static LabelListUiBinder binder = GWT.create(LabelListUiBinder.class);
+ @Override
+ public HasClickHandlers getAdd() {
+ return add;
+ }
+
+ @Override
+ public HasClickHandlers getDelete() {
+ return delete;
+ }
- @Override
- public HasClickHandlers getAdd() {
- return add;
- }
-
- @Override
- public HasClickHandlers getDelete() {
- return delete;
- }
-
- @Override
- public void refresh() {
- System.out.println("REFRESH");
- hupaStorage.expireFolders();
- data.refresh();
- }
+ @Override
+ public void refresh() {
+ System.out.println("REFRESH");
+ hupaStorage.expireFolders();
+ data.refresh();
+ }
}
Modified: james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/LabelListView.ui.xml
URL: http://svn.apache.org/viewvc/james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/LabelListView.ui.xml?rev=1579559&r1=1579558&r2=1579559&view=diff
==============================================================================
--- james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/LabelListView.ui.xml (original)
+++ james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/LabelListView.ui.xml Thu Mar 20 08:16:02 2014
@@ -1,25 +1,25 @@
-<!-- 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. -->
+<!-- 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>
- <g:center>
- <g:ScrollPanel ui:field="thisView" />
- </g:center>
- <g:south size="43">
- <g:FlowPanel ui:field="folderOpButtons">
- <g:Button ui:field="add">Add</g:Button>
- <g:Button ui:field="delete">Delete</g:Button>
- </g:FlowPanel>
- </g:south>
- </g:DockLayoutPanel>
+ xmlns:g='urn:import:com.google.gwt.user.client.ui'>
+ <g:DockLayoutPanel>
+ <g:center>
+ <g:ScrollPanel ui:field="thisView" />
+ </g:center>
+ <g:south size="43">
+ <g:FlowPanel ui:field="folderOpButtons">
+ <g:Button ui:field="add">Add</g:Button>
+ <g:Button ui:field="delete">Delete</g:Button>
+ </g:FlowPanel>
+ </g:south>
+ </g:DockLayoutPanel>
</ui:UiBinder>
\ No newline at end of file
Modified: james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/LabelNode.java
URL: http://svn.apache.org/viewvc/james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/LabelNode.java?rev=1579559&r1=1579558&r2=1579559&view=diff
==============================================================================
--- james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/LabelNode.java (original)
+++ james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/LabelNode.java Thu Mar 20 08:16:02 2014
@@ -3,54 +3,54 @@ package org.apache.hupa.client.ui;
import org.apache.hupa.shared.domain.ImapFolder;
public class LabelNode implements Comparable<LabelNode> {
-
- public static LabelNode ROOT = new LabelNode("---");
-
- private ImapFolder folder;
- private String name;
- private String nameForDisplay;
- private String path;
- private LabelNode parent;
-
- public LabelNode(){}
- public LabelNode(String name){this.name = name;}
-
-
- public String getNameForDisplay() {
- return nameForDisplay;
- }
- public void setNameForDisplay(String nameForDisplay) {
- this.nameForDisplay = nameForDisplay;
- }
- public ImapFolder getFolder() {
- return folder;
- }
- public void setFolder(ImapFolder folder) {
- this.folder = folder;
- }
- public String getName() {
- return name;
- }
- public void setName(String name) {
- this.name = name;
- }
- public String getPath() {
- return path;
- }
- public void setPath(String path) {
- this.path = path;
- }
- public LabelNode getParent() {
- return parent;
- }
- public void setParent(LabelNode parent) {
- this.parent = parent;
- }
- @Override
- public int compareTo(LabelNode o) {
- if(name == null) return -1;
- if(o == null) return 1;
- return name.compareTo(o.name);
- }
+
+ public static LabelNode ROOT = new LabelNode("---");
+
+ private ImapFolder folder;
+ private String name;
+ private String nameForDisplay;
+ private String path;
+ private LabelNode parent;
+
+ public LabelNode(){}
+ public LabelNode(String name){this.name = name;}
+
+
+ public String getNameForDisplay() {
+ return nameForDisplay;
+ }
+ public void setNameForDisplay(String nameForDisplay) {
+ this.nameForDisplay = nameForDisplay;
+ }
+ public ImapFolder getFolder() {
+ return folder;
+ }
+ public void setFolder(ImapFolder folder) {
+ this.folder = folder;
+ }
+ public String getName() {
+ return name;
+ }
+ public void setName(String name) {
+ this.name = name;
+ }
+ public String getPath() {
+ return path;
+ }
+ public void setPath(String path) {
+ this.path = path;
+ }
+ public LabelNode getParent() {
+ return parent;
+ }
+ public void setParent(LabelNode parent) {
+ this.parent = parent;
+ }
+ @Override
+ public int compareTo(LabelNode o) {
+ if(name == null) return -1;
+ if(o == null) return 1;
+ return name.compareTo(o.name);
+ }
}
---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org