本文整理了Java中com.mxgraph.view.mxGraph.addEdge()
方法的一些代码示例,展示了mxGraph.addEdge()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。mxGraph.addEdge()
方法的具体详情如下:
包路径:com.mxgraph.view.mxGraph
类名称:mxGraph
方法名:addEdge
[英]Adds the edge to the parent and connects it to the given source and target terminals. This is a shortcut method.
[中]将边添加到父端子,并将其连接到给定的源端子和目标端子。这是一种快捷方式。
代码示例来源:origin: com.github.vlsi.mxgraph/jgraphx
/**
* Adds a new edge into the given parent using value as the user object and
* the given source and target as the terminals of the new edge. The Id and
* style are used for the respective properties of the new cell, which is
* returned.
*
* @param parent Cell that specifies the parent of the new edge.
* @param id Optional string that defines the Id of the new edge.
* @param value Object to be used as the user object.
* @param source Cell that defines the source of the edge.
* @param target Cell that defines the target of the edge.
* @param style Optional string that defines the cell style.
* @return Returns the new edge that has been inserted.
*/
public Object insertEdge(Object parent, String id, Object value,
Object source, Object target, String style)
{
Object edge = createEdge(parent, id, value, source, target, style);
return addEdge(edge, parent, source, target, null);
}
代码示例来源:origin: org.tinyjee.jgraphx/jgraphx
/**
* Adds a new edge into the given parent using value as the user object and
* the given source and target as the terminals of the new edge. The Id and
* style are used for the respective properties of the new cell, which is
* returned.
*
* @param parent Cell that specifies the parent of the new edge.
* @param id Optional string that defines the Id of the new edge.
* @param value Object to be used as the user object.
* @param source Cell that defines the source of the edge.
* @param target Cell that defines the target of the edge.
* @param style Optional string that defines the cell style.
* @return Returns the new edge that has been inserted.
*/
public Object insertEdge(Object parent, String id, Object value,
Object source, Object target, String style)
{
Object edge = createEdge(parent, id, value, source, target, style);
return addEdge(edge, parent, source, target, null);
}
内容来源于网络,如有侵权,请联系作者删除!