1
2
3
4
5
6 package net.kwfgrid.gwui.graphviz;
7
8 import net.kwfgrid.gwui.graphview.*;
9
10 import de.fzi.wim.guibase.graphview.view.*;
11
12 import java.awt.*;
13
14 /***
15 Converter that converts a WorkflowGraph into graphviz' dot language.
16 The implementation is rather simple at the moment as we are only interested
17 in the layout information.
18 */
19 public class WorkflowGraph2DOTConverter2 extends WorkflowGraph2DOTConverter {
20 protected Dimension _transitionsize, _placesize;
21
22 /***
23 Constructor for a converter with fixed node sizes.
24 */
25 public WorkflowGraph2DOTConverter2(Dimension transitionsize, Dimension placesize) {
26 super();
27 _pane = null;
28 _placesize = placesize;
29 _transitionsize = transitionsize;
30 }
31
32 protected void getNodeSize(PlaceNode node, Rectangle bounds) {
33 bounds.setSize(_placesize);
34 }
35
36 protected void getNodeSize(TransitionNode node, Rectangle bounds) {
37 bounds.setSize(_transitionsize);
38 }
39 }
40