Beispiel #1
0
 /** Show this button's menu (if it has one). */
 public void showMenu() {
   if (menu != null) {
     menu.show(getElement(), menuAlign);
     ButtonEvent be = new ButtonEvent(this);
     be.setMenu(menu);
     fireEvent(Events.MenuShow, be);
   }
 }
Beispiel #2
0
 /** Hide this button's menu (if it has one). */
 public void hideMenu() {
   if (menu != null) {
     menu.hide();
     ButtonEvent be = new ButtonEvent(this);
     be.setMenu(menu);
     fireEvent(Events.MenuHide, be);
   }
 }
        @Override
        public void componentSelected(ButtonEvent ce) {
          fireEvent(Events.Select, new BaseEvent(Events.Select));

          model.setType((Type) ce.getButton().getData(TYPE_DATA));
          reportEventBus.fireChange();
        }
  @Override
  public void componentSelected(ButtonEvent e) {
    //        RootLayoutPanel.get().add(new BinderDeckLayout());
    //        this.binderDeckLayout.setVisible(Boolean.TRUE);
    //        notificationPopupPanel.setStyleName(style.notifypopup());
    notificationPopupPanel.setPopupPosition(
        e.getTarget().getAbsoluteLeft() - (170), e.getTarget().getAbsoluteTop() + (20));
    notificationPopupPanel.show();
    IGPAccountDetail accountDetail = Registry.get(UserSessionEnum.ACCOUNT_DETAIL_IN_SESSION.name());
    List<IGPClientMessage> messageList = accountDetail.getUnreadMessages();
    if (messageList != null && !messageList.isEmpty()) {
      NotificationRemote.Util.getInstance()
          .markMessagesAsRead(
              new AsyncCallback<Boolean>() {
                @Override
                public void onFailure(Throwable caught) {
                  if (caught.getCause() instanceof GPSessionTimeout) {
                    GPHandlerManager.fireEvent(new GPLoginEvent(null));
                  } else {
                    GeoPlatformMessage.errorMessage(
                        "Error Saving the read messages",
                        "An error occurred while making the requested connection.\n"
                            + "Verify network connections and try again."
                            + "\nIf the problem persists contact your system administrator.");
                    LayoutManager.getInstance()
                        .getStatusMap()
                        .setStatus(
                            "Error Saving the read messages",
                            SearchStatus.EnumSearchStatus.STATUS_NO_SEARCH.toString());
                    System.out.println(
                        "Error Saving the read messages: "
                            + caught.toString()
                            + " data: "
                            + caught.getMessage());
                  }
                }

                @Override
                public void onSuccess(Boolean result) {}
              });
    }
  }
  /**
   * (non-Javadoc)
   *
   * @see
   *     com.extjs.gxt.ui.client.event.SelectionListener#componentSelected(com.extjs.gxt.ui.client.event.ComponentEvent)
   */
  @Override
  public void componentSelected(ButtonEvent ce) {
    ToggleButton button = (ToggleButton) ce.getSource();

    super.changeButtonState();

    if (button.isPressed()) {
      editorOberver.setButtonPressed(button);
      this.mapWidget.activateDrawPointFeature();
    } else {
      this.mapWidget.deactivateDrawPointFeature();
    }
  }