Class DependencyMatrixConfigurator
- java.lang.Object
-
- com.nomagic.magicdraw.dependencymatrix.configuration.DependencyMatrixConfigurator
-
@OpenApiAll public class DependencyMatrixConfigurator extends java.lang.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 Summary
Fields Modifier and Type Field Description static java.lang.String
DEFAULT_DEPENDENCY_MATRIX_DIAGRAM_TYPE
Default dependency matrix diagram typeprivate java.lang.String
mDiagramType
Reference to the full matrix configurator
-
Constructor Summary
Constructors Constructor Description DependencyMatrixConfigurator(java.lang.String diagramType)
create new instance of the configurator
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
configureDependencyHandlers(java.util.Collection<DependencyExtractor> extractors, java.util.Collection<DependencyEditor> editors)
Creates Matrix Dependency handlers, which are responsible for extracting and editing dependencies shown in the matrixjavax.swing.table.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.javax.swing.table.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.javax.swing.table.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.static DependencyMatrixConfigurator
getConfigurator(Diagram diagram)
Returns registered configurator for this diagramstatic DependencyMatrixConfigurator
getConfigurator(java.lang.String diagramType)
Returns registered configurator for this diagramjava.lang.String
getDiagramType()
Diagram type of the current configuratorstatic java.util.Collection<java.lang.String>
getRegisteredMatrixTypes()
Returns list of all dependency matrix typesstatic void
registerConfiguration(DependencyMatrixConfigurator configurator)
Registers new configurator in the matrix configurator registry
-
-
-
Field Detail
-
DEFAULT_DEPENDENCY_MATRIX_DIAGRAM_TYPE
public static final java.lang.String DEFAULT_DEPENDENCY_MATRIX_DIAGRAM_TYPE
Default dependency matrix diagram type- See Also:
- Constant Field Values
-
mDiagramType
private final java.lang.String mDiagramType
Reference to the full matrix configurator
-
-
Method Detail
-
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(java.lang.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 java.lang.String getDiagramType()
Diagram type of the current configurator- Returns:
- diagram type
-
createTableCellRenderer
public javax.swing.table.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 javax.swing.table.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 javax.swing.table.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(java.util.Collection<DependencyExtractor> extractors, java.util.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
public static java.util.Collection<java.lang.String> getRegisteredMatrixTypes()
Returns list of all dependency matrix types- Returns:
- all known dependency matrix types.
-
-