Class DependencyMatrixConfigurator
java.lang.Object
com.nomagic.magicdraw.dependencymatrix.configuration.DependencyMatrixConfigurator
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 Summary
-
Constructor Summary
ConstructorDescriptionDependencyMatrixConfigurator
(String diagramType) create new instance of the configurator -
Method Summary
Modifier and TypeMethodDescriptionvoid
configureDependencyHandlers
(Collection<DependencyExtractor> extractors, Collection<DependencyEditor> editors) Creates Matrix Dependency handlers, which are responsible for extracting and editing dependencies shown in the matrixCreate 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.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.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.static DependencyMatrixConfigurator
getConfigurator
(Diagram diagram) Returns registered configurator for this diagramstatic DependencyMatrixConfigurator
getConfigurator
(String diagramType) Returns registered configurator for this diagramDiagram type of the current configuratorstatic Collection<String>
Returns list of all dependency matrix typesstatic void
registerConfiguration
(DependencyMatrixConfigurator configurator) Registers new configurator in the matrix configurator registry
-
Field Details
-
DEFAULT_DEPENDENCY_MATRIX_DIAGRAM_TYPE
Default dependency matrix diagram type- See Also:
-
-
Constructor Details
-
DependencyMatrixConfigurator
create new instance of the configurator- Parameters:
diagramType
- diagram type name
-
-
Method Details
-
getConfigurator
Returns registered configurator for this diagram- Parameters:
diagram
- diagram instance- Returns:
- configurator used to create this kind of Dependency Matrix
-
getConfigurator
Returns registered configurator for this diagram- Parameters:
diagramType
- diagram type name- Returns:
- configurator used to create this kind of Dependency Matrix
-
registerConfiguration
Registers new configurator in the matrix configurator registry- Parameters:
configurator
- new registered configurator
-
getDiagramType
Diagram type of the current configurator- Returns:
- diagram type
-
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
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
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 useDependencyExtractor
In order to add custom dependency editors (add and remove dependency actions) useDependencyEditor
- Parameters:
extractors
- dependency extractor instanceseditors
- Dependency editor instances
-
getRegisteredMatrixTypes
Returns list of all dependency matrix types- Returns:
- all known dependency matrix types.
-