Examples of addListener()


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

 
      Messages.setLanguageText(update_item, "GeneralView.label.trackerurlupdate");
     
      update_item.setEnabled( update_ok );
     
      update_item.addListener(
        SWT.Selection,
        new TableSelectedRowsListener(tv)
        {
          public void
          run(
View Full Code Here

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

    sash_data.top = new FormAttachment (0,0);
    sash_data.bottom = new FormAttachment (100,0);
   
    sash.setLayoutData(sash_data);
   
    sash.addListener (SWT.Selection, new Listener () {
      public void handleEvent (Event e) {
        Rectangle sashRect = sash.getBounds ();
        Rectangle shellRect = parent.getClientArea ();
        int right = shellRect.width - sashRect.width - limit;
        e.x = Math.max (Math.min (e.x, right), limit);
View Full Code Here

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

    final Scale scale = new Scale(shell, SWT.HORIZONTAL);
    scale.setBounds(10, 570, 400, 80);
    scale.setMaximum(255);
    scale.setMinimum(50);
    scale.setPageIncrement(10);
    scale.addListener(SWT.Selection, new Listener() {
      public void handleEvent(Event event) {
        int perspectiveValue = scale.getMaximum() - scale.getSelection() +  scale.getMinimum();
        shell.setAlpha(perspectiveValue);
      }
    });
View Full Code Here

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

      void installListeners() {
        // Listeners on this popup's table and scroll bar
        proposalTable.addListener(SWT.FocusOut, this);
        ScrollBar scrollbar = proposalTable.getVerticalBar();
        if (scrollbar != null) {
          scrollbar.addListener(SWT.Selection, this);
        }

        // Listeners on this popup's shell
        getShell().addListener(SWT.Deactivate, this);
        getShell().addListener(SWT.Close, this);
View Full Code Here

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

    }
    });
       
    window.setDefaultButton( btnOk );
   
    window.addListener(SWT.Traverse, new Listener() { 
    public void handleEvent(Event e) {
      if ( e.character == SWT.ESC){
           window.dispose();
       }
    }
View Full Code Here

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

        case ISearchValueType.NUMBER:
        case ISearchValueType.INTEGER: {
          final Spinner spinner = new Spinner(inputField, SWT.BORDER);
          spinner.setMinimum(0);
          spinner.setMaximum(1000);
          spinner.addListener(SWT.Modify, new Listener() {
            public void handleEvent(Event event) {
              fInputValue = spinner.getSelection();

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

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

                break;
        }
       
        createNotificationsTabIfNecessary(tabFolder, mbean);
       
        tabFolder.addListener(SWT.Selection, new Listener()
        {
            public void handleEvent(Event evt)
            {
                TabItem tab = (TabItem)evt.item;       
                TabControl controller = (TabControl)tab.getData(TabControl.CONTROLLER);
View Full Code Here

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

      public void handleEvent(Event event) {
        setEnabledDisabled();
      }
    };

    table.addListener(SWT.Selection, actionEnabler);
    table.addListener(SWT.FocusOut, actionEnabler);
    envVariablesViewer.setContentProvider(new IStructuredContentProvider() {

      public Object[] getElements(Object inputElement) {
        if (inputElement instanceof Collection) {
View Full Code Here

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

    table_column.setToolTipText(columnDesc);
    table_column.setData(SWTConstants.COLUMN_DESC_KEY, columnDesc);
   
    table_column.setMoveable(true);
    table_column.setResizable(true);
    table_column.addListener(SWT.Resize, column_data_save_listener);
    table_column.addListener(SWT.Move, column_data_save_listener);
   
    Listener sort_listener = new Listener() {
      private int sort_order = 0;
      public void handleEvent(final Event e) {
View Full Code Here

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

        int pos = table.getSelectionIndex();
        if (pos > 0) {
          item = new MenuItem(menu, SWT.PUSH);
          item.setText("Move Up");
          item.addListener(SWT.Selection,
              new org.eclipse.swt.widgets.Listener() {
                public void handleEvent(Event e) {
                  int pos = table.getSelectionIndex();
                  TableItem it1 = table.getItem(pos);
                  String[] sa = new String[provider
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.