OSDN Git Service

rename action mask methods.
authorOlyutorskii <olyutorskii@users.osdn.me>
Thu, 19 Mar 2020 16:22:23 +0000 (01:22 +0900)
committerOlyutorskii <olyutorskii@users.osdn.me>
Thu, 19 Mar 2020 16:22:23 +0000 (01:22 +0900)
src/main/java/jp/sfjp/jindolf/Controller.java
src/main/java/jp/sfjp/jindolf/view/ActionManager.java

index 28943b9..eee1361 100644 (file)
@@ -1397,8 +1397,8 @@ public class Controller
         String landName = land.getLandDef().getLandName();
         setFrameTitle(landName);
 
-        this.actionManager.villageExpose(false);
-        this.actionManager.periodExpose(false);
+        this.actionManager.exposeVillage(false);
+        this.actionManager.exposePeriod(false);
 
         this.topView.showLandInfo(land);
 
@@ -1412,7 +1412,7 @@ public class Controller
      */
     private void selectedVillage(Village village){
         setFrameTitle(village.getVillageFullName());
-        this.actionManager.villageExpose(true);
+        this.actionManager.exposeVillage(true);
 
         Runnable task = () -> {
             try{
@@ -1693,7 +1693,7 @@ public class Controller
                 boolean hasCurrentPeriod;
                 if(periodView == null) hasCurrentPeriod = false;
                 else                   hasCurrentPeriod = true;
-                Controller.this.actionManager.periodExpose(hasCurrentPeriod);
+                Controller.this.actionManager.exposePeriod(hasCurrentPeriod);
             }
 
             return;
index 843594e..5138521 100644 (file)
@@ -191,8 +191,9 @@ public class ActionManager{
         this.menuBar       = buildMenuBar();
         this.browseToolBar = buildBrowseToolBar();
 
-        villageExposeImpl(false);
-        periodExposeImpl(false);
+        exposeVillageImpl(false);
+        exposeVillageLocalImpl(false);
+        exposePeriodImpl(false);
 
         return;
     }
@@ -530,8 +531,8 @@ public class ActionManager{
      *
      * @param appear 表示されているときはtrue
      */
-    private void periodExposeImpl(boolean appear){
-        if(appear) villageExposeImpl(appear);
+    private void exposePeriodImpl(boolean appear){
+        if(appear) exposeVillageImpl(appear);
 
         this.menuEdit.setEnabled(appear);
         this.menuDay .setEnabled(appear);
@@ -549,8 +550,8 @@ public class ActionManager{
      *
      * @param appear 表示されているときはtrue
      */
-    public void periodExpose(boolean appear){
-        periodExposeImpl(appear);
+    public void exposePeriod(boolean appear){
+        exposePeriodImpl(appear);
         return;
     }
 
@@ -559,8 +560,8 @@ public class ActionManager{
      *
      * @param appear 表示されているときはtrue
      */
-    private void villageExposeImpl(boolean appear){
-        if( ! appear) periodExposeImpl(appear);
+    private void exposeVillageImpl(boolean appear){
+        if( ! appear) exposePeriodImpl(appear);
 
         this.menuVillage.setEnabled(appear);
 
@@ -572,8 +573,38 @@ public class ActionManager{
      *
      * @param appear 表示されているときはtrue
      */
-    public void villageExpose(boolean appear){
-        villageExposeImpl(appear);
+    public void exposeVillage(boolean appear){
+        exposeVillageImpl(appear);
+        return;
+    }
+
+    /**
+     * ローカルXML村が選択表示されている状況か通知を受ける。
+     *
+     * <p>単一および全日程Periodの強制読み込みが抑止される。
+     *
+     * @param appear 表示されているときはtrue
+     */
+    private void exposeVillageLocalImpl(boolean appear){
+        if( ! appear) exposePeriodImpl(appear);
+
+        this.menuVillage.setEnabled(appear);
+
+        getMenuItem(CMD_RELOAD).setEnabled(appear);
+        getMenuItem(CMD_ALLPERIOD).setEnabled(appear);
+
+        getToolButton(CMD_RELOAD).setEnabled(appear);
+
+        return;
+    }
+
+    /**
+     * ローカルXML村が選択表示されている状況か通知を受ける。
+     *
+     * @param appear 表示されているときはtrue
+     */
+    public void exposeVillageLocal(boolean appear){
+        exposeVillageLocalImpl(appear);
         return;
     }