本文整理了Java中com.mxgraph.view.mxGraph.isCellConnectable()
方法的一些代码示例,展示了mxGraph.isCellConnectable()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。mxGraph.isCellConnectable()
方法的具体详情如下:
包路径:com.mxgraph.view.mxGraph
类名称:mxGraph
方法名:isCellConnectable
[英]Returns true if the given cell is connectable in this graph. This implementation uses . Subclassers can override this to implement specific connectable states for cells in only one graph, that is, without affecting the connectable state of the cell in the model.
[中]如果给定单元格在此图中可连接,则返回true。此实现使用。子类可以覆盖该属性,只在一个图中为单元实现特定的可连接状态,也就是说,不影响模型中单元的可连接状态。
代码示例来源:origin: com.github.vlsi.mxgraph/jgraphx
/**
* Returns true if the given cell is a valid source for new connections.
* This implementation returns true for all non-null values and is
* called by is called by <isValidConnection>.
*
* @param cell Object that represents a possible source or null.
* @return Returns true if the given cell is a valid source terminal.
*/
public boolean isValidSource(Object cell)
{
return (cell == null && allowDanglingEdges)
|| (cell != null
&& (!model.isEdge(cell) || isConnectableEdges()) && isCellConnectable(cell));
}
代码示例来源:origin: org.tinyjee.jgraphx/jgraphx
/**
* Returns true if the given cell is a valid source for new connections.
* This implementation returns true for all non-null values and is
* called by is called by <isValidConnection>.
*
* @param cell Object that represents a possible source or null.
* @return Returns true if the given cell is a valid source terminal.
*/
public boolean isValidSource(Object cell)
{
return (cell == null && allowDanglingEdges)
|| (cell != null
&& (!model.isEdge(cell) || isConnectableEdges()) && isCellConnectable(cell));
}
代码示例来源: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;
}
内容来源于网络,如有侵权,请联系作者删除!