Package org.eclipse.swt.widgets

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


    cmbS2Sensor.select(s2Sensor);
    GridData cmbS2SensorData = new GridData();
    cmbS2SensorData.verticalAlignment=SWT.TOP;
    cmbS2SensorData.minimumWidth = 50;
    cmbS2Sensor.setLayoutData(cmbS2SensorData);
    cmbS2Sensor.addModifyListener(new ModifyListener() {
      public void modifyText(ModifyEvent e) {
        s2Sensor = cmbS2Sensor.getSelectionIndex();
      }
    });
View Full Code Here


    cmbS3Sensor.select(s3Sensor);
    GridData cmbS3SensorData = new GridData();
    cmbS3SensorData.minimumWidth = 50;
    cmbS3SensorData.verticalAlignment=SWT.TOP;
    cmbS3Sensor.setLayoutData(cmbS3SensorData);
    cmbS3Sensor.addModifyListener(new ModifyListener() {
      public void modifyText(ModifyEvent e) {
        s3Sensor = cmbS3Sensor.getSelectionIndex();
      }
    });
   
View Full Code Here

    cmbS4Sensor.select(s4Sensor);
    GridData cmbS4SensorData = new GridData();
    cmbS4SensorData.minimumWidth = 50;
    cmbS4SensorData.verticalAlignment=SWT.TOP;
    cmbS4Sensor.setLayoutData(cmbS4SensorData);
    cmbS4Sensor.addModifyListener(new ModifyListener() {
      public void modifyText(ModifyEvent e) {
        s4Sensor = cmbS4Sensor.getSelectionIndex();
      }
    });
   
View Full Code Here

      }
      ProjectInput.Option selectedOption = input.getSelectedOption();
      if (selectedOption != null) {
        combo.select(input.getOptions().indexOf(selectedOption));
      }
      combo.addModifyListener(this);
      control = combo;
    } else {
      if (type == ProjectInput.Type.String) {
        control = new Text(parent, SWT.BORDER | SWT.SINGLE);
        ((Text) control).setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
View Full Code Here

            }
        };
       
        property.attach( propertyListener );
       
        combo.addModifyListener
        (
            new ModifyListener()
            {
                public void modifyText( final ModifyEvent e )
                {
View Full Code Here

        async.setText("Add Async Class?");

        final Combo combo = new Combo(container, SWT.READ_ONLY);
        combo.setItems(new String[] { "True", "False" });
        combo.setText("True");
        combo.addModifyListener(new ModifyListener() {
            public void modifyText(ModifyEvent e) {
                setAsyncTrue(Boolean.valueOf(combo.getText()));
            }
        });
    }
View Full Code Here

   
    final Combo statusCmb = new Combo(composite,SWT.DROP_DOWN | SWT.READ_ONLY | SWT.BORDER);
    statusCmb.setLayoutData(new GridData(SWT.FILL, SWT.TOP, false, false, 1, 1));
    statusCmb.setItems(PresenceManager.PRESENCE);
    statusCmb.select(0);
    statusCmb.addModifyListener(new ModifyListener() {
     
      @Override
      public void modifyText(ModifyEvent e) {
        //TODO 用户状态改变时的操作
        Util.showDebugMsg("你选择了" + PresenceManager.PRESENCE[statusCmb.getSelectionIndex()]);
View Full Code Here

   
    final Combo combo = new Combo(shlMyApp, SWT.NONE);
    combo.setItems(new String[] {"101", "201"});
    combo.setBounds(47, 10, 70, 25);
    combo.select(0);
    combo.addModifyListener(new ModifyListener() {
      public void modifyText(ModifyEvent arg0) {
        switch (Integer.parseInt(combo.getText())) {
        case 101:
          beginText.setText("2014001");
          break;
View Full Code Here

//        // do this before installing the modify listener, else inadvertently
//        // trigger call to refresh() which results in a NPE.
//        if (selectedApplication != -1) {
//            combo.select(selectedApplication);
//        }
        combo.addModifyListener(new ModifyListener() {
            public void modifyText(
                    ModifyEvent e) {
                refresh();
            }
        });
View Full Code Here

      if (cacheMap.containsKey(textLabel)) {
        List<String> strings = cacheMap.get(textLabel);
        combo.setItems(strings.toArray(new String[strings.size()]));
        combo.setText(combo.getItem(0));
      }
      combo.addModifyListener(new TextModifyListener());
    }
  }

  private void loadPreferenceCache() {
    String cache = prefStore.getString(prefStoreKey);
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.