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

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

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

mxGraph.isCellLocked介绍

[英]Returns true if the given cell may not be moved, sized, bended, disconnected, edited or selected. This implementation returns true for all vertices with a relative geometry if cellsLocked is false.
[中]如果给定单元格可能未移动、调整大小、弯曲、断开连接、编辑或选择,则返回true。如果cellsLocked为false,则对于具有相对几何体的所有顶点,此实现将返回true。

代码示例

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

  1. /**
  2. * Returns true if the given cell is disconnectable from the source or
  3. * target terminal. This returns <disconnectable> for all given cells if
  4. * <isLocked> does not return true for the given cell.
  5. *
  6. * @param cell <mxCell> whose disconnectable state should be returned.
  7. * @param terminal <mxCell> that represents the source or target terminal.
  8. * @param source Boolean indicating if the source or target terminal is to be
  9. * disconnected.
  10. * @return Returns true if the given edge can be disconnected from the given
  11. * terminal.
  12. */
  13. public boolean isCellDisconnectable(Object cell, Object terminal,
  14. boolean source)
  15. {
  16. return isCellsDisconnectable() && !isCellLocked(cell);
  17. }

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

  1. /**
  2. * Returns true if the given cell is disconnectable from the source or
  3. * target terminal. This returns <disconnectable> for all given cells if
  4. * <isLocked> does not return true for the given cell.
  5. *
  6. * @param cell <mxCell> whose disconnectable state should be returned.
  7. * @param terminal <mxCell> that represents the source or target terminal.
  8. * @param source Boolean indicating if the source or target terminal is to be
  9. * disconnected.
  10. * @return Returns true if the given edge can be disconnected from the given
  11. * terminal.
  12. */
  13. public boolean isCellDisconnectable(Object cell, Object terminal,
  14. boolean source)
  15. {
  16. return isCellsDisconnectable() && !isCellLocked(cell);
  17. }

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

  1. /**
  2. * Returns true if the given edges's label is moveable. This returns
  3. * <movable> for all given cells if <isLocked> does not return true
  4. * for the given cell.
  5. *
  6. * @param cell <mxCell> whose label should be moved.
  7. * @return Returns true if the label of the given cell is movable.
  8. */
  9. public boolean isLabelMovable(Object cell)
  10. {
  11. return !isCellLocked(cell)
  12. && ((model.isEdge(cell) && isEdgeLabelsMovable()) || (model
  13. .isVertex(cell) && isVertexLabelsMovable()));
  14. }

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

  1. /**
  2. * Returns true if the given edges's label is moveable. This returns
  3. * <movable> for all given cells if <isLocked> does not return true
  4. * for the given cell.
  5. *
  6. * @param cell <mxCell> whose label should be moved.
  7. * @return Returns true if the label of the given cell is movable.
  8. */
  9. public boolean isLabelMovable(Object cell)
  10. {
  11. return !isCellLocked(cell)
  12. && ((model.isEdge(cell) && isEdgeLabelsMovable()) || (model
  13. .isVertex(cell) && isVertexLabelsMovable()));
  14. }

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

  1. /**
  2. * Returns true if the given cell is movable. This implementation returns editable.
  3. *
  4. * @param cell Cell whose editable state should be returned.
  5. * @return Returns true if the cell is editable.
  6. */
  7. public boolean isCellEditable(Object cell)
  8. {
  9. mxCellState state = view.getState(cell);
  10. Map<String, Object> style = (state != null) ? state.getStyle()
  11. : getCellStyle(cell);
  12. return isCellsEditable() && !isCellLocked(cell)
  13. && mxUtils.isTrue(style, mxConstants.STYLE_EDITABLE, true);
  14. }

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

  1. /**
  2. * Returns true if the given cell is bendable. This implementation returns
  3. * bendable. This is used in mxElbowEdgeHandler to determine if the middle
  4. * handle should be shown.
  5. *
  6. * @param cell Cell whose bendable state should be returned.
  7. * @return Returns true if the cell is bendable.
  8. */
  9. public boolean isCellBendable(Object cell)
  10. {
  11. mxCellState state = view.getState(cell);
  12. Map<String, Object> style = (state != null) ? state.getStyle()
  13. : getCellStyle(cell);
  14. return isCellsBendable() && !isCellLocked(cell)
  15. && mxUtils.isTrue(style, mxConstants.STYLE_BENDABLE, true);
  16. }

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

  1. /**
  2. * Returns true if the given cell is movable. This implementation returns editable.
  3. *
  4. * @param cell Cell whose editable state should be returned.
  5. * @return Returns true if the cell is editable.
  6. */
  7. public boolean isCellEditable(Object cell)
  8. {
  9. mxCellState state = view.getState(cell);
  10. Map<String, Object> style = (state != null) ? state.getStyle()
  11. : getCellStyle(cell);
  12. return isCellsEditable() && !isCellLocked(cell)
  13. && mxUtils.isTrue(style, mxConstants.STYLE_EDITABLE, true);
  14. }

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

  1. /**
  2. * Returns true if the given cell is movable. This implementation
  3. * returns movable.
  4. *
  5. * @param cell Cell whose movable state should be returned.
  6. * @return Returns true if the cell is movable.
  7. */
  8. public boolean isCellMovable(Object cell)
  9. {
  10. mxCellState state = view.getState(cell);
  11. Map<String, Object> style = (state != null) ? state.getStyle()
  12. : getCellStyle(cell);
  13. return isCellsMovable() && !isCellLocked(cell)
  14. && mxUtils.isTrue(style, mxConstants.STYLE_MOVABLE, true);
  15. }

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

  1. /**
  2. * Returns true if the given cell is resizable. This implementation returns
  3. * cellsSizable for all cells.
  4. *
  5. * @param cell Cell whose resizable state should be returned.
  6. * @return Returns true if the cell is sizable.
  7. */
  8. public boolean isCellResizable(Object cell)
  9. {
  10. mxCellState state = view.getState(cell);
  11. Map<String, Object> style = (state != null) ? state.getStyle()
  12. : getCellStyle(cell);
  13. return isCellsResizable() && !isCellLocked(cell)
  14. && mxUtils.isTrue(style, mxConstants.STYLE_RESIZABLE, true);
  15. }

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

  1. /**
  2. * Returns true if the given cell is movable. This implementation
  3. * returns movable.
  4. *
  5. * @param cell Cell whose movable state should be returned.
  6. * @return Returns true if the cell is movable.
  7. */
  8. public boolean isCellMovable(Object cell)
  9. {
  10. mxCellState state = view.getState(cell);
  11. Map<String, Object> style = (state != null) ? state.getStyle()
  12. : getCellStyle(cell);
  13. return isCellsMovable() && !isCellLocked(cell)
  14. && mxUtils.isTrue(style, mxConstants.STYLE_MOVABLE, true);
  15. }

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

  1. /**
  2. * Returns true if the given cell is resizable. This implementation returns
  3. * cellsSizable for all cells.
  4. *
  5. * @param cell Cell whose resizable state should be returned.
  6. * @return Returns true if the cell is sizable.
  7. */
  8. public boolean isCellResizable(Object cell)
  9. {
  10. mxCellState state = view.getState(cell);
  11. Map<String, Object> style = (state != null) ? state.getStyle()
  12. : getCellStyle(cell);
  13. return isCellsResizable() && !isCellLocked(cell)
  14. && mxUtils.isTrue(style, mxConstants.STYLE_RESIZABLE, true);
  15. }

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

  1. /**
  2. * Returns true if the given cell is bendable. This implementation returns
  3. * bendable. This is used in mxElbowEdgeHandler to determine if the middle
  4. * handle should be shown.
  5. *
  6. * @param cell Cell whose bendable state should be returned.
  7. * @return Returns true if the cell is bendable.
  8. */
  9. public boolean isCellBendable(Object cell)
  10. {
  11. mxCellState state = view.getState(cell);
  12. Map<String, Object> style = (state != null) ? state.getStyle()
  13. : getCellStyle(cell);
  14. return isCellsBendable() && !isCellLocked(cell)
  15. && mxUtils.isTrue(style, mxConstants.STYLE_BENDABLE, true);
  16. }

相关文章

mxGraph类方法