Package org.eclipse.swt.events

Examples of org.eclipse.swt.events.MouseListener


        // not implemented
      }

    });

    getSourceViewer().getTextWidget().addMouseListener(new MouseListener() {
      public void mouseDown(MouseEvent e) {
        int newCaretOffset = getSourceViewer().getTextWidget().getCaretOffset();

        if (newCaretOffset != mCursorPosition) {
          mCursorPosition = newCaretOffset;
View Full Code Here


      }
    };
  }

  private MouseListener getTextMouseListener() {
    return new MouseListener() {
      public void mouseDoubleClick(MouseEvent e) {
      }

      public void mouseDown(MouseEvent e) {
      }
View Full Code Here

    setBackground(parent.getBackground());
   
    setFont(exitFont);
    setBackground(exitColor, new int[] {100});
   
    addMouseListener(new MouseListener(){
      @SuppressWarnings("unused")
      public void mouseDoubleClick(MouseEvent e){
       
      }
      public void mouseDown(MouseEvent e){
View Full Code Here

    checklist_tm = new Button[data.length];
    for (int i=0; i<data.length; i++)
    {
      checklist_tm[i] = new Button(traditionalMutants, SWT.CHECK);
      checklist_tm[i].setText(data[i]);
      checklist_tm[i].addMouseListener(new MouseListener() {
              public void mouseDown(MouseEvent e) {
                 
              }
              public void mouseUp(MouseEvent e) {
                  validatePage();
View Full Code Here

    checklist_cm = new Button[data.length];
    for (int i=0; i<data.length; i++)
    {
      checklist_cm[i] = new Button(classMutants, SWT.CHECK);
      checklist_cm[i].setText(data[i]);
      checklist_cm[i].addMouseListener(new MouseListener() {
              public void mouseDown(MouseEvent e) {
                 
              }
              public void mouseUp(MouseEvent e) {
                  validatePage();
View Full Code Here

    Group quickSelect = new Group(comp, SWT.SHADOW_ETCHED_IN);
    FillLayout col = new FillLayout(SWT.VERTICAL);
    quickSelect.setLayout(col);
    Button tradAll = new Button(quickSelect, SWT.PUSH);
    tradAll.setText("All Traditional");
    tradAll.addMouseListener(new MouseListener() {
            public void mouseDown(MouseEvent e) {
               
            }
            public void mouseUp(MouseEvent e) {
                setAllChecklist(checklist_tm, true);
            }
            public void mouseDoubleClick(MouseEvent e) {
               
            }
        });
    Button tradNone = new Button(quickSelect, SWT.PUSH);
    tradNone.setText("No Traditional");
    tradNone.addMouseListener(new MouseListener() {
            public void mouseDown(MouseEvent e) {
               
            }
            public void mouseUp(MouseEvent e) {
                setAllChecklist(checklist_tm, false);
            }
            public void mouseDoubleClick(MouseEvent e) {
               
            }
        });
    Button classAll = new Button(quickSelect, SWT.PUSH);
    classAll.setText("All Class-level");
    classAll.addMouseListener(new MouseListener() {
            public void mouseDown(MouseEvent e) {
               
            }
            public void mouseUp(MouseEvent e) {
                setAllChecklist(checklist_cm, true);
            }
            public void mouseDoubleClick(MouseEvent e) {
               
            }
        });
    Button classNone = new Button(quickSelect, SWT.PUSH);
    classNone.setText("No Class-level");
    classNone.addMouseListener(new MouseListener() {
            public void mouseDown(MouseEvent e) {
               
            }
            public void mouseUp(MouseEvent e) {
                setAllChecklist(checklist_cm, false);
View Full Code Here

        redeliveredText.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
        redeliveredText.setText("-");
        redeliveredText.setEditable(false);
       
        //listener for double clicking to view message content
        _table.addMouseListener(new MouseListener()                                             
        {
            // MouseListener implementation
            public void mouseDoubleClick(MouseEvent event)
            {
                viewMessageContent();
View Full Code Here

        _queuesTable.setSortColumn(_queuesTable.getColumn(0));
        _queuesTable.setSortDirection(SWT.UP);
        _queuesTableViewer.setInput(new String[]{"Select a binding key to view queues"});
       
        //listener for double clicking to open the selection mbean
        _queuesTable.addMouseListener(new MouseListener()                                             
        {
            // MouseListener implementation
            public void mouseDoubleClick(MouseEvent event)
            {
                openMBean(_queuesTable);
View Full Code Here

                }
            }
        });

        //listener for double clicking to open the selection mbean
        _queueTable.addMouseListener(new MouseListener()                                             
        {
            // MouseListener implementation
            public void mouseDoubleClick(MouseEvent event)
            {
                openMBean(_queueTable);
            }
           
            public void mouseDown(MouseEvent e){}
            public void mouseUp(MouseEvent e){}
        });
       
        Group exchangesGroup = new Group(_paramsComposite, SWT.SHADOW_NONE);
        exchangesGroup.setBackground(_paramsComposite.getBackground());
        exchangesGroup.setText("Exchanges");
        exchangesGroup.setLayout(new GridLayout(2,false));
        gridData = new GridData(SWT.FILL, SWT.FILL, true, true);
        exchangesGroup.setLayoutData(gridData);
              
        _exchangeTable = new Table (exchangesGroup, SWT.MULTI | SWT.SCROLL_LINE | SWT.BORDER | SWT.FULL_SELECTION);
        _exchangeTable.setLinesVisible (true);
        _exchangeTable.setHeaderVisible (true);
        data = new GridData(SWT.FILL, SWT.FILL, true, true);
        _exchangeTable.setLayoutData(data);
       
        _exchangeTableViewer = new TableViewer(_exchangeTable);
        final TableSorter exchangeTableSorter = new TableSorter();
       
        for (int i = 0; i < titles.length; i++)
        {
            final int index = i;
            final TableColumn column = new TableColumn (_exchangeTable, SWT.NONE);

            column.setText(titles[i]);
            column.setWidth(bounds[i]);
            column.setResizable(true);

            //Setting the right sorter
            column.addSelectionListener(new SelectionAdapter()
            {
                @Override
                public void widgetSelected(SelectionEvent e)
                {
                    exchangeTableSorter.setColumn(index);
                    final TableViewer viewer = _exchangeTableViewer;
                    int dir = viewer .getTable().getSortDirection();
                    if (viewer.getTable().getSortColumn() == column)
                    {
                        dir = dir == SWT.UP ? SWT.DOWN : SWT.UP;
                    }
                    else
                    {
                        dir = SWT.UP;
                    }
                    viewer.getTable().setSortDirection(dir);
                    viewer.getTable().setSortColumn(column);
                    viewer.refresh();
                }
            });

        }
       
        _exchangeTableViewer.setContentProvider(new ContentProviderImpl());
        _exchangeTableViewer.setLabelProvider(new LabelProviderImpl());
        _exchangeTableViewer.setSorter(exchangeTableSorter);
        _exchangeTable.setSortColumn(_exchangeTable.getColumn(0));
        _exchangeTable.setSortDirection(SWT.UP);
       
        Composite exchangesRightComposite = _toolkit.createComposite(exchangesGroup);
        gridData = new GridData(SWT.FILL, SWT.FILL, false, true);
        exchangesRightComposite.setLayoutData(gridData);
        exchangesRightComposite.setLayout(new GridLayout());
       
        final Button createExchangeButton = _toolkit.createButton(exchangesRightComposite, "Create ...", SWT.PUSH);
        createExchangeButton.setLayoutData(new GridData(SWT.CENTER, SWT.CENTER, false, false));
        createExchangeButton.addSelectionListener(new SelectionAdapter()
        {
            public void widgetSelected(SelectionEvent e)
            {
                createExchange(createQueueButton.getShell());
            }
        });
       
        final Button deleteExchangeButton = _toolkit.createButton(exchangesRightComposite, "Delete", SWT.PUSH);
        deleteExchangeButton.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
        deleteExchangeButton.setEnabled(false);
        deleteExchangeButton.addSelectionListener(new SelectionAdapter()
        {
            public void widgetSelected(SelectionEvent e)
            {
                deleteQueuesOrExchanges(deleteExchangeButton.getShell(), VhostOperations.DELETE_EXCHANGE);
            }
        });
 
        _exchangeTableViewer.addSelectionChangedListener(new ISelectionChangedListener(){
            public void selectionChanged(SelectionChangedEvent evt)
            {
                int selectionIndex = _exchangeTable.getSelectionIndex();

                if (selectionIndex != -1)
                {
                    deleteExchangeButton.setEnabled(true);
                }
                else
                {
                    deleteExchangeButton.setEnabled(false);
                }
            }
        });
       
        //listener for double clicking to open the selection mbean
        _exchangeTable.addMouseListener(new MouseListener()                                             
        {
            // MouseListener implementation
            public void mouseDoubleClick(MouseEvent event)
            {
                openMBean(_exchangeTable);
View Full Code Here

                }
            }
        });
       
        //listener for double clicking to open the selection mbean
        _bindingNumberTable.addMouseListener(new MouseListener()                                             
        {
            // MouseListener implementation
            public void mouseDoubleClick(MouseEvent event)
            {
                openMBean(_bindingNumberTable);
View Full Code Here

TOP

Related Classes of org.eclipse.swt.events.MouseListener

Copyright © 2018 www.massapicom. 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.