Class SectionToolbar

java.lang.Object
com._1c.g5.v8.dt.common.ui.controls.SectionToolbar

public class SectionToolbar extends Object
This class provides a convenient shorthand for creating and initializing ToolBar. This offers several benefits over creating ToolBar normal way:
  • Minimize the codes of the creating of the ToolBar
  • The setters on SectionToolbar all return "this", allowing them to be chained
  • Constructor Summary

    Constructors
    Constructor
    Description
    SectionToolbar(org.eclipse.swt.widgets.Composite section)
    Create SectionToolbar with default style (SWT.FLAT | SWT.HORIZONTAL)
    SectionToolbar(org.eclipse.swt.widgets.Composite section, int style)
    Create SectionToolbar using specified style (See styles of the ToolBarManager).
  • Method Summary

    Modifier and Type
    Method
    Description
    add(org.eclipse.jface.action.IAction action)
    Adds an action as a contribution item, and returns this for convenience
    add(org.eclipse.jface.action.IContributionItem iContributionItem)
    Adds a contribution item to this manager, and returns this for convenience
    Updates the wrapped ToolBarManager.
    Equivalent to this.toolBarManager#update(true);
    org.eclipse.swt.widgets.ToolBar
    Gets the created ToolBar.
    org.eclipse.jface.action.ToolBarManager
    Gets the created ToolBar manager.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • SectionToolbar

      public SectionToolbar(org.eclipse.swt.widgets.Composite section)
      Create SectionToolbar with default style (SWT.FLAT | SWT.HORIZONTAL)
      Parameters:
      section - - a parent composite
    • SectionToolbar

      public SectionToolbar(org.eclipse.swt.widgets.Composite section, int style)
      Create SectionToolbar using specified style (See styles of the ToolBarManager).
      Parameters:
      section - - a parent composite
      style - - a style for the create of the ToolBarManager
  • Method Details

    • add

      public SectionToolbar add(org.eclipse.jface.action.IAction action)
      Adds an action as a contribution item, and returns this for convenience
      Parameters:
      action - - the action, this cannot be null
      Returns:
      this for convenience
    • add

      public SectionToolbar add(org.eclipse.jface.action.IContributionItem iContributionItem)
      Adds a contribution item to this manager, and returns this for convenience
      Parameters:
      iContributionItem - - the contribution item, this cannot be null
      Returns:
      this for convenience
    • done

      public SectionToolbar done()
      Updates the wrapped ToolBarManager.
      Equivalent to this.toolBarManager#update(true);
      Returns:
      this for convenience
      See Also:
      • ToolBarManager.update(boolean)
    • getControl

      public org.eclipse.swt.widgets.ToolBar getControl()
      Gets the created ToolBar.
      Returns:
      created ToolBar
    • getManager

      public org.eclipse.jface.action.ToolBarManager getManager()
      Gets the created ToolBar manager.
      Returns:
      created ToolBar