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 theToolBarManager).
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SectionToolbaradd(org.eclipse.jface.action.IAction action)Adds an action as a contribution item, and returns this for convenienceSectionToolbaradd(org.eclipse.jface.action.IContributionItem iContributionItem)Adds a contribution item to this manager, and returns this for convenienceSectionToolbardone()Updates the wrapped ToolBarManager.
Equivalent tothis.toolBarManager#update(true);org.eclipse.swt.widgets.ToolBargetControl()Gets the created ToolBar.org.eclipse.jface.action.ToolBarManagergetManager()Gets the created ToolBar manager.
-
-
-
Constructor Detail
-
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 theToolBarManager).- Parameters:
section- - a parent compositestyle- - a style for the create of the ToolBarManager
-
-
Method Detail
-
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 benull- Returns:
thisfor 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 benull- Returns:
thisfor convenience
-
done
public SectionToolbar done()
Updates the wrapped ToolBarManager.
Equivalent tothis.toolBarManager#update(true);- Returns:
thisfor 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
-
-