Package org.eclipse.jface.viewers

Examples of org.eclipse.jface.viewers.ISelectionChangedListener


    /* Hook into Statusline */
    fViewer.addSelectionChangedListener(new StatusLineUpdater(fEditorSite.getActionBars().getStatusLineManager()));

    /* Track Selections in the Viewer */
    fSelectionChangeListener = new ISelectionChangedListener() {
      public void selectionChanged(SelectionChangedEvent event) {
        onSelectionChanged(event);
      }
    };
    fViewer.addPostSelectionChangedListener(fSelectionChangeListener);
View Full Code Here


    fStatusLabel = new Label(statusContainer, SWT.NONE);
    fStatusLabel.setLayoutData(new GridData(SWT.FILL, SWT.BEGINNING, true, false));

    /* Update Status Label when selection changes */
    fViewer.addSelectionChangedListener(new ISelectionChangedListener() {
      public void selectionChanged(SelectionChangedEvent event) {
        onSelectionChange();
      }
    });

View Full Code Here

        Controller.getDefault().getSavedSearchService().updateSavedSearches(false);
      }
    });

    /* Enable "Link to FeedView" */
    fViewer.addPostSelectionChangedListener(new ISelectionChangedListener() {
      public void selectionChanged(SelectionChangedEvent event) {
        onSelectionChanged(event);
      }
    });

View Full Code Here

    /* Create LabelProvider */
    fBrowserViewer.setLabelProvider(new NewsBrowserLabelProvider(fBrowserViewer));

    /* Set input when selection in result viewer changes */
    fResultViewer.addSelectionChangedListener(new ISelectionChangedListener() {
      public void selectionChanged(SelectionChangedEvent event) {
        IStructuredSelection selection = (IStructuredSelection) event.getSelection();
        if (!selection.isEmpty() && fIsPreviewVisible) {
          fBrowserViewer.setInput(selection.getFirstElement());
          hideBrowser(false);
View Full Code Here

    boolean usedInDialog = (fParent.getShell().getParent() != null);
    fFolderViewer.setLabelProvider(new BookMarkLabelProvider(false, usedInDialog));
    fFolderViewer.setInput(new Object());

    fFolderViewer.addSelectionChangedListener(new ISelectionChangedListener() {
      public void selectionChanged(SelectionChangedEvent event) {
        IStructuredSelection selection = (IStructuredSelection) event.getSelection();
        if (!selection.isEmpty())
          onFolderSelected((IFolder) selection.getFirstElement());
        notifyListeners(SWT.Selection, new Event());
View Full Code Here

    /* Select the Condition's Field */
    fFieldViewer.setSelection(new StructuredSelection(fCondition.getField()));

    /* Listen to Changes */
    fFieldViewer.addSelectionChangedListener(new ISelectionChangedListener() {
      public void selectionChanged(SelectionChangedEvent event) {
        fModified = true;
      }
    });
  }
View Full Code Here

      fSpecifierViewer.getCombo().select(0);

    specifierCombo.setToolTipText(getSpecifierTooltip((IStructuredSelection) fSpecifierViewer.getSelection()));

    /* Listen to Selection Changes in the Field-Viewer */
    fFieldViewer.addSelectionChangedListener(new ISelectionChangedListener() {
      public void selectionChanged(SelectionChangedEvent event) {
        IStructuredSelection selection = (IStructuredSelection) event.getSelection();
        if (!selection.isEmpty()) {

          /* Remember old Selection */
          ISelection oldSelection = fSpecifierViewer.getSelection();

          /* Set Field as Input */
          ISearchField field = (ISearchField) selection.getFirstElement();
          fSpecifierViewer.setInput(field);

          /* Try keeping the selection */
          fSpecifierViewer.setSelection(oldSelection);
          if (fSpecifierViewer.getCombo().getSelectionIndex() == -1)
            selectFirstItem(fSpecifierViewer);
        }
      }
    });

    /* Listen to Changes */
    fSpecifierViewer.addSelectionChangedListener(new ISelectionChangedListener() {
      public void selectionChanged(SelectionChangedEvent event) {
        fModified = true;
        specifierCombo.setToolTipText(getSpecifierTooltip((IStructuredSelection) event.getSelection()));
      }
    });
View Full Code Here

    ((GridData) fInputFieldContainer.getLayoutData()).widthHint = 220;

    updateInputField(fInputFieldContainer, fCondition.getField(), fCondition.getValue());

    /* Listen to Selection Changes in the Field-Viewer */
    fFieldViewer.addSelectionChangedListener(new ISelectionChangedListener() {
      public void selectionChanged(SelectionChangedEvent event) {
        IStructuredSelection selection = (IStructuredSelection) event.getSelection();
        if (!selection.isEmpty()) {
          ISearchField field = (ISearchField) selection.getFirstElement();
          updateInputField(fInputFieldContainer, field, null);
View Full Code Here

        Controller.getDefault().getSavedSearchService().updateSavedSearches(false);
      }
    });

    /* Enable "Link to FeedView" */
    fViewer.addPostSelectionChangedListener(new ISelectionChangedListener() {
      public void selectionChanged(SelectionChangedEvent event) {
        onSelectionChanged(event);
      }
    });

View Full Code Here

    /* Set Dummy Input */
    fViewer.setInput(new Object());
    fRemoveAll.setEnabled(fViewer.getTable().getItemCount() > 0);

    /* Listen to Selection Changes */
    fViewer.addSelectionChangedListener(new ISelectionChangedListener() {
      public void selectionChanged(SelectionChangedEvent event) {
        fRemoveSelected.setEnabled(!fViewer.getSelection().isEmpty());
      }
    });

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.