Class Pages
java.lang.Object
com.amalgamasimulation.desktop.appelements.Pages
Entry points to the builders of pages for
AbstractPagesPart: a table or a tree of EMF
objects taken from a list of the container.
How to use
Call a method inregisterPages() of the part and go through the builder steps. The last
step, register, adds the page to the part and returns it:
Pages.emfTable(Row.class)
.treeElementType(TreeElementType.ROWS)
.container(() -> scenarioObservable.getValue())
.elementsFeature(MyPackage.Literals.SCENARIO__ROWS)
.columns(table -> ...)
.register(this);
Keep the returned page if you need to call its methods later, for example
updateEnabled().-
Method Summary
Modifier and TypeMethodDescriptionstatic <V extends org.eclipse.emf.ecore.EObject>
EmfTablePageBuilder.TreeElementTypeBuilder<V> Starts the builder of anEmfTablePage.static <V extends org.eclipse.emf.ecore.EObject>
EmfTreePageBuilder.TreeElementTypeBuilder<V> Starts the builder of anEmfTreePage.
-
Method Details
-
emfTable
public static <V extends org.eclipse.emf.ecore.EObject> EmfTablePageBuilder.TreeElementTypeBuilder<V> emfTable(Class<V> rowType) Starts the builder of anEmfTablePage.- Type Parameters:
V- type of the rows- Parameters:
rowType- class of the rows; it only sets the typeVand is not passed to the page- Returns:
- the first step of the builder
-
emfTree
public static <V extends org.eclipse.emf.ecore.EObject> EmfTreePageBuilder.TreeElementTypeBuilder<V> emfTree(Class<V> rowType) Starts the builder of anEmfTreePage.- Type Parameters:
V- type of the nodes- Parameters:
rowType- class of the nodes; it only sets the typeVand is not passed to the page- Returns:
- the first step of the builder
-