Examples of ToolBar


Examples of org.eclipse.swt.widgets.ToolBar

    /* Create Item */
    final SearchConditionItem item = new SearchConditionItem(itemContainer, SWT.NONE, condition, fFieldsToExclude);
    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.setDisabledImage(fAddDisabledIcon);
    addButton.setToolTipText(Messages.SearchConditionList_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);
      }
    });

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

View Full Code Here

Examples of org.eclipse.swt.widgets.ToolBar

  public RGB getColor() {
    return fSelectedColor;
  }

  private void initControl(int style) {
    fBar = new ToolBar(fParent, style);
    OwlUI.makeAccessible(fBar, Messages.ColorPicker_COLOR_LABEL);
    fBar.addDisposeListener(new DisposeListener() {
      public void widgetDisposed(DisposeEvent e) {
        fColorMenu.dispose();
View Full Code Here

Examples of org.eclipse.swt.widgets.ToolBar

        public void widgetSelected(SelectionEvent e) {
          PreferencesUtil.createPreferenceDialogOn(fBrowser.getControl().getShell(), BrowserPreferencePage.ID, null, Boolean.TRUE).open();
        }
      });

      ToolBar bar = new ToolBar(fJSInfoBar, SWT.FLAT);
      bar.setLayoutData(new GridData(SWT.END, SWT.CENTER, false, true));
      bar.setBackground(fJSInfoBar.getBackground());

      ToolItem closeItem = new ToolItem(bar, SWT.PUSH);
      closeItem.setToolTipText(Messages.WebBrowserView_CLOSE);
      closeItem.setImage(OwlUI.getImage(bar, "icons/etool16/close_normal.png")); //$NON-NLS-1$
      closeItem.addSelectionListener(new SelectionAdapter() {
View Full Code Here

Examples of org.eclipse.swt.widgets.ToolBar

    fNameInput = new Text(nameContainer, Application.IS_MAC ? SWT.BORDER : SWT.NONE);
    OwlUI.makeAccessible(fNameInput, nameLabel);
    fNameInput.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, true));
    fNameInput.setText(mark.getName());

    ToolBar generateTitleBar = new ToolBar(nameContainer, SWT.FLAT);
    OwlUI.makeAccessible(generateTitleBar, Messages.SearchMarkPropertyPage_NAME_FROM_CONDITION);
    if (!Application.IS_MAC)
      generateTitleBar.setBackground(container.getDisplay().getSystemColor(SWT.COLOR_LIST_BACKGROUND));

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

Examples of org.eclipse.swt.widgets.ToolBar

        fNameInput = new Text(nameContainer, Application.IS_MAC ? SWT.BORDER : SWT.NONE);
        OwlUI.makeAccessible(fNameInput, nameLabel);
        fNameInput.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, true));
        fNameInput.setText(getName(entity));

        ToolBar grabTitleBar = new ToolBar(nameContainer, SWT.FLAT);
        OwlUI.makeAccessible(grabTitleBar, Messages.GeneralPropertyPage_LOAD_NAME);
        if (!Application.IS_MAC)
          grabTitleBar.setBackground(container.getDisplay().getSystemColor(SWT.COLOR_LIST_BACKGROUND));

        ToolItem grabTitleItem = new ToolItem(grabTitleBar, SWT.PUSH);
        grabTitleItem.setImage(OwlUI.getImage(fSite.getResourceManager(), "icons/etool16/info.gif")); //$NON-NLS-1$
        grabTitleItem.setToolTipText(Messages.GeneralPropertyPage_LOAD_NAME);
        grabTitleItem.addSelectionListener(new SelectionAdapter() {
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(control.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

        fFeedView.getEditorSite().getActionBars().getGlobalActionHandler(ActionFactory.PASTE.getId()).setEnabled(false);
      }
    });

    /* Clear Button */
    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();
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 */
    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.PUSH);
    addButton.setImage(fAddIcon);
    addButton.setToolTipText("Add Condition");
View Full Code Here

Examples of org.eclipse.swt.widgets.ToolBar

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

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

    ToolItem generateTitleItem = new ToolItem(generateTitleBar, SWT.PUSH);
    generateTitleItem.setImage(OwlUI.getImage(fResources, "icons/etool16/info.gif"));
    generateTitleItem.setToolTipText("Create name from conditions");
    generateTitleItem.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
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.