Class EmfTablePageBuilder
java.lang.Object
com.amalgamasimulation.desktop.appelements.builders.EmfTablePageBuilder
Builder of a page with an EMF table for a part with pages (AbstractPagesPart). The table shows
the objects of a feature of a container. It is usually obtained with Pages.emfTable(Row.class).
The first steps go in a fixed order: the tree element, the container, the elements feature and the columns. After them the optional settings go in any order, and register creates the page and registers it in the part:
Pages.emfTable(WorkCenter.class)
.treeElementType(TreeElementType.WORK_CENTER)
.container(() -> appData.getScenario())
.elementsFeature(DatamodelPackage.Literals.SCENARIO__WORK_CENTERS)
.columns(table -> table.column(WorkCenter::getName).name("Name"))
.toolBar()
.defaultCreateElementAction("WC-", DatamodelFactory.eINSTANCE::createWorkCenter)
.defaultRemoveElementAction()
.end()
.register(this);
- Author:
- Ionov Ivan
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceEmfTablePageBuilder.ColumnBuilder<V extends org.eclipse.emf.ecore.EObject>The fourth step: the columns.static interfaceEmfTablePageBuilder.ContainerBuilder<V extends org.eclipse.emf.ecore.EObject>The second step: the container of the list.static interfaceEmfTablePageBuilder.ElementsFeatureBuilder<V extends org.eclipse.emf.ecore.EObject>The third step: the list of rows.static interfaceEmfTablePageBuilder.FinalBuilder<V extends org.eclipse.emf.ecore.EObject>The last step: optional settings in any order, then register.static interfaceEmfTablePageBuilder.ToolBarBuilder<V extends org.eclipse.emf.ecore.EObject,R> Builder of the table toolbar.static interfaceEmfTablePageBuilder.TreeElementTypeBuilder<V extends org.eclipse.emf.ecore.EObject>The first step: the tree element. -
Method Summary
Modifier and TypeMethodDescriptionstatic <V extends org.eclipse.emf.ecore.EObject>
EmfTablePageBuilder.TreeElementTypeBuilder<V> create()Starts the setup of a new page with a table.static <V extends org.eclipse.emf.ecore.EObject,R>
EmfTablePageBuilder.ToolBarBuilder<V, R> toolBar(TablePageProperties<V> properties, R owner) Returns a toolbar builder for the settings of an existing page.
-
Method Details
-
create
public static <V extends org.eclipse.emf.ecore.EObject> EmfTablePageBuilder.TreeElementTypeBuilder<V> create()Starts the setup of a new page with a table.- Type Parameters:
V- the type of the table rows- Returns:
- the first step of the builder
-
toolBar
public static <V extends org.eclipse.emf.ecore.EObject,R> EmfTablePageBuilder.ToolBarBuilder<V,R> toolBar(TablePageProperties<V> properties, R owner) Returns a toolbar builder for the settings of an existing page. EmfTablePage.toolBar() uses it to add toolbar items after register.- Type Parameters:
V- the type of the table rowsR- the type returned by end()- Parameters:
properties- the settings of the pageowner- the object returned by end()- Returns:
- the toolbar builder
-