Package org.eclipse.swt.widgets

Examples of org.eclipse.swt.widgets.Text.addListener()


    }
     
    text.setToolTipText("Enter a Type name." + (contentAssistAvailable ?
            "Content Assist is available (press Ctrl + Space)" : ""));
    text.getParent().setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
    text.addListener(SWT.KeyUp, this);
    text.addListener(SWT.MouseUp, this); // for paste operation
    text.addListener(SWT.Modify, this)// for content assist
   
//    newText(tc, SWT.NONE,
//    "Enter a Type name. Content Assist is available on Eclipse 3.2 and beyond (press Ctrl + Space)");
View Full Code Here


     
    text.setToolTipText("Enter a Type name." + (contentAssistAvailable ?
            "Content Assist is available (press Ctrl + Space)" : ""));
    text.getParent().setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
    text.addListener(SWT.KeyUp, this);
    text.addListener(SWT.MouseUp, this); // for paste operation
    text.addListener(SWT.Modify, this)// for content assist
   
//    newText(tc, SWT.NONE,
//    "Enter a Type name. Content Assist is available on Eclipse 3.2 and beyond (press Ctrl + Space)");
View Full Code Here

    text.setToolTipText("Enter a Type name." + (contentAssistAvailable ?
            "Content Assist is available (press Ctrl + Space)" : ""));
    text.getParent().setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
    text.addListener(SWT.KeyUp, this);
    text.addListener(SWT.MouseUp, this); // for paste operation
    text.addListener(SWT.Modify, this)// for content assist
   
//    newText(tc, SWT.NONE,
//    "Enter a Type name. Content Assist is available on Eclipse 3.2 and beyond (press Ctrl + Space)");

//    ContentProposalAdapter adapter = new ContentProposalAdapter(
View Full Code Here

      final FontMetrics fm = gc.getFontMetrics();
      final int width = chars * fm.getAverageCharWidth();
      final int height = fm.getHeight();
      gc.dispose();
      t.setSize(t.computeSize(width, height));
      t.addListener(SWT.DefaultSelection, this);
      t.addListener(SWT.Modify, this);

    }

    @Override
View Full Code Here

      final int width = chars * fm.getAverageCharWidth();
      final int height = fm.getHeight();
      gc.dispose();
      t.setSize(t.computeSize(width, height));
      t.addListener(SWT.DefaultSelection, this);
      t.addListener(SWT.Modify, this);

    }

    @Override
    public int preferredSize() {
View Full Code Here

    final Text timeText = new Text(controlsComposite, SWT.NONE);
    timeText.setText("6.0");
    timeText.setLayoutData(new RowData(40, SWT.DEFAULT));

    timeText.addListener(SWT.Verify, new Listener() {
      @Override
      public void handleEvent(Event e) {
        final String string = e.text;
        final char[] chars = new char[string.length()];
        string.getChars(0, chars.length, chars, 0);
View Full Code Here

        }

          /* Type: Enumeration */
        case ISearchValueType.ENUM: {
          final Text text = new Text(inputField, SWT.BORDER);
          text.addListener(SWT.Modify, new Listener() {
            public void handleEvent(Event event) {
              fInputValue = text.getText();

              if (!fInputValue.equals(input))
                fModified = true;
View Full Code Here

          final ControlDecoration controlDeco = new ControlDecoration(text, SWT.LEFT | SWT.TOP);
          controlDeco.setImage(FieldDecorationRegistry.getDefault().getFieldDecoration(FieldDecorationRegistry.DEC_CONTENT_PROPOSAL).getImage());
          controlDeco.setShowOnlyOnFocus(true);

          /* Listen to Changes of Input */
          text.addListener(SWT.Modify, new Listener() {
            private boolean isShowingWarning = false;

            public void handleEvent(Event event) {
              String textValue = text.getText();
              fInputValue = textValue;
View Full Code Here

      regionEditor.horizontalAlignment = SWT.LEFT;
      regionEditor.setEditor(regionText, item, 2);
      fTextFields.put(regionText,key+".name");
      regionText.addModifyListener(fTextFieldListener);
     
      regionText.addListener(SWT.Modify, new Listener() {

        public void handleEvent(Event event) {
          foldCheckBox.setEnabled(regionText.getText().length() > 0);
          initialCheckBox.setEnabled(regionText.getText().length() > 0);
        }
View Full Code Here

                if (rect.contains(pt)) {

                    final Text text = new Text(table, SWT.NONE);
                    Listener textListener = new TextListener(item, text);

                    text.addListener(SWT.FocusOut, textListener);
                    text.addListener(SWT.Traverse, textListener);
                    text.addListener(SWT.FocusOut, wizard);
                    editor.setEditor(text, item, i);
                    text.setText(item.getText(i));
                    text.selectAll();
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.