@Override public void widgetSelected(SelectionEvent e) { InputDialog inputDialog = new InputDialog( (Shell) shell, RedisClient.i18nFile.getText(I18nFile.INPUTVALUES), RedisClient.i18nFile.getText(I18nFile.INPUTZSETFORMAT), "", null); if (inputDialog.open() == InputDialog.OK) { String values = inputDialog.getValue(); String[] zsetValues = values.split(";"); TableItem item = null; for (String value : zsetValues) { item = new TableItem(table, SWT.NONE); String[] zset = value.split(","); item.setText(zset); } if(item != null) table.setSelection(item); } } });
@Override public void widgetSelected(SelectionEvent e) { InputDialog inputDialog = new InputDialog( (Shell) shell, RedisClient.i18nFile.getText(I18nFile.INPUTVALUES), RedisClient.i18nFile.getText(I18nFile.HASHINPUTFORMAT), "", null); if (inputDialog.open() == InputDialog.OK) { String values = inputDialog.getValue(); String[] hashValues = values.split(";"); TableItem item = null; for (String value : hashValues) { item = new TableItem(table, SWT.NONE); String[] zset = value.split(","); item.setText(zset); } if(item != null) table.setSelection(item); } } });
@Override public void widgetSelected(SelectionEvent e) { InputDialog inputDialog = new InputDialog((Shell) shell, RedisClient.i18nFile.getText(I18nFile.INPUTVALUES), RedisClient.i18nFile.getText(I18nFile.LISTINPUTFORMAT), "", null); if (inputDialog.open() == InputDialog.OK) { String values = inputDialog.getValue(); String[] listValues = values.split(";"); TableItem item = null; for (String value : listValues) { item = new TableItem(table, SWT.NONE); item.setText(value); } if(item != null) table.setSelection(item); } } });
@Override public void widgetSelected(SelectionEvent e) { InputDialog inputDialog = new InputDialog((Shell) shell, RedisClient.i18nFile.getText(I18nFile.INPUTVALUES), RedisClient.i18nFile.getText(I18nFile.LISTINPUTFORMAT), "", null); if (inputDialog.open() == InputDialog.OK) { String values = inputDialog.getValue(); String[] listValues = values.split(";"); TableItem item = null; for (String value : listValues) { item = new TableItem(table, SWT.NONE); item.setText(value); } if(item != null) table.setSelection(item); } } });
@Override public void widgetSelected(SelectionEvent e) { InputDialog dialog = new InputDialog(shell.getParent().getShell(), RedisClient.i18nFile.getText(I18nFile.INSERTHEAD), RedisClient.i18nFile.getText(I18nFile.INPUTVALUES), "", null); if(dialog.open() == InputDialog.OK){ String value = dialog.getValue(); service.addHead(id, db, key, value); refresh(); } } });
@Override public void widgetSelected(SelectionEvent e) { InputDialog inputDialog = new InputDialog(shell.getParent().getShell(), RedisClient.i18nFile.getText(I18nFile.INPUTVALUES), RedisClient.i18nFile.getText(I18nFile.LISTINPUTFORMAT), "", null); if (inputDialog.open() == InputDialog.OK) { String values = inputDialog.getValue(); String[] setValues = values.split(";"); long size = service.addValues(id, db, key, setValues); if(size == 0) MessageDialog.openInformation(shell.getParent().getShell(), RedisClient.i18nFile.getText(I18nFile.INPUTVALUES), RedisClient.i18nFile.getText(I18nFile.ADDSETVALUES)); refresh(); } } });
@Override public void widgetSelected(SelectionEvent e) { InputDialog dialog = new InputDialog(shell.getParent().getShell(), RedisClient.i18nFile.getText(I18nFile.APPENDTAIL), RedisClient.i18nFile.getText(I18nFile.INPUTVALUES), "", null); if(dialog.open() == InputDialog.OK){ String value = dialog.getValue(); service.addTail(id, db, key, value); pageListener.setCount(); table.clear(table.getItemCount()-1); table.setSelection(table.getItemCount()-1); table.setSelection(-1); currentData.setItem(null); status = Status.Normal; statusChanged(); } } });
private void jButton3ActionPerformed(java.awt.event.ActionEvent evt) { dia = new InputDialog(this); dia.setVisible(true); }
InputDialog seaerchDialog = new InputDialog(); // show modal dialog, wait for response seaerchDialog.doModal(); // get the input text Dialog.alert(seaerchDialog.getInputText());
/** * Prompts the user to input a string. * @see PromptExpanderBase#prompt() */ @Override public void prompt() { InputDialog dialog = new InputDialog(null, StringSubstitutionMessages.StringPromptExpander_0, dialogMessage, defaultValue == null ? lastValue : defaultValue, null); int dialogResult = dialog.open(); if (dialogResult == Window.OK) { dialogResultString = dialog.getValue(); } }
private void addFilter() { IInputValidator validator = new IInputValidator() { public String isValid(String newText) { return newText.indexOf(';') >= 0 ? Messages.FilterDialog_FilterShouldntContainSemicolon : null; } }; InputDialog dialog = new InputDialog(getShell(), Messages.FilterDialog_AddFilterTitle, Messages.FilterDialog_AddFliterLabel, null, validator); if (dialog.open() == Window.OK) { String value = dialog.getValue().trim(); if (value.length() > 0) { filterList.add(value); } } }
private InputDialog getRefNameInputDialog(String prompt, final String refPrefix, String initialValue) { InputDialog labelDialog = new InputDialog(getShell(), UIText.CheckoutDialog_QuestionNewBranchTitle, prompt, initialValue, ValidationUtils.getRefNameInputValidator(repo, refPrefix, true)); labelDialog.setBlockOnOpen(true); return labelDialog; }
private InputDialog getRefNameInputDialog(String prompt, final String refPrefix, String initialValue) { InputDialog branchNameDialog = new InputDialog( getShell(), UIText.RenameBranchDialog_RenameBranchDialogNewNameInputWindowTitle, prompt, initialValue, ValidationUtils.getRefNameInputValidator( repo, refPrefix, true)); branchNameDialog.setBlockOnOpen(true); return branchNameDialog; }
@Override public void runWithEvent ( final Event event ) { final InputDialog dialog = new InputDialog ( this.shell, "Add key", "Enter the name of the key to add", "", null ); if ( dialog.open () == Window.OK ) { this.map.put ( dialog.getValue (), "" ); } } }
@Override public void runWithEvent ( final Event event ) { final InputDialog dialog = new InputDialog ( this.shell, "Add key", "Enter the name of the key to add", "", null ); if ( dialog.open () == Window.OK ) { this.map.put ( dialog.getValue (), "" ); } } }
public void widgetSelected(SelectionEvent e) { IInputValidator validator = new IInputValidator() { public String isValid(String newText) { if (newText.trim().length() > 0 && newText.matches("[_a-zA-Z]*")) //$NON-NLS-1$ return null; return RutaFoldingMessages.RutaFoldingPreferenceBlock_2; } }; InputDialog dlg = new InputDialog(null, RutaFoldingMessages.RutaFoldingPreferenceBlock_3, RutaFoldingMessages.RutaFoldingPreferenceBlock_4, "", validator); if (dlg.open() == Window.OK) { fList.add(dlg.getValue()); save(); } } });
@Override public void widgetSelected(SelectionEvent e) { InputDialog dialog = new InputDialog(getShell(), "New Name", "File name pattern like *.java, my.xml:", null, new IInputValidator() { public String isValid(String newText) { if (newText != null && newText.trim().length() > 0) return null; return ""; } }); if (dialog.open() == InputDialog.OK) { addFileName(dialog.getValue()); } } }
public void handleInsert () { final InputDialog dlg = new InputDialog ( getSite ().getShell (), "Create new configuration", "Enter the id of the new configuration object to create", "", null ); if ( dlg.open () == Window.OK ) { insertEntry ( dlg.getValue () ); } }
private void renameFilter() { MarkerFieldFilterGroup filterGroup = getSelectionFromTable(); IInputValidator nameValidator = getNameValidator(filterGroup.getName(), getCurrentConfigurationNames()); InputDialog inputDialog = new InputDialog(getShell(), MarkerMessages.MarkerFilterDialog_title, MarkerMessages.MarkerFilterDialog_message, filterGroup.getName(), nameValidator); if(inputDialog.open() == Window.OK) { filterGroup.setName(inputDialog.getValue()); configsTable.refresh(filterGroup); } }
/** * To be called when add is requested to the table. * * @return Returns new {@link ExcludeRule} or <code>null</code> if definition of one has been * canceled. */ private ExcludeRule addRequested() { InputDialog inputDialog = new InputDialog(getManagedForm().getForm().getShell(), "New Exclude Rule", "Enter class name or pattern:", "", new FqnWildcardValidator(false, false)); if (inputDialog.open() == Window.OK) { ExcludeRule excludeRule = new ExcludeRule(); excludeRule.setClassName(inputDialog.getValue()); return excludeRule; } return null; }