diff --git a/AlgebraicDataflowArchitectureModel/src/application/editor/Stage.java b/AlgebraicDataflowArchitectureModel/src/application/editor/Stage.java index 8eb198e..1107278 100644 --- a/AlgebraicDataflowArchitectureModel/src/application/editor/Stage.java +++ b/AlgebraicDataflowArchitectureModel/src/application/editor/Stage.java @@ -64,9 +64,9 @@ } /** - * Enable or disable only the specified layer (layerNo) + * Enable or disable the specified layer (layerNo) */ - public void setEnabledForLayer(final int layerNo, final boolean isEnable){ + public void setLayerEnabled(final int layerNo, final boolean isEnable){ mxCell rootCell = (mxCell) graph.getDefaultParent(); if(rootCell == null) return; if(rootCell.getChildCount() <= 0) return; @@ -76,9 +76,9 @@ } /** - * After hiding all layers, show only the specified ones (argsOfLayers) + * Show the specified layers only (argsOfLayers) */ - public void showOnlyLayer(final int... argsOfLayers){ + public void showLayers(final int... argsOfLayers){ mxCell rootCell = (mxCell) graph.getDefaultParent(); if(rootCell == null) return; if(rootCell.getChildCount() <= 0) return; diff --git a/AlgebraicDataflowArchitectureModel/src/application/editor/stages/PushPullSelectionStage.java b/AlgebraicDataflowArchitectureModel/src/application/editor/stages/PushPullSelectionStage.java index 9ba5b43..081dc71 100644 --- a/AlgebraicDataflowArchitectureModel/src/application/editor/stages/PushPullSelectionStage.java +++ b/AlgebraicDataflowArchitectureModel/src/application/editor/stages/PushPullSelectionStage.java @@ -37,7 +37,7 @@ if (prevStage instanceof DataFlowModelingStage) { model = prevStage.getModel(); dataFlowGraph = analyzeDataTransferModel(model); - showOnlyLayer(DATA_FLOW_LAYER); + showLayers(DATA_FLOW_LAYER); } } diff --git a/AlgebraicDataflowArchitectureModel/src/application/views/FlowLayerWindow.java b/AlgebraicDataflowArchitectureModel/src/application/views/FlowLayerWindow.java index ae2749a..cca4aac 100644 --- a/AlgebraicDataflowArchitectureModel/src/application/views/FlowLayerWindow.java +++ b/AlgebraicDataflowArchitectureModel/src/application/views/FlowLayerWindow.java @@ -26,35 +26,35 @@ stage = Editor.STAGE_PUSH_PULL_SELECTION; - //ボタンの追加 + // Add check boxes. dataFlowCheckBox = new JCheckBox("Data-Flow", false); pushFlowCheckBox = new JCheckBox("Push-Flow", true); pullFlowCheckBox = new JCheckBox("Pull-Flow", true); - // 各Viewにイベントハンドラを追加 + // Add handlers to the check boxes. dataFlowCheckBox.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { - stage.setEnabledForLayer(Stage.DATA_FLOW_LAYER, dataFlowCheckBox.isSelected()); + stage.setLayerEnabled(Stage.DATA_FLOW_LAYER, dataFlowCheckBox.isSelected()); }}); pushFlowCheckBox.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { - stage.setEnabledForLayer(Stage.PUSH_FLOW_LAYER, pushFlowCheckBox.isSelected()); + stage.setLayerEnabled(Stage.PUSH_FLOW_LAYER, pushFlowCheckBox.isSelected()); }}); pullFlowCheckBox.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { - stage.setEnabledForLayer(Stage.PULL_FLOW_LAYER, pullFlowCheckBox.isSelected()); + stage.setLayerEnabled(Stage.PULL_FLOW_LAYER, pullFlowCheckBox.isSelected()); }}); dataFlowCheckBox.setEnabled(false); pushFlowCheckBox.setEnabled(false); pullFlowCheckBox.setEnabled(false); - // レイヤーのパネルレイアウトの初期化. + // Initialize the layer panel layout. Container panel = getContentPane(); panel.setLayout(new GridLayout(/*low*/4, /*col*/1)); panel.add(dataFlowCheckBox); @@ -68,7 +68,7 @@ } /** - * When the stage changes, toggle the active state of layer visibility buttons + * Toggle the activation of layer check boxes whenever the current stage changes. */ @Override public void stageChanged(Stage newStage) { @@ -76,7 +76,7 @@ pushFlowCheckBox.setEnabled(false); pullFlowCheckBox.setEnabled(false); - newStage.setEnabledForLayer(Stage.PUSH_FLOW_LAYER, false); - newStage.setEnabledForLayer(Stage.PULL_FLOW_LAYER, false); + newStage.setLayerEnabled(Stage.PUSH_FLOW_LAYER, false); + newStage.setLayerEnabled(Stage.PULL_FLOW_LAYER, false); } }