Examples of toDisplay()


Examples of org.eclipse.swt.widgets.ToolBar.toDisplay()

      item.addSelectionListener(new SelectionAdapter() {
        @Override
        public void widgetSelected(SelectionEvent event) {
            Rectangle rect = item.getBounds();
            Point pt = new Point(rect.x, rect.y + rect.height);
              pt = toolBar.toDisplay(pt);
              viewerMenu.setLocation(pt.x, pt.y);
              viewerMenu.setVisible(true);
        }
      });
     
View Full Code Here

Examples of org.eclipse.swt.widgets.Tree.toDisplay()

            if (o != null && !o.equals(fLastItem)) {
                fLastItem = (TreeItem) o;
                tree.setSelection(new TreeItem[] { fLastItem });
            } else if (e.y < tree.getItemHeight() / 4) {
                // Scroll up
                final Point p = tree.toDisplay(e.x, e.y);
                final Item item = fTreeViewer.scrollUp(p.x, p.y);
                if (item instanceof TreeItem) {
                    fLastItem = (TreeItem) item;
                    tree.setSelection(new TreeItem[] { fLastItem });
                }
View Full Code Here

Examples of org.eclipse.swt.widgets.Tree.toDisplay()

                    fLastItem = (TreeItem) item;
                    tree.setSelection(new TreeItem[] { fLastItem });
                }
            } else if (e.y > tree.getBounds().height - tree.getItemHeight() / 4) {
                // Scroll down
                final Point p = tree.toDisplay(e.x, e.y);
                final Item item = fTreeViewer.scrollDown(p.x, p.y);
                if (item instanceof TreeItem) {
                    fLastItem = (TreeItem) item;
                    tree.setSelection(new TreeItem[] { fLastItem });
                }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.