コード例 #1
0
  /** The activity has started */
  @Override
  public void start(AcceptsOneWidget panel, EventBus eventBus) {
    Log.info("SystemStartActivity.start()");
    AnamnesisCheckView systemStartView = new AnamnesisCheckViewImpl();
    innerSystemStartView = systemStartView;
    //        AnamnesisCheckView systemStartView = getAnamnesisCheckView();
    systemStartView.setPresenter(this);
    this.widget = panel;
    this.view = systemStartView;

    MenuClickEvent.register(requests.getEventBus(), (AnamnesisCheckViewImpl) view);

    widget.setWidget(systemStartView.asWidget());
    init();

    activityManger.setDisplay(view.getDetailsPanel());
    placeChangeHandlerRegistration =
        eventBus.addHandler(
            PlaceChangeEvent.TYPE,
            new PlaceChangeEvent.Handler() {

              @Override
              public void onPlaceChange(PlaceChangeEvent event) {
                if (event.getNewPlace() instanceof AnamnesisCheckDetailsPlace) {
                  requests.getEventBus().fireEvent(new ApplicationLoadingScreenEvent(true));
                  view.setDetailPanel(true);
                  requests.getEventBus().fireEvent(new ApplicationLoadingScreenEvent(false));
                  AnamnesisCheckDetailsPlace place =
                      (AnamnesisCheckDetailsPlace) event.getNewPlace();
                  if (place.getOperation() == Operation.NEW) {
                    requests.getEventBus().fireEvent(new ApplicationLoadingScreenEvent(false));
                    getSearchStringByEntityProxyId(
                        (EntityProxyId<AnamnesisCheckProxy>) place.getProxyId());
                  }
                } else if (event.getNewPlace() instanceof AnamnesisCheckPlace) {
                  view.setDetailPanel(false);
                  AnamnesisCheckPlace place = (AnamnesisCheckPlace) event.getNewPlace();
                  if (place.getToken().contains("!DELETED")) {
                    //                        initSearch();
                  }
                }
              }
            });
  }
コード例 #2
0
  @Override
  public void onMenuClicked(MenuClickEvent event) {

    OsMaMainNav.setMenuStatus(event.getMenuStatus());
    ResolutionSettings.setSplitLayoutPanelPosition(splitLayoutPanel, false);
    //		int left = (OsMaMainNav.getMenuStatus() == 0) ? 40 : 225;
    //
    //		DOM.setElementAttribute(splitLayoutPanel.getElement(), "style", "position: absolute; left:
    // "+left+"px; top: 30px; right: 5px; bottom: 0px;");
    //
    //		if(splitLayoutPanel.getWidget(0).getOffsetWidth() >= 1220){
    //
    //			if(OsMaMainNav.getMenuStatus() == 0)
    //				splitLayoutPanel.setWidgetSize(splitLayoutPanel.getWidget(0), 1412);
    //			else
    //				splitLayoutPanel.setWidgetSize(splitLayoutPanel.getWidget(0), 1220);
    //		}

  }