Optional string that specifies the attributename to be passed to mxUtils.isNode to check if the rule applies to a cell.
Defines the maximum number of connections for which this rule applies.
Defines the minimum number of connections for which this rule applies.
Boolean that specifies if the rule is applied to the source or target terminal of an edge.
Defines the type of the source or target terminal. The type is a string passed to mxUtils.isNode together with the source or target vertex value as the first argument.
Holds the localized error message to be displayed if the type of the neighbor for a connection does not match the rule.
Holds an array of strings that specify the type of neighbor for which this rule applies. The strings are used in Cell.is on the opposite terminal to check if the rule applies to the connection.
Boolean indicating if the list of validNeighbors are those that are allowed for this rule or those that are not allowed for this rule.
Optional string that specifies the value of the attribute to be passed to mxUtils.isNode to check if the rule applies to a cell.
Checks the multiplicity for the given arguments and returns the error for the given connection or null if the multiplicity does not apply.
Reference to the enclosing graph instance.
mxCell that represents the edge to validate.
mxCell that represents the source terminal.
mxCell that represents the target terminal.
Number of outgoing edges from the source terminal.
Number of incoming edges for the target terminal.
Checks if there are any valid neighbours in validNeighbors. This is only called if validNeighbors is a non-empty array.
Multiplicity
Defines invalid connections along with the error messages that they produce. To add or remove rules on a graph, you must add/remove instances of this class to graph.multiplicities.
Example
Defines a rule where each rectangle must be connected to no more than 2 circles and no other types of targets are allowed.