Author: dongxu
Date: Thu Sep 12 03:57:53 2013
New Revision: 1522278

URL: http://svn.apache.org/r1522278
Log:
split the layout panel to little ones

Added:
    
james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/CenterPanel.java
    
james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/CenterPanel.ui.xml
    
james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/ToolPanel.java
    
james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/ToolPanel.ui.xml
Modified:
    
james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/FoldersTreeViewModel.java
    
james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/HupaLayout.java
    
james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/HupaLayout.ui.xml

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=1522278&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
 Thu Sep 12 03:57:53 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.                                           *
+ ****************************************************************/
+
+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.ScrollPanel;
+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 CenterPanel extends Composite {
+
+       @UiField SplitLayoutPanel centerPanel;
+       @UiField DockLayoutPanel folderArea;
+
+       @UiField SplitLayoutPanel messageArea;
+       @UiField ScrollPanel folderListContainer;
+       @UiField DockLayoutPanel messageListBox;
+       @UiField SimpleLayoutPanel messageListContainer;
+       @UiField SimplePanel messageListFooterContainer;
+       @UiField ScrollPanel messageContentContainer;
+       @UiField SimplePanel statusContainer;
+
+       @UiField HTMLPanel contactBox;
+
+       public CenterPanel() {
+               initWidget(binder.createAndBindUi(this));
+               centerPanel.setWidgetMinSize(folderArea, 144);
+               messageArea.setWidgetHidden(contactBox, true);
+               messageArea.setWidgetMinSize(messageListBox, 130);
+       }
+
+       public AcceptsOneWidget getFolderListView() {
+               return new AcceptsOneWidget() {
+                       @Override
+                       public void setWidget(IsWidget w) {
+                               
folderListContainer.setWidget(Widget.asWidgetOrNull(w));
+                       }
+               };
+       }
+
+       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 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=1522278&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
 Thu Sep 12 03:57:53 2013
@@ -0,0 +1,153 @@
+<!-- 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="originLogo" 
src="res/hupa-logo-original-transparent.png" />
+       <ui:style>
+               .folderList {
+                       position: absolute;
+                       top: 0;
+                       left: 0;
+                       width: 100%;
+                       min-width: 144px;
+                       bottom: 0;
+                       overflow-x: hidden;
+                       overflow-y: auto;
+               }
+               
+               .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;
+               }
+               
+               .listBox {
+                       background: #D9ECF4;
+                       overflow: hidden;
+               }
+               
+               .box .boxFooter {
+                       border-radius: 0 0 4px 4px;
+               }
+               
+               .listBox .boxFooter {
+                       position: absolute;
+                       bottom: 0;
+                       left: 0;
+                       width: 100%;
+                       height: 42px;
+                       border-top: 1px solid #CCDDE4;
+                       background: #D9ECF4;
+                       -webkit-box-shadow: inset 0 1px 0 0 white;
+                       -moz-box-shadow: inset 0 1px 0 0 #fff;
+                       box-shadow: inset 0 1px 0 0 white;
+                       white-space: nowrap;
+                       overflow: hidden;
+               }
+               
+               .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="centerPanel">
+               <g:west size="373">
+                       <g:DockLayoutPanel unit="PX" ui:field="folderArea"
+                               addStyleNames="{style.folderList}  {style.box}  
{style.listBox}">
+                               <g:center>
+                                       <g:ScrollPanel 
ui:field="folderListContainer" />
+                               </g:center>
+                               <g:south size="41">
+                                       <g:SimplePanel 
styleName="{style.boxFooter}">
+                                               <g:HTMLPanel 
tag="span"></g:HTMLPanel>
+                                       </g:SimplePanel>
+                               </g:south>
+                       </g:DockLayoutPanel>
+               </g:west>
+               <g:center>
+                       <g:SplitLayoutPanel ui:field="messageArea">
+                               <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:ScrollPanel 
ui:field="messageContentContainer"
+                                                               
addStyleNames="{style.messageContentWorkAround}" />
+                                               </g:center>
+                                               <g:south size="25">
+                                                       <g:SimplePanel 
ui:field="statusContainer" />
+                                               </g:south>
+                                       </g:DockLayoutPanel>
+                               </g:center>
+                       </g:SplitLayoutPanel>
+               </g:center>
+       </g:SplitLayoutPanel>
+</ui:UiBinder>
\ No newline at end of file

Modified: 
james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/FoldersTreeViewModel.java
URL: 
http://svn.apache.org/viewvc/james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/FoldersTreeViewModel.java?rev=1522278&r1=1522277&r2=1522278&view=diff
==============================================================================
--- 
james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/FoldersTreeViewModel.java
 (original)
+++ 
james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/FoldersTreeViewModel.java
 Thu Sep 12 03:57:53 2013
@@ -42,7 +42,6 @@ import com.google.gwt.view.client.Select
 import com.google.gwt.view.client.SingleSelectionModel;
 import com.google.gwt.view.client.TreeViewModel;
 import com.google.inject.Inject;
-import com.google.inject.Provider;
 import com.google.web.bindery.requestfactory.shared.Receiver;
 import com.google.web.bindery.requestfactory.shared.ServerFailure;
 

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=1522278&r1=1522277&r2=1522278&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 Sep 12 03:57:53 2013
@@ -28,11 +28,8 @@ import com.google.gwt.dom.client.Style.U
 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.DockLayoutPanel;
-import com.google.gwt.user.client.ui.HTMLPanel;
 import com.google.gwt.user.client.ui.IsWidget;
 import com.google.gwt.user.client.ui.LayoutPanel;
-import com.google.gwt.user.client.ui.ScrollPanel;
 import com.google.gwt.user.client.ui.SimpleLayoutPanel;
 <<<<<<< HEAD
 import com.google.gwt.user.client.ui.SimplePanel;
@@ -247,7 +244,6 @@ import com.google.gwt.user.client.ui.Lay
 =======
 >>>>>>> deal with onResizeEvent of folder list panel, but found issue #25
 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 HupaLayout implements HupaLayoutable {
@@ -257,28 +253,14 @@ public class HupaLayout implements HupaL
        @UiField SimplePanel logoContainer;
        @UiField SimpleLayoutPanel navigationContainer;
 
-       @UiField SimplePanel toolBarContainer;
+       @UiField ToolPanel toolPanel;
 
-       @UiField SplitLayoutPanel messageSpace;
-       @UiField DockLayoutPanel folderArea;
-
-       @UiField SplitLayoutPanel messageArea;
-       @UiField ScrollPanel folderListContainer;
-       @UiField DockLayoutPanel messageListBox;
-       @UiField SimpleLayoutPanel messageListContainer;
-       @UiField SimplePanel messageListFooterContainer;
-       @UiField ScrollPanel messageContentContainer;
-       @UiField SimplePanel statusContainer;
-
-       @UiField HTMLPanel contactBox;
+       @UiField CenterPanel centerPanel;
 
        private LayoutPanel hupaMainPanel;
 
        public HupaLayout() {
                hupaMainPanel = binder.createAndBindUi(this);
-               messageSpace.setWidgetMinSize(folderArea, 144);
-               messageArea.setWidgetHidden(contactBox, true);
-               messageArea.setWidgetMinSize(messageListBox, 130);
        }
 
        @Override
@@ -324,62 +306,32 @@ public class HupaLayout implements HupaL
 
        @Override
        public AcceptsOneWidget getToolBarView() {
-               return new AcceptsOneWidget() {
-                       @Override
-                       public void setWidget(IsWidget w) {
-                               
toolBarContainer.setWidget(Widget.asWidgetOrNull(w));
-                       }
-               };
+               return toolPanel.getToolBarView();
        }
 
        @Override
        public AcceptsOneWidget getFolderListView() {
-               return new AcceptsOneWidget() {
-                       @Override
-                       public void setWidget(IsWidget w) {
-                               
folderListContainer.setWidget(Widget.asWidgetOrNull(w));
-                       }
-               };
+               return centerPanel.getFolderListView();
        }
 
        @Override
        public AcceptsOneWidget getMessageListView() {
-               return new AcceptsOneWidget() {
-                       @Override
-                       public void setWidget(IsWidget w) {
-                               
messageListContainer.setWidget(Widget.asWidgetOrNull(w));
-                       }
-               };
+               return centerPanel.getMessageListView();
        }
 
        @Override
        public AcceptsOneWidget getMessageListFooterView() {
-               return new AcceptsOneWidget() {
-                       @Override
-                       public void setWidget(IsWidget w) {
-                               
messageListFooterContainer.setWidget(Widget.asWidgetOrNull(w));
-                       }
-               };
+               return centerPanel.getMessageListFooterView();
        }
 
        @Override
        public AcceptsOneWidget getMessageContentView() {
-               return new AcceptsOneWidget() {
-                       @Override
-                       public void setWidget(IsWidget w) {
-                               
messageContentContainer.setWidget(Widget.asWidgetOrNull(w));
-                       }
-               };
+               return centerPanel.getMessageContentView();
        }
 
        @Override
        public AcceptsOneWidget getStatusView() {
-               return new AcceptsOneWidget() {
-                       @Override
-                       public void setWidget(IsWidget w) {
-                               
statusContainer.setWidget(Widget.asWidgetOrNull(w));
-                       }
-               };
+               return centerPanel.getStatusView();
        }
 
 <<<<<<< HEAD

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=1522278&r1=1522277&r2=1522278&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 Sep 12 03:57:53 2013
@@ -29,6 +29,7 @@
                        background: linear-gradient(top, #404040 0%, #060606 
100%);
                }
 <<<<<<< HEAD
+<<<<<<< HEAD
        </ui:style>
        <g:LayoutPanel addStyleNames="{style.minWidth}">
                <g:layer left='0' right='0' top='0' height='92px'>
@@ -123,6 +124,8 @@
                        width: auto;
                        height: auto;
                }
+=======
+>>>>>>> split the layout panel to little ones
        </ui:style>
        <g:LayoutPanel addStyleNames="{style.minWidth}">
                <g:layer left='0' right='0' top='0' height='92px'>
@@ -231,72 +234,12 @@
                </g:layer>
 =======
                <g:layer left='10px' right='10px' top='88px' bottom="20px">
-                       <g:DockLayoutPanel ui:field="MainBox">
+                       <g:DockLayoutPanel ui:field="mainBox">
                                <g:north size="40">
-                                       <g:DockLayoutPanel unit="PX">
-                                               <g:west size="550">
-                                                       <g:SimplePanel 
ui:field="toolBarContainer" />
-                                               </g:west>
-                                               <g:east size="180">
-                                                       <g:HTMLPanel>
-                                                               Search
-                                                               <input 
style='color: gray;' value='//TODO' />
-                                                       </g:HTMLPanel>
-                                               </g:east>
-                                               <g:center>
-                                                       <g:HTMLPanel />
-                                               </g:center>
-                                       </g:DockLayoutPanel>
+                                       <hupa:ToolPanel ui:field="toolPanel" />
                                </g:north>
                                <g:center>
-                                       <g:SplitLayoutPanel 
ui:field="messageSpace">
-                                               <g:west size="373">
-                                                       <g:DockLayoutPanel 
unit="PX" ui:field="folderArea"
-                                                               
addStyleNames="{style.folderList}  {style.box}  {style.listBox}">
-                                                               <g:center>
-                                                                       
<g:ScrollPanel ui:field="folderListContainer" />
-                                                               </g:center>
-                                                               <g:south 
size="41">
-                                                                       
<g:SimplePanel styleName="{style.boxFooter}">
-                                                                               
<g:HTMLPanel tag="span"></g:HTMLPanel>
-                                                                       
</g:SimplePanel>
-                                                               </g:south>
-                                                       </g:DockLayoutPanel>
-                                               </g:west>
-                                               <g:center>
-                                                       <g:SplitLayoutPanel 
ui:field="messageArea">
-                                                               <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:ScrollPanel ui:field="messageContentContainer"
-                                                                               
                addStyleNames="{style.messageContentWorkAround}" />
-                                                                               
</g:center>
-                                                                               
<g:south size="25">
-                                                                               
        <g:SimplePanel ui:field="statusContainer" />
-                                                                               
</g:south>
-                                                                       
</g:DockLayoutPanel>
-                                                               </g:center>
-                                                       </g:SplitLayoutPanel>
-                                               </g:center>
-                                       </g:SplitLayoutPanel>
+                                       <hupa:CenterPanel 
ui:field="centerPanel" />
                                </g:center>
                        </g:DockLayoutPanel>
 <<<<<<< HEAD

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=1522278&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 
Thu Sep 12 03:57:53 2013
@@ -0,0 +1,57 @@
+/****************************************************************
+ * 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.StatusActivity;
+
+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 implements StatusActivity.Displayable 
{
+
+       @UiField SimplePanel toolBarContainer;
+
+       public ToolPanel() {
+               initWidget(binder.createAndBindUi(this));
+       }
+
+       public AcceptsOneWidget getToolBarView() {
+               return new AcceptsOneWidget() {
+                       @Override
+                       public void setWidget(IsWidget w) {
+                               
toolBarContainer.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=1522278&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
 Thu Sep 12 03:57:53 2013
@@ -0,0 +1,28 @@
+<!-- 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">
+               <g:west size="550">
+                       <g:SimplePanel ui:field="toolBarContainer" />
+               </g:west>
+               <g:east size="180">
+                       <g:HTMLPanel>
+                               Search
+                               <input style='color: gray;' value='//TODO' />
+                       </g:HTMLPanel>
+               </g:east>
+               <g:center>
+                       <g:HTMLPanel />
+               </g:center>
+       </g:DockLayoutPanel>
+</ui:UiBinder>
\ No newline at end of file



---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscr...@james.apache.org
For additional commands, e-mail: server-dev-h...@james.apache.org

Reply via email to