Package org.eclipse.jface.dialogs

Examples of org.eclipse.jface.dialogs.InputDialog.open()


   * Adds new {@link CategoryInfo}.
   */
  private void onAddCategory() {
    InputDialog inputDialog =
        new InputDialog(getShell(), "New category", "Enter new category name:", "", null);
    if (inputDialog.open() == Window.OK) {
      commands_add(new CategoryAddCommand("category_" + System.currentTimeMillis(),
          inputDialog.getValue()));
    }
  }

View Full Code Here


              "Category",
              "Enter new category name:",
              category.getName(),
              null);
      // execute dialog
      if (inputDialog.open() == Window.OK) {
        commands_add(new CategoryNameCommand(category, inputDialog.getValue()));
      }
    } else if (element instanceof DeviceInfo) {
      DeviceInfo device = (DeviceInfo) element;
      DeviceEditDialog dialog = new DeviceEditDialog(device);
View Full Code Here

                            return control;
                        }
                    };
                   
                    int returnValue;
                    while((returnValue = id.open()) == InputDialog.OK)
                    {
                        if (id.getValue() == null || id.getValue().toString().length() == 0)
                        {                           
                            ViewUtility.popupErrorMessage("Set Password", "Please enter a valid password");                      
                        }
View Full Code Here

  @Override
  public void run() {
    InputDialog dlg = new InputDialog(
        Display.getCurrent().getActiveShell(), "Create new Java class",
        "Enter a name for the enclosing Java class:", "", null);
    if (dlg.open() == InputDialog.OK) {
      className = dlg.getValue();
      logger.debug("Classname: " + dlg.getValue());
    } else {
      logger.debug("Do not create a class.");
    }
View Full Code Here

      @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) {
View Full Code Here

        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);
View Full Code Here

    btnInsertHead.setLayoutData(new GridData(SWT.FILL, SWT.TOP, false, false, 1, 1));
    btnInsertHead.addSelectionListener(new SelectionAdapter() {
      @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();
        }
      }
View Full Code Here

        1, 1));
    btnAppendTail.addSelectionListener(new SelectionAdapter() {
      @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);
View Full Code Here

    btnWatch.addSelectionListener(new SelectionAdapter() {
      @Override
      public void widgetSelected(SelectionEvent e) {
        WatchDialog dialog = new WatchDialog(shell.getParent()
            .getShell(), image, currentData.getValue());
        dialog.open();
      }
    });
   
   
   
View Full Code Here

      @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));
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.