private void userChanged() { if (users == null) { return; } ClientUser user = null; if (users.getSelectedIndex() > 0) { final String email = users.getValue(users.getSelectedIndex()); if (userInfo.containsKey(email)) { user = userInfo.get(email); } Cookies.setCookie( "email", users.getValue(users.getSelectedIndex()), ParamSetSelectionController.getCookieExpirationDate(), null, "/", false); } // Figure out whether this user can edit parameters or not final boolean editorEnabled = user != null && user.isParameterEditorEnabled(); if (paramsEditor != null) { paramsEditor.setEditorEnabled(editorEnabled, user); } setOutputPathChangeEnabled(user != null && user.isOutputPathChangeEnabled()); }
private void copySelected(final ListBox from, final ListBox to) { int selected; while ((selected = from.getSelectedIndex()) != -1) { to.addItem(from.getItemText(selected)); from.removeItem(selected); } }
private void updateWorkspace() { String name = availableWorkspacesListBox.getItemText(availableWorkspacesListBox.getSelectedIndex()); List<String> selectedModulesList = new ArrayList<String>(selectedModulesListBox.getItemCount()); for (int i = 0; i < selectedModulesListBox.getItemCount(); i++) { selectedModulesList.add(selectedModulesListBox.getItemText(i)); } List<String> availableModuleList = new ArrayList<String>(availableModulesListBox.getItemCount()); for (int i = 0; i < availableModulesListBox.getItemCount(); i++) { availableModuleList.add(availableModulesListBox.getItemText(i)); } availableModuleList.removeAll(selectedModulesList); LoadingPopup.showMessage(constants.LoadingStatuses()); repositoryService.updateWorkspace( name, selectedModulesList.toArray(new String[selectedModulesList.size()]), availableModuleList.toArray(new String[availableModuleList.size()]), new GenericCallback<java.lang.Void>() { public void onSuccess(Void v) { Window.alert(constants.WorkspaceUpdated()); refreshWorkspaceList(); } }); }
private void removeWorkspace() { String name = availableWorkspacesListBox.getItemText(availableWorkspacesListBox.getSelectedIndex()); repositoryService.removeWorkspace( name, new GenericCallback<java.lang.Void>() { public void onSuccess(Void v) { Window.alert(constants.WorkspaceRemoved()); refreshWorkspaceList(); } }); }
private void go() { target.clear(); switch (demoList.getSelectedIndex()) { case 0: demoButtonsAndBody(); break; case 1: demoSidebarAndMargin(); break; case 2: demoBorder(); break; } target.layout(); }
private String getSelectedNavItem() { return navigation.getItemText(navigation.getSelectedIndex()); }
private int getSelectedConfigIndex() { return configList.getSelectedIndex(); }