diff --git a/AlgebraicDataflowArchitectureModel/src/application/editor/stages/ControlFlowModelingStage.java b/AlgebraicDataflowArchitectureModel/src/application/editor/stages/ControlFlowModelingStage.java index 359c677..69383fe 100644 --- a/AlgebraicDataflowArchitectureModel/src/application/editor/stages/ControlFlowModelingStage.java +++ b/AlgebraicDataflowArchitectureModel/src/application/editor/stages/ControlFlowModelingStage.java @@ -27,6 +27,12 @@ public final int PORT_DIAMETER = 8; public final int PORT_RADIUS = PORT_DIAMETER / 2; + public static final int RESOURCE_NODE_WIDTH = 240; + public static final int RESOURCE_NODE_HEIGHT = 120; + + public static final int EVENT_CHANNEL_NODE_WIDTH = 120; + public static final int EVENT_CHANNEL_NODE_HEIGHT = 60; + private ControlFlowGraph controlFlowGraph = null; public ControlFlowModelingStage(mxGraphComponent graphComponent) { @@ -133,7 +139,6 @@ graph.getModel().beginUpdate(); try { - // Rootのレイヤー以下のPUSH/PULLレイヤーを削除. root.remove(root.getChildAt(PULL_FLOW_LAYER)); root.remove(root.getChildAt(PUSH_FLOW_LAYER)); @@ -167,8 +172,8 @@ for (ResourceNode rootNode : controlFlowGraph.getDataFlowGraph().getRootResourceNodes()) { ResourcePath rootResourcePath = rootNode.getPrimaryResourcePath(); - int width = 240; - int height = 120; + int width = RESOURCE_NODE_WIDTH; + int height = RESOURCE_NODE_HEIGHT; mxCell insertedCell = (mxCell) graph.insertVertex(layerCell, null, rootResourcePath.getLeafResourceName(), 20, 20, width, height, "shape=ellipse;perimeter=ellipsePerimeter;verticalAlign=top"); // insert a resource as a vertex resourceNodeCells.put(rootNode, insertedCell); @@ -221,7 +226,7 @@ final Map outputChannelNodeCells = new HashMap<>(); for (ChannelNode rootChannelNode : controlFlowGraph.getDataFlowGraph().getRootChannelNodes()) { - createEventChannelNodeCell(graph, layerCell, rootChannelNode, channelNodeCells, outputChannelNodeCells, 120, 60); + createEventChannelNodeCell(graph, layerCell, rootChannelNode, channelNodeCells, outputChannelNodeCells, EVENT_CHANNEL_NODE_WIDTH, EVENT_CHANNEL_NODE_HEIGHT); } return channelNodeCells; }