Package org.eclipse.jface.viewers

Examples of org.eclipse.jface.viewers.ISelectionChangedListener


        viewer = new TreeViewer(tree);
        viewer.setContentProvider(contentProvider);
        viewer.setLabelProvider(new JARTreeLabelProvider());

        managedForm.addPart(this);
        viewer.addSelectionChangedListener(new ISelectionChangedListener() {
            @Override
            public void selectionChanged(final SelectionChangedEvent event) {
                JARContentTreePart.this.managedForm.fireSelectionChanged(JARContentTreePart.this, event.getSelection());
            }
        });
View Full Code Here


                return ((ActivateSignature) element).label;
            }
        });
        vwrActivateStub.setInput(EnumSet.allOf(ActivateSignature.class));
        vwrActivateStub.setSelection(new StructuredSelection(activateSignature), true);
        vwrActivateStub.addSelectionChangedListener(new ISelectionChangedListener() {
            public void selectionChanged(SelectionChangedEvent event) {
                ISelection sel = event.getSelection();
                if (!sel.isEmpty() && sel instanceof IStructuredSelection) {
                    activateSignature = (ActivateSignature) ((IStructuredSelection) sel).getFirstElement();
                } else {
View Full Code Here

                selectedIndirectResources.clear();
                updateSelectedCheckboxes();
            }
        });

        viewerDirect.addSelectionChangedListener(new ISelectionChangedListener() {
            public void selectionChanged(SelectionChangedEvent event) {
                ISelection sel = event.getSelection();
                if (sel.isEmpty())
                    selection = (ResourceDescriptor) ((IStructuredSelection) viewerIndirect.getSelection()).getFirstElement();
                else
                    selection = (ResourceDescriptor) ((IStructuredSelection) sel).getFirstElement();
                getContainer().updateMessage();
            }
        });
        viewerIndirect.addSelectionChangedListener(new ISelectionChangedListener() {
            public void selectionChanged(SelectionChangedEvent event) {
                ISelection sel = event.getSelection();
                if (sel.isEmpty())
                    selection = (ResourceDescriptor) ((IStructuredSelection) viewerDirect.getSelection()).getFirstElement();
                else
View Full Code Here

        }, dropAdapter);
        viewer.addDragSupport(DND.DROP_COPY | DND.DROP_MOVE, new Transfer[] {
            LocalSelectionTransfer.getTransfer()
        }, new SelectionDragAdapter(viewer));

        viewer.addSelectionChangedListener(new ISelectionChangedListener() {
            public void selectionChanged(SelectionChangedEvent event) {
                boolean writableRepoSelected = false;
                IStructuredSelection selection = (IStructuredSelection) viewer.getSelection();
                Object element = selection.getFirstElement();
                if (element instanceof RepositoryPlugin) {
View Full Code Here

                ISelection selection = viewer.getSelection();
                if (!selection.isEmpty())
                    managedForm.fireSelectionChanged(PkgPatternsListPart.this, selection);
            }
        });
        viewer.addSelectionChangedListener(new ISelectionChangedListener() {
            public void selectionChanged(SelectionChangedEvent event) {
                managedForm.fireSelectionChanged(PkgPatternsListPart.this, event.getSelection());
                boolean enabled = !viewer.getSelection().isEmpty();
                insertItem.setEnabled(enabled);
                removeItem.setEnabled(enabled);
View Full Code Here

        viewer = new TreeViewer(tree);
        viewer.setContentProvider(contentProvider);
        viewer.setLabelProvider(new JARTreeLabelProvider());

        managedForm.addPart(this);
        viewer.addSelectionChangedListener(new ISelectionChangedListener() {
            public void selectionChanged(SelectionChangedEvent event) {
                JARContentTreePart.this.managedForm.fireSelectionChanged(JARContentTreePart.this, event.getSelection());
            }
        });
View Full Code Here

            protected boolean canEdit(Object element) {
                // all values are editable
                return true;
            }
        });
        viewer.addSelectionChangedListener(new ISelectionChangedListener() {
           
            @Override
            public void selectionChanged(SelectionChangedEvent event) {
                final ISelection selection = event.getSelection();
                if (selection instanceof IStructuredSelection) {
View Full Code Here

        this.masterForm.getBody().setLayout( new FillLayout() );
        this.createMaster( this.masterForm.getBody() );

        this.detailForm.getBody().setLayout( new FillLayout() );
        this.createDetail( this.detailForm.getBody() );
        viewer.addSelectionChangedListener( new ISelectionChangedListener()
        {
            public void selectionChanged( SelectionChangedEvent event )
            {
                ISelection selection = event.getSelection();
                if ( selection.isEmpty() )
View Full Code Here

        descriptionText.setEditable( false );
        gridData = new GridData( SWT.FILL, SWT.NONE, true, false );
        gridData.heightHint = 27;
        gridData.widthHint = 300;
        descriptionText.setLayoutData( gridData );
        entryEditorsTableViewer.addSelectionChangedListener( new ISelectionChangedListener()
        {
            public void selectionChanged( SelectionChangedEvent event )
            {
                // Getting the selected entry editor
                EntryEditorExtension entryEditor = ( EntryEditorExtension ) ( ( StructuredSelection ) entryEditorsTableViewer
View Full Code Here

        final Button btnRemove = new Button(composite, SWT.NONE);
        btnRemove.setText("Remove");
        btnRemove.setEnabled(false);

        // LISTENERS
        viewer.addSelectionChangedListener(new ISelectionChangedListener() {
            public void selectionChanged(SelectionChangedEvent event) {
                btnRemove.setEnabled(!viewer.getSelection().isEmpty());
            }
        });
        btnAdd.addSelectionListener(new SelectionAdapter() {
View Full Code Here

TOP

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

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.