Package org.eclipse.swt.widgets

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


        {
            public void widgetSelected( SelectionEvent event )
            {
                Rectangle rect = leftMenuToolItem.getBounds();
                Point pt = new Point( rect.x, rect.y + rect.height );
                pt = leftToolBar.toDisplay( pt );
                leftMenu.setLocation( pt.x, pt.y );
                leftMenu.setVisible( true );
            }
        } );
        // Adding the 'Sorting...' MenuItem
View Full Code Here


        {
            public void widgetSelected( SelectionEvent event )
            {
                Rectangle rect = rightMenuToolItem.getBounds();
                Point pt = new Point( rect.x, rect.y + rect.height );
                pt = rightToolBar.toDisplay( pt );
                rightMenu.setLocation( pt.x, pt.y );
                rightMenu.setVisible( true );
            }
        } );
        // Adding the 'Group By Property' MenuItem
View Full Code Here

      public void handleEvent(Event event) {
        if (event.widget == backItem) {
          final ToolItem toolItem = (ToolItem) event.widget;
          final ToolBar toolBar = toolItem.getParent();
          Rectangle toolItemBounds = toolItem.getBounds();
          Point point = toolBar.toDisplay(new Point(toolItemBounds.x, toolItemBounds.y));
          backMenu.setLocation(point.x, point.y + toolItemBounds.height);
          backMenu.setVisible(true);
        }
      }
    });
View Full Code Here

          // Position the menu below and vertically aligned with the the drop down tool button.
          final ToolItem toolItem = (ToolItem) event.widget;
          final ToolBar toolBar = toolItem.getParent();

          Rectangle toolItemBounds = toolItem.getBounds();
          Point point = toolBar.toDisplay(new Point(toolItemBounds.x, toolItemBounds.y));
          menu.setLocation(point.x, point.y + toolItemBounds.height);
          setMenuVisible(true);
        }
      } else {
        /*
 
View Full Code Here

    colorItem1.addListener(SWT.Selection, new Listener() {
      public void handleEvent(Event event) {
        final ToolItem toolItem = (ToolItem) event.widget;
        final ToolBar toolBar = toolItem.getParent();
        Rectangle toolItemBounds = toolItem.getBounds();
        Point point = toolBar.toDisplay(new Point(toolItemBounds.x, toolItemBounds.y));
        menu1.setLocation(point.x, point.y + toolItemBounds.height);
        menu1.setVisible(true);
      }
    });
View Full Code Here

    colorItem2.addListener(SWT.Selection, new Listener() {
      public void handleEvent(Event event) {
        final ToolItem toolItem = (ToolItem) event.widget;
        final ToolBar toolBar = toolItem.getParent();
        Rectangle toolItemBounds = toolItem.getBounds();
        Point point = toolBar.toDisplay(new Point(toolItemBounds.x, toolItemBounds.y));
        menu2.setLocation(point.x, point.y + toolItemBounds.height);
        menu2.setVisible(true);
      }
    });
View Full Code Here

        download_tb.addListener (SWT.Selection, new Listener () {
            public void handleEvent (Event event) {
                if(event.detail == SWT.ARROW){
                    Rectangle rect = download_tb.getBounds ();
                    Point pt = new Point (rect.x, rect.y + rect.height);
                    pt = toolBar.toDisplay (pt);
                    menu.setLocation (pt.x, pt.y);
                    menu.setVisible (true);
                }else{
                    try {
                        View.getPluginInterface().getPluginconfig().setPluginParameter("Azureus_downloadTracer",true);
View Full Code Here

    prefsDropDown.addListener(SWT.Selection, new Listener() {
      public void handleEvent(Event event) {
        if (event.detail == SWT.ARROW) {
          // Arrow clicked, show drop down menu
          Rectangle itemBounds = prefsDropDown.getBounds();
          Point point = toolBar.toDisplay(itemBounds.x, itemBounds.y
              + itemBounds.height);
          prefsMenu.setLocation(point);
          prefsMenu.setVisible(true);
        } else {
          // Button clicked, cycle to next option
View Full Code Here

    addButton.addListener(SWT.Selection, new Listener() {
      public void handleEvent(Event event) {
        if (event.detail == SWT.ARROW) {
          Rectangle rect = item.getBounds();
          Point pt = new Point(rect.x, rect.y + rect.height);
          pt = buttonBar.toDisplay(pt);
          actionMenu.setLocation(pt.x, pt.y);
          actionMenu.setVisible(true);
        } else
          onAdd(item);
      }
View Full Code Here

    addButton.addListener(SWT.Selection, new Listener() {
      public void handleEvent(Event event) {
        if (event.detail == SWT.ARROW) {
          Rectangle rect = item.getBounds();
          Point pt = new Point(rect.x, rect.y + rect.height);
          pt = buttonBar.toDisplay(pt);
          conditionMenu.setLocation(pt.x, pt.y);
          conditionMenu.setVisible(true);
        } else
          onAdd(item);
      }
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.