OSDN Git Service

rename LandsModel to LandsTreeModel.
authorOlyutorskii <olyutorskii@users.osdn.me>
Mon, 9 Mar 2020 02:49:58 +0000 (11:49 +0900)
committerOlyutorskii <olyutorskii@users.osdn.me>
Mon, 9 Mar 2020 02:49:58 +0000 (11:49 +0900)
src/main/java/jp/sfjp/jindolf/Controller.java
src/main/java/jp/sfjp/jindolf/JindolfMain.java
src/main/java/jp/sfjp/jindolf/data/LandsTreeModel.java [moved from src/main/java/jp/sfjp/jindolf/data/LandsModel.java with 99% similarity]
src/main/java/jp/sfjp/jindolf/view/AccountPanel.java
src/main/java/jp/sfjp/jindolf/view/LandsTree.java

index 3a2165a..1790211 100644 (file)
@@ -49,7 +49,7 @@ import jp.sfjp.jindolf.config.OptionInfo;
 import jp.sfjp.jindolf.data.Anchor;
 import jp.sfjp.jindolf.data.DialogPref;
 import jp.sfjp.jindolf.data.Land;
-import jp.sfjp.jindolf.data.LandsModel;
+import jp.sfjp.jindolf.data.LandsTreeModel;
 import jp.sfjp.jindolf.data.Period;
 import jp.sfjp.jindolf.data.RegexPattern;
 import jp.sfjp.jindolf.data.Talk;
@@ -105,7 +105,7 @@ public class Controller
             "このLook&Feel[{0}]を生成する事ができません。";
 
 
-    private final LandsModel model;
+    private final LandsTreeModel model;
     private final WindowManager windowManager;
     private final ActionManager actionManager;
     private final AppSetting appSetting;
@@ -131,7 +131,7 @@ public class Controller
      * @param setting アプリ設定
      */
     @SuppressWarnings("LeakingThisInConstructor")
-    public Controller(LandsModel model,
+    public Controller(LandsTreeModel model,
                       WindowManager windowManager,
                       ActionManager actionManager,
                       AppSetting setting){
index 972ac20..2485ce3 100644 (file)
@@ -21,7 +21,7 @@ import jp.sfjp.jindolf.config.CmdOption;
 import jp.sfjp.jindolf.config.ConfigStore;
 import jp.sfjp.jindolf.config.EnvInfo;
 import jp.sfjp.jindolf.config.OptionInfo;
-import jp.sfjp.jindolf.data.LandsModel;
+import jp.sfjp.jindolf.data.LandsTreeModel;
 import jp.sfjp.jindolf.log.LogUtils;
 import jp.sfjp.jindolf.log.LoggingDispatcher;
 import jp.sfjp.jindolf.util.GUIUtils;
@@ -311,7 +311,7 @@ public final class JindolfMain {
      * @return アプリケーションのトップフレーム
      */
     private static JFrame buildMVC(AppSetting appSetting){
-        LandsModel model = new LandsModel();
+        LandsTreeModel model = new LandsTreeModel();
         WindowManager windowManager = new WindowManager();
         ActionManager actionManager = new ActionManager();
 
@@ -32,7 +32,7 @@ import org.xml.sax.SAXException;
  * 国一覧と村一覧を管理。
  * JTreeのモデルも兼用。
  */
-public class LandsModel implements TreeModel{ // ComboBoxModelも付けるか?
+public class LandsTreeModel implements TreeModel{ // ComboBoxModelも付けるか?
 
     private static final String ROOT = "ROOT";
     private static final int SECTION_INTERVAL = 100;
@@ -55,7 +55,7 @@ public class LandsModel implements TreeModel{ // ComboBoxModelも付けるか?
      * コンストラクタ。
      * この時点ではまだ国一覧が読み込まれない。
      */
-    public LandsModel(){
+    public LandsTreeModel(){
         super();
         return;
     }
index 1c26d24..7f3421c 100644 (file)
@@ -37,7 +37,7 @@ import javax.swing.JTextField;
 import javax.swing.border.Border;
 import jp.sfjp.jindolf.VerInfo;
 import jp.sfjp.jindolf.data.Land;
-import jp.sfjp.jindolf.data.LandsModel;
+import jp.sfjp.jindolf.data.LandsTreeModel;
 import jp.sfjp.jindolf.dxchg.TextPopup;
 import jp.sfjp.jindolf.net.ServerAccess;
 import jp.sfjp.jindolf.util.GUIUtils;
@@ -411,7 +411,7 @@ public class AccountPanel
      * @param model 国情報
      * @throws NullPointerException 引数がnull
      */
-    public void setModel(LandsModel model) throws NullPointerException{
+    public void setModel(LandsTreeModel model) throws NullPointerException{
         if(model == null) throw new NullPointerException();
 
         this.landUserIDMap.clear();
index e663533..4f91e78 100644 (file)
@@ -28,7 +28,7 @@ import javax.swing.tree.TreePath;
 import javax.swing.tree.TreeSelectionModel;
 import jp.sfjp.jindolf.ResourceManager;
 import jp.sfjp.jindolf.data.Land;
-import jp.sfjp.jindolf.data.LandsModel;
+import jp.sfjp.jindolf.data.LandsTreeModel;
 
 /**
  * 国一覧Tree周辺コンポーネント群。
@@ -151,13 +151,13 @@ public class LandsTree
     }
 
     /**
-     * 管理下のLandsModelを返す。
-     * @return LandsModel
+     * 管理下のLandsTreeModelを返す。
+     * @return LandsTreeModel
      */
-    private LandsModel getLandsModel(){
+    private LandsTreeModel getLandsModel(){
         TreeModel model = this.treeView.getModel();
-        if(model instanceof LandsModel){
-            return (LandsModel) model;
+        if(model instanceof LandsTreeModel){
+            return (LandsTreeModel) model;
         }
         return null;
     }
@@ -179,7 +179,7 @@ public class LandsTree
 
         final TreePath lastPath = this.treeView.getSelectionPath();
 
-        LandsModel model = getLandsModel();
+        LandsTreeModel model = getLandsModel();
         if(model != null){
             model.setAscending(this.ascending);
         }