Package org.eclipse.swt.widgets

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


        schemaSectionItemNew.addListener(SWT.Selection, new Listener() {
            public void handleEvent(Event event) {

                  Rectangle rect = schemaSectionItemNew.getBounds();
                  Point pt = new Point(rect.x, rect.y + rect.height);
                  pt = schemaSectionToolBar.toDisplay(pt);
                  menu.setLocation(pt.x, pt.y);
                  menu.setVisible(true);

              }
           }
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

    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

    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

        {
            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

             * Starting from the leftmost tool, retrieve the tool's bounding
             * rectangle.
             */
            Rectangle toolBounds = tools[i].getBounds();
            /* Convert to display coordinates (i.e. was relative to ToolBar). */
            pt = toolBar.toDisplay(new Point(toolBounds.x, toolBounds.y));
            toolBounds.x = pt.x;
            toolBounds.y = pt.y;
            /*
             * Figure out the visible portion of the tool by looking at the
             * intersection of the tool bounds with the cool item bounds.
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

     
      toolItemSmileys.addListener(SWT.Selection,new Listener() {

        public void handleEvent(Event event) {
          Rectangle bounds = ((ToolItem)event.widget).getBounds();
          Point loc = toolBar.toDisplay(bounds.x,bounds.y);
          final Shell shell = new Shell(toolBar.getShell(),SWT.RESIZE | SWT.BORDER);
          shell.setBounds(loc.x,loc.y,150,200);
          shell.setLayout(new FillLayout());
          final Tree tree = new Tree(shell,SWT.BORDER);
          for(IconDef iconDef : emoticons.getIcons()) {
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.