Package org.eclipse.swt.events

Examples of org.eclipse.swt.events.KeyListener


        labelN.setText("The size of the n-Grams (typically 3):");       
        labelN.setLayoutData(new GridData())
       
        N = new Text(container, SWT.BORDER | SWT.SINGLE);
        N.setText("" + Activator.getRuleEngine().getN());
        N.addKeyListener(new KeyListener()
        {
            @Override
            public void keyPressed(KeyEvent e)
            {
            }

            @Override
            public void keyReleased(KeyEvent e)
            {
                try
                {
                    Integer.valueOf(N.getText());
                    int val = Integer.valueOf(N.getText()).intValue();
                    if( val < 1 )
                    {
                        setErrorMessage("Value for parameter \"N\" must be greater than 0");
                        inputNValid = false;
                        setPageComplete(inputNValid & inputCValid);
                    }
                    else
                    {
                        inputNValid = true;
                        setErrorMessage(null);
                        setPageComplete(inputNValid & inputCValid);
                    }
                   
                }
                catch(NumberFormatException exception)
                {
                    setErrorMessage("Integer value expected for parameter \"N\"");
                    inputNValid = false;
                    setPageComplete(inputNValid & inputCValid);
                }
            }
        });

        N.setLayoutData(new GridData(50, 20));
       
        Label labelCorrelation = new Label(container, SWT.NULL);
        labelCorrelation.setText("The minimum correlation if two items should match (min. 0, max. 1):");       
        labelCorrelation.setLayoutData(new GridData())
              
        correlation = new Text(container, SWT.BORDER | SWT.SINGLE);
        correlation.setText("" + Activator.getRuleEngine().getCorrelation());
        correlation.addKeyListener(new KeyListener()
        {
            @Override
            public void keyPressed(KeyEvent e)
            {
            }
View Full Code Here


    captionText
        .setToolTipText("Please enter here the caption for the link.");
   
    final IWizard wizard = getWizard();

    captionText.addKeyListener( new KeyListener() {
     
      @Override
      public void keyReleased(KeyEvent e) {
        if (captionText.getText() == null || captionText.getText()== "") {
          setErrorMessage("Please enter a caption for the link.");
View Full Code Here

    gridData.horizontalSpan = 1;
    gridData.horizontalAlignment = SWT.LEFT;
    gridData.grabExcessHorizontalSpace = false;
    stopButton.setLayoutData(gridData);

    filterText.addKeyListener(new KeyListener() {

      @Override
      public void keyReleased(KeyEvent e) {
        searchProperties(getFilterWord(), getN(), getMinCorrelation(),  cataloguge,
            assignedConstraintedSet);
View Full Code Here

        labelN.setText("The maximum propagation distance of changes (typically 2):");       
        labelN.setLayoutData(new GridData())
       
        distanceEditor = new Text(container, SWT.BORDER | SWT.SINGLE);
        distanceEditor.setText("" + Activator.getDistanceBasedImpactAnalyzer().getPropagationDistance());
        distanceEditor.addKeyListener(new KeyListener()
        {
            @Override
            public void keyPressed(KeyEvent e)
            {
            }
View Full Code Here

    tableFormData.top = new FormAttachment(measuresText, 15);
    tableFormData.bottom = new FormAttachment(100, 0);
    tableFormData.left = new FormAttachment(0, 0);
    tableFormData.right = new FormAttachment(100, 0);
    table.setLayoutData(tableFormData);
    table.addKeyListener(new KeyListener() {

      public void keyPressed(KeyEvent e) {
        if (((e.stateMask & SWT.CTRL) == SWT.CTRL) && (e.keyCode == 'c')) {
          String output = "";
          TableItem[] items = table.getSelection();
View Full Code Here

    tableFormData.left = new FormAttachment(0, 10);
    tableFormData.right = new FormAttachment(constraintButtonRuta, -10);
    tableFormData.bottom = new FormAttachment(100, 0);
    table.setLayoutData(tableFormData);

    table.addKeyListener(new KeyListener() {

      public void keyPressed(KeyEvent e) {
        // if (((e.stateMask & SWT.CTRL) == SWT.CTRL) && (e.keyCode == 'c')) {
        // String output = "";
        // TableItem[] items = table.getSelection();
View Full Code Here

    layout.verticalSpacing = 0;
    layout.marginWidth = 0;
    layout.marginHeight = 0;
    overlay.setLayout(layout);

    KeyListener checkSelectedKeyListener = new KeyAdapter() {

      public void keyPressed(KeyEvent keyEvent) {
        int keyCode = keyEvent.keyCode;
        if (keyCode == SWT.CR || keyCode == SWT.LF || keyCode == SWT.KEYPAD_CR) {
          uncheckAll();
View Full Code Here

    tableFormData.left = new FormAttachment(0, 5);
    tableFormData.bottom = new FormAttachment(100, -5);
    tableFormData.right = new FormAttachment(100, -5);
    table.setLayoutData(tableFormData);

    table.addKeyListener(new KeyListener() {
      public void keyPressed(KeyEvent e) {
        if (((e.stateMask & SWT.CTRL) == SWT.CTRL) && (e.keyCode == 'c')) {
          String output = "";
          TableItem[] items = table.getSelection();
          for (TableItem item : items) {
View Full Code Here

      resultViewer = new TableViewer(composite2, SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER | SWT.MULTI);
      final QueryResultLabelProvider queryResultLabelProvider = new QueryResultLabelProvider();
      resultViewer.setLabelProvider(queryResultLabelProvider);
      resultViewer.setContentProvider(new QueryResultContentProvider());
      resultViewer.addSelectionChangedListener(this);
      resultViewer.getTable().addKeyListener(new KeyListener() {

        public void keyPressed(KeyEvent e) {
          if (((e.stateMask & SWT.CTRL) == SWT.CTRL) && (e.keyCode == 'c')) {
            String output = "";
            TableItem[] items = resultViewer.getTable().getSelection();
View Full Code Here

                mActions.updateActionBars();
            }
        });

        mTreeViewer.getTree().addKeyListener(new KeyListener(){

      public void keyPressed(KeyEvent e) {
        mActions.handleKeyPressed(e);
      }
View Full Code Here

TOP

Related Classes of org.eclipse.swt.events.KeyListener

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.