Class GenericTableManager


  • @OpenApiAll
    public class GenericTableManager
    extends java.lang.Object
    Helps manage a generic table: create a new table, add, get and remove rows, add and get columns, get column values, get currently selected elements.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static void addColumnsById​(Diagram diagram, java.util.List<java.lang.String> columnIDs)
      Adds generic table columns by id
      static void addGenericTableToolbarConfigurator​(DTConfigurator configurator)
      Adds generic table toolbar configurator.
      static void addRowElement​(Diagram diagram, Element element)
      Adds an element into generic table diagram as row
      static Diagram createGenericTable​(Project project, java.lang.String genericTableDiagramName)
      Creates generic table diagram in given project with given name
      static Property getCellValue​(Diagram diagram, Element element, java.lang.String columnId)
      Returns cell value by row element and column id.
      static java.util.Map<Element,​java.util.Map<java.lang.String,​Property>> getCellValues​(Diagram diagram)
      Returns all cell values by row element and column id.
      private static java.util.Map<Element,​java.util.Map<java.lang.String,​Property>> getCellValues​(Diagram diagram, java.util.function.Function<Element,​java.lang.Boolean> rowsFilter, java.util.function.Function<java.lang.String,​java.lang.Boolean> columnsFilter)  
      private static com.nomagic.magicdraw.properties.ui.jideui.PropertyColumn getColumnById​(com.nomagic.diagramtable.Table table, java.lang.String columnId)
      Returns column by id from a generic table diagram
      static java.lang.String getColumnIDByPropertyName​(java.lang.String propertyName)
      Creates Column ID for table from property name
      static java.lang.String getColumnIDByTag​(java.lang.String tagName, Stereotype stereotype)
      Creates Column ID for table from stereotype tag name
      static java.util.List<java.lang.String> getColumnIds​(Diagram diagram)
      Returns column ids from a generic table diagram
      static java.lang.String getColumnNameById​(Diagram diagram, java.lang.String columnId)
      Returns column name by id from a generic table diagram
      static java.util.List<java.lang.String> getColumnNames​(Diagram diagram)
      Returns column names from a generic table diagram
      static java.util.List<java.lang.String> getPossibleColumnIDs​(Element type)
      Returns all possible column ids for a generic table element types
      static java.util.List<Element> getRowElements​(Diagram diagram)
      Returns row elements of generic table diagram
      static java.util.Collection<Element> getScope​(Diagram diagram)
      Gets the scope elements from the table.
      static java.util.List<Element> getSelectedElements​(Diagram diagram)
      Gets currently selected elements from the diagram table.
      static java.util.List<java.lang.Object> getTableElementTypes​(Diagram diagram)
      Return generic table diagram element types
      static java.util.List<java.lang.String> getVisibleColumnIds​(Diagram diagram)
      Returns visible column ids from a generic table diagram.
      static java.util.List<Element> getVisibleRowElements​(Diagram diagram)
      Returns visible row elements of generic table diagram.
      static void refreshTable​(Diagram diagram)
      Refresh diagram table.
      static void registerToolbarActionsConfigurator​(java.lang.String diagramType, AMConfigurator configurator)
      Registers toolbar actions configurator.
      static void removeRowElement​(Diagram diagram, Element element)
      Removes row element from a generic table diagram
      static void setScope​(Diagram diagram, java.util.Collection<Element> scope)
      Sets the scope elements for the table.
      static void setSelectedElements​(Diagram diagram, java.util.List<Element> elements)
      Selects rows which represent given model elements.
      static void setTableElementTypes​(Diagram diagram, java.util.List<java.lang.Object> tableElementTypes)
      Sets generic table diagram element types Element types specify what elements can be added to table.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait