Examples of ModifyListener


Examples of org.eclipse.swt.events.ModifyListener

      label.setLayoutData(new GridData(SWT.BEGINNING, SWT.CENTER, false, false));
      label.setText("File: ");

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

Examples of org.eclipse.swt.events.ModifyListener

      Label nameLabel = new Label(control, SWT.NONE);
      nameLabel.setText("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

Examples of org.eclipse.swt.events.ModifyListener

      }

      /* 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

Examples of org.eclipse.swt.events.ModifyListener

    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

Examples of org.eclipse.swt.events.ModifyListener

      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

Examples of org.eclipse.swt.events.ModifyListener

        }
      }
    });

    /* Run search when text is entered */
    fSearchInput.addModifyListener(new ModifyListener() {
      public void modifyText(ModifyEvent e) {

        /* Clear Search immediately */
        if (fSearchInput.getText().length() == 0 && fFeedView.getFilter().isPatternSet()) {
          fFeedView.getFilter().setPattern(fSearchInput.getText());
View Full Code Here

Examples of org.eclipse.swt.events.ModifyListener

    fLabelsInput = new Text(composite, SWT.BORDER | SWT.SINGLE);
    fLabelsInput.setLayoutData(new GridData(SWT.FILL, SWT.BEGINNING, true, false));
    fLabelsInput.setText(getLabelsValue());
    fLabelsInput.setSelection(fLabelsInput.getText().length());
    fLabelsInput.addModifyListener(new ModifyListener() {
      public void modifyText(ModifyEvent e) {
        onModifyName();
      }
    });
View Full Code Here

Examples of org.eclipse.swt.events.ModifyListener

    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

Examples of org.eclipse.swt.events.ModifyListener

    } else {
      fFeedLinkInput.setText(URIUtils.HTTP);
      fFeedLinkInput.setSelection(URIUtils.HTTP.length());
    }

    fFeedLinkInput.addModifyListener(new ModifyListener() {
      public void modifyText(ModifyEvent e) {
        getContainer().updateButtons();
        onLinkChange();
      }
    });

    fLoadTitleFromFeedButton = new Button(textIndent, SWT.CHECK);
    fLoadTitleFromFeedButton.setText(Messages.FeedDefinitionPage_USE_TITLE_OF_FEED);
    fLoadTitleFromFeedButton.setSelection(loadTitleFromFeed);
    fLoadTitleFromFeedButton.addSelectionListener(new SelectionAdapter() {
      @Override
      public void widgetSelected(SelectionEvent e) {
        getContainer().updateButtons();
      }
    });

    /* 2) Feed by Keyword */
    fFeedByKeywordButton = new Button(container, SWT.RADIO);
    fFeedByKeywordButton.setLayoutData(new GridData(SWT.FILL, SWT.BEGINNING, true, false));
    fFeedByKeywordButton.setText(Messages.FeedDefinitionPage_CREATE_KEYWORD_FEED);
    fFeedByKeywordButton.addSelectionListener(new SelectionAdapter() {
      @Override
      public void widgetSelected(SelectionEvent e) {
        fKeywordInput.setEnabled(fFeedByKeywordButton.getSelection());

        if (fKeywordInput.isEnabled())
          hookKeywordAutocomplete();

        fKeywordInput.setFocus();
        getContainer().updateButtons();
      }
    });

    textIndent = new Composite(container, SWT.NONE);
    textIndent.setLayoutData(new GridData(SWT.FILL, SWT.BEGINNING, true, false));
    textIndent.setLayout(new GridLayout(1, false));
    ((GridLayout) textIndent.getLayout()).marginLeft = 10;

    fKeywordInput = new Text(textIndent, SWT.BORDER);
    OwlUI.makeAccessible(fKeywordInput, fFeedByKeywordButton);
    fKeywordInput.setLayoutData(new GridData(SWT.FILL, SWT.BEGINNING, true, false));
    fKeywordInput.setEnabled(false);
    fKeywordInput.addModifyListener(new ModifyListener() {
      public void modifyText(ModifyEvent e) {
        getContainer().updateButtons();
      }
    });

View Full Code Here

Examples of org.eclipse.swt.events.ModifyListener

      for (String source : previousResources) {
        fResourceInput.add(source);
      }
    }

    fResourceInput.addModifyListener(new ModifyListener() {
      public void modifyText(ModifyEvent e) {
        updatePageComplete();
      }
    });
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.