diff --git a/AlgebraicDataflowArchitectureModel/src/application/SimulatorWindow.java b/AlgebraicDataflowArchitectureModel/src/application/SimulatorWindow.java index 47b8303..301ab81 100644 --- a/AlgebraicDataflowArchitectureModel/src/application/SimulatorWindow.java +++ b/AlgebraicDataflowArchitectureModel/src/application/SimulatorWindow.java @@ -146,12 +146,12 @@ int h = 30; ResourcePath res = resNode.getResourceIdentifier(); Object resource = graph.insertVertex(parent, null, - res.getLeafResourceName(), x, y, w, h, + res.toString(), x, y, w, h, "shape=ellipse;perimeter=ellipsePerimeter;verticalAlign=top;"); // insert a resource as a vertex resources.put(resNode, resource); createChildSimulateResourceVerticies(resource, resNode, resources, w, h); x+=80; - } + } } finally { graph.getModel().endUpdate(); @@ -168,12 +168,16 @@ for (Resource childNode: resNode.getChildren()) { ResourcePath childRes = childNode.getResourceIdentifier(); Object childResource = graph.insertVertex(resource, null, - childRes.getName(), 0, 0, w/2, h/2, + childRes.toString(), 0, 0, w/2, h/2, "shape=ellipse;perimeter=ellipsePerimeter;verticalAlign=top;"); // insert a resource as a vertex resources.put(childNode, childResource); createChildSimulateResourceVerticies(childResource, childNode, resources, w, h); } } + if (resNode.getChildren() == null || resNode.getChildren().size() == 0) { + Object state = graph.insertVertex(resource, null, + resNode.getState().getValue().toString(), 0.5, 0.5, 0.25, 0.25, "opacity=0;", true); // insert a state label as a vertex + } } public mxGraphComponent getGraphComponent() {