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

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

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

mxGraph.isSwimlane介绍

[英]Returns true if the given cell is a swimlane. This implementation always returns false.
[中]如果给定单元格是泳道,则返回true。这个实现总是返回false。

代码示例

代码示例来源:origin: Activiti/Activiti

  1. /**
  2. * Returns a boolean indicating if the given <em>mxCell</em> should be ignored as a vertex. This returns true if the cell has no connections.
  3. *
  4. * @param vertex
  5. * Object that represents the vertex to be tested.
  6. * @return Returns true if the vertex should be ignored.
  7. */
  8. public boolean isVertexIgnored(Object vertex) {
  9. return super.isVertexIgnored(vertex) || graph.isSwimlane(vertex) || graph.getModel().getGeometry(vertex).isRelative() || graph.getConnections(vertex).length == 0;
  10. }

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

  1. /**
  2. * Returns true if the given swimlane should be ignored.
  3. */
  4. protected boolean isSwimlaneIgnored(Object swimlane)
  5. {
  6. return !getGraph().isSwimlane(swimlane);
  7. }

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

  1. /**
  2. * Returns true if the given swimlane should be ignored.
  3. */
  4. protected boolean isSwimlaneIgnored(Object swimlane)
  5. {
  6. return !getGraph().isSwimlane(swimlane);
  7. }

代码示例来源:origin: org.flowable/flowable-bpmn-layout

  1. /**
  2. * Returns a boolean indicating if the given <mxCell> should be ignored as a vertex. This returns true if the cell has no connections.
  3. *
  4. * @param vertex
  5. * Object that represents the vertex to be tested.
  6. * @return Returns true if the vertex should be ignored.
  7. */
  8. @Override
  9. public boolean isVertexIgnored(Object vertex) {
  10. return super.isVertexIgnored(vertex) || graph.isSwimlane(vertex) || graph.getModel().getGeometry(vertex).isRelative() || graph.getConnections(vertex).length == 0;
  11. }

代码示例来源:origin: com.bbossgroups.activiti/activiti-bpmn-layout

  1. /**
  2. * Returns a boolean indicating if the given <mxCell> should be ignored as a vertex. This returns true if the cell
  3. * has no connections.
  4. *
  5. * @param vertex
  6. * Object that represents the vertex to be tested.
  7. * @return Returns true if the vertex should be ignored.
  8. */
  9. public boolean isVertexIgnored(Object vertex) {
  10. return super.isVertexIgnored(vertex) || graph.isSwimlane(vertex) || graph.getModel().getGeometry(vertex).isRelative()
  11. || graph.getConnections(vertex).length == 0;
  12. }

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

  1. /**
  2. * Returns true if the given cell is a valid drop target for the specified
  3. * cells. This returns true if the cell is a swimlane, has children and is
  4. * not collapsed, or if splitEnabled is true and isSplitTarget returns
  5. * true for the given arguments
  6. *
  7. * @param cell Object that represents the possible drop target.
  8. * @param cells Objects that are going to be dropped.
  9. * @return Returns true if the cell is a valid drop target for the given
  10. * cells.
  11. */
  12. public boolean isValidDropTarget(Object cell, Object[] cells)
  13. {
  14. return cell != null
  15. && ((isSplitEnabled() && isSplitTarget(cell, cells)) || (!model
  16. .isEdge(cell) && (isSwimlane(cell) || (model
  17. .getChildCount(cell) > 0 && !isCellCollapsed(cell)))));
  18. }

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

  1. /**
  2. * Returns true if the given cell is a valid drop target for the specified
  3. * cells. This returns true if the cell is a swimlane, has children and is
  4. * not collapsed, or if splitEnabled is true and isSplitTarget returns
  5. * true for the given arguments
  6. *
  7. * @param cell Object that represents the possible drop target.
  8. * @param cells Objects that are going to be dropped.
  9. * @return Returns true if the cell is a valid drop target for the given
  10. * cells.
  11. */
  12. public boolean isValidDropTarget(Object cell, Object[] cells)
  13. {
  14. return cell != null
  15. && ((isSplitEnabled() && isSplitTarget(cell, cells)) || (!model
  16. .isEdge(cell) && (isSwimlane(cell) || (model
  17. .getChildCount(cell) > 0 && !isCellCollapsed(cell)))));
  18. }

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

  1. /**
  2. * Returns true if the given cell is horizontal. If the given cell is not a
  3. * swimlane, then the <horizontal> value is returned.
  4. */
  5. protected boolean isCellHorizontal(Object cell)
  6. {
  7. if (graph.isSwimlane(cell))
  8. {
  9. mxCellState state = graph.getView().getState(cell);
  10. Map<String, Object> style = (state != null) ? state.getStyle()
  11. : graph.getCellStyle(cell);
  12. return mxUtils.isTrue(style, mxConstants.STYLE_HORIZONTAL, true);
  13. }
  14. return !isHorizontal();
  15. }

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

  1. /**
  2. * Returns true if the given cell is horizontal. If the given cell is not a
  3. * swimlane, then the <horizontal> value is returned.
  4. */
  5. protected boolean isCellHorizontal(Object cell)
  6. {
  7. if (graph.isSwimlane(cell))
  8. {
  9. mxCellState state = graph.getView().getState(cell);
  10. Map<String, Object> style = (state != null) ? state.getStyle()
  11. : graph.getCellStyle(cell);
  12. return mxUtils.isTrue(style, mxConstants.STYLE_HORIZONTAL, true);
  13. }
  14. return !isHorizontal();
  15. }

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

  1. int y = (int) source.getCenterY() - imgHeight / 2;
  2. if (graphComponent.getGraph().isSwimlane(source.getCell()))

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

  1. int y = (int) source.getCenterY() - imgHeight / 2;
  2. if (graphComponent.getGraph().isSwimlane(source.getCell()))

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

  1. if (isSwimlane(cell))

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

  1. double h = g.getHeight();
  2. if (isSwimlane(parent))

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

  1. double h = g.getHeight();
  2. if (isSwimlane(parent))

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

  1. /**
  2. * Returns the bounds to be used for the given group and children. This
  3. * implementation computes the bounding box of the geometries of all
  4. * vertices in the given children array. Edges are ignored. If the group
  5. * cell is a swimlane the title region is added to the bounds.
  6. */
  7. public mxRectangle getBoundsForGroup(Object group, Object[] children,
  8. double border)
  9. {
  10. mxRectangle result = getBoundingBoxFromGeometry(children);
  11. if (result != null)
  12. {
  13. if (isSwimlane(group))
  14. {
  15. mxRectangle size = getStartSize(group);
  16. result.setX(result.getX() - size.getWidth());
  17. result.setY(result.getY() - size.getHeight());
  18. result.setWidth(result.getWidth() + size.getWidth());
  19. result.setHeight(result.getHeight() + size.getHeight());
  20. }
  21. // Adds the border
  22. result.setX(result.getX() - border);
  23. result.setY(result.getY() - border);
  24. result.setWidth(result.getWidth() + 2 * border);
  25. result.setHeight(result.getHeight() + 2 * border);
  26. }
  27. return result;
  28. }

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

  1. /**
  2. * Returns the bounds to be used for the given group and children. This
  3. * implementation computes the bounding box of the geometries of all
  4. * vertices in the given children array. Edges are ignored. If the group
  5. * cell is a swimlane the title region is added to the bounds.
  6. */
  7. public mxRectangle getBoundsForGroup(Object group, Object[] children,
  8. double border)
  9. {
  10. mxRectangle result = getBoundingBoxFromGeometry(children);
  11. if (result != null)
  12. {
  13. if (isSwimlane(group))
  14. {
  15. mxRectangle size = getStartSize(group);
  16. result.setX(result.getX() - size.getWidth());
  17. result.setY(result.getY() - size.getHeight());
  18. result.setWidth(result.getWidth() + size.getWidth());
  19. result.setHeight(result.getHeight() + size.getHeight());
  20. }
  21. // Adds the border
  22. result.setX(result.getX() - border);
  23. result.setY(result.getY() - border);
  24. result.setWidth(result.getWidth() + 2 * border);
  25. result.setHeight(result.getHeight() + 2 * border);
  26. }
  27. return result;
  28. }

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

  1. mxRectangle tmp = (graph.isSwimlane(current)) ?
  2. graph.getStartSize(current) :
  3. new mxRectangle();

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

  1. if (this.graph.isSwimlane(group))

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

  1. if (this.graph.isSwimlane(group))

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

  1. && childBounds.getHeight() > 0)
  2. mxRectangle size = (isSwimlane(cells[i])) ? getStartSize(cells[i])
  3. : new mxRectangle();

相关文章

mxGraph类方法