Examples of InputDialog


Examples of org.eclipse.jface.dialogs.InputDialog

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

Examples of org.eclipse.jface.dialogs.InputDialog

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

Examples of org.eclipse.jface.dialogs.InputDialog

    Button btnAdd = new Button(grpValues, SWT.NONE);
    btnAdd.setLayoutData(new GridData(SWT.FILL, SWT.TOP, false, false, 1, 1));
    btnAdd.addSelectionListener(new SelectionAdapter() {
      @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(",");
View Full Code Here

Examples of org.eclipse.jface.dialogs.InputDialog

                else
                    return null;
            }
        };

        InputDialog dialog = new InputDialog(
            getShell(),
            Messages.getString( "RenameAction.RenameSearchDialog" ), Messages.getString( "RenameAction.RenameSearchNewName" ), search.getName(), validator ); //$NON-NLS-1$ //$NON-NLS-2$

        dialog.open();
        String newName = dialog.getValue();
        if ( newName != null )
        {
            search.setName( newName );
        }
    }
View Full Code Here

Examples of org.eclipse.jface.dialogs.InputDialog

                else
                    return null;
            }
        };

        InputDialog dialog = new InputDialog(
            getShell(),
            Messages.getString( "RenameAction.RenameBookmarkDialog" ), Messages.getString( "RenameAction.RenameBookmarkNewName" ), bookmark.getName(), validator ); //$NON-NLS-1$ //$NON-NLS-2$

        dialog.open();
        String newName = dialog.getValue();
        if ( newName != null )
        {
            bookmark.setName( newName );
        }
    }
View Full Code Here

Examples of org.eclipse.jface.dialogs.InputDialog

                    return null;
                }
            }
        };

        InputDialog dialog = new InputDialog(
            getShell(),
            Messages.getString( "RenameAction.RenameConnection" ), Messages.getString( "RenameAction.NewNameConnection" ), connection.getName(), //$NON-NLS-1$ //$NON-NLS-2$
            validator );

        dialog.open();
        String newName = dialog.getValue();
        if ( newName != null )
        {
            connection.setName( newName );
        }
    }
View Full Code Here

Examples of org.eclipse.jface.dialogs.InputDialog

                    return null;
                }
            }
        };

        InputDialog dialog = new InputDialog(
            getShell(),
            Messages.getString( "RenameAction.RenameConnectionFolder" ), Messages.getString( "RenameAction.NewNameConnectionFolder" ), connectionFolder.getName(), //$NON-NLS-1$ //$NON-NLS-2$
            validator );

        dialog.open();
        String newName = dialog.getValue();
        if ( newName != null )
        {
            connectionFolder.setName( newName );
        }
    }
View Full Code Here

Examples of org.eclipse.jface.dialogs.InputDialog

  @Override
  public void preWindowOpen() {
    ReInjector.getInstance().reInject(this);
    boolean connected = false;
    while (!connected) {
      InputDialog inputDialog = new InputDialog(new Shell(),
          Messages.ApplicationWorkbenchWindowAdvisor_HostTitle,
          Messages.ApplicationWorkbenchWindowAdvisor_HostDescription,
          Messages.ApplicationWorkbenchWindowAdvisor_HostDefault,
          null);
      inputDialog.open();
      if (inputDialog.getReturnCode() == InputDialog.OK) {
        connected = getGameClient().connectToServer(
            inputDialog.getValue());
      } else {
        new MessageDialog(
            new Shell(),
            Messages.ApplicationWorkbenchWindowAdvisor_ConnectionFailedTitle,
            null,
View Full Code Here

Examples of org.eclipse.jface.dialogs.InputDialog

    return City.class;
  }

  @Override
  public void execute(Object tile) {
    InputDialog inputDialog = new InputDialog(new Shell(),
        Messages.CreateUnitTileAction_NumerOfUnitsTitle,
        Messages.CreateUnitTileAction_NumberOfUnitsQuestion,
        Messages.CreateUnitTileAction_NumberOfUnitDefault,
        new IInputValidator() {
          @Override
          public String isValid(String newText) {
            try {
              int parseInt = Integer.parseInt(newText);
              if (parseInt <= 0) {
                return Messages.CreateUnitTileAction_Warning;
              }
            } catch (Exception e) {
              return Messages.CreateUnitTileAction_Warning2;
            }
            return null;
          }
        });
    if (inputDialog.open() == InputDialog.OK) {
      clientService.execute(new CreateUnitCommand(playerService
          .getDynasty(userService.getUser()), (City) tile, Integer
          .parseInt(inputDialog.getValue())));
    }
  }
View Full Code Here

Examples of org.eclipse.jface.dialogs.InputDialog

                if (selectionIndex != -1)
                {
                    final CompositeData selectedLogger = (CompositeData)_table.getItem(
                                                                        selectionIndex).getData();
                    String user = selectedLogger.get(USERNAME).toString();
                    InputDialog id = new InputDialog(setPasswordButton.getShell(),"Set Password",
                                        "Please enter the new password for '" + user + "':",null,null){
                        @Override
                        protected Control createDialogArea(Composite parent)
                        {
                            Control control = super.createDialogArea(parent);
                            //set the Text field echo char to '*' to mask the password
                            getText().setEchoChar('*');
                            //return the normal result
                            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");                      
                        }
                        else
                        {
                            break;
                        }
                    }
                   
                    if (returnValue  == InputDialog.OK)
                    {
                        char[] password = id.getValue().toCharArray();

                        // Qpid JMX API 1.1 and below expects the password to be sent as a hashed value.
                        if (_ApiVersion.lessThanOrEqualTo(1,1))
                        {
                            try
                            {
                                password = ViewUtility.getHash(id.getValue());
                            }
                            catch (Exception hashException)
                            {
                                ViewUtility.popupErrorMessage("Set Password",
                                        "Unable to calculate hash for Password:"
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.