Class CommonViewerEx

All Implemented Interfaces:
IViewerToolTip, IInputProvider, IInputSelectionProvider, IPostSelectionProvider, ISelectionProvider
Direct Known Subclasses:
FilteredCommonViewer

public class CommonViewerEx extends CommonViewer implements IViewerToolTip
A little extended Common Viewer for 3.8+/4.2+ Eclipse and drag-drop enhancement.
Author:
Christopher Mindus
  • Constructor Details

    • CommonViewerEx

      public CommonViewerEx(Composite parent, int style)
      Creates the common viewer.
      Parameters:
      parent - Parent composite.
      style - SWT style for tree control.
    • CommonViewerEx

      public CommonViewerEx(Composite parent, int style, int flags)
      Creates the common viewer.
      Parameters:
      parent - Parent composite.
      style - SWT style for tree control.
      flags - The presentation flags, from INavigatorPresentation.
  • Method Details

    • init

      protected void init()
      Initializes the content provider, label provider, and drag and drop support. Should not be called by clients -- this method is invoked when the constructor is invoked.
      Overrides:
      init in class CommonViewer
    • addFlagsListener

      public void addFlagsListener(IProviderFlagsChangeListener listener)
      Adds a label or content provider to be informed of changes.
    • removeFlagsListener

      public void removeFlagsListener(IProviderFlagsChangeListener listener)
      Removes a label or content provider to be informed of changes.
    • setProviderFlags

      public void setProviderFlags(int flags)
      Sets the flags for label and content providers.
    • getProviderFlags

      public int getProviderFlags()
      Gets the flags for label and content providers.
    • getViewerRow

      public ViewerRow getViewerRow(Point point)
      Returns the viewer row at the given widget-relative coordinates. Overridden to make public. As it's for tooltip support this will work just fine.
      Specified by:
      getViewerRow in interface IViewerToolTip
      Overrides:
      getViewerRow in class ColumnViewer
      Parameters:
      point - The widget-relative coordinates of the viewer row.
      Returns:
      ViewerRow the row or null if no row is found at the given coordinates.