本文整理了Java中com.mxgraph.view.mxGraph.setStylesheet()
方法的一些代码示例,展示了mxGraph.setStylesheet()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。mxGraph.setStylesheet()
方法的具体详情如下:
包路径:com.mxgraph.view.mxGraph
类名称:mxGraph
方法名:setStylesheet
[英]Sets the stylesheet that provides the style.
[中]设置提供样式的样式表。
代码示例来源:origin: org.opensingular/singular-requirement-module
private static void style(mxGraph graph) {
final mxStylesheet foo = new mxStylesheet();
final Map<String, Object> stil = new HashMap<>();
stil.put(mxConstants.STYLE_ROUNDED, Boolean.TRUE);
stil.put(mxConstants.STYLE_EDGE, mxConstants.EDGESTYLE_ORTHOGONAL);
stil.put(mxConstants.STYLE_SHAPE, mxConstants.SHAPE_CONNECTOR);
stil.put(mxConstants.STYLE_ENDARROW, mxConstants.ARROW_CLASSIC);
stil.put(mxConstants.STYLE_ALIGN, mxConstants.ALIGN_CENTER);
stil.put(mxConstants.STYLE_VERTICAL_LABEL_POSITION, mxConstants.ALIGN_BOTTOM);
stil.put(mxConstants.STYLE_VERTICAL_ALIGN, mxConstants.ALIGN_BOTTOM);
stil.put(mxConstants.STYLE_STROKECOLOR, "#6482B9");
stil.put(mxConstants.STYLE_FONTCOLOR, "#446299");
foo.setDefaultEdgeStyle(stil);
addStyleIcon(foo, "TIMER", "timer.png");
addStyleIcon(foo, "END", "terminate.png");
addStyleIcon(foo, "MESSAGE", "message_intermediate.png");
addStyleIcon(foo, "START", "start.png");
addStyleIcon(foo, "JAVA", "gear.png");
addStyleIcon(foo, "HUMAN", "pessoinha.png");
graph.setStylesheet(foo);
}
代码示例来源:origin: org.opensingular/singular-requirement-commons
private static void style(mxGraph graph) {
final mxStylesheet foo = new mxStylesheet();
final Map<String, Object> stil = new HashMap<>();
stil.put(mxConstants.STYLE_ROUNDED, Boolean.TRUE);
stil.put(mxConstants.STYLE_EDGE, mxConstants.EDGESTYLE_ORTHOGONAL);
stil.put(mxConstants.STYLE_SHAPE, mxConstants.SHAPE_CONNECTOR);
stil.put(mxConstants.STYLE_ENDARROW, mxConstants.ARROW_CLASSIC);
stil.put(mxConstants.STYLE_ALIGN, mxConstants.ALIGN_CENTER);
stil.put(mxConstants.STYLE_VERTICAL_LABEL_POSITION, mxConstants.ALIGN_BOTTOM);
stil.put(mxConstants.STYLE_VERTICAL_ALIGN, mxConstants.ALIGN_BOTTOM);
stil.put(mxConstants.STYLE_STROKECOLOR, "#6482B9");
stil.put(mxConstants.STYLE_FONTCOLOR, "#446299");
foo.setDefaultEdgeStyle(stil);
addStyleIcon(foo, "TIMER", "timer.png");
addStyleIcon(foo, "END", "terminate.png");
addStyleIcon(foo, "MESSAGE", "message_intermediate.png");
addStyleIcon(foo, "START", "start.png");
addStyleIcon(foo, "JAVA", "gear.png");
addStyleIcon(foo, "HUMAN", "pessoinha.png");
graph.setStylesheet(foo);
}
代码示例来源:origin: org.opensingular/server-commons
private static void style(mxGraph graph) {
final mxStylesheet foo = new mxStylesheet();
final Map<String, Object> stil = new HashMap<>();
stil.put(mxConstants.STYLE_ROUNDED, true);
stil.put(mxConstants.STYLE_EDGE, mxConstants.EDGESTYLE_ENTITY_RELATION);
stil.put(mxConstants.STYLE_SHAPE, mxConstants.SHAPE_CONNECTOR);
stil.put(mxConstants.STYLE_ENDARROW, mxConstants.ARROW_CLASSIC);
stil.put(mxConstants.STYLE_VERTICAL_ALIGN, mxConstants.ALIGN_MIDDLE);
stil.put(mxConstants.STYLE_ALIGN, mxConstants.ALIGN_CENTER);
stil.put(mxConstants.STYLE_STROKECOLOR, "#6482B9");
stil.put(mxConstants.STYLE_FONTCOLOR, "#446299");
foo.setDefaultEdgeStyle(stil);
addStyleIcone(foo, "TIMER", "timer.png");
addStyleIcone(foo, "END", "terminate.png");
addStyleIcone(foo, "MESSAGE", "message_intermediate.png");
addStyleIcone(foo, "START", "event.png");
addStyleIcone(foo, "JAVA", "gear.png");
graph.setStylesheet(foo);
}
代码示例来源:origin: org.opensingular/singular-server-commons
private static void style(mxGraph graph) {
final mxStylesheet foo = new mxStylesheet();
final Map<String, Object> stil = new HashMap<>();
stil.put(mxConstants.STYLE_ROUNDED, Boolean.TRUE);
stil.put(mxConstants.STYLE_EDGE, mxConstants.EDGESTYLE_ORTHOGONAL);
stil.put(mxConstants.STYLE_SHAPE, mxConstants.SHAPE_CONNECTOR);
stil.put(mxConstants.STYLE_ENDARROW, mxConstants.ARROW_CLASSIC);
stil.put(mxConstants.STYLE_ALIGN, mxConstants.ALIGN_CENTER);
stil.put(mxConstants.STYLE_VERTICAL_LABEL_POSITION, mxConstants.ALIGN_BOTTOM);
stil.put(mxConstants.STYLE_VERTICAL_ALIGN, mxConstants.ALIGN_BOTTOM);
stil.put(mxConstants.STYLE_STROKECOLOR, "#6482B9");
stil.put(mxConstants.STYLE_FONTCOLOR, "#446299");
foo.setDefaultEdgeStyle(stil);
addStyleIcon(foo, "TIMER", "timer.png");
addStyleIcon(foo, "END", "terminate.png");
addStyleIcon(foo, "MESSAGE", "message_intermediate.png");
addStyleIcon(foo, "START", "start.png");
addStyleIcon(foo, "JAVA", "gear.png");
addStyleIcon(foo, "HUMAN", "pessoinha.png");
graph.setStylesheet(foo);
}
代码示例来源:origin: com.github.vlsi.mxgraph/jgraphx
/**
* Constructs a new graph for the specified model. If no model is
* specified, then a new, empty {@link com.mxgraph.model.mxGraphModel} is
* used.
*
* @param model Model that contains the graph data
*/
public mxGraph(mxIGraphModel model, mxStylesheet stylesheet)
{
selectionModel = createSelectionModel();
setModel((model != null) ? model : new mxGraphModel());
setStylesheet((stylesheet != null) ? stylesheet : createStylesheet());
setView(createGraphView());
}
代码示例来源:origin: org.tinyjee.jgraphx/jgraphx
/**
* Constructs a new graph for the specified model. If no model is
* specified, then a new, empty {@link com.mxgraph.model.mxGraphModel} is
* used.
*
* @param model Model that contains the graph data
*/
public mxGraph(mxIGraphModel model, mxStylesheet stylesheet)
{
selectionModel = createSelectionModel();
setModel((model != null) ? model : new mxGraphModel());
setStylesheet((stylesheet != null) ? stylesheet : createStylesheet());
setView(createGraphView());
}
代码示例来源:origin: SmartDataAnalytics/DL-Learner
stylesheet.setDefaultVertexStyle(nodeStyle);
graph.setStylesheet(stylesheet);
内容来源于网络,如有侵权,请联系作者删除!