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

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

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

mxGraph.postProcessCellStyle介绍

[英]Tries to resolve the value for the image style in the image bundles and turns short data URIs as defined in mxImageBundle to data URIs as defined in RFC 2397 of the IETF.
[中]尝试解析图像束中图像样式的值,并将mxImageBundle中定义的短数据URI转换为IETF的RFC 2397中定义的数据URI。

代码示例

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

  1. /**
  2. * Returns an array of key, value pairs representing the cell style for the
  3. * given cell. If no string is defined in the model that specifies the
  4. * style, then the default style for the cell is returned or <EMPTY_ARRAY>,
  5. * if not style can be found.
  6. *
  7. * @param cell Cell whose style should be returned.
  8. * @return Returns the style of the cell.
  9. */
  10. public Map<String, Object> getCellStyle(Object cell)
  11. {
  12. Map<String, Object> style = (model.isEdge(cell)) ? stylesheet
  13. .getDefaultEdgeStyle() : stylesheet.getDefaultVertexStyle();
  14. String name = model.getStyle(cell);
  15. if (name != null)
  16. {
  17. style = postProcessCellStyle(stylesheet.getCellStyle(name, style));
  18. }
  19. if (style == null)
  20. {
  21. style = mxStylesheet.EMPTY_STYLE;
  22. }
  23. return style;
  24. }

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

  1. /**
  2. * Returns an array of key, value pairs representing the cell style for the
  3. * given cell. If no string is defined in the model that specifies the
  4. * style, then the default style for the cell is returned or <EMPTY_ARRAY>,
  5. * if not style can be found.
  6. *
  7. * @param cell Cell whose style should be returned.
  8. * @return Returns the style of the cell.
  9. */
  10. public Map<String, Object> getCellStyle(Object cell)
  11. {
  12. Map<String, Object> style = (model.isEdge(cell)) ? stylesheet
  13. .getDefaultEdgeStyle() : stylesheet.getDefaultVertexStyle();
  14. String name = model.getStyle(cell);
  15. if (name != null)
  16. {
  17. style = postProcessCellStyle(stylesheet.getCellStyle(name, style));
  18. }
  19. if (style == null)
  20. {
  21. style = mxStylesheet.EMPTY_STYLE;
  22. }
  23. return style;
  24. }

相关文章

mxGraph类方法