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

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

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

mxGraph.isConnectableEdges介绍

[英]Returns connectableEdges.
[中]返回可连接边。

代码示例

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

  1. /**
  2. * Returns true if the given cell is a valid source for new connections.
  3. * This implementation returns true for all non-null values and is
  4. * called by is called by <isValidConnection>.
  5. *
  6. * @param cell Object that represents a possible source or null.
  7. * @return Returns true if the given cell is a valid source terminal.
  8. */
  9. public boolean isValidSource(Object cell)
  10. {
  11. return (cell == null && allowDanglingEdges)
  12. || (cell != null
  13. && (!model.isEdge(cell) || isConnectableEdges()) && isCellConnectable(cell));
  14. }

代码示例来源:origin: com.github.vlsi.mxgraph/jgraphx

  1. /**
  2. * Returns true if the given cell is a valid source for new connections.
  3. * This implementation returns true for all non-null values and is
  4. * called by is called by <isValidConnection>.
  5. *
  6. * @param cell Object that represents a possible source or null.
  7. * @return Returns true if the given cell is a valid source terminal.
  8. */
  9. public boolean isValidSource(Object cell)
  10. {
  11. return (cell == null && allowDanglingEdges)
  12. || (cell != null
  13. && (!model.isEdge(cell) || isConnectableEdges()) && isCellConnectable(cell));
  14. }

代码示例来源:origin: com.github.vlsi.mxgraph/jgraphx

  1. protected Object getCell(MouseEvent e)
  2. {
  3. mxGraph graph = graphComponent.getGraph();
  4. mxIGraphModel model = graph.getModel();
  5. Object cell = super.getCell(e);
  6. if (cell == mxEdgeHandler.this.state.getCell()
  7. || (!graph.isConnectableEdges() && model.isEdge(cell)))
  8. {
  9. cell = null;
  10. }
  11. return cell;
  12. }

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

  1. protected Object getCell(MouseEvent e)
  2. {
  3. mxGraph graph = graphComponent.getGraph();
  4. mxIGraphModel model = graph.getModel();
  5. Object cell = super.getCell(e);
  6. if (cell == mxEdgeHandler.this.state.getCell()
  7. || (!graph.isConnectableEdges() && model.isEdge(cell)))
  8. {
  9. cell = null;
  10. }
  11. return cell;
  12. }

相关文章

mxGraph类方法