Package org.eclipse.jface.action

Examples of org.eclipse.jface.action.ToolBarManager


  private Shell _shell;
  private ContextInformation _input;
  private Action _openInExternalBrowser;
 
  public HTMLInformationControl(Shell parentShell, int intialWidth, int initialHeight) {
    super(parentShell, new ToolBarManager());
    _width = intialWidth;
    _height = initialHeight;
    _shell = parentShell;

    _openInExternalBrowser = new Action("Open documentation", ImageDescriptor.createFromImage(Plugin.getDefault().getImageRegistry().get(Plugin.IMAGE_TML_LINK_TO_DOC))) {
View Full Code Here


        prefSize.widthHint = 500;

        sectionLayout.numColumns = 1;
        sectionClient.setLayout(sectionLayout);

        ToolBarManager toolBarManager = new ToolBarManager(SWT.FLAT);
        ToolBar toolbar = toolBarManager.createControl(section);

        Action action1 = new Action("refresh", Plugin.getDefault().getImageRegistry().getDescriptor(Plugin.IMAGE_REFRESH)) {
            public void run() {
                try {
                    refresh();
                }
                catch (IOException e) {
                    // TODO Auto-generated catch block
                    e.printStackTrace();
                }
            }

        };
        toolBarManager.add(action1);

        toolBarManager.update(true);
        section.setTextClient(toolbar);

        _directAccessibleFilesModel = new DirectAccessibleTMLModulModel(getDirectAccessibleFiles());

        _tableControl = new EditableTableControl<IFile>(sectionClient, SWT.NONE) {
View Full Code Here

    }
    return saveOnClose;
  }*/
 
  public void createPageToolbar(Form form) {
    ToolBarManager toolbarManager = (ToolBarManager)form.getToolBarManager();
    IMenuService ms = (IMenuService)getSite().getService(IMenuService.class);
    ms.populateContributionManager(toolbarManager, "toolbar:" + ID);
    toolbarManager.update(true);
    /*
      form.getToolBarManager().add(new Action("Export WGA Design", IAction.AS_DROP_DOWN_MENU) {
      @Override
      public ImageDescriptor getImageDescriptor() {
        return WGADesignerPlugin.getDefault().getImageRegistry().getDescriptor(WGADesignerPlugin.IMAGE_EXPORT_WGA_DESIGN);
View Full Code Here

    _webAppModel = new WebApplicationsModel(apps, config);
   
    // register as runtime listener to refresh web app model on wga config changes
    _model.getWgaRuntime().addListener(this);
   
    ToolBarManager toolBarManager = new ToolBarManager(SWT.FLAT);
    ToolBar toolbar = toolBarManager.createControl(_webAppSection);
  
    Action action1 = new Action("refresh", WGADesignerPlugin.getDefault().getImageRegistry().getDescriptor(WGADesignerPlugin.IMAGE_REFRESH)) {
      public void run() {
        refreshWebApplications();       
      }


    };
    toolBarManager.add(action1);

    toolBarManager.update(true);
    _webAppSection.setTextClient(toolbar);



    sectionClient = toolkit.createComposite(_webAppSection);
View Full Code Here

    /* Location Field */
    createLocationInput(container);
  }

  private void createNavigationToolBar(Composite parent) {
    fNavigationToolBarManager = new ToolBarManager(SWT.FLAT);

    /* Navigate Backward */
    IAction navBackward = new Action("Back") {
      @Override
      public void run() {
View Full Code Here

    /* Location Field */
    createLocationInput(container);
  }

  private void createNavigationToolBar(Composite parent) {
    fNavigationToolBarManager = new ToolBarManager(SWT.FLAT);

    /* Navigate Backward */
    IAction navBackward = new Action("Back") {
      @Override
      public void run() {
View Full Code Here

    /* Location Field */
    createLocationInput(container);
  }

  private void createNavigationToolBar(Composite parent) {
    fNavigationToolBarManager = new ToolBarManager(SWT.FLAT);

    /* Navigate Backward */
    IAction navBackward = new Action("Back") {
      @Override
      public void run() {
View Full Code Here

      /* Load and Add Items */
      int[] items = fPreferences.getIntegers(DefaultPreferences.TOOLBAR_ITEMS);
      if (items == null || items.length == 0)
        items = new int[] { CoolBarItem.SPACER.ordinal() };

      ToolBarManager currentToolBar = new ToolBarManager(mode == CoolBarMode.IMAGE_TEXT_HORIZONTAL ? (SWT.FLAT | SWT.RIGHT) : SWT.FLAT);
      for (int id : items) {
        final CoolBarItem item = CoolBarItem.values()[id];
        if (item != null) {

          /* Separator: Start a new Toolbar */
          if (item == CoolBarItem.SEPARATOR) {
            fManager.add(currentToolBar);
            currentToolBar = new ToolBarManager(mode == CoolBarMode.IMAGE_TEXT_HORIZONTAL ? (SWT.FLAT | SWT.RIGHT) : SWT.FLAT);
          }

          /* Spacer */
          else if (item == CoolBarItem.SPACER) {
            ActionContributionItem contribItem = new ActionContributionItem(new Action("") { //$NON-NLS-1$
                  @Override
                  public boolean isEnabled() {
                    return false;
                  }
                });
            currentToolBar.add(contribItem);
          }

          /* Any other Item */
          else {
            ActionContributionItem contribItem = new CoolBarActionContributionitem(item, getAction(item, mode, currentToolBar));
            contribItem.setId(item.getId());
            if (mode == CoolBarMode.IMAGE_TEXT_HORIZONTAL || mode == CoolBarMode.IMAGE_TEXT_VERTICAL)
              contribItem.setMode(ActionContributionItem.MODE_FORCE_TEXT);

            /* Add to Toolbar */
            currentToolBar.add(contribItem);
          }
        }
      }

      /* Add latest Toolbar Manager to Coolbar too */
 
View Full Code Here

      fJSInfoBar.getParent().layout(true, true);
    }
  }

  private void createNavigationToolBar(Composite parent) {
    fNavigationToolBarManager = new ToolBarManager(SWT.FLAT);

    /* New Browser Tab */
    IAction newBrowserTab = new Action(Messages.WebBrowserView_NEW_TAB) {
      @Override
      public void run() {
View Full Code Here

    Composite container = new Composite(fParent, SWT.NONE);
    container.setLayout(LayoutUtils.createGridLayout(5, 3, 0));
    container.setLayoutData(new GridData(SWT.FILL, SWT.BEGINNING, true, false));

    /* Filter */
    fFirstToolBarManager = new ToolBarManager(SWT.FLAT | SWT.RIGHT);
    createFilterBar();
    createGrouperBar();
    fFirstToolBarManager.createControl(container);
    fFirstToolBarManager.getControl().setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, true));

    /* Separator */
    Label sep = new Label(container, SWT.SEPARATOR | SWT.VERTICAL);
    sep.setLayoutData(new GridData(SWT.BEGINNING, SWT.CENTER, false, true));
    ((GridData) sep.getLayoutData()).heightHint = 18;

    fSecondToolBarManager = new ToolBarManager(SWT.FLAT);

    /* Toggle Layout */
    createLayoutBar();

    /* Highlight Searches */
 
View Full Code Here

TOP

Related Classes of org.eclipse.jface.action.ToolBarManager

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.