com.mxgraph.view.mxGraph.isPort()方法的使用及代码示例

x33g5p2x  于2022-01-25 转载在 其他  
字(1.2k)|赞(0)|评价(0)|浏览(109)

本文整理了Java中com.mxgraph.view.mxGraph.isPort()方法的一些代码示例,展示了mxGraph.isPort()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。mxGraph.isPort()方法的具体详情如下:
包路径:com.mxgraph.view.mxGraph
类名称:mxGraph
方法名:isPort

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

  1. if (isPort(terminal) && terminal instanceof mxICell)

代码示例来源:origin: org.tinyjee.jgraphx/jgraphx

  1. if (isPort(terminal) && terminal instanceof mxICell)

相关文章

mxGraph类方法