Author: dongxu Date: Thu Sep 12 04:02:45 2013 New Revision: 1522291 URL: http://svn.apache.org/r1522291 Log: could change main panel dynamically currently by clicking the compose button
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/ui/HupaLayout.java 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/_CenterPanel.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=1522291&r1=1522290&r2=1522291&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:02:45 2013 @@ -29,6 +29,7 @@ import org.apache.hupa.client.activity.T import org.apache.hupa.client.activity.TopBarActivity; import org.apache.hupa.client.mapper.ActivityManagerInitializer; import org.apache.hupa.client.place.ComposePlace; +<<<<<<< HEAD import org.apache.hupa.client.place.ContactPlace; import org.apache.hupa.client.place.FolderPlace; import org.apache.hupa.client.place.HupaPlace; @@ -61,6 +62,8 @@ import java.util.logging.Logger; import org.apache.hupa.client.bundles.HupaResources; ======= >>>>>>> scrub login view code, use css by a unique way +======= +>>>>>>> could change main panel dynamically currently by clicking the compose button import org.apache.hupa.client.rf.CheckSessionRequest; import org.apache.hupa.client.rf.HupaRequestFactory; import org.apache.hupa.client.ui.HupaLayoutable; @@ -70,6 +73,7 @@ import org.apache.hupa.client.ui.LoginVi >>>>>>> move new theme ui from experiment to hupa evo import com.google.gwt.dom.client.StyleInjector; import com.google.gwt.event.shared.EventBus; +import com.google.gwt.place.shared.Place; import com.google.gwt.place.shared.PlaceChangeEvent; import com.google.gwt.place.shared.PlaceController; import com.google.gwt.place.shared.PlaceHistoryHandler; @@ -265,12 +269,23 @@ public class HupaController { private void bindCss() { // TODO:replace with a more gentle approach - StyleInjector.inject(LoginView.Resources.INSTANCE.stylesheet().getText()); + StyleInjector.inject(LoginView.Resources.INSTANCE.stylesheet() + .getText()); } private final class PlaceChangHandler implements PlaceChangeEvent.Handler { @Override public void onPlaceChange(PlaceChangeEvent event) { + adjustLayout(event); + } + } + + private void adjustLayout(PlaceChangeEvent event) { + Place place = event.getNewPlace(); + if (place instanceof ComposePlace) { + hupaLayout.switchToCompose(); + } else { + hupaLayout.switchToMessage(); } } 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=1522291&r1=1522290&r2=1522291&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:02:45 2013 @@ -335,9 +335,30 @@ public class HupaLayout implements HupaL } <<<<<<< HEAD +<<<<<<< HEAD public interface HupaLayout { LayoutPanel get(); >>>>>>> move new theme ui from experiment to hupa evo ======= >>>>>>> make login page as one part of the overall layout & splite layout to >>>>>>> little one +======= + @Override + public void switchToCompose() { + if (centerPanel.thisPanel.getWidgetIndex(centerPanel.contentPanel) >= 0) { + centerPanel.thisPanel.remove(centerPanel.contentPanel); + centerPanel.thisPanel.add(centerPanel.composePanel); + } + } + + @Override + public void switchToMessage() { + if (centerPanel.thisPanel.getWidgetIndex(centerPanel.contentPanel) >= 0) + return; + if (centerPanel.thisPanel.getWidgetIndex(centerPanel.composePanel) >= 0) { + centerPanel.thisPanel.remove(centerPanel.composePanel); + centerPanel.thisPanel.add(centerPanel.contentPanel); + } + } + +>>>>>>> could change main panel dynamically currently by clicking the compose button } 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=1522291&r1=1522290&r2=1522291&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:02:45 2013 @@ -104,5 +104,12 @@ public interface HupaLayoutable extends AcceptsOneWidget getMessageContentView(); AcceptsOneWidget getStatusView(); +<<<<<<< HEAD >>>>>>> integrate all of the views to their corresponding activities and >>>>>>> mappers +======= + + void switchToCompose(); + + void switchToMessage(); +>>>>>>> could change main panel dynamically currently by clicking the compose button } 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=1522291&r1=1522290&r2=1522291&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:02:45 2013 @@ -46,8 +46,8 @@ public class _CenterPanel extends Compos initWidget(binder.createAndBindUi(this)); thisPanel.setWidgetMinSize(outlinePanel, 144); thisPanel.setWidgetHidden(composePanel, true); - thisPanel.remove(contentPanel); - thisPanel.add(composePanel); +// thisPanel.remove(contentPanel); +// thisPanel.add(composePanel); } public AcceptsOneWidget getFolderListView() { --------------------------------------------------------------------- To unsubscribe, e-mail: server-dev-unsubscr...@james.apache.org For additional commands, e-mail: server-dev-h...@james.apache.org