Class EmfTreePageBuilder

java.lang.Object
com.amalgamasimulation.desktop.appelements.builders.EmfTreePageBuilder

public final class EmfTreePageBuilder extends Object
Builder of a page with an EMF tree for a part with pages (AbstractPagesPart). It is usually obtained with Pages.emfTree(Row.class).

The steps go in the same order as in EmfTablePageBuilder, with one more step, childrenFeature, after the elements feature:

 Pages.emfTree(MineArea.class)
     .treeElementType(TreeElementType.MINE_AREAS)
     .container(() -> scenario)
     .elementsFeature(DatamodelPackage.Literals.SCENARIO__MINE_AREAS)
     .childrenFeature(DatamodelPackage.Literals.MINE_AREA__CHILD_MINE_AREAS)
     .columns(tree -> tree.column(MineArea::getName).name("Name"))
     .register(this);
 
Author:
Ionov Ivan
  • Method Details

    • create

      public static <V extends org.eclipse.emf.ecore.EObject> EmfTreePageBuilder.TreeElementTypeBuilder<V> create()
      Starts the setup of a new page with a tree.
      Type Parameters:
      V - the type of the tree rows
      Returns:
      the first step of the builder
    • toolBar

      public static <V extends org.eclipse.emf.ecore.EObject, R> EmfTreePageBuilder.ToolBarBuilder<V,R> toolBar(TreePageProperties<V> properties, R owner)
      Returns a toolbar builder for the settings of an existing page. EmfTreePage.toolBar() uses it to add toolbar items after register.
      Type Parameters:
      V - the type of the tree rows
      R - the type returned by end()
      Parameters:
      properties - the settings of the page
      owner - the object returned by end()
      Returns:
      the toolbar builder