Package org.eclipse.swt.widgets

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


  protected void specialPopupMenuItems(Menu menu, Event event) {
    MenuItem item = new MenuItem(menu, SWT.PUSH);
    item.setText("getItem(Point) on mouse coordinates");
    final Tree t = (Tree) event.widget;
    menuMouseCoords = t.toControl(new Point(event.x, event.y));
    item.addSelectionListener(new SelectionAdapter() {
      public void widgetSelected(SelectionEvent e) {
        eventConsole.append("getItem(Point(" + menuMouseCoords + ")) returned: " + t.getItem(menuMouseCoords));
        eventConsole.append("\n");
      };
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.