Package org.eclipse.swt.widgets

Examples of org.eclipse.swt.widgets.Text


    fNavigationToolBarManager.createControl(parent);
  }

  private void createLocationInput(Composite parent) {
    fLocationInput = new Text(parent, SWT.BORDER | SWT.SINGLE);
    fLocationInput.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, true));
    fLocationInput.addSelectionListener(new SelectionAdapter() {
      @Override
      public void widgetDefaultSelected(SelectionEvent e) {
        if (StringUtils.isSet(fLocationInput.getText())) {
View Full Code Here


      /* Name */
      if (fMode == DialogMode.ADD || fMode == DialogMode.EDIT) {
        Label nameLabel = new Label(composite, SWT.NONE);
        nameLabel.setText("Name: ");

        fNameInput = new Text(composite, SWT.BORDER | SWT.SINGLE);
        fNameInput.setLayoutData(new GridData(SWT.FILL, SWT.BEGINNING, true, false));

        if (fExistingLabel != null) {
          fNameInput.setText(fExistingLabel.getName());
          fNameInput.selectAll();
View Full Code Here

      fFilteredTree.getViewer().getControl().addKeyListener(new KeyAdapter() {
        @Override
        public void keyPressed(KeyEvent e) {
          if (e.character > 0x20) {
            String character = String.valueOf(e.character);
            Text text = fFilteredTree.getFilterControl();
            text.setFocus();
            text.setText(character);
            text.setSelection(1);
            filter.setPattern(character);

            /* Consume the Event */
            e.doit = false;
          }
View Full Code Here

        });
      }

      /* Text */
      else if (c instanceof Text) {
        Text text = (Text) c;
        text.addModifyListener(new ModifyListener() {
          public void modifyText(ModifyEvent e) {
            run.run();
          }
        });
      }
View Full Code Here

      OwlUI.openInFeedView(fEditorSite.getPage(), new StructuredSelection(newsMark), true, false, perform);
  }

  private void createLocationInput(Composite parent) {
    if (Application.IS_WINDOWS || Application.IS_LINUX)
      fLocationInput = new Text(parent, SWT.BORDER | SWT.SINGLE | SWT.SEARCH);
    else
      fLocationInput = new Text(parent, SWT.BORDER | SWT.SINGLE);
    OwlUI.makeAccessible(fLocationInput, Messages.WebBrowserView_ENTER_WEBSITE_PHRASE);
    fLocationInput.setMessage(Messages.WebBrowserView_ENTER_WEBSITE_PHRASE);
    fLocationInput.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, true));
    if (fInput.getUrl() != null)
      fLocationInput.setText(fInput.getUrl());
View Full Code Here

    /* Site */
    Label siteLabel = new Label(composite, SWT.None);
    siteLabel.setLayoutData(new GridData(SWT.BEGINNING, SWT.CENTER, false, false));
    siteLabel.setText(Messages.AddCredentialsDialog_LINK);

    fSiteInput = new Text(composite, SWT.BORDER | SWT.SINGLE);
    fSiteInput.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
    fSiteInput.setText(URIUtils.HTTP);
    fSiteInput.setSelection(URIUtils.HTTP.length());
    fSiteInput.setFocus();
    fSiteInput.addModifyListener(new ModifyListener() {
      public void modifyText(ModifyEvent e) {
        updateOkButton();
      }
    });

    /* Show UI Hint for extra information is available */
    final Pair<SimpleContentProposalProvider, ContentProposalAdapter> pair = OwlUI.hookAutoComplete(fSiteInput, null, true, true);

    /* Load proposals in the Background */
    JobRunner.runInBackgroundThread(100, new Runnable() {
      public void run() {
        if (!fSiteInput.isDisposed()) {
          Set<String> values = new TreeSet<String>(new Comparator<String>() {
            public int compare(String o1, String o2) {
              return o1.compareToIgnoreCase(o2);
            }
          });

          values.addAll(CoreUtils.getFeedLinks());

          /* Remember for Validation */
          fFeedLinks = new HashSet<String>(values);

          /* Apply Proposals */
          if (!fSiteInput.isDisposed()) {
            OwlUI.applyAutoCompleteProposals(values, pair.getFirst(), pair.getSecond());
            pair.getSecond().setAutoActivationCharacters(new char[] { 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', '/', '.' });
          }
        }
      }
    });

    /* Username */
    Label usernameLabel = new Label(composite, SWT.None);
    usernameLabel.setLayoutData(new GridData(SWT.BEGINNING, SWT.CENTER, false, false));
    usernameLabel.setText(Messages.AddCredentialsDialog_USERNAME);

    fUsernameInput = new Text(composite, SWT.BORDER | SWT.SINGLE);
    fUsernameInput.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
    fUsernameInput.addModifyListener(new ModifyListener() {
      public void modifyText(ModifyEvent e) {
        updateOkButton();
      }
    });

    /* Password */
    Label passwordLabel = new Label(composite, SWT.None);
    passwordLabel.setLayoutData(new GridData(SWT.BEGINNING, SWT.CENTER, false, false));
    passwordLabel.setText(Messages.AddCredentialsDialog_PASSWORD);

    fPasswordInput = new Text(composite, SWT.BORDER | SWT.SINGLE | SWT.PASSWORD);
    fPasswordInput.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
    fPasswordInput.addModifyListener(new ModifyListener() {
      public void modifyText(ModifyEvent e) {
        updateOkButton();
      }
View Full Code Here

      control.setLayoutData(new GridData(SWT.FILL, SWT.BEGINNING, true, false));

      Label l1 = new Label(control, SWT.NONE);
      l1.setText(Messages.FolderWizard_NAME);

      fNameInput = new Text(control, SWT.SINGLE | SWT.BORDER);
      fNameInput.setLayoutData(new GridData(SWT.FILL, SWT.BEGINNING, true, false));
      fNameInput.addModifyListener(new ModifyListener() {
        public void modifyText(ModifyEvent e) {
          setErrorMessage(null);
        }
View Full Code Here

    Label usernameLabel = new Label(composite, SWT.NONE);
    usernameLabel.setText(Messages.LoginDialog_USERNAME);
    usernameLabel.setLayoutData(new GridData(SWT.BEGINNING, SWT.CENTER, false, false));

    /* Username input field */
    fUsername = new Text(composite, SWT.SINGLE | SWT.BORDER);
    fUsername.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
    fUsername.setFocus();

    /* Password Label */
    Label passwordLabel = new Label(composite, SWT.NONE);
    passwordLabel.setText(Messages.LoginDialog_PASSWORD);
    passwordLabel.setLayoutData(new GridData(SWT.BEGINNING, SWT.CENTER, false, false));

    /* Password input field */
    fPassword = new Text(composite, SWT.SINGLE | SWT.BORDER | SWT.PASSWORD);
    fPassword.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));

    /* Separator */
    Label separator = new Label(parent, SWT.SEPARATOR | SWT.HORIZONTAL);
    separator.setLayoutData(new GridData(SWT.FILL, SWT.END, true, true));
View Full Code Here

    fSetNameLabel = new Label(newBookmarkSetContainer, SWT.None);
    fSetNameLabel.setText(Messages.ImportTargetPage_NAME);
    fSetNameLabel.setEnabled(false);

    fSetNameInput = new Text(newBookmarkSetContainer, SWT.SINGLE | SWT.BORDER);
    fSetNameInput.setLayoutData(new GridData(SWT.FILL, SWT.BEGINNING, true, false));
    fSetNameInput.setEnabled(false);
    fSetNameInput.addModifyListener(new ModifyListener() {
      public void modifyText(ModifyEvent e) {
        updatePageComplete();
View Full Code Here

    nameContainer.setLayoutData(new GridData(SWT.FILL, SWT.BEGINNING, true, false));
    nameContainer.setLayout(LayoutUtils.createGridLayout(2, 0, 0));
    if (!Application.IS_MAC)
      nameContainer.setBackground(container.getDisplay().getSystemColor(SWT.COLOR_LIST_BACKGROUND));

    fNameInput = new Text(nameContainer, Application.IS_MAC ? SWT.BORDER : SWT.NONE);
    OwlUI.makeAccessible(fNameInput, nameLabel);
    fNameInput.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, true));
    fNameInput.setText(mark.getName());

    ToolBar generateTitleBar = new ToolBar(nameContainer, SWT.FLAT);
View Full Code Here

TOP

Related Classes of org.eclipse.swt.widgets.Text

Copyright © 2018 www.massapicom. 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.