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

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

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

mxGraph.foldCells介绍

[英]Sets the collapsed state of the selection cells without recursion. This is a shortcut method.
[中]设置选择单元格的折叠状态,而不进行递归。这是一种快捷方式。

代码示例

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

  1. /**
  2. * Sets the collapsed state of the selection cells without recursion.
  3. * This is a shortcut method.
  4. *
  5. * @param collapse Boolean that specifies the collapsed state to be
  6. * assigned.
  7. * @return Returns the cells whose collapsed state was changed.
  8. */
  9. public Object[] foldCells(boolean collapse)
  10. {
  11. return foldCells(collapse, false);
  12. }

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

  1. /**
  2. * Invokes foldCells with checkFoldable set to false.
  3. */
  4. public Object[] foldCells(boolean collapse, boolean recurse, Object[] cells)
  5. {
  6. return foldCells(collapse, recurse, cells, false);
  7. }

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

  1. /**
  2. * Sets the collapsed state of the selection cells. This is a shortcut
  3. * method.
  4. *
  5. * @param collapse Boolean that specifies the collapsed state to be
  6. * assigned.
  7. * @param recurse Boolean that specifies if the collapsed state should
  8. * be assigned to all descendants.
  9. * @return Returns the cells whose collapsed state was changed.
  10. */
  11. public Object[] foldCells(boolean collapse, boolean recurse)
  12. {
  13. return foldCells(collapse, recurse, null);
  14. }

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

  1. /**
  2. * Invokes foldCells with checkFoldable set to false.
  3. */
  4. public Object[] foldCells(boolean collapse, boolean recurse, Object[] cells)
  5. {
  6. return foldCells(collapse, recurse, cells, false);
  7. }

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

  1. /**
  2. * Sets the collapsed state of the selection cells without recursion.
  3. * This is a shortcut method.
  4. *
  5. * @param collapse Boolean that specifies the collapsed state to be
  6. * assigned.
  7. * @return Returns the cells whose collapsed state was changed.
  8. */
  9. public Object[] foldCells(boolean collapse)
  10. {
  11. return foldCells(collapse, false);
  12. }

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

  1. /**
  2. * Sets the collapsed state of the selection cells. This is a shortcut
  3. * method.
  4. *
  5. * @param collapse Boolean that specifies the collapsed state to be
  6. * assigned.
  7. * @param recurse Boolean that specifies if the collapsed state should
  8. * be assigned to all descendants.
  9. * @return Returns the cells whose collapsed state was changed.
  10. */
  11. public Object[] foldCells(boolean collapse, boolean recurse)
  12. {
  13. return foldCells(collapse, recurse, null);
  14. }

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

  1. /**
  2. *
  3. */
  4. public void actionPerformed(ActionEvent e)
  5. {
  6. mxGraph graph = getGraph(e);
  7. if (graph != null)
  8. {
  9. boolean collapse = getValue(Action.NAME).toString()
  10. .equalsIgnoreCase("collapse");
  11. graph.foldCells(collapse);
  12. }
  13. }

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

  1. /**
  2. *
  3. */
  4. public void actionPerformed(ActionEvent e)
  5. {
  6. mxGraph graph = getGraph(e);
  7. if (graph != null)
  8. {
  9. boolean collapse = getValue(Action.NAME).toString()
  10. .equalsIgnoreCase("collapse");
  11. graph.foldCells(collapse);
  12. }
  13. }

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

  1. /**
  2. *
  3. */
  4. protected void fold(Object cell)
  5. {
  6. boolean collapse = !graphComponent.getGraph().isCellCollapsed(cell);
  7. graphComponent.getGraph().foldCells(collapse, false,
  8. new Object[] { cell });
  9. }

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

  1. /**
  2. *
  3. */
  4. protected void fold(Object cell)
  5. {
  6. boolean collapse = !graphComponent.getGraph().isCellCollapsed(cell);
  7. graphComponent.getGraph().foldCells(collapse, false,
  8. new Object[] { cell });
  9. }

相关文章

mxGraph类方法