Examples of ToolBar


Examples of org.eclipse.swt.widgets.ToolBar

        public void modifyText(ModifyEvent e) {
          validateInput();
        }
      });

      ToolBar grabTitleBar = new ToolBar(nameContainer, SWT.FLAT);
      grabTitleBar.setBackground(container.getDisplay().getSystemColor(SWT.COLOR_WHITE));

      ToolItem grabTitleItem = new ToolItem(grabTitleBar, SWT.PUSH);
      grabTitleItem.setImage(OwlUI.getImage(fResources, "icons/etool16/info.gif"));
      grabTitleItem.setToolTipText("Load name from feed");
      grabTitleItem.addSelectionListener(new SelectionAdapter() {
View Full Code Here

Examples of org.eclipse.swt.widgets.ToolBar

    /* Create Item */
    final SearchConditionItem item = new SearchConditionItem(itemContainer, SWT.NONE, condition);
    item.setLayoutData(new GridData(SWT.FILL, SWT.BEGINNING, true, false));

    /* Create Button Box */
    final ToolBar buttonBar = new ToolBar(itemContainer, SWT.FLAT);
    buttonBar.setLayoutData(new GridData(SWT.END, SWT.CENTER, false, false));

    /* Button to add Condition */
    ToolItem addButton = new ToolItem(buttonBar, SWT.DROP_DOWN);
    addButton.setImage(fAddIcon);
    addButton.setToolTipText("Add Condition");

    /* Add Menu */
    final Menu conditionMenu = new Menu(buttonBar);
    createConditionMenu(conditionMenu, item);
    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

Examples of org.eclipse.swt.widgets.ToolBar

        public void modifyText(ModifyEvent e) {
          validateInput();
        }
      });

      ToolBar grabTitleBar = new ToolBar(nameContainer, SWT.FLAT);
      grabTitleBar.setBackground(container.getDisplay().getSystemColor(SWT.COLOR_WHITE));

      ToolItem grabTitleItem = new ToolItem(grabTitleBar, SWT.PUSH);
      grabTitleItem.setImage(OwlUI.getImage(fResources, "icons/etool16/info.gif"));
      grabTitleItem.setToolTipText("Load name from feed");
      grabTitleItem.addSelectionListener(new SelectionAdapter() {
View Full Code Here

Examples of org.eclipse.swt.widgets.ToolBar

    /* Create Item */
    final NewsActionItem item = new NewsActionItem(itemContainer, SWT.NONE, action);
    item.setLayoutData(new GridData(SWT.FILL, SWT.BEGINNING, true, false));

    /* Create Button Box */
    final ToolBar buttonBar = new ToolBar(itemContainer, SWT.FLAT);
    buttonBar.setLayoutData(new GridData(SWT.END, SWT.CENTER, false, false));

    /* Button to add Action */
    ToolItem addButton = new ToolItem(buttonBar, SWT.DROP_DOWN);
    addButton.setImage(fAddIcon);
    addButton.setToolTipText(Messages.NewsActionList_ADD_ACTION);

    /* Add Menu */
    final Menu actionMenu = new Menu(buttonBar);
    createActionMenu(actionMenu, item);
    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);
      }
    });

    buttonBar.addDisposeListener(new DisposeListener() {
      public void widgetDisposed(DisposeEvent e) {
        actionMenu.dispose();
      }
    });

View Full Code Here

Examples of org.eclipse.swt.widgets.ToolBar

    shell.getDisplay().addFilter(SWT.Selection, new Listener() {
      @SuppressWarnings("restriction")
      public void handleEvent(Event event) {
        if (event.item == null && event.widget instanceof ToolItem) {
          ToolItem item = (ToolItem) event.widget;
          ToolBar toolbar = item.getParent();
          Composite parent = toolbar.getParent();
          if (!(parent instanceof Shell)) {
            parent = parent.getParent();
            if (parent != null && !(parent instanceof Shell) && !parent.isDisposed() && parent.getLayoutData() instanceof org.eclipse.ui.internal.progress.ProgressRegion) {
              event.doit = false;
              event.type = SWT.None;
              asyncOpenActivityDialog(toolbar.getShell());
            }
          }
        }
      }
    });
View Full Code Here

Examples of org.eclipse.swt.widgets.ToolBar

    Composite toolbarContainer = new Composite(headerContainer, SWT.NONE);
    toolbarContainer.setLayout(LayoutUtils.createGridLayout(2, 0, 0, 0, 1, false));
    toolbarContainer.setLayoutData(new GridData(SWT.END, SWT.CENTER, false, true));
    toolbarContainer.setBackground(fParent.getDisplay().getSystemColor(SWT.COLOR_LIST_BACKGROUND));

    fAddFolderBar = new ToolBar(toolbarContainer, SWT.FLAT);
    OwlUI.makeAccessible(fAddFolderBar, Messages.FolderChooser_NEW_FOLDER);
    fAddFolderBar.setLayoutData(new GridData(SWT.END, SWT.CENTER, false, true));
    fAddFolderBar.setBackground(fParent.getDisplay().getSystemColor(SWT.COLOR_LIST_BACKGROUND));
    fAddFolderBar.setCursor(headerContainer.getDisplay().getSystemCursor(SWT.CURSOR_ARROW));
    fAddFolderBar.setVisible(!fExpandable);

    ToolItem addFolderItem = new ToolItem(fAddFolderBar, SWT.PUSH);
    addFolderItem.setImage(OwlUI.getImage(fResources, "icons/etool16/add_crop.gif")); //$NON-NLS-1$
    addFolderItem.setToolTipText(Messages.FolderChooser_NEW_FOLDER);
    addFolderItem.addSelectionListener(new SelectionAdapter() {
      @Override
      public void widgetSelected(SelectionEvent e) {
        onNewFolder();
        notifyListeners(SWT.Selection, new Event());
      }
    });

    ToolBar toggleBar = new ToolBar(toolbarContainer, SWT.FLAT);
    OwlUI.makeAccessible(toggleBar, Messages.FolderChooser_SHOW_FOLDERS);
    toggleBar.setLayoutData(new GridData(SWT.END, SWT.CENTER, false, true));
    ((GridData) toggleBar.getLayoutData()).exclude = !fExpandable;
    toggleBar.setBackground(fParent.getDisplay().getSystemColor(SWT.COLOR_LIST_BACKGROUND));
    toggleBar.setCursor(headerContainer.getDisplay().getSystemCursor(SWT.CURSOR_ARROW));

    fToggleItem = new ToolItem(toggleBar, SWT.PUSH);
    fToggleItem.setImage(OwlUI.getImage(fResources, "icons/ovr16/arrow_down.gif")); //$NON-NLS-1$
    fToggleItem.setToolTipText(Messages.FolderChooser_SHOW_FOLDERS);
    fToggleItem.addSelectionListener(new SelectionAdapter() {
View Full Code Here

Examples of org.eclipse.swt.widgets.ToolBar

    setFont(parent.getFont());
  }

  /* Create Toolbar with "Clear" Button */
  private void createClearText(Composite parent) {
    ToolBar toolBar = new ToolBar(parent, SWT.FLAT | SWT.HORIZONTAL);
    fFilterToolBar = new ToolBarManager(toolBar);
    fFilterToolBar.getControl().setBackground(parent.getBackground());
    fFilterToolBar.getControl().setLayoutData(new GridData(SWT.BEGINNING, SWT.CENTER, false, true));

    /* Initially Hide */
    ((GridData) toolBar.getLayoutData()).exclude = true;
    toolBar.setVisible(false);

    IAction clearTextAction = new Action("", IAction.AS_PUSH_BUTTON) {//$NON-NLS-1$
      @Override
      public void run() {
        setFilterText(""); //$NON-NLS-1$
View Full Code Here

Examples of org.eclipse.swt.widgets.ToolBar

      public void modifyText(ModifyEvent e) {
        setErrorMessage(null);
      }
    });

    ToolBar generateTitleBar = new ToolBar(nameContainer, SWT.FLAT);
    OwlUI.makeAccessible(generateTitleBar, Messages.SearchMarkDialog_CREATE_NAME_FROM_CONDITIONS);
    generateTitleBar.setBackground(container.getDisplay().getSystemColor(SWT.COLOR_LIST_BACKGROUND));

    ToolItem generateTitleItem = new ToolItem(generateTitleBar, SWT.PUSH);
    generateTitleItem.setImage(OwlUI.getImage(fResources, "icons/etool16/info.gif")); //$NON-NLS-1$
    generateTitleItem.setToolTipText(Messages.SearchMarkDialog_CREATE_NAME_FROM_CONDITIONS);
    generateTitleItem.addSelectionListener(new SelectionAdapter() {
View Full Code Here

Examples of org.eclipse.swt.widgets.ToolBar

      }
    });

    /* Clear Button */
    if (!Application.IS_MAC) {
      ToolBar toolBar = new ToolBar(searchContainer, SWT.FLAT | SWT.HORIZONTAL);
      fFilterToolBar = new ToolBarManager(toolBar);
      fFilterToolBar.getControl().setBackground(parent.getBackground());
      fFilterToolBar.getControl().setLayoutData(new GridData(SWT.BEGINNING, SWT.CENTER, false, true));

      /* Initially Hide */
      ((GridData) toolBar.getLayoutData()).exclude = true;
      toolBar.setVisible(false);

      IAction clearTextAction = new Action("", IAction.AS_PUSH_BUTTON) {//$NON-NLS-1$
        @Override
        public void run() {
          clearQuickSearch(true);
View Full Code Here

Examples of org.eclipse.swt.widgets.ToolBar

    int entryFieldWidth = Dialog.convertHorizontalDLUsToPixels(fontMetrics, IDialogConstants.ENTRY_FIELD_WIDTH);
    gc.dispose();

    ((GridData) fNameInput.getLayoutData()).widthHint = entryFieldWidth; //Required to avoid large spanning dialog for long Links

    ToolBar generateTitleBar = new ToolBar(nameContainer, SWT.FLAT);
    OwlUI.makeAccessible(generateTitleBar, Messages.NewsFilterDialog_CREATE_NAME_FROM_CONDITIONS);
    generateTitleBar.setBackground(container.getDisplay().getSystemColor(SWT.COLOR_LIST_BACKGROUND));

    ToolItem generateTitleItem = new ToolItem(generateTitleBar, SWT.PUSH);
    generateTitleItem.setImage(OwlUI.getImage(fResources, "icons/etool16/info.gif")); //$NON-NLS-1$
    generateTitleItem.setToolTipText(Messages.NewsFilterDialog_CREATE_NAME_FROM_CONDITIONS);
    generateTitleItem.addSelectionListener(new SelectionAdapter() {
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.