You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-dev@james.apache.org by do...@apache.org on 2013/09/12 06:35:43 UTC
svn commit: r1522367 - in
/james/hupa/trunk/client/src/main/java/org/apache/hupa/client: ./ ioc/
mapper/ ui/
Author: dongxu
Date: Thu Sep 12 04:35:42 2013
New Revision: 1522367
URL: http://svn.apache.org/r1522367
Log:
make layout can be arranged by clicking the navigation buttons; make the layout changing by set their sizes to zero rather than remove/add from their parent widgets; merge to the master branch.
Modified:
james/hupa/trunk/client/src/main/java/org/apache/hupa/client/HupaController.java
james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ioc/AppGinModule.java
james/hupa/trunk/client/src/main/java/org/apache/hupa/client/mapper/ActivityManagerInitializer.java
james/hupa/trunk/client/src/main/java/org/apache/hupa/client/mapper/ComposeActivityMapper.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
james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/HupaLayoutable.java
james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/LabelPropertiesView.java
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
Modified: james/hupa/trunk/client/src/main/java/org/apache/hupa/client/HupaController.java
URL: http://svn.apache.org/viewvc/james/hupa/trunk/client/src/main/java/org/apache/hupa/client/HupaController.java?rev=1522367&r1=1522366&r2=1522367&view=diff
==============================================================================
--- james/hupa/trunk/client/src/main/java/org/apache/hupa/client/HupaController.java (original)
+++ james/hupa/trunk/client/src/main/java/org/apache/hupa/client/HupaController.java Thu Sep 12 04:35:42 2013
@@ -90,6 +90,7 @@ import org.apache.hupa.client.place.Sett
import org.apache.hupa.client.rf.CheckSessionRequest;
import org.apache.hupa.client.rf.HupaRequestFactory;
import org.apache.hupa.client.rf.IdleRequest;
+import org.apache.hupa.client.ui.HupaLayout;
import org.apache.hupa.client.ui.HupaLayoutable;
import org.apache.hupa.client.ui.LoginLayoutable;
import org.apache.hupa.client.ui.LoginView;
@@ -348,14 +349,15 @@ public class HupaController {
if (place instanceof ComposePlace) {
ComposePlace here = (ComposePlace) place;
if (here.getParameters() != null) {
- hupaLayout.switchToCompose();
+ hupaLayout.switchTo(HupaLayout.LAYOUT_COMPOSE);
} else {
+ //FIXME when gmail mode
this.placeController.goTo(new MailFolderPlace("Mock-Inbox"));
}
- } else if(place instanceof SettingPlace) {
- hupaLayout.switchToSetting();
+ } else if (place instanceof SettingPlace) {
+ hupaLayout.switchTo(HupaLayout.LAYOUT_SETTING);
} else {
- hupaLayout.switchToMessage();
+ hupaLayout.switchTo(HupaLayout.LAYOUT_MESSAGE);
}
}
Modified: james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ioc/AppGinModule.java
URL: http://svn.apache.org/viewvc/james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ioc/AppGinModule.java?rev=1522367&r1=1522366&r2=1522367&view=diff
==============================================================================
--- james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ioc/AppGinModule.java (original)
+++ james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ioc/AppGinModule.java Thu Sep 12 04:35:42 2013
@@ -278,7 +278,6 @@ import org.apache.hupa.client.ui.ToolBar
import org.apache.hupa.client.ui.TopBarView;
import org.apache.hupa.client.ui.TopView;
import org.apache.hupa.client.ui.WestView;
-import org.apache.hupa.client.ui._CenterSettingPanel;
import com.google.gwt.activity.shared.ActivityManager;
<<<<<<< HEAD
@@ -569,11 +568,14 @@ public class AppGinModule extends Abstra
bind(LabelPropertiesActivity.class).in(Singleton.class);
<<<<<<< HEAD
+<<<<<<< HEAD
bind(_CenterSettingPanel.class).in(Singleton.class);
>>>>>>> attempt to add label setting feature
=======
// bind(_CenterSettingPanel.class).in(Singleton.class);
>>>>>>> try to make switch to setting work
+=======
+>>>>>>> make layout can be arranged by clicking the navigation buttons; make the layout changing by set their sizes to zero rather than remove/add from their parent widgets; merge to the master branch.
<<<<<<< HEAD
>>>>>>> integrate all of the views to their corresponding activities and mappers
Modified: james/hupa/trunk/client/src/main/java/org/apache/hupa/client/mapper/ActivityManagerInitializer.java
URL: http://svn.apache.org/viewvc/james/hupa/trunk/client/src/main/java/org/apache/hupa/client/mapper/ActivityManagerInitializer.java?rev=1522367&r1=1522366&r2=1522367&view=diff
==============================================================================
--- james/hupa/trunk/client/src/main/java/org/apache/hupa/client/mapper/ActivityManagerInitializer.java (original)
+++ james/hupa/trunk/client/src/main/java/org/apache/hupa/client/mapper/ActivityManagerInitializer.java Thu Sep 12 04:35:42 2013
@@ -48,8 +48,9 @@ public class ActivityManagerInitializer
@Named("MessageListFooterRegion") ActivityManager messageListFooterActivityManager,
@Named("MessageContentRegion") ActivityManager messageContentActivityManager,
@Named("StatusRegion") ActivityManager statusActivityManager,
- @Named("ComposeToolBarRegion") ActivityManager composeToolBarActivityManager,
- @Named("ComposeRegion") ActivityManager composeActivityManager) {
+ @Named("ComposeToolBarRegion") ActivityManager composeToolBarActivityManager
+ ,@Named("ComposeRegion") ActivityManager composeActivityManager
+ ) {
labelPropertiesActivityManager.setDisplay(hupaLayout.getLabelPropertiesView());
labelListActivityManager.setDisplay(hupaLayout.getLabelListView());
loginActivityManager.setDisplay(loginLayout.getLoginView());
Modified: james/hupa/trunk/client/src/main/java/org/apache/hupa/client/mapper/ComposeActivityMapper.java
URL: http://svn.apache.org/viewvc/james/hupa/trunk/client/src/main/java/org/apache/hupa/client/mapper/ComposeActivityMapper.java?rev=1522367&r1=1522366&r2=1522367&view=diff
==============================================================================
--- james/hupa/trunk/client/src/main/java/org/apache/hupa/client/mapper/ComposeActivityMapper.java (original)
+++ james/hupa/trunk/client/src/main/java/org/apache/hupa/client/mapper/ComposeActivityMapper.java Thu Sep 12 04:35:42 2013
@@ -21,8 +21,6 @@ package org.apache.hupa.client.mapper;
import org.apache.hupa.client.activity.ComposeActivity;
import org.apache.hupa.client.place.ComposePlace;
-import org.apache.hupa.client.place.MailFolderPlace;
-import org.apache.hupa.client.ui.ToolBarView.Parameters;
import com.google.gwt.activity.shared.Activity;
import com.google.gwt.activity.shared.ActivityMapper;
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=1522367&r1=1522366&r2=1522367&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 04:35:42 2013
@@ -35,7 +35,6 @@ 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.IsWidget;
import com.google.gwt.user.client.ui.LayoutPanel;
import com.google.gwt.user.client.ui.SimpleLayoutPanel;
@@ -253,21 +252,27 @@ 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.Widget;
-import com.google.inject.Inject;
public class HupaLayout implements HupaLayoutable {
- @UiField SimplePanel topBarContainer;
+ /*
+ * 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_SETTING = 0x04;
+ @UiField SimplePanel topBarContainer;
@UiField SimplePanel logoContainer;
@UiField SimplePanel notificationContainer;
@UiField SimpleLayoutPanel navigationContainer;
-
@UiField _ToolPanel toolPanel;
+ @UiField LayoutPanel mainBox;
+
@UiField _CenterPanel centerPanel;
- @UiField DockLayoutPanel mainBox;
-
+ @UiField _CenterComposePanel composePanel;
@UiField _CenterSettingPanel settingPanel;
private LayoutPanel hupaMainPanel;
@@ -282,44 +287,8 @@ public class HupaLayout implements HupaL
}
@Override
- public void switchToCompose() {
- if (isMessageOccupied()) {
- changeToCompose();
- }
- }
-
- @Override
- public void switchToMessage() {
- if (isMessageOccupied())
- return;
- if (isComposeOccupied()) {
- changeToMessage();
- }
- }
-
- private void changeToCompose() {
- centerPanel.thisPanel.remove(centerPanel.contentPanel);
- centerPanel.thisPanel.add(centerPanel.composeContainer);
- toolPanel.toggleToCompose(true);
- centerPanel.temporarilyHiddenTheUnimplementedContactPanel(true);
- }
-
- private boolean isMessageOccupied() {
- return centerPanel.thisPanel.getWidgetIndex(centerPanel.contentPanel) >= 0;
- }
-
- private void changeToMessage() {
-// mainBox.remove(settingPanel);
- mainBox.setWidgetHidden(settingPanel, true);
- mainBox.setWidgetHidden(centerPanel,false);
- centerPanel.thisPanel.remove(centerPanel.composeContainer);
- centerPanel.thisPanel.add(centerPanel.contentPanel);
- toolPanel.toggleToCompose(false);
- centerPanel.temporarilyHiddenTheUnimplementedContactPanel(false);
- }
-
- private boolean isComposeOccupied() {
- return centerPanel.thisPanel.getWidgetIndex(centerPanel.composeContainer) >= 0;
+ public void switchTo(int layout) {
+ arrangeLayout(layout);
}
@Override
@@ -365,14 +334,11 @@ public class HupaLayout implements HupaL
public AcceptsOneWidget getToolBarView() {
return toolPanel.getToolBarView();
}
-
-
@Override
public AcceptsOneWidget getComposeView() {
- return centerPanel.getComposeView();
+ return composePanel.getComposeView();
}
-
@Override
public AcceptsOneWidget getComposeToolBarView() {
@@ -383,6 +349,10 @@ public class HupaLayout implements HupaL
public AcceptsOneWidget getFolderListView() {
return centerPanel.getFolderListView();
}
+ @Override
+ public AcceptsOneWidget getContactListView() {
+ return composePanel.getContactListView();
+ }
@Override
public AcceptsOneWidget getMessageListView() {
@@ -403,18 +373,19 @@ public class HupaLayout implements HupaL
public AcceptsOneWidget getStatusView() {
return centerPanel.getStatusView();
}
-
+
@Override
public AcceptsOneWidget getLabelListView() {
return settingPanel.getLabelListView();
}
-
+
@Override
- public AcceptsOneWidget getLabelPropertiesView(){
+ public AcceptsOneWidget getLabelPropertiesView() {
return settingPanel.getLabelPropertiesView();
}
<<<<<<< HEAD
+<<<<<<< HEAD
@Override
public AcceptsOneWidget getComposeHeader() {
return centerPanel.getComposeHeader();
@@ -469,12 +440,37 @@ public interface HupaLayout {
<<<<<<< HEAD
>>>>>>> toggle to display/hide the tool bar view to adjust the compose and message panel
=======
+=======
+ private void arrangeLayout(int lyt) {
+ toolPanel.toggleTo(lyt);
+ showOrHideMessage(lyt);
+ showOrHideCompose(lyt);
+ showOrHideSetting(lyt);
+ }
- @Override
- public void switchToSetting() {
-// centerPanel.removeFromParent();
- mainBox.setWidgetHidden(centerPanel, true);
- mainBox.setWidgetHidden(settingPanel, false);
+ private void showOrHideSetting(int lyt) {
+ mainBox.setWidgetLeftWidth(settingPanel, 0, Unit.PCT, (lyt & LAYOUT_SETTING) / LAYOUT_SETTING * 100, Unit.PCT);
+ mainBox.setWidgetTopHeight(settingPanel, 0, Unit.PCT, (lyt & LAYOUT_SETTING) / LAYOUT_SETTING * 100, Unit.PCT);
+ }
+>>>>>>> make layout can be arranged by clicking the navigation buttons; make the layout changing by set their sizes to zero rather than remove/add from their parent widgets; merge to the master branch.
+
+ private void showOrHideCompose(int lyt) {
+ mainBox.setWidgetLeftWidth(composePanel, 0, Unit.PCT, (lyt & LAYOUT_COMPOSE) / LAYOUT_COMPOSE * 100, Unit.PCT);
+ mainBox.setWidgetTopHeight(composePanel, 0, Unit.PCT, (lyt & LAYOUT_COMPOSE) / LAYOUT_COMPOSE * 100, Unit.PCT);
}
+<<<<<<< HEAD
>>>>>>> attempt to add label setting feature
+=======
+
+ private void showOrHideMessage(int lyt) {
+ mainBox.setWidgetLeftWidth(centerPanel, 0, Unit.PCT, (lyt & LAYOUT_MESSAGE) / LAYOUT_MESSAGE * 100, Unit.PCT);
+ mainBox.setWidgetTopHeight(centerPanel, 0, Unit.PCT, (lyt & LAYOUT_MESSAGE) / LAYOUT_MESSAGE * 100, Unit.PCT);
+ }
+
+ interface HupaLayoutUiBinder extends UiBinder<LayoutPanel, HupaLayout> {
+ }
+
+ private static HupaLayoutUiBinder binder = GWT.create(HupaLayoutUiBinder.class);
+
+>>>>>>> make layout can be arranged by clicking the navigation buttons; make the layout changing by set their sizes to zero rather than remove/add from their parent widgets; merge to the master branch.
}
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=1522367&r1=1522366&r2=1522367&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 04:35:42 2013
@@ -160,15 +160,20 @@
ui:field="HupaFeature">
<<<<<<< HEAD
<<<<<<< HEAD
+<<<<<<< HEAD
=======
>>>>>>> add loading and notification bar(finishing the folder list click event), related to the issue#18
+=======
+
+>>>>>>> make layout can be arranged by clicking the navigation buttons; make the layout changing by set their sizes to zero rather than remove/add from their parent widgets; merge to the master branch.
<g:layer width="177px" left="10px">
<g:SimplePanel ui:field="logoContainer" />
</g:layer>
<g:layer>
<<<<<<< HEAD
+<<<<<<< HEAD
<g:SimplePanel ui:field="notificationContainer" />
</g:layer>
<g:layer width="287px" right="0">
@@ -214,6 +219,9 @@
=======
=======
<g:SimplePanel ui:field="notificationContainer" />
+=======
+ <g:SimplePanel ui:field="notificationContainer" />
+>>>>>>> make layout can be arranged by clicking the navigation buttons; make the layout changing by set their sizes to zero rather than remove/add from their parent widgets; merge to the master branch.
</g:layer>
>>>>>>> add loading and notification bar(finishing the folder list click event), related to the issue#18
<g:layer width="287px" right="0">
@@ -249,17 +257,28 @@
<g:layer left='10px' right='10px' top='88px' bottom="20px">
=======
<g:layer left='10px' right='10px' top='84px' bottom="20px">
+<<<<<<< HEAD
>>>>>>> make fine tuning with tool buttons in toolbar
<g:DockLayoutPanel ui:field="mainBox">
+=======
+ <g:DockLayoutPanel>
+>>>>>>> make layout can be arranged by clicking the navigation buttons; make the layout changing by set their sizes to zero rather than remove/add from their parent widgets; merge to the master branch.
<g:north size="44">
<hupa:_ToolPanel ui:field="toolPanel" />
</g:north>
<g:center>
- <hupa:_CenterPanel ui:field="centerPanel" />
+ <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="0%" top="0%" height="0%">
+ <hupa:_CenterSettingPanel ui:field="settingPanel" />
+ </g:layer>
+ <g:layer left="0%" width="0%" top="0%" height="0%">
+ <hupa:_CenterComposePanel ui:field="composePanel" />
+ </g:layer>
+ </g:LayoutPanel>
</g:center>
- <g:south size="0">
- <hupa:_CenterSettingPanel ui:field="settingPanel" />
- </g:south>
</g:DockLayoutPanel>
<<<<<<< HEAD
</g:layer> -->
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=1522367&r1=1522366&r2=1522367&view=diff
==============================================================================
--- james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/HupaLayoutable.java (original)
+++ james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/HupaLayoutable.java Thu Sep 12 04:35:42 2013
@@ -108,6 +108,7 @@ public interface HupaLayoutable extends
>>>>>>> integrate all of the views to their corresponding activities and mappers
=======
+<<<<<<< HEAD
void switchToCompose();
void switchToMessage();
@@ -128,6 +129,8 @@ public interface HupaLayoutable extends
AcceptsOneWidget getComposeToolBarView();
>>>>>>> toggle to display/hide the tool bar view to adjust the compose and message panel
=======
+=======
+>>>>>>> make layout can be arranged by clicking the navigation buttons; make the layout changing by set their sizes to zero rather than remove/add from their parent widgets; merge to the master branch.
AcceptsOneWidget getComposeToolBarView();
AcceptsOneWidget getComposeView();
@@ -140,6 +143,7 @@ public interface HupaLayoutable extends
>>>>>>> add loading and notification bar(finishing the folder list click event), related to the issue#18
=======
+<<<<<<< HEAD
void switchToSetting();
<<<<<<< HEAD
>>>>>>> attempt to add label setting feature
@@ -152,4 +156,12 @@ public interface HupaLayoutable extends
AcceptsOneWidget getLabelPropertiesView();
>>>>>>> add rename RF to label setting feature
+=======
+ AcceptsOneWidget getLabelListView();
+ AcceptsOneWidget getContactListView();
+
+ AcceptsOneWidget getLabelPropertiesView();
+
+ void switchTo(int layout);
+>>>>>>> make layout can be arranged by clicking the navigation buttons; make the layout changing by set their sizes to zero rather than remove/add from their parent widgets; merge to the master branch.
}
Modified: james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/LabelPropertiesView.java
URL: http://svn.apache.org/viewvc/james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/LabelPropertiesView.java?rev=1522367&r1=1522366&r2=1522367&view=diff
==============================================================================
--- james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/LabelPropertiesView.java (original)
+++ james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/LabelPropertiesView.java Thu Sep 12 04:35:42 2013
@@ -22,8 +22,11 @@ package org.apache.hupa.client.ui;
import java.util.List;
<<<<<<< HEAD
+<<<<<<< HEAD
import org.apache.hupa.client.HupaController;
import org.apache.hupa.client.activity.LabelListActivity;
+=======
+>>>>>>> make layout can be arranged by clicking the navigation buttons; make the layout changing by set their sizes to zero rather than remove/add from their parent widgets; merge to the master branch.
import org.apache.hupa.client.activity.LabelPropertiesActivity;
import org.apache.hupa.client.rf.CreateFolderRequest;
import org.apache.hupa.client.rf.HupaRequestFactory;
Modified: 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=1522367&r1=1522366&r2=1522367&view=diff
==============================================================================
--- james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/_CenterPanel.java (original)
+++ james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/_CenterPanel.java Thu Sep 12 04:35:42 2013
@@ -24,10 +24,7 @@ import com.google.gwt.uibinder.client.Ui
import com.google.gwt.uibinder.client.UiField;
import com.google.gwt.user.client.ui.AcceptsOneWidget;
import com.google.gwt.user.client.ui.Composite;
-import com.google.gwt.user.client.ui.IsWidget;
-import com.google.gwt.user.client.ui.SimpleLayoutPanel;
import com.google.gwt.user.client.ui.SplitLayoutPanel;
-import com.google.gwt.user.client.ui.Widget;
public class _CenterPanel extends Composite {
@@ -36,6 +33,7 @@ public class _CenterPanel extends Compos
@UiField protected SplitLayoutPanel thisPanel;
@UiField protected __OutlinePanel outlinePanel;
@UiField protected __ContentPanel contentPanel;
+<<<<<<< HEAD
=======
@UiField SplitLayoutPanel thisPanel;
@UiField __OutlinePanel outlinePanel;
@@ -59,16 +57,12 @@ public class _CenterPanel extends Compos
=======
@UiField protected SimpleLayoutPanel composeContainer;
>>>>>>> make send text mail work excellently
+=======
+>>>>>>> make layout can be arranged by clicking the navigation buttons; make the layout changing by set their sizes to zero rather than remove/add from their parent widgets; merge to the master branch.
public _CenterPanel() {
initWidget(binder.createAndBindUi(this));
thisPanel.setWidgetMinSize(outlinePanel, 144);
- thisPanel.setWidgetHidden(composeContainer, true);
- }
-
- // TODO make it display to remove this method and the corresponding code
- public void temporarilyHiddenTheUnimplementedContactPanel(boolean hidden) {
-// thisPanel.setWidgetHidden(outlinePanel, hidden);
}
public AcceptsOneWidget getFolderListView() {
@@ -98,14 +92,4 @@ public class _CenterPanel extends Compos
private static _CenterPanelUiBinder binder = GWT
.create(_CenterPanelUiBinder.class);
-
- public AcceptsOneWidget getComposeView() {
- return new AcceptsOneWidget() {
- @Override
- public void setWidget(IsWidget w) {
- composeContainer.setWidget(Widget.asWidgetOrNull(w));
- }
- };
- }
-
}
Modified: 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=1522367&r1=1522366&r2=1522367&view=diff
==============================================================================
--- james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/_CenterPanel.ui.xml (original)
+++ james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/_CenterPanel.ui.xml Thu Sep 12 04:35:42 2013
@@ -31,8 +31,5 @@
<g:center>
<hupa:__ContentPanel ui:field="contentPanel" />
</g:center>
- <g:south size="0">
- <g:SimpleLayoutPanel ui:field="composeContainer" />
- </g:south>
</g:SplitLayoutPanel>
</ui:UiBinder>
\ No newline at end of file
Modified: 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=1522367&r1=1522366&r2=1522367&view=diff
==============================================================================
--- james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/_ToolPanel.java (original)
+++ james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/_ToolPanel.java Thu Sep 12 04:35:42 2013
@@ -39,10 +39,27 @@ public class _ToolPanel extends Composit
public _ToolPanel() {
initWidget(binder.createAndBindUi(this));
- toggleToCompose(false);
}
-
- protected void toggleToCompose(boolean visible){
+
+ void toggleTo(int layout) {
+ switch (layout) {
+ case HupaLayout.LAYOUT_MESSAGE:
+ this.toggleToCompose(false);break;
+ case HupaLayout.LAYOUT_COMPOSE:
+ this.toggleToCompose(true);break;
+ //TODO compose button should be shown when setting
+ default:
+ hideAll();
+ }
+ }
+
+ private void hideAll() {
+ toolBarContainer.setVisible(false);
+ searchFilterContainer.setVisible(false);
+ composeToolBarContainer.setVisible(false);
+ }
+
+ protected void toggleToCompose(boolean visible) {
toolBarContainer.setVisible(!visible);
searchFilterContainer.setVisible(!visible);
composeToolBarContainer.setVisible(visible);
@@ -69,7 +86,6 @@ public class _ToolPanel extends Composit
interface _ToolPanelUiBinder extends UiBinder<DockLayoutPanel, _ToolPanel> {
}
- private static _ToolPanelUiBinder binder = GWT
- .create(_ToolPanelUiBinder.class);
+ private static _ToolPanelUiBinder binder = GWT.create(_ToolPanelUiBinder.class);
}
---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org