|
mxGraph 2.5.0.3 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.mxgraph.view.mxMultiplicity
public class mxMultiplicity
Field Summary | |
---|---|
protected String |
attr
Optional string that specifies the attributename to be passed to mxCell.is to check if the rule applies to a cell. |
protected String |
countError
Holds the localized error message to be displayed if the number of connections for which the rule applies is smaller than min or greater than max. |
protected String |
max
Defines the maximum number of connections for which this rule applies. |
protected int |
min
Defines the minimum number of connections for which this rule applies. |
protected boolean |
source
Boolean that specifies if the rule is applied to the source or target terminal of an edge. |
protected String |
type
Defines the type of the source or target terminal. |
protected String |
typeError
Holds the localized error message to be displayed if the type of the neighbor for a connection does not match the rule. |
protected Collection<String> |
validNeighbors
Holds an array of strings that specify the type of neighbor for which this rule applies. |
protected boolean |
validNeighborsAllowed
Boolean indicating if the list of validNeighbors are those that are allowed for this rule or those that are not allowed for this rule. |
protected String |
value
Optional string that specifies the value of the attribute to be passed to mxCell.is to check if the rule applies to a cell. |
Constructor Summary | |
---|---|
mxMultiplicity(boolean source,
String type,
String attr,
String value,
int min,
String max,
Collection<String> validNeighbors,
String countError,
String typeError,
boolean validNeighborsAllowed)
|
Method Summary | |
---|---|
String |
check(mxGraph graph,
Object edge,
Object source,
Object target,
int sourceOut,
int targetIn)
Function: check Checks the multiplicity for the given arguments and returns the error for the given connection or null if the multiplicity does not apply. |
boolean |
checkNeighbors(mxGraph graph,
Object edge,
Object source,
Object target)
Checks the type of the given value. |
boolean |
checkTerminal(mxGraph graph,
Object terminal,
Object edge)
Checks the type of the given value. |
boolean |
checkType(mxGraph graph,
Object value,
String type)
Checks the type of the given value. |
boolean |
checkType(mxGraph graph,
Object value,
String type,
String attr,
String attrValue)
Checks the type of the given value. |
int |
getMaxValue()
Returns the numeric value of max. |
boolean |
isUnlimited()
Returns true if max is "n" (unlimited). |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected String type
protected String attr
protected String value
protected boolean source
protected int min
protected String max
protected Collection<String> validNeighbors
protected boolean validNeighborsAllowed
protected String countError
protected String typeError
Constructor Detail |
---|
public mxMultiplicity(boolean source, String type, String attr, String value, int min, String max, Collection<String> validNeighbors, String countError, String typeError, boolean validNeighborsAllowed)
Method Detail |
---|
public String check(mxGraph graph, Object edge, Object source, Object target, int sourceOut, int targetIn)
public boolean checkNeighbors(mxGraph graph, Object edge, Object source, Object target)
public boolean checkTerminal(mxGraph graph, Object terminal, Object edge)
public boolean checkType(mxGraph graph, Object value, String type)
public boolean checkType(mxGraph graph, Object value, String type, String attr, String attrValue)
public boolean isUnlimited()
public int getMaxValue()
|
mxGraph 2.5.0.3 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |