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

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

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

mxGraph.isCellDisconnectable介绍

[英]Returns true if the given cell is disconnectable from the source or target terminal. This returns for all given cells if does not return true for the given cell.
[中]如果给定单元格可与源或目标终端断开连接,则返回true。如果给定单元格未返回true,则返回所有给定单元格。

代码示例

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

  1. /**
  2. *
  3. */
  4. public void mousePressed(MouseEvent e)
  5. {
  6. super.mousePressed(e);
  7. boolean source = isSource(index);
  8. if (source || isTarget(index))
  9. {
  10. mxGraph graph = graphComponent.getGraph();
  11. mxIGraphModel model = graph.getModel();
  12. Object terminal = model.getTerminal(state.getCell(), source);
  13. if ((terminal == null && !graph.isTerminalPointMovable(
  14. state.getCell(), source))
  15. || (terminal != null && !graph.isCellDisconnectable(
  16. state.getCell(), terminal, source)))
  17. {
  18. first = null;
  19. }
  20. }
  21. }

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

  1. /**
  2. *
  3. */
  4. public void mousePressed(MouseEvent e)
  5. {
  6. super.mousePressed(e);
  7. boolean source = isSource(index);
  8. if (source || isTarget(index))
  9. {
  10. mxGraph graph = graphComponent.getGraph();
  11. mxIGraphModel model = graph.getModel();
  12. Object terminal = model.getTerminal(state.getCell(), source);
  13. if ((terminal == null && !graph.isTerminalPointMovable(
  14. state.getCell(), source))
  15. || (terminal != null && !graph.isCellDisconnectable(
  16. state.getCell(), terminal, source)))
  17. {
  18. first = null;
  19. }
  20. }
  21. }

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

  1. /**
  2. *
  3. */
  4. protected Color getHandleFillColor(int index)
  5. {
  6. boolean source = isSource(index);
  7. if (source || isTarget(index))
  8. {
  9. mxGraph graph = graphComponent.getGraph();
  10. Object terminal = graph.getModel().getTerminal(state.getCell(),
  11. source);
  12. if (terminal == null
  13. && !graphComponent.getGraph().isTerminalPointMovable(
  14. state.getCell(), source))
  15. {
  16. return mxSwingConstants.LOCKED_HANDLE_FILLCOLOR;
  17. }
  18. else if (terminal != null)
  19. {
  20. return (graphComponent.getGraph().isCellDisconnectable(
  21. state.getCell(), terminal, source)) ? mxSwingConstants.CONNECT_HANDLE_FILLCOLOR
  22. : mxSwingConstants.LOCKED_HANDLE_FILLCOLOR;
  23. }
  24. }
  25. return super.getHandleFillColor(index);
  26. }

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

  1. /**
  2. *
  3. */
  4. protected Color getHandleFillColor(int index)
  5. {
  6. boolean source = isSource(index);
  7. if (source || isTarget(index))
  8. {
  9. mxGraph graph = graphComponent.getGraph();
  10. Object terminal = graph.getModel().getTerminal(state.getCell(),
  11. source);
  12. if (terminal == null
  13. && !graphComponent.getGraph().isTerminalPointMovable(
  14. state.getCell(), source))
  15. {
  16. return mxSwingConstants.LOCKED_HANDLE_FILLCOLOR;
  17. }
  18. else if (terminal != null)
  19. {
  20. return (graphComponent.getGraph().isCellDisconnectable(
  21. state.getCell(), terminal, source)) ? mxSwingConstants.CONNECT_HANDLE_FILLCOLOR
  22. : mxSwingConstants.LOCKED_HANDLE_FILLCOLOR;
  23. }
  24. }
  25. return super.getHandleFillColor(index);
  26. }

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

  1. && isCellDisconnectable(cells[i], src,
  2. true))
  3. && isCellDisconnectable(cells[i], trg,
  4. false))

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

  1. && isCellDisconnectable(cells[i], src,
  2. true))
  3. && isCellDisconnectable(cells[i], trg,
  4. false))

相关文章

mxGraph类方法