Package org.eclipse.jface.viewers

Examples of org.eclipse.jface.viewers.IDoubleClickListener


        updateMoveEnablement();
      }
    });

    /* Doubleclick */
    fViewer.addDoubleClickListener(new IDoubleClickListener() {
      public void doubleClick(DoubleClickEvent event) {
        onEdit();
      }
    });

View Full Code Here


  }

  private void registerListeners() {

    /* Open selected News Links in Browser on doubleclick */
    fResultViewer.addDoubleClickListener(new IDoubleClickListener() {
      public void doubleClick(DoubleClickEvent event) {
        onMouseDoubleClick(event);
      }
    });

View Full Code Here

        return !(element instanceof INewsBin);
      }
    });

    /* Listen on Doubleclick */
    fViewer.addDoubleClickListener(new IDoubleClickListener() {
      public void doubleClick(DoubleClickEvent event) {
        IStructuredSelection selection = (IStructuredSelection) event.getSelection();
        IFolder folder = selection.getFirstElement() instanceof IFolder ? (IFolder) selection.getFirstElement() : null;

        /* Expand / Collapse Folder */
 
View Full Code Here

                // Default
                tableViewer.setInput( null );
            }
        } );
        treeViewer.addDoubleClickListener( new IDoubleClickListener()
        {
            public void doubleClick( DoubleClickEvent event )
            {
                StructuredSelection selection = ( StructuredSelection ) event.getSelection();
                Object element = selection.getFirstElement();
View Full Code Here

    /**
     * Initializes the DoubleClickListener.
     */
    private void initDoubleClickListener()
    {
        viewer.addDoubleClickListener( new IDoubleClickListener()
        {
            public void doubleClick( DoubleClickEvent event )
            {
                StructuredSelection selection = ( StructuredSelection ) viewer.getSelection();

View Full Code Here

                {
                    editSupportedMechanismButton.setEnabled( false );
                }
            }
        } );
        supportedMechanismsTableViewer.addDoubleClickListener( new IDoubleClickListener()
        {
            public void doubleClick( DoubleClickEvent event )
            {
                editSelectedSupportedMechanism();
            }
        } );
        editSupportedMechanismButton.addSelectionListener( new SelectionAdapter()
        {
            public void widgetSelected( SelectionEvent e )
            {
                editSelectedSupportedMechanism();
            }
        } );
        selectAllSupportedMechanismsButton.addSelectionListener( new SelectionAdapter()
        {
            public void widgetSelected( SelectionEvent e )
            {
                supportedMechanismsTableViewer.setAllChecked( true );
                setEditorDirty();
            }
        } );
        deselectAllSupportedMechanismsButton.addSelectionListener( new SelectionAdapter()
        {
            public void widgetSelected( SelectionEvent e )
            {
                supportedMechanismsTableViewer.setAllChecked( false );
                setEditorDirty();
            }
        } );
        supportedMechanismsTableViewer.addCheckStateListener( new ICheckStateListener()
        {
            public void checkStateChanged( CheckStateChangedEvent event )
            {
                setEditorDirty();
            }
        } );

        // SASL Host
        saslHostText.addModifyListener( modifyListener );

        // SASL Principal
        saslPrincipalText.addModifyListener( modifyListener );

        // Search Base DN
        searchBaseDnText.addModifyListener( modifyListener );

        // SASL Realms
        saslRealmsTableViewer.addSelectionChangedListener( new ISelectionChangedListener()
        {
            public void selectionChanged( SelectionChangedEvent event )
            {
                editSaslRealmsButton.setEnabled( !event.getSelection().isEmpty() );
                deleteSaslRealmButton.setEnabled( !event.getSelection().isEmpty() );
            }
        } );
        saslRealmsTableViewer.addDoubleClickListener( new IDoubleClickListener()
        {
            public void doubleClick( DoubleClickEvent event )
            {
                editSelectedSaslRealm();
            }
View Full Code Here

                {
                    editSupportedMechanismButton.setEnabled( false );
                }
            }
        } );
        supportedMechanismsTableViewer.addDoubleClickListener( new IDoubleClickListener()
        {
            public void doubleClick( DoubleClickEvent event )
            {
                editSelectedSupportedMechanism();
            }
        } );
        editSupportedMechanismButton.addSelectionListener( new SelectionAdapter()
        {
            public void widgetSelected( SelectionEvent e )
            {
                editSelectedSupportedMechanism();
            }
        } );
        selectAllSupportedMechanismsButton.addSelectionListener( new SelectionAdapter()
        {
            public void widgetSelected( SelectionEvent e )
            {
                supportedMechanismsTableViewer.setAllChecked( true );
                setEditorDirty();
            }
        } );
        deselectAllSupportedMechanismsButton.addSelectionListener( new SelectionAdapter()
        {
            public void widgetSelected( SelectionEvent e )
            {
                supportedMechanismsTableViewer.setAllChecked( false );
                setEditorDirty();
            }
        } );
        supportedMechanismsTableViewer.addCheckStateListener( new ICheckStateListener()
        {
            public void checkStateChanged( CheckStateChangedEvent event )
            {
                setEditorDirty();
            }
        } );

        // SASL Host
        saslHostText.addModifyListener( modifyListener );

        // SASL Principal
        saslPrincipalText.addModifyListener( modifyListener );

        // Search Base DN
        searchBaseDnText.addModifyListener( modifyListener );

        // SASL Quality Of Protection
        selectAllQualityOfProtectionButton.addSelectionListener( new SelectionAdapter()
        {
            public void widgetSelected( SelectionEvent e )
            {
                saslQualityOfProtectionTableViewer.setAllChecked( true );
                setEditorDirty();
            }
        } );
        deselectAllQualityOfProtectionButton.addSelectionListener( new SelectionAdapter()
        {
            public void widgetSelected( SelectionEvent e )
            {
                saslQualityOfProtectionTableViewer.setAllChecked( false );
                setEditorDirty();
            }
        } );
        saslQualityOfProtectionTableViewer.addCheckStateListener( new ICheckStateListener()
        {
            public void checkStateChanged( CheckStateChangedEvent event )
            {
                setEditorDirty();
            }
        } );

        // SASL Realms
        saslRealmsTableViewer.addSelectionChangedListener( new ISelectionChangedListener()
        {
            public void selectionChanged( SelectionChangedEvent event )
            {
                editSaslRealmsButton.setEnabled( !event.getSelection().isEmpty() );
                deleteSaslRealmButton.setEnabled( !event.getSelection().isEmpty() );
            }
        } );
        saslRealmsTableViewer.addDoubleClickListener( new IDoubleClickListener()
        {
            public void doubleClick( DoubleClickEvent event )
            {
                editSelectedSaslRealm();
            }
View Full Code Here

                        Plugin.getDefault().getLog().log(e.getStatus());
                    }
                }
            }
        });
        viewer.addDoubleClickListener(new IDoubleClickListener() {
            public void doubleClick(DoubleClickEvent event) {
                if (!event.getSelection().isEmpty()) {
                    IStructuredSelection selection = (IStructuredSelection) event.getSelection();
                    Object element = selection.getFirstElement();
                    if (element instanceof IAdaptable) {
View Full Code Here

                        programmaticChange = false;
                    }
                }
            }
        });
        viewer.addDoubleClickListener(new IDoubleClickListener() {
            public void doubleClick(DoubleClickEvent event) {
                getContainer().showPage(getNextPage());
            }
        });
View Full Code Here

        availableViewer.addSelectionChangedListener(new ISelectionChangedListener() {
            public void selectionChanged(SelectionChangedEvent event) {
                updateUI();
            }
        });
        availableViewer.addDoubleClickListener(new IDoubleClickListener() {
            public void doubleClick(DoubleClickEvent event) {
                doAddSelection();
            }
        });

        Composite composite_1 = new Composite(composite, SWT.NONE);
        GridLayout gl_composite_1 = new GridLayout(1, false);
        gl_composite_1.marginWidth = 0;
        gl_composite_1.marginHeight = 0;
        composite_1.setLayout(gl_composite_1);

        btnAdd = new Button(composite_1, SWT.NONE);
        btnAdd.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false, 1, 1));
        btnAdd.addSelectionListener(new SelectionAdapter() {
            @Override
            public void widgetSelected(SelectionEvent e) {
                doAddSelection();
            }
        });
        btnAdd.setText("Add ->");
        btnAdd.setEnabled(false);

        btnAddAll = new Button(composite_1, SWT.NONE);
        btnAddAll.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false, 1, 1));
        btnAddAll.setText("Add All ->");
        btnAddAll.setEnabled(false);
        btnAddAll.addSelectionListener(new SelectionAdapter() {
            @Override
            public void widgetSelected(SelectionEvent e) {
                doAddAll();
            }
        });

        btnRemove = new Button(composite_1, SWT.NONE);
        btnRemove.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false, 1, 1));
        btnRemove.addSelectionListener(new SelectionAdapter() {
            @Override
            public void widgetSelected(SelectionEvent e) {
                doRemoveSelection();
            }
        });

        btnRemove.setText("<- Remove");
        btnRemove.setEnabled(false);

        btnRemoveAll = new Button(composite_1, SWT.NONE);
        btnRemoveAll.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false, 1, 1));
        btnRemoveAll.setText("<- Remove All");
        btnRemoveAll.setEnabled(false);
        btnRemoveAll.addSelectionListener(new SelectionAdapter() {
            @Override
            public void widgetSelected(SelectionEvent e) {
                doRemoveAll();
            }
        });

        tblSelected = new Table(composite, SWT.BORDER | SWT.FULL_SELECTION);
        tblSelected.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));

        selectedViewer = new TableViewer(tblSelected);
        selectedViewer.setContentProvider(ArrayContentProvider.getInstance());
        selectedViewer.setLabelProvider(new PackageNameLabelProvider());
        selectedViewer.addSelectionChangedListener(new ISelectionChangedListener() {
            public void selectionChanged(SelectionChangedEvent event) {
                updateUI();
            }
        });
        selectedViewer.addDoubleClickListener(new IDoubleClickListener() {
            public void doubleClick(DoubleClickEvent event) {
                doRemoveSelection();
            }
        });
View Full Code Here

TOP

Related Classes of org.eclipse.jface.viewers.IDoubleClickListener

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.