Package org.eclipse.swt.widgets

Examples of org.eclipse.swt.widgets.ToolBar


  public List<SWTBotToolbarButton> getToolbarButtons() {
    return UIThreadRunnable.syncExec(new ListResult<SWTBotToolbarButton>() {

      public List<SWTBotToolbarButton> run() {
        ViewPane obj = (ViewPane) ((WorkbenchPartReference) partReference).getPane();
        ToolBar toolbar = (ToolBar) obj.getToolBar();

        List<SWTBotToolbarButton> l = new ArrayList<SWTBotToolbarButton>();
        ToolItem[] items = toolbar.getItems();
        for (int i = 0; i < items.length; i++) {
          try {
            l.add(new SWTBotToolbarButton(items[i]));
          } catch (WidgetNotFoundException e) {
            log.warn("Failed to find widget " + items[i].getText(), e); //$NON-NLS-1$
View Full Code Here


                String filter = (String) event.getNewValue();
                updatedFilter(filter);
            }
        });

        ToolBar toolbar = new ToolBar(composite, SWT.FLAT);
        ToolItem tiCheckAll = new ToolItem(toolbar, SWT.FLAT);
        tiCheckAll.setImage(Activator.getImageDescriptor("icons/check_all.gif").createImage());
        tiCheckAll.setToolTipText(Messages.checkAll);
        tiCheckAll.addSelectionListener(new SelectionAdapter() {
View Full Code Here

                String filter = (String) event.getNewValue();
                updatedFilter(filter);
            }
        });

        ToolBar toolbar = new ToolBar(composite, SWT.FLAT);
        ToolItem tiCheckAll = new ToolItem(toolbar, SWT.FLAT);
        tiCheckAll.setImage(Activator.getImageDescriptor("icons/check_all.gif").createImage());
        tiCheckAll.setToolTipText(Messages.checkAll);
        tiCheckAll.addSelectionListener(new SelectionAdapter() {
View Full Code Here

  public List<SWTBotToolbarButton> getToolbarButtons() {
    return UIThreadRunnable.syncExec(new ListResult<SWTBotToolbarButton>() {

      public List<SWTBotToolbarButton> run() {
        ViewPane obj = (ViewPane) ((WorkbenchPartReference) partReference).getPane();
        ToolBar toolbar = (ToolBar) obj.getToolBar();
        final List<SWTBotToolbarButton> l = new ArrayList<SWTBotToolbarButton>();

        if (toolbar == null)
          return l;

        ToolItem[] items = toolbar.getItems();
        log.debug("number of items : " + items.length);
        for (int i = 0; i < items.length; i++) {
          try {
            if (SWTUtils.hasStyle(items[i], SWT.PUSH))
              l.add(new SWTBotToolbarPushButton(items[i]));
View Full Code Here

        infoText = BaseWidgetUtils.createLabeledText( infoTextControl, "", 1 ); //$NON-NLS-1$
        infoText.setLayoutData( new GridData( SWT.FILL, SWT.CENTER, true, true ) );
        control.setTopLeft( infoTextControl );

        // tool bar
        actionToolBar = new ToolBar( control, SWT.FLAT | SWT.RIGHT );
        actionToolBar.setLayoutData( new GridData( SWT.END, SWT.NONE, true, false ) );
        actionToolBarManager = new ToolBarManager( actionToolBar );
        control.setTopCenter( actionToolBar );

        // local menu
        this.menuManager = new MenuManager();
        menuToolBar = new ToolBar( control, SWT.FLAT | SWT.RIGHT );
        ToolItem ti = new ToolItem( menuToolBar, SWT.PUSH, 0 );
        ti.setImage( BrowserCommonActivator.getDefault().getImage( BrowserCommonConstants.IMG_PULLDOWN ) );
        ti.addSelectionListener( new SelectionAdapter()
        {
            public void widgetSelected( SelectionEvent e )
View Full Code Here

                }
            }
        } );

        // Search Toolbar
        final ToolBar searchToolBar = new ToolBar( searchFieldInnerComposite, SWT.HORIZONTAL | SWT.FLAT );
        // Creating the Search In ToolItem
        final ToolItem searchInToolItem = new ToolItem( searchToolBar, SWT.DROP_DOWN );
        searchInToolItem.setText( Messages.getString( "SearchView.SearchIn" ) ); //$NON-NLS-1$
        // Adding the action to display the Menu when the item is clicked
        searchInToolItem.addSelectionListener( new SelectionAdapter()
        {
            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 );
            }
        } );

        new ToolItem( searchToolBar, SWT.SEPARATOR );

        final ToolItem scopeToolItem = new ToolItem( searchToolBar, SWT.DROP_DOWN );
        scopeToolItem.setText( Messages.getString( "SearchView.Scope" ) ); //$NON-NLS-1$
        // Adding the action to display the Menu when the item is clicked
        scopeToolItem.addSelectionListener( new SelectionAdapter()
        {
            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 );
            }
        } );
        searchToolBar.setLayoutData( new GridData( SWT.NONE, SWT.CENTER, false, false ) );

        // Search Button
        searchButton = new Button( searchFieldInnerComposite, SWT.PUSH | SWT.DOWN );
        searchButton.setEnabled( false );
        searchButton.setImage( Activator.getDefault().getImage( PluginConstants.IMG_SEARCH ) );
View Full Code Here

      }
    });
    GridLayout gridLayout = new GridLayout(1, true);
    mainShell.setLayout(gridLayout);
    GridData toolbarGridData = new GridData(GridData.HORIZONTAL_ALIGN_CENTER, GridData.VERTICAL_ALIGN_BEGINNING, true, true);
    toolBar = new ToolBar(mainShell, SWT.HORIZONTAL);
    toolBar.setLayoutData(toolbarGridData);
    toolBar.setLayout(new FillLayout(SWT.HORIZONTAL));

    GridData progressGridData = new GridData(GridData.HORIZONTAL_ALIGN_CENTER, GridData.VERTICAL_ALIGN_END, true, false);
    progressGridData.widthHint = 300;
View Full Code Here

        GridData data = new GridData(GridData.FILL_HORIZONTAL
                | GridData.GRAB_HORIZONTAL);
        getFilterControl().setLayoutData(data);

        ToolBar toolBar = new ToolBar(filterParent, SWT.FLAT | SWT.HORIZONTAL);
        filterToolBar = new ToolBarManager(toolBar);

        createClearText(filterToolBar);

        filterToolBar.update(false);
View Full Code Here

   * Get the toolbar for the container
   *
   * @return Control
   */
  Control getContainerToolBar(Composite composite) {
        ToolBar historyBar = new ToolBar(composite, SWT.HORIZONTAL | SWT.FLAT);
        ToolBarManager historyManager = new ToolBarManager(historyBar);
   
        history.createHistoryControls(historyBar, historyManager);
       
        historyManager.update(false);
View Full Code Here

    gridData.horizontalAlignment = GridData.FILL;
    gridData.grabExcessHorizontalSpace = true;
    gridData.grabExcessVerticalSpace = false;
    gridData.verticalAlignment = GridData.FILL;

    imageToolBar = new ToolBar(parent, SWT.LEFT_TO_RIGHT);

    itemLoad = new ToolItem(imageToolBar, SWT.PUSH);
    itemLoad.setImage(this.registry.get("Load")); //$NON-NLS-1$
    itemLoad.setToolTipText(Messages.ImageComposite_itemLoadTooltip);
    itemLoad.addListener(SWT.Selection, new Listener() {
View Full Code Here

TOP

Related Classes of org.eclipse.swt.widgets.ToolBar

Copyright © 2018 www.massapicom. 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.