Package org.eclipse.jface.window

Examples of org.eclipse.jface.window.DefaultToolTip


                SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL);
        actionSetsViewer.getTable().setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
        actionSetsViewer.setLabelProvider(new WorkbenchLabelProvider());
        actionSetsViewer.setContentProvider(new ArrayContentProvider());
        actionSetsViewer.setComparator(new ActionSetComparator());
        actionSetsViewerTooltip = new DefaultToolTip(actionSetsViewer.getControl(),ToolTip.RECREATE,true){

      public Point getLocation(Point tipSize, Event event) {
        return getShell().getDisplay().getCursorLocation();
      }
         
        };

        // Menu and toolbar composite
        Composite actionGroup = new Composite(sashComposite, SWT.NONE);
        layout = new GridLayout();
        layout.numColumns = 2;
        layout.makeColumnsEqualWidth = true;
        layout.marginHeight = 0;
        layout.marginWidth = 0;
        layout.horizontalSpacing = 0;
        actionGroup.setLayout(layout);
        actionGroup.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));

        Composite menubarGroup = new Composite(actionGroup, SWT.NONE);
        layout = new GridLayout();
        layout.marginHeight = 0;
        layout.marginWidth = 0;
        menubarGroup.setLayout(layout);
        menubarGroup.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
       
        label = new Label(menubarGroup, SWT.WRAP);
        label.setText(WorkbenchMessages.ActionSetSelection_menubarActions);
        label.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));

        actionSetMenuViewer = new TreeViewer(menubarGroup);
        actionSetMenuViewer.setAutoExpandLevel(AbstractTreeViewer.ALL_LEVELS);
        actionSetMenuViewer.getControl().setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
        actionSetMenuViewer.setLabelProvider(new ActionSetLabelProvider());
        actionSetMenuViewer.setContentProvider(new TreeContentProvider());
        actionSetMenuViewerTooltip = new DefaultToolTip(actionSetMenuViewer.getControl(),ToolTip.RECREATE, true) {

      public Point getLocation(Point tipSize, Event event) {
        return getShell().getDisplay().getCursorLocation();
      }
         
        };

        Composite toolbarGroup = new Composite(actionGroup, SWT.NONE);
        layout = new GridLayout();
        layout.marginHeight = 0;
        layout.marginWidth = 0;
        toolbarGroup.setLayout(layout);
        toolbarGroup.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
       
        label = new Label(toolbarGroup, SWT.WRAP);
        label.setText(WorkbenchMessages.ActionSetSelection_toolbarActions);
        label.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));

        actionSetToolbarViewer = new TreeViewer(toolbarGroup);
        actionSetToolbarViewer.setAutoExpandLevel(AbstractTreeViewer.ALL_LEVELS);
        actionSetToolbarViewer.getControl().setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
        actionSetToolbarViewer
                .setLabelProvider(new ActionSetLabelProvider());
        actionSetToolbarViewer.setContentProvider(new TreeContentProvider());
        actionSetToolbarViewerTooltip = new DefaultToolTip(actionSetToolbarViewer.getControl(),ToolTip.RECREATE,true){

      public Point getLocation(Point tipSize, Event event) {
        return getShell().getDisplay().getCursorLocation();
      }
         
View Full Code Here


          }
        }
      }
    });

    new DefaultToolTip(table, ToolTip.NO_RECREATE, false) {
      private QuickAccessEntry getEntry(Event event) {
        TableItem item = table.getItem(new Point(event.x, event.y));
        if (item != null) {
          return (QuickAccessEntry) item.getData();
        }
View Full Code Here

        attachToolTip(natTable);
        return natTable;
    }

    private void attachToolTip(NatTable natTable) {
        DefaultToolTip toolTip = new ExampleNatTableToolTip(natTable);
        toolTip.setBackgroundColor(natTable.getDisplay().getSystemColor(
                SWT.COLOR_RED));
        toolTip.setPopupDelay(500);
        toolTip.activate();
        toolTip.setShift(new Point(10, 10));
    }
View Full Code Here

        // TODO should we update the diagram's selection too?
      }
    });
    final Tree tree = (Tree)viewer.getControl();
    ToolTip tooltip = new DefaultToolTip(tree) {
      @Override
      protected String getText(Event event) {
        TreeItem item = tree.getItem(new Point(event.x, event.y));
        if (item != null) {
          Object data = item.getData();
View Full Code Here

TOP

Related Classes of org.eclipse.jface.window.DefaultToolTip

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.