本文整理了Java中com.mxgraph.view.mxGraph.isPort()
方法的一些代码示例,展示了mxGraph.isPort()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。mxGraph.isPort()
方法的具体详情如下:
包路径:com.mxgraph.view.mxGraph
类名称:mxGraph
方法名:isPort
[英]Returns true if the given cell is a "port", that is, when connecting to it, the cell returned by getTerminalForPort should be used as the terminal and the port should be referenced by the ID in either the mxConstants.STYLE_SOURCE_PORT or the or the mxConstants.STYLE_TARGET_PORT. Note that a port should not be movable. This implementation always returns false. A typical implementation of this method looks as follows: public boolean isPort(Object cell) { mxGeometry geo = getCellGeometry(cell); return (geo != null) ? geo.isRelative() : false; }
[中]如果给定单元格是“端口”,则返回true,也就是说,当连接到它时,getTerminalForPort返回的单元格应该用作终端,并且端口应该由两个MX常量中的ID引用。STYLE_SOURCE_PORT或或mxConstants。样式_目标_端口。请注意,端口不应是可移动的。这个实现总是返回false。此方法的典型实现如下所示:public boolean isPort(Object cell) { mxGeometry geo = getCellGeometry(cell); return (geo != null) ? geo.isRelative() : false; }
代码示例来源:origin: com.github.vlsi.mxgraph/jgraphx
if (isPort(terminal) && terminal instanceof mxICell)
代码示例来源:origin: org.tinyjee.jgraphx/jgraphx
if (isPort(terminal) && terminal instanceof mxICell)
内容来源于网络,如有侵权,请联系作者删除!