private final ChangeListener filterWatcher =
new FilterWatcher();
+ private boolean isLocalXml = false;
+
private final Executor executor = Executors.newCachedThreadPool();
private volatile boolean isBusyNow;
return;
}
EventQueue.invokeLater(() -> {
+ this.isLocalXml = true;
selectedVillage(village);
});
}, "XML読み込み中", "XML読み込み完了");
*/
private void selectedVillage(Village village){
setFrameTitle(village.getVillageFullName());
- this.actionManager.exposeVillage(true);
+ if(this.isLocalXml){
+ this.actionManager.exposeVillageLocal(true);
+ }else{
+ this.actionManager.exposeVillage(true);
+ }
Runnable task = () -> {
try{
if(periodView == null) hasCurrentPeriod = false;
else hasCurrentPeriod = true;
Controller.this.actionManager.exposePeriod(hasCurrentPeriod);
+ if(hasCurrentPeriod){
+ if(Controller.this.isLocalXml){
+ Controller.this.actionManager.exposeVillageLocal(hasCurrentPeriod);
+ }else{
+ Controller.this.actionManager.exposeVillage(hasCurrentPeriod);
+ }
+ }
}
return;
selectedLand(land);
}else if(selObj instanceof Village){
Village village = (Village) selObj;
+ Controller.this.isLocalXml = false;
selectedVillage(village);
}
}
/**
- * Periodã\81\8cé\81¸æ\8a\9e表示ã\81\95ã\82\8cã\81¦ã\81\84ã\82\8bç\8a¶æ³\81ã\81\8bé\80\9aç\9f¥ã\82\92å\8f\97ã\81\91る。
+ * Periodã\81®é\81¸æ\8a\9e表示ç\8a¶æ³\81ã\81«å¿\9cã\81\98ã\81¦UIã\82\92ã\83\9eã\82¹ã\82¯ã\81\99る。
*
- * @param appear 表示されているときはtrue
+ * @param appear Periodタブが選択されているときはtrue
*/
private void exposePeriodImpl(boolean appear){
- if(appear) exposeVillageImpl(appear);
-
this.menuEdit.setEnabled(appear);
this.menuDay .setEnabled(appear);
}
/**
- * Periodã\81\8cé\81¸æ\8a\9e表示ã\81\95ã\82\8cã\81¦ã\81\84ã\82\8bç\8a¶æ³\81ã\81\8bé\80\9aç\9f¥ã\82\92å\8f\97ã\81\91る。
+ * Periodã\81®é\81¸æ\8a\9e表示ç\8a¶æ³\81ã\81«å¿\9cã\81\98ã\81¦UIã\82\92ã\83\9eã\82¹ã\82¯ã\81\99る。
*
- * @param appear 表示されているときはtrue
+ * @param appear Periodタブが選択されているときはtrue
*/
public void exposePeriod(boolean appear){
exposePeriodImpl(appear);
}
/**
- * æ\9d\91ã\81\8cé\81¸æ\8a\9e表示ã\81\95ã\82\8cã\81¦ã\81\84ã\82\8bç\8a¶æ³\81ã\81\8bé\80\9aç\9f¥ã\82\92å\8f\97ã\81\91る。
+ * æ\9d\91ã\83\84ã\83ªã\83¼ã\81®é\81¸æ\8a\9e表示ç\8a¶æ³\81ã\81«å¿\9cã\81\98ã\81¦UIã\82\92ã\83\9eã\82¹ã\82¯ã\81\99る。
*
- * @param appear 表示されているときはtrue
+ * @param appear 村ノードが選択されているときはtrue
*/
private void exposeVillageImpl(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;
}
/**
- * æ\9d\91ã\81\8cé\81¸æ\8a\9e表示ã\81\95ã\82\8cã\81¦ã\81\84ã\82\8bç\8a¶æ³\81ã\81\8bé\80\9aç\9f¥ã\82\92å\8f\97ã\81\91る。
+ * æ\9d\91ã\83\84ã\83ªã\83¼ã\81®é\81¸æ\8a\9e表示ç\8a¶æ³\81ã\81«å¿\9cã\81\98ã\81¦UIã\82\92ã\83\9eã\82¹ã\82¯ã\81\99る。
*
- * @param appear 表示されているときはtrue
+ * @param appear 村ノードが選択されているときはtrue
*/
public void exposeVillage(boolean appear){
exposeVillageImpl(appear);
}
/**
- * ã\83ã\83¼ã\82«ã\83«XMLæ\9d\91ã\81\8cé\81¸æ\8a\9e表示ã\81\95ã\82\8cã\81¦ã\81\84ã\82\8bç\8a¶æ³\81ã\81\8bé\80\9aç\9f¥ã\82\92å\8f\97ã\81\91る。
+ * ã\83ã\83¼ã\82«ã\83«XMLæ\9d\91ã\81®è¡¨ç¤ºç\8a¶æ³\81ã\81«å¿\9cã\81\98ã\81¦UIã\82\92ã\83\9eã\82¹ã\82¯ã\81\99る。
*
* <p>単一および全日程Periodの強制読み込みが抑止される。
*
- * @param appear 表示されているときはtrue
+ * @param appear ローカルXMLが表示されているときはtrue
*/
private void exposeVillageLocalImpl(boolean appear){
- if( ! appear) exposePeriodImpl(appear);
-
this.menuVillage.setEnabled(appear);
- getMenuItem(CMD_RELOAD).setEnabled(appear);
- getMenuItem(CMD_ALLPERIOD).setEnabled(appear);
+ getMenuItem(CMD_RELOAD) .setEnabled( ! appear);
+ getMenuItem(CMD_ALLPERIOD) .setEnabled( ! appear);
- getToolButton(CMD_RELOAD).setEnabled(appear);
+ getToolButton(CMD_RELOAD) .setEnabled( ! appear);
return;
}
/**
- * ローカルXML村が選択表示されている状況か通知を受ける。
+ * ローカルXML村の表示状況に応じてUIをマスクする。
+ *
+ * <p>単一および全日程Periodの強制読み込みが抑止される。
*
- * @param appear 表示されているときはtrue
+ * @param appear ローカルXMLが表示されているときはtrue
*/
public void exposeVillageLocal(boolean appear){
exposeVillageLocalImpl(appear);