private void handleDeleteSchedules() {
    final SchedulerToolbarController localThis = this;

    final ConfirmDialog confirm =
        new ConfirmDialog(
            Messages.getString("confirmDelete"), // $NON-NLS-1$
            Messages.getString(
                "confirmDeleteQuestion", Integer.toString(getNumSubscribers()))); // $NON-NLS-1$
    confirm.setOnOkHandler(
        new ICallback<MessageDialog>() {
          public void onHandle(MessageDialog d) {
            confirm.hide();
            localThis.deleteSelectedSchedules();
          }
        });
    confirm.center();
  }
 public void onClick(Widget sender) {
   if (sender == updateUserBtn) {
     updateUserDetails(sender);
   } else if (sender == deleteUserBtn) {
     if (usersList.getSelectedObjects().size() > 0) {
       confirmDeleteUsersDialog.center();
     }
   } else if (sender == addUserBtn) {
     addNewUser();
   } else if (sender == deleteRoleAssignmentBtn) {
     if (assignedRolesList.getSelectedObjects().size() > 0) {
       confirmRemoveRoleAssignmentDialog.center();
     }
   } else if (sender == addRoleAssignmentBtn) {
     List<ProxyPentahoUser> selectedUsers = usersList.getSelectedObjects();
     if (selectedUsers.size() == 1) {
       modifyRoleAssignments(selectedUsers.get(0));
     }
   }
 }
 public void show() {
   roleCreated = false;
   super.show();
 }
  @SuppressWarnings("unchecked")
  public UsersPanel() {
    // User List Panel
    VerticalPanel userListPanel = buildUsersListPanel();
    userListPanel.setStyleName("borderPane"); // $NON-NLS-1$
    // CSS this userListPanel.setSpacing(4);

    // User Details Panel
    VerticalPanel userDetailsDockPanel = buildUserDetailsDockPanel();
    userDetailsDockPanel.setStyleName("borderPane"); // $NON-NLS-1$
    // CSS this userDetailsDockPanel.setSpacing(4);

    add(userListPanel);
    add(userDetailsDockPanel);

    setSpacing(10);

    setCellWidth(userListPanel, "30%"); // $NON-NLS-1$
    setCellWidth(userDetailsDockPanel, "70%"); // $NON-NLS-1$
    setCellHeight(userListPanel, "100%"); // $NON-NLS-1$
    setCellHeight(userDetailsDockPanel, "100%"); // $NON-NLS-1$

    userListPanel.setWidth("100%"); // $NON-NLS-1$
    userListPanel.setHeight("100%"); // $NON-NLS-1$
    userDetailsDockPanel.setWidth("100%"); // $NON-NLS-1$
    userDetailsDockPanel.setHeight("100%"); // $NON-NLS-1$

    userDetailsPanel.setEnabled(false);
    updateUserBtn.setEnabled(false);

    newUserDialogBox.setCallback(
        new IDialogCallback() {
          public void cancelPressed() {}

          public void okPressed() {
            if (newUserDialogBox.isUserCreated()) {
              ProxyPentahoUser newUser = newUserDialogBox.getUser();
              IListBoxFilter filter = usersList.getFilter();
              if ((filter != null) && !filter.accepts(newUser)) {
                filterTextBox.setText(""); // $NON-NLS-1$
                usersList.setFilter(null);
              }
              usersList.addObject(newUser);
              usersList.setSelectedObject(newUser);
              userSelectionChanged();
              // default roles might have been added; update assigned roles list
              List<ProxyPentahoRole> roleList =
                  Arrays.asList(UserAndRoleMgmtService.instance().getRoles(newUser));
              assignedRolesList.setObjects(roleList);
              assignedRoleSelectionChanged();
            }
          }
        });
    roleAssignmentsDialog.addPopupListener(this);

    userDetailsPanel.getUserNameTextBox().setEnabled(false);

    confirmDeleteUsersDialog.setText(Messages.getString("deleteUsers")); // $NON-NLS-1$
    confirmDeleteUsersDialog.setMessage(
        Messages.getString("confirmUserDeletionMsg")); // $NON-NLS-1$
    confirmDeleteUsersDialog.setOnOkHandler(
        new ICallback() {
          public void onHandle(Object o) {
            confirmDeleteUsersDialog.hide();
            deleteSelectedUsers();
            assignedRoleSelectionChanged();
          }
        });

    confirmRemoveRoleAssignmentDialog.setText(Messages.getString("unassignRoles")); // $NON-NLS-1$
    confirmRemoveRoleAssignmentDialog.setMessage(
        Messages.getString("confirmUnassignRolesMsg")); // $NON-NLS-1$
    confirmRemoveRoleAssignmentDialog.setOnOkHandler(
        new ICallback() {
          public void onHandle(Object o) {
            confirmRemoveRoleAssignmentDialog.hide();
            unassignSelectedRoles();
            assignedRoleSelectionChanged();
          }
        });
  }