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); }
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); }
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); }
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); }
/** * 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()); }
/** * 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()); }
stylesheet.setDefaultVertexStyle(nodeStyle); graph.setStylesheet(stylesheet);