java.lang.Object
com.amalgamasimulation.desktop.appelements.Pages

public final class Pages extends Object
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 in registerPages() 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 Details

    • emfTable

      public static <V extends org.eclipse.emf.ecore.EObject> EmfTablePageBuilder.TreeElementTypeBuilder<V> emfTable(Class<V> rowType)
      Starts the builder of an EmfTablePage.
      Type Parameters:
      V - type of the rows
      Parameters:
      rowType - class of the rows; it only sets the type V and 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 an EmfTreePage.
      Type Parameters:
      V - type of the nodes
      Parameters:
      rowType - class of the nodes; it only sets the type V and is not passed to the page
      Returns:
      the first step of the builder