Package org.eclipse.swt.widgets

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


            gd.horizontalSpan = 2;
            gd.grabExcessHorizontalSpace = true;
            gd.minimumWidth = 100;
            box.setLayoutData( gd );

            box.addModifyListener( new ModifyListener() {
                public void modifyText(ModifyEvent e) {
                    c.setValue(box.getText());
                    modeller.setDirty( true );
                }
            } );
View Full Code Here


        gd.grabExcessHorizontalSpace = true;
        gd.minimumWidth = 100;
        box.setLayoutData( gd );

        box.addModifyListener( new ModifyListener() {
            public void modifyText(ModifyEvent e) {
                c.setValue(box.getText());
                modeller.setDirty( true );
            }
        } );
View Full Code Here

  }

  Text makeWidget(Composite comp, IFigureConstructionEnv env,String text) {
    Text textfield = new Text(comp, SWT.SINGLE | SWT.BORDER);
   
    textfield.addModifyListener(new ModifyListener() {
      public void modifyText(ModifyEvent e) {
        doValidate();
      }
    });
    textfield.addSelectionListener(new SelectionAdapter() {
View Full Code Here

    textControl.setLayoutData(gd);
    textControl.setTextLimit(textLimit);
    textControl.setToolTipText(preference.getDescription());

    if (domain != null) {
      textControl.addModifyListener(new ModifyListener() {
        public void modifyText(ModifyEvent e) {
          String value= textControl.getText();
          IStatus status= domain.validate(value);
          if (!status.matches(IStatus.ERROR))
            fOverlayStore.setValue(preference.getKey(), value);
View Full Code Here

    gd= new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING);
    gd.widthHint= pixelConverter.convertWidthInCharsToPixels(textLimit + 1);
    textControl.setLayoutData(gd);
    textControl.setTextLimit(textLimit);

    textControl.addModifyListener(new ModifyListener() {
      public void modifyText(ModifyEvent e) {
        String value= textControl.getText();
        if (key != null)
          fStore.setValue(key, value);
      }
View Full Code Here

        }
        // text field
        else if (type.equals("text")) {
          Text nameText = new Text(composite, SWT.BORDER);
          nameText.setData("ID_" + i);
          nameText.addModifyListener(this);
          GridData gridData = new GridData();
          gridData.horizontalAlignment = SWT.FILL;
          gridData.grabExcessHorizontalSpace = true;
          nameText.setLayoutData(gridData);
          // nameText.setText("");
View Full Code Here

        // multi text field
        else if (type.equals("multiline")) {
          Text nameText = new Text(composite, SWT.BORDER | SWT.WRAP
              | SWT.MULTI);
          nameText.setData("ID_" + i);
          nameText.addModifyListener(this);
         
          GridData gridData = new GridData();
          gridData.horizontalAlignment = SWT.FILL;
          gridData.grabExcessHorizontalSpace = true;
          gridData.verticalAlignment = SWT.FILL;
View Full Code Here

                DeviceReference deviceRef = (DeviceReference) event.getElement();
                fireSelectionEvent(deviceRef, event.getChecked());
            }
        });

        filter.addModifyListener(new ModifyListener() {
            public void modifyText(ModifyEvent event) {
                contentProvider.setFilterString(filter.getText());
                deviceList.refresh();
                deviceList.setCheckedElements(selection.toArray());
            }
View Full Code Here

            // Register the listeners for the fallback GUI components
            for (int i = 0; i < types.length; i++) {
                final PolicyType type = types[i];
                final Text text = (Text) typesToTextComponents.get(type);
                text.addModifyListener(new ModifyListener() {
                    public void modifyText(ModifyEvent event) {
                        setFallbackPolicy(type, text.getText());
                    }
                });
            }
View Full Code Here

    private void addText(final PropertyDescriptor descriptor) {

        PropertyIdentifier identifier = descriptor.getIdentifier();
        final Text text = addTextBasedProperty(descriptor);

        text.addModifyListener(
            new ModifyListener() {
                public void modifyText(ModifyEvent event) {
                    propertyChanged(descriptor, text.getText());
                }
            }
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.