Class DependencyMatrixConfigurator

java.lang.Object
com.nomagic.magicdraw.dependencymatrix.configuration.DependencyMatrixConfigurator

@OpenApiAll public class DependencyMatrixConfigurator extends Object
This class allows to customize standard matrix behaviour and view. Custom matrix configurator must be derived from this class and registered in configurators registry with custom matrix descriptor.
  • Field Details

    • DEFAULT_DEPENDENCY_MATRIX_DIAGRAM_TYPE

      public static final String DEFAULT_DEPENDENCY_MATRIX_DIAGRAM_TYPE
      Default dependency matrix diagram type
      See Also:
  • Constructor Details

    • DependencyMatrixConfigurator

      public DependencyMatrixConfigurator(String diagramType)
      create new instance of the configurator
      Parameters:
      diagramType - diagram type name
  • Method Details

    • getConfigurator

      @CheckForNull public static DependencyMatrixConfigurator getConfigurator(Diagram diagram)
      Returns registered configurator for this diagram
      Parameters:
      diagram - diagram instance
      Returns:
      configurator used to create this kind of Dependency Matrix
    • getConfigurator

      @CheckForNull public static DependencyMatrixConfigurator getConfigurator(String diagramType)
      Returns registered configurator for this diagram
      Parameters:
      diagramType - diagram type name
      Returns:
      configurator used to create this kind of Dependency Matrix
    • registerConfiguration

      public static void registerConfiguration(DependencyMatrixConfigurator configurator)
      Registers new configurator in the matrix configurator registry
      Parameters:
      configurator - new registered configurator
    • getDiagramType

      public String getDiagramType()
      Diagram type of the current configurator
      Returns:
      diagram type
    • createTableCellRenderer

      public TableCellRenderer createTableCellRenderer()
      Create renderer, which is responsible for displaying cell elements Make sure that TableCellRenderer also implements com.nomagic.magicdraw.ui.zoom.Zoomable interface to properly display scaled (zoomed) matrix.
      Returns:
      new cell renderer component
    • createColumnCellRenderer

      public TableCellRenderer createColumnCellRenderer()
      Create renderer, which is responsible for displaying table header header row elements Make sure that TableCellRenderer also implements com.nomagic.magicdraw.ui.zoom.Zoomable interface to properly display scaled (zoomed) matrix.
      Returns:
      new column renderer component
    • createRowCellRenderer

      public TableCellRenderer createRowCellRenderer()
      Create renderer, which is responsible for displaying row header column elements Make sure that provided TableCellRenderer also implements com.nomagic.magicdraw.ui.zoom.Zoomable interface to properly display scaled (zoomed) matrix.
      Returns:
      new row renderer component
    • configureDependencyHandlers

      public void configureDependencyHandlers(Collection<DependencyExtractor> extractors, Collection<DependencyEditor> editors)
      Creates Matrix Dependency handlers, which are responsible for extracting and editing dependencies shown in the matrix

      In order to add custom dependency extraction algorithms use DependencyExtractor In order to add custom dependency editors (add and remove dependency actions) use DependencyEditor

      Parameters:
      extractors - dependency extractor instances
      editors - Dependency editor instances
    • getRegisteredMatrixTypes

      public static Collection<String> getRegisteredMatrixTypes()
      Returns list of all dependency matrix types
      Returns:
      all known dependency matrix types.