本文整理了Java中com.mxgraph.view.mxGraph.getEdgeValidationError()
方法的一些代码示例,展示了mxGraph.getEdgeValidationError()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。mxGraph.getEdgeValidationError()
方法的具体详情如下:
包路径:com.mxgraph.view.mxGraph
类名称:mxGraph
方法名:getEdgeValidationError
[英]Returns the validation error message to be displayed when inserting or changing an edges' connectivity. A return value of null means the edge is valid, a return value of '' means it's not valid, but do not display an error message. Any other (non-empty) string returned from this method is displayed as an error message when trying to connect an edge to a source and target. This implementation uses the multiplicities, as well as multigraph and allowDanglingEdges to generate validation errors.
[中]
代码示例来源:origin: com.github.vlsi.mxgraph/jgraphx
/**
* Checks if the return value of getEdgeValidationError for the given
* arguments is null.
*
* @param edge Cell that represents the edge to validate.
* @param source Cell that represents the source terminal.
* @param target Cell that represents the target terminal.
*/
public boolean isEdgeValid(Object edge, Object source, Object target)
{
return getEdgeValidationError(edge, source, target) == null;
}
代码示例来源:origin: org.tinyjee.jgraphx/jgraphx
/**
* Checks if the return value of getEdgeValidationError for the given
* arguments is null.
*
* @param edge Cell that represents the edge to validate.
* @param source Cell that represents the source terminal.
* @param target Cell that represents the target terminal.
*/
public boolean isEdgeValid(Object edge, Object source, Object target)
{
return getEdgeValidationError(edge, source, target) == null;
}
代码示例来源:origin: com.github.vlsi.mxgraph/jgraphx
/**
* Returns the error message or an empty string if the connection for the
* given source target pair is not valid. Otherwise it returns null.
*/
public String validateConnection(Object source, Object target)
{
return graphComponent.getGraph().getEdgeValidationError(
state.getCell(), source, target);
}
代码示例来源:origin: org.tinyjee.jgraphx/jgraphx
/**
* Returns the error message or an empty string if the connection for the
* given source target pair is not valid. Otherwise it returns null.
*/
public String validateConnection(Object source, Object target)
{
return graphComponent.getGraph().getEdgeValidationError(
state.getCell(), source, target);
}
代码示例来源:origin: org.tinyjee.jgraphx/jgraphx
/**
* Returns the error message or an empty string if the connection for the
* given source target pair is not valid. Otherwise it returns null.
*/
public String validateConnection(Object source, Object target)
{
if (target == null && createTarget)
{
return null;
}
if (!isValidTarget(target))
{
return "";
}
return graphComponent.getGraph().getEdgeValidationError(
connectPreview.getPreviewState().getCell(), source, target);
}
代码示例来源:origin: com.github.vlsi.mxgraph/jgraphx
/**
* Returns the error message or an empty string if the connection for the
* given source target pair is not valid. Otherwise it returns null.
*/
public String validateConnection(Object source, Object target)
{
if (target == null && createTarget)
{
return null;
}
if (!isValidTarget(target))
{
return "";
}
return graphComponent.getGraph().getEdgeValidationError(
connectPreview.getPreviewState().getCell(), source, target);
}
代码示例来源:origin: org.activecomponents.jadex/jadex-editor-bpmn
Object target)
String error = super.getEdgeValidationError(edge, source, target);
if (error == null)
代码示例来源:origin: org.tinyjee.jgraphx/jgraphx
String tmp = graph.getEdgeValidationError(cell,
model.getTerminal(cell, true),
model.getTerminal(cell, false));
代码示例来源:origin: com.github.vlsi.mxgraph/jgraphx
String tmp = graph.getEdgeValidationError(cell,
model.getTerminal(cell, true),
model.getTerminal(cell, false));
代码示例来源:origin: com.github.vlsi.mxgraph/jgraphx
/**
* Returns true if split is enabled and the given edge may be splitted into
* two edges with the given cell as a new terminal between the two.
*
* @param target Object that represents the edge to be splitted.
* @param cells Array of cells to add into the given edge.
* @return Returns true if the given edge may be splitted by the given
* cell.
*/
public boolean isSplitTarget(Object target, Object[] cells)
{
if (target != null && cells != null && cells.length == 1)
{
Object src = model.getTerminal(target, true);
Object trg = model.getTerminal(target, false);
return (model.isEdge(target)
&& isCellConnectable(cells[0])
&& getEdgeValidationError(target,
model.getTerminal(target, true), cells[0]) == null
&& !model.isAncestor(cells[0], src) && !model.isAncestor(
cells[0], trg));
}
return false;
}
代码示例来源:origin: org.tinyjee.jgraphx/jgraphx
/**
* Returns true if split is enabled and the given edge may be splitted into
* two edges with the given cell as a new terminal between the two.
*
* @param target Object that represents the edge to be splitted.
* @param cells Array of cells to add into the given edge.
* @return Returns true if the given edge may be splitted by the given
* cell.
*/
public boolean isSplitTarget(Object target, Object[] cells)
{
if (target != null && cells != null && cells.length == 1)
{
Object src = model.getTerminal(target, true);
Object trg = model.getTerminal(target, false);
return (model.isEdge(target)
&& isCellConnectable(cells[0])
&& getEdgeValidationError(target,
model.getTerminal(target, true), cells[0]) == null
&& !model.isAncestor(cells[0], src) && !model.isAncestor(
cells[0], trg));
}
return false;
}
代码示例来源:origin: org.tinyjee.jgraphx/jgraphx
&& getEdgeValidationError(clones[i],
model.getTerminal(clones[i], true),
model.getTerminal(clones[i], false)) != null)
代码示例来源:origin: com.github.vlsi.mxgraph/jgraphx
&& getEdgeValidationError(clones[i],
model.getTerminal(clones[i], true),
model.getTerminal(clones[i], false)) != null)
内容来源于网络,如有侵权,请联系作者删除!