Package org.eclipse.swt.widgets

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


        {
            public void widgetSelected( SelectionEvent event )
            {
                Rectangle rect = scopeToolItem.getBounds();
                Point pt = new Point( rect.x, rect.y + rect.height );
                pt = scopeToolBar.toDisplay( pt );

                Menu menu = createMenu();
                menu.setLocation( pt.x, pt.y );
                menu.setVisible( true );
            }
View Full Code Here


        {
            public void widgetSelected( SelectionEvent event )
            {
                Rectangle rect = searchInToolItem.getBounds();
                Point pt = new Point( rect.x, rect.y + rect.height );
                pt = searchToolBar.toDisplay( pt );

                Menu menu = createSearchInMenu();
                menu.setLocation( pt.x, pt.y );
                menu.setVisible( true );
            }
View Full Code Here

        {
            public void widgetSelected( SelectionEvent event )
            {
                Rectangle rect = scopeToolItem.getBounds();
                Point pt = new Point( rect.x, rect.y + rect.height );
                pt = searchToolBar.toDisplay( pt );

                Menu menu = createScopeMenu();
                menu.setLocation( pt.x, pt.y );
                menu.setVisible( true );
            }
View Full Code Here

        {
            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

      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

         * bounds of the cool item.
         */
        int i = 0;
        while (i < toolCount) {
          Rectangle toolBounds = tools[i].getBounds();
          pt = toolBar.toDisplay(new Point(toolBounds.x, toolBounds.y));
          toolBounds.x = pt.x;
          toolBounds.y = pt.y;
          Rectangle intersection = itemBounds.intersection(toolBounds);
          if (!intersection.equals(toolBounds))
            break;
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

        {
            public void widgetSelected( SelectionEvent event )
            {
                Rectangle rect = searchInToolItem.getBounds();
                Point pt = new Point( rect.x, rect.y + rect.height );
                pt = searchToolBar.toDisplay( pt );

                Menu menu = createSearchInMenu();
                menu.setLocation( pt.x, pt.y );
                menu.setVisible( true );
            }
View Full Code Here

        {
            public void widgetSelected( SelectionEvent event )
            {
                Rectangle rect = scopeToolItem.getBounds();
                Point pt = new Point( rect.x, rect.y + rect.height );
                pt = searchToolBar.toDisplay( pt );

                Menu menu = createScopeMenu();
                menu.setLocation( pt.x, pt.y );
                menu.setVisible( true );
            }
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.