diff --git a/AlgebraicDataflowArchitectureModel/src/application/editor/Stage.java b/AlgebraicDataflowArchitectureModel/src/application/editor/Stage.java index 664f8db..44ac06e 100644 --- a/AlgebraicDataflowArchitectureModel/src/application/editor/Stage.java +++ b/AlgebraicDataflowArchitectureModel/src/application/editor/Stage.java @@ -67,9 +67,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; @@ -79,9 +79,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 79382c5..b8f3bd2 100644 --- a/AlgebraicDataflowArchitectureModel/src/application/editor/stages/PushPullSelectionStage.java +++ b/AlgebraicDataflowArchitectureModel/src/application/editor/stages/PushPullSelectionStage.java @@ -38,7 +38,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 e9d1b06..7cc743c 100644 --- a/AlgebraicDataflowArchitectureModel/src/application/views/FlowLayerWindow.java +++ b/AlgebraicDataflowArchitectureModel/src/application/views/FlowLayerWindow.java @@ -30,29 +30,29 @@ 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); dependencyCheckBox = new JCheckBox("Dependency", false); - // 各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()); }}); dependencyCheckBox.addActionListener(new ActionListener() { @@ -66,7 +66,7 @@ pullFlowCheckBox.setEnabled(false); dependencyCheckBox.setEnabled(false); - // レイヤーのパネルレイアウトの初期化. + // Initialize the layer panel layout. Container panel = getContentPane(); panel.setLayout(new GridLayout(/*low*/4, /*col*/1)); panel.add(dataFlowCheckBox); @@ -81,7 +81,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) {