Package org.eclipse.swt.widgets

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


        createLabel( composite,
                     "Logically insert a new fact" );
        final Combo factsCombo = createFactsCombo( composite,
                                                   heading,
                                                   facts );
        factsCombo.addListener( SWT.Selection,
                                new Listener() {
                                    public void handleEvent(Event event) {

                                        if ( factsCombo.getSelectionIndex() == 0 ) {
                                            return;
View Full Code Here


        createLabel( composite,
                     "Assert a new fact" );
        final Combo factsCombo = createFactsCombo( composite,
                                                   heading,
                                                   facts );
        factsCombo.addListener( SWT.Selection,
                                new Listener() {
                                    public void handleEvent(Event event) {
                                        if ( factsCombo.getSelectionIndex() == 0 ) {
                                            return;
                                        }
View Full Code Here

        for ( int i = 0; i < boundFacts.size(); i++ ) {
            globalVarsCombo.add( (String) boundFacts.get( i ) );
        }
        globalVarsCombo.select( 0 );

        globalVarsCombo.addListener( SWT.Selection,
                                     new Listener() {
                                         public void handleEvent(Event event) {
                                             if ( globalVarsCombo.getSelectionIndex() == 0 ) {
                                                 return;
                                             }
View Full Code Here

            combo.select(0);
        } else {
            combo.select(1);
        }
        if (handler != null) {
            combo.addListener(SWT.Selection, new Listener() {
                public void handleEvent(Event event) {
                    Boolean newValue = Boolean.valueOf(combo.getText());
                    handler.write(newValue);
                }
            });
View Full Code Here

    final Combo combo = new Combo(shell, SWT.READ_ONLY|SWT.DROP_DOWN);
    for (int i = 0; i < audioDevices.size(); ++i)
      {
      combo.add(((CaptureDeviceInfo)audioDevices.get(i)).getName());
      }
    combo.addListener(SWT.Modify, new Listener()
        {
        public void handleEvent(Event event)
          {
          captureDevice = (CaptureDeviceInfo)audioDevices.get(combo.getSelectionIndex());
          }
View Full Code Here

              }
            end.setDate(date);
            }
          });
     
    endMonth.addListener(SWT.Modify, new Listener()
          {
          public void handleEvent(Event event)
            {
            try
              {
View Full Code Here

          public void handleEvent(Event event) {
            cmdEditor.getItem().setText(0,command.getText());
            cmd.command = command.getText();
          }
        });
        type.addListener(SWT.Modify,new Listener() {
          public void handleEvent(Event event) {
            GOIMGameExecuteCommands.ExecuteCommandType cmdtype = null;
            switch(type.getSelectionIndex()) {
            case 0:
              cmdtype = GOIMGameExecuteCommands.ExecuteCommandType.BOTH;
View Full Code Here

      Combo options =  new Combo (c, SWT.SINGLE | SWT.BORDER|SWT.READ_ONLY);
      options.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
      for(HadoopVersion ver:HadoopVersion.values()){
        options.add(ver.getDisplayName());
      }
      options.addListener (SWT.Selection, new Listener () {

        @Override
        public void handleEvent(Event arg0) {
          hdfsVersion = hdfsVersionOptions.getText();
        }
View Full Code Here

        Combo options = new Combo(group, SWT.SINGLE | SWT.BORDER | SWT.READ_ONLY);
        options.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
        for (HadoopVersion ver : HadoopVersion.values()) {
          options.add(ver.getDisplayName());
        }
        options.addListener(SWT.Selection, new Listener() {
          public void handleEvent(Event e) {
            try {
              if (!hadoopVersionText.equalsIgnoreCase(hadoopVersion.getText())) {
                homeReader = AbstractHadoopHomeReader.createReader(hadoopVersion.getText());
                hadoopVersionText = hadoopVersion.getText();
View Full Code Here

          break;
        }
        pos++;
      }
      options.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
      options.addListener(SWT.Selection, new Listener() {
        @Override
        public void handleEvent(Event event) {
          final String selection = hadoopVersion.getText();
          if (location == null || !selection.equals(location.getVersion())) {
            Display.getDefault().syncExec(new Runnable() {
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.