public final class DefaultButtonBarBuilder extends Object implements ButtonBarBuilder
ButtonBarBuilder. Clients may extend this class.| Constructor and Description |
|---|
DefaultButtonBarBuilder() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addLayoutToButtonComposite(org.eclipse.swt.widgets.Composite buttonComposite)
Add a column grid layout to the composite.
|
protected void |
createAddButton(org.eclipse.swt.widgets.Composite buttonComposite,
org.eclipse.jface.viewers.AbstractTableViewer viewer)
Creates the add button.
|
Object |
createNewElement(org.eclipse.swt.widgets.Button button)
Gets called when a button is pressed which needs to create a new element which gets added to the list.
|
protected void |
createRemoveButton(org.eclipse.swt.widgets.Composite buttonComposite,
org.eclipse.jface.viewers.AbstractTableViewer viewer)
Creates the remove button.
|
void |
fillButtonComposite(org.eclipse.swt.widgets.Composite buttonComposite,
org.eclipse.jface.viewers.AbstractTableViewer viewer)
This method is called to fill the given
Composite with all required buttons. |
protected int |
getNumberOfColumns()
Called by
addLayoutToButtonComposite(Composite) to identify the number of columns. |
void |
setCreator(NewElementCreator<Object,org.eclipse.swt.widgets.Button> creator) |
public void fillButtonComposite(org.eclipse.swt.widgets.Composite buttonComposite,
org.eclipse.jface.viewers.AbstractTableViewer viewer)
ButtonBarBuilderComposite with all required buttons.fillButtonComposite in interface ButtonBarBuilderbuttonComposite - the button barviewer - the AbstractTableViewerprotected void addLayoutToButtonComposite(org.eclipse.swt.widgets.Composite buttonComposite)
buttonComposite - the button Compositeprotected int getNumberOfColumns()
addLayoutToButtonComposite(Composite) to identify the number of columns.protected void createRemoveButton(org.eclipse.swt.widgets.Composite buttonComposite,
org.eclipse.jface.viewers.AbstractTableViewer viewer)
buttonComposite - the parentviewer - the viewerprotected void createAddButton(org.eclipse.swt.widgets.Composite buttonComposite,
org.eclipse.jface.viewers.AbstractTableViewer viewer)
buttonComposite - the parentviewer - the viewerpublic Object createNewElement(org.eclipse.swt.widgets.Button button)
ButtonBarBuildercreateNewElement in interface ButtonBarBuildercreateNewElement in interface NewElementCreator<Object,org.eclipse.swt.widgets.Button>button - the button which was pressedpublic void setCreator(NewElementCreator<Object,org.eclipse.swt.widgets.Button> creator)
creator - the NewElementCreatorCopyright © 2018. All rights reserved.