Skip to content

Commit

Permalink
Worked on rendering of BPMN as dot (style as in Signavio)
Browse files Browse the repository at this point in the history
  • Loading branch information
delas committed Nov 12, 2018
1 parent 0a1a8ba commit 96e1318
Show file tree
Hide file tree
Showing 8 changed files with 23 additions and 30 deletions.
3 changes: 2 additions & 1 deletion libPlgVisualizer/src/plg/visualizer/model/DotModel.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ public DotModel(Process model) {
this.model = model;

// setOption("splines", "ortho");
// setOption("nodesep", "0.5");
// setOption("nodesep", "1.0");
// setOption("sep", "+4");
setOption("rankdir", "LR");

realize();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public class DotDataObjectConnection extends DotEdge {
public DotDataObjectConnection(DotNode source, DotNode target) {
super(source, target);

setOption("color", "#666666");
setOption("color", "#303030");
setOption("style", "dashed");
setOption("arrowhead", "open");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@ public class DotSequence extends DotEdge {
public DotSequence(DotNode source, DotNode target) {
super(source, target);

setOption("color", "#5a677b");
setOption("color", "#303030");
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
public class DotDataObject extends DotNode {

public DotDataObject(DataObject node) {
super(node.getName(), null);
super(null, null);

setSelectable(true);

Expand All @@ -21,9 +21,11 @@ public DotDataObject(DataObject node) {
setOption("height", "0.5");
setOption("style", "filled");
setOption("fillcolor", "#ffffff");
setOption("color", "#666666");
setOption("fontcolor", "#666666");
setOption("color", "#303030");
setOption("fontcolor", "#303030");
setOption("fontname", "sans-serif");

setLabel("<<table border='0'><tr><td width='80'>" + node.getName() + "</td></tr></table>>");
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,8 @@ public DotEndEvent() {
setSelectable(true);

setOption("shape", "circle");
setOption("style", "filled");
setOption("fillcolor", "#e46e60:#ffc5c1");
setOption("gradientangle", "270");
setOption("color", "#630000");
setOption("width", ".3");
setOption("fontcolor", "#630000");
setOption("fontcolor", "#000000");
setOption("fontname", "sans-serif");
setOption("fontsize", "12.0");
setOption("penwidth", "2");
Expand Down
12 changes: 4 additions & 8 deletions libPlgVisualizer/src/plg/visualizer/model/nodes/DotGateway.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,21 +18,17 @@ public DotGateway(TYPE type) {
setSelectable(true);

setOption("shape", "diamond");
setOption("style", "filled");
setOption("width", "0.4");
setOption("height", "0.4");
setOption("fontsize", "20");
setOption("fillcolor", "#ffff84:#ffffbd");
setOption("gradientangle", "270");
setOption("color", "#a6a855");
setOption("fontcolor", "#708041");
setOption("fontsize", "30");
setOption("fontcolor", "#000000");
setOption("fontname", "sans-serif");
setOption("fixedsize", "true");

if (TYPE.PARALLEL.equals(type)) {
setLabel("+");
setLabel("<<table border='0'><tr><td></td></tr><tr><td valign='top'><font point-size='5' color='white'>_</font>+</td></tr></table>>");
} else {
setLabel("&times;");
setLabel("<<table border='0'><tr><td></td></tr><tr><td valign='top'><font point-size='7.5' color='white'>_</font>&times;</td></tr></table>>");
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,8 @@ public DotStartEvent() {
setSelectable(true);

setOption("shape", "circle");
setOption("style", "filled");
setOption("fillcolor", "#5dbd5a:#bafcc2");
setOption("gradientangle", "270");
setOption("color", "#20962f");
setOption("width", ".3");
setOption("fontcolor", "#20962f");
setOption("fontcolor", "#000000");
setOption("fontname", "sans-serif");
setOption("fontsize", "12.0");
setOption("penwidth", "2");
Expand Down
14 changes: 8 additions & 6 deletions libPlgVisualizer/src/plg/visualizer/model/nodes/DotTask.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,21 @@
public class DotTask extends DotNode {

public DotTask(String label) {
super(label, null);
super(null, null);

setSelectable(true);

setOption("shape", "box");
setOption("style", "rounded,filled");
setOption("fillcolor", "#cedeef:#ffffff");
setOption("gradientangle", "270");
setOption("color", "#5a677b");
setOption("fillcolor", "#ffffff:#ffffcb");
setOption("gradientangle", "300");
setOption("color", "#303030");
setOption("width", "0.5");
setOption("fontcolor", "#5a677b");
setOption("fontcolor", "#303030");
setOption("fontname", "sans-serif");
setOption("fontsize", "14.0");
setOption("fontsize", "12");
setOption("penwidth", "1");

setLabel("<<table border='0'><tr><td height='30'>" + label + "</td></tr></table>>");
}
}

0 comments on commit 96e1318

Please sign in to comment.