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);
}
Aggregations