Search in sources :

Example 6 with ToolTip

use of org.eclipse.jface.window.ToolTip in project ecf by eclipse.

the class MultiRosterView method setupTreeViewer.

protected void setupTreeViewer(Composite parent) {
    treeViewer = new TreeViewer(parent, SWT.BORDER | SWT.SINGLE | SWT.V_SCROLL);
    getSite().setSelectionProvider(treeViewer);
    presenceListener = new PresenceListener();
    treeViewer.setContentProvider(new MultiRosterContentProvider());
    treeViewer.setLabelProvider(new MultiRosterLabelProvider());
    treeViewer.addFilter(hideOfflineFilter);
    treeViewer.addFilter(hideEmptyGroupsFilter);
    treeViewer.addFilter(showAwayFilter);
    treeViewer.setInput(rosterAccounts);
    treeViewer.addOpenListener(new IOpenListener() {

        public void open(OpenEvent e) {
            message((IStructuredSelection) e.getSelection());
        }
    });
    ToolTip toolTip = new ViewerToolTip(treeViewer.getControl());
    toolTip.setHideOnMouseDown(false);
    toolTip.setPopupDelay(200);
    toolTip.setShift(new Point(5, 5));
    makeActions();
    hookContextMenu();
    contributeToActionBars();
    hookDropSupport();
    retrieveServices();
    treeViewer.expandToLevel(DEFAULT_EXPAND_LEVEL);
}
Also used : ToolTip(org.eclipse.jface.window.ToolTip)

Aggregations

ToolTip (org.eclipse.jface.window.ToolTip)6 Point (org.eclipse.swt.graphics.Point)5 GridLayout (org.eclipse.swt.layout.GridLayout)4 Composite (org.eclipse.swt.widgets.Composite)4 Event (org.eclipse.swt.widgets.Event)4 ITag (org.eclipse.epp.mpc.core.model.ITag)2 IMenuListener (org.eclipse.jface.action.IMenuListener)2 IMenuManager (org.eclipse.jface.action.IMenuManager)2 MenuManager (org.eclipse.jface.action.MenuManager)2 AbstractTreeViewer (org.eclipse.jface.viewers.AbstractTreeViewer)2 IOpenListener (org.eclipse.jface.viewers.IOpenListener)2 ISelectionChangedListener (org.eclipse.jface.viewers.ISelectionChangedListener)2 OpenEvent (org.eclipse.jface.viewers.OpenEvent)2 SelectionChangedEvent (org.eclipse.jface.viewers.SelectionChangedEvent)2 TreeViewer (org.eclipse.jface.viewers.TreeViewer)2 OutlineItem (org.eclipse.mylyn.wikitext.parser.outline.OutlineItem)2 DisposeEvent (org.eclipse.swt.events.DisposeEvent)2 TypedEvent (org.eclipse.swt.events.TypedEvent)2 GridData (org.eclipse.swt.layout.GridData)2 Label (org.eclipse.swt.widgets.Label)2