Class DependencyMatrixActionRegistry
- java.lang.Object
-
- com.nomagic.magicdraw.dependencymatrix.configuration.DependencyMatrixActionRegistry
-
@OpenApiAll public class DependencyMatrixActionRegistry extends java.lang.Object
Dependency matrix action registry - manages all configurators, which configures all actions which are applicable for dependency matrix, including filter area panel, and row/column elements. Users may get instance and add additional configurators which add remove actions according to element and matrix element provided.
-
-
Field Summary
Fields Modifier and Type Field Description private static java.lang.String
CELL_CONTEXT_MENU
private static java.lang.String
COLUMN_ROW_CONTEXT_MENU
private java.util.Map<java.lang.String,java.util.List<DependencyMatrixAMConfigurator>>
dependencyMatrixAMConfigurators
Registered configuratorsprivate java.util.Map<java.lang.String,java.util.List<DependencyMatrixCellAMConfigurator>>
dependencyMatrixCellAMConfigurators
private static DependencyMatrixActionRegistry
instance
Action registry instance
-
Constructor Summary
Constructors Constructor Description DependencyMatrixActionRegistry()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addCellContextAMConfigurator(DependencyMatrixCellAMConfigurator configurator)
private static <T extends ConfiguratorWithPriority>
voidaddConfigurator(java.util.Map<java.lang.String,java.util.List<T>> configurators, java.lang.String type, T configurator)
void
addContextConfigurator(DependencyMatrixAMConfigurator configurator)
Registers new configurator for dependency matrix action registryActionsManager
configureCellContextAMConfigurator(PersistenceManager settings, DependencyMatrixSelection selection)
ActionsManager
configureContextActions(PersistenceManager settings, java.util.Collection<ElementNode> elementNodes, boolean forRow)
Creates new Action manager and configures it with all registered row/column configuratorsstatic DependencyMatrixActionRegistry
getInstance()
void
removeCellContextAMConfigurator(DependencyMatrixCellAMConfigurator configurator)
private <T extends ConfiguratorWithPriority>
voidremoveConfigurator(java.util.Map<java.lang.String,java.util.List<T>> configurators, java.lang.String type, T configurator)
void
removeContextConfigurator(DependencyMatrixAMConfigurator configurator)
Removes context configurator from the registry
-
-
-
Field Detail
-
COLUMN_ROW_CONTEXT_MENU
private static final java.lang.String COLUMN_ROW_CONTEXT_MENU
- See Also:
- Constant Field Values
-
CELL_CONTEXT_MENU
private static final java.lang.String CELL_CONTEXT_MENU
- See Also:
- Constant Field Values
-
dependencyMatrixAMConfigurators
private final java.util.Map<java.lang.String,java.util.List<DependencyMatrixAMConfigurator>> dependencyMatrixAMConfigurators
Registered configurators
-
dependencyMatrixCellAMConfigurators
private final java.util.Map<java.lang.String,java.util.List<DependencyMatrixCellAMConfigurator>> dependencyMatrixCellAMConfigurators
-
instance
private static final DependencyMatrixActionRegistry instance
Action registry instance
-
-
Method Detail
-
getInstance
public static DependencyMatrixActionRegistry getInstance()
-
addContextConfigurator
public void addContextConfigurator(DependencyMatrixAMConfigurator configurator)
Registers new configurator for dependency matrix action registry- Parameters:
configurator
- configurator
-
removeContextConfigurator
public void removeContextConfigurator(DependencyMatrixAMConfigurator configurator)
Removes context configurator from the registry- Parameters:
configurator
- configurator to remove
-
configureContextActions
public ActionsManager configureContextActions(PersistenceManager settings, java.util.Collection<ElementNode> elementNodes, boolean forRow)
Creates new Action manager and configures it with all registered row/column configurators- Parameters:
elementNodes
- describes currently selected nodes and cells in matrixforRow
- true if actions are configured for rows, false if for columnssettings
- matrix settings- Returns:
- new configured
ActionsManager
instance
-
addCellContextAMConfigurator
public void addCellContextAMConfigurator(DependencyMatrixCellAMConfigurator configurator)
-
removeCellContextAMConfigurator
public void removeCellContextAMConfigurator(DependencyMatrixCellAMConfigurator configurator)
-
configureCellContextAMConfigurator
public ActionsManager configureCellContextAMConfigurator(PersistenceManager settings, DependencyMatrixSelection selection)
-
addConfigurator
private static <T extends ConfiguratorWithPriority> void addConfigurator(java.util.Map<java.lang.String,java.util.List<T>> configurators, java.lang.String type, T configurator)
-
removeConfigurator
private <T extends ConfiguratorWithPriority> void removeConfigurator(java.util.Map<java.lang.String,java.util.List<T>> configurators, java.lang.String type, T configurator)
-
-