Package org.eclipse.swt.widgets

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


          {
          shell.dispose();
          }
      });

    buttonCancel.addListener(SWT.Selection, new Listener()
      {
        public void handleEvent(Event event)
          {
          username = oldname;
          shell.dispose();
View Full Code Here


          shell.dispose();
          }
        });
    final Button buttonCancel = new Button(controls,SWT.PUSH);
    buttonCancel.setText("Cancel");
    buttonCancel.addListener(SWT.Selection, new Listener()
        {
        public void handleEvent(Event event)
          {
          captureDevice = null;
          shell.dispose();
View Full Code Here

      });

    //add the listener for the cancel button to close the window and
    //revert the backing data model to the state we cached when the
    //dialog was opened, current changes are lost as per usual
    buttonCancel.addListener(SWT.Selection, new Listener()
      {
        public void handleEvent(Event event)
          {
          servername = oldInfo.server;
          serverport = oldInfo.port;
View Full Code Here

          shell.dispose();
          }
      });
   
    //if the cancel button is pressed discard the changes
    buttonCancel.addListener(SWT.Selection, new Listener()
      {
        public void handleEvent(Event event)
          {
          shell.dispose();
          }
View Full Code Here

    outGroupButtons.setLayoutData(alignTop);
    outGroupButtons.setLayout(new GridLayout(1,true));
    Button addOutbound = new Button(outGroupButtons,SWT.PUSH);
    addOutbound.setText("Add target...");
    addOutbound.setImage(AbstractUIPlugin.imageDescriptorFromPlugin("XCDEVoice","icons/newaudio.png").createImage());
    addOutbound.addListener(SWT.Selection, new Listener()
        {
        public void handleEvent(Event event)
          {
          XCDEAudioRemoteHostDialog d = new XCDEAudioRemoteHostDialog(new Shell());
          ServerInfo info = d.open(new ServerInfo("",64656));
View Full Code Here

        });
   
    Button removeOutbound = new Button(outGroupButtons,SWT.PUSH);
    removeOutbound.setText("Remove target...");
    removeOutbound.setImage(AbstractUIPlugin.imageDescriptorFromPlugin("XCDEVoice","icons/removeaudio.png").createImage());
    removeOutbound.addListener(SWT.Selection, new Listener()
        {
        public void handleEvent(Event event)
          {
          int selIndex = outbound.getSelectionIndex();
          if (selIndex == -1)
View Full Code Here

    Composite inGroupButtons = new Composite(inGroup,SWT.NULL);
    inGroupButtons.setLayoutData(alignTop);
    inGroupButtons.setLayout(new GridLayout(1,true));
    Button stopListening = new Button(inGroupButtons,SWT.PUSH);
    stopListening.setText("Stop Listening To...");
    stopListening.addListener(SWT.Selection, new Listener()
        {
        public void handleEvent(Event event)
          {
          int selIndex = inbound.getSelectionIndex();
          if (selIndex == -1)
View Full Code Here

        });
    stopListening.setImage(AbstractUIPlugin.imageDescriptorFromPlugin("XCDEVoice","icons/pause.png").createImage());
   
    Button resumeListening = new Button(inGroupButtons,SWT.PUSH);
    resumeListening.setText("Resume Listening To...");
    resumeListening.addListener(SWT.Selection, new Listener()
        {
        public void handleEvent(Event event)
          {
          int selIndex = inbound.getSelectionIndex();
          if (selIndex == -1)
View Full Code Here

          shell.dispose();
          }
      });

    //hook-up the cancel button to close the dialog and discard the applied changes
    buttonCancel.addListener(SWT.Selection, new Listener()
      {
        public void handleEvent(Event event)
          {
          shell.dispose();
          }
View Full Code Here

    swfBackgroundColorText.addListener(SWT.Modify, nameModifyListener);
    swfBackgroundColorText.setLayoutData(colorBox);
    // Color Dialog Button
    Button colorPicker = new Button(shellDetails, SWT.PUSH);
    colorPicker.setImage(Activator.getImageDescriptor("color-picker.gif").createImage());
    colorPicker.addListener(SWT.Selection, new Listener() {
      public void handleEvent(Event event) {
        ColorDialog colorDialog = new ColorDialog(getShell(), SWT.SINGLE);
        colorDialog.setText("Please select background color.");
        colorDialog.setRGB(new RGB(255, 255, 255));
        RGB newColor = colorDialog.open();
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.