• R/O
  • HTTP
  • SSH
  • HTTPS

提交

標籤

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

テキストの各行をキーと値に分離し、複数テキストファイルを読み込み、キーを突き合わせ照合し、その結果を表示するGUIユーテリティです。


Commit MetaInfo

修訂fc17f353d1b02377d0ee332359e3e65c3c7a6334 (tree)
時間2011-10-12 23:50:11
作者seraphy <seraphy@192....>
Commiterseraphy

Log Message

リファクタリングとコメント

Change Summary

差異

--- a/src/textkeymatcher/entity/KeyMatchedDataModel.java
+++ b/src/textkeymatcher/entity/KeyMatchedRowMap.java
@@ -4,27 +4,45 @@
44 */
55 package textkeymatcher.entity;
66
7+import java.util.AbstractMap;
78 import java.util.ArrayList;
89 import java.util.Collections;
910 import java.util.List;
1011 import java.util.Map;
12+import java.util.Map.Entry;
13+import java.util.Set;
1114 import java.util.TreeMap;
15+import textkeymatcher.entity.KeyMatchedRowMap.RowKey;
16+import textkeymatcher.entity.KeyMatchedRowMap.RowValues;
1217 import textkeymatcher.service.KeyMatcher;
1318
1419 /**
15- *
20+ * 各カラムデータと、キーによるマッチングを行い、キーと値リストの組にする.<br>
1621 * @author seraphy
1722 */
18-public class KeyMatchedDataModel {
23+public class KeyMatchedRowMap extends AbstractMap<RowKey, RowValues> {
1924
25+ /**
26+ * データソースのコレクション.<br>
27+ */
2028 private ArrayList<LineDataList> lineDataLists = new ArrayList<LineDataList>();
2129
2230
31+ /**
32+ * 行のキー表現
33+ */
2334 public static class RowKey implements Comparable<RowKey> {
2435
36+ /**
37+ * キー判定方法
38+ */
2539 private final KeyMatcher keyMatcher;
2640
41+ /**
42+ * キーの生データ
43+ */
2744 private final String key;
45+
2846
2947 public RowKey(KeyMatcher keyMatcher, String key) {
3048 if (keyMatcher == null) {
@@ -65,6 +83,10 @@ public class KeyMatchedDataModel {
6583 return false;
6684 }
6785
86+ /**
87+ * キーのマッチング法に従った文字列表現
88+ * @return 文字列表現
89+ */
6890 @Override
6991 public String toString() {
7092 return keyMatcher.getNormalize(key);
@@ -72,14 +94,41 @@ public class KeyMatchedDataModel {
7294 }
7395
7496
97+ /**
98+ * データソースごとの値のリスト.<br>
99+ */
75100 public static class RowValues {
76101
102+ /**
103+ * データソースごとのデータを入れる配列.<br>
104+ * データソースごとに添字を指定する.<br>
105+ * 単一データであれば文字列が入り、複数データであれば文字列のリストオブジェクトが入る.<br>
106+ * 該当がなければ、nullとなる.<br>
107+ */
77108 private Object[] datas;
78-
109+
110+ /**
111+ * データソース数を指定して構築する.
112+ * @param dataWidth データソース数
113+ */
79114 public RowValues(int dataWidth) {
80115 this.datas = new Object[dataWidth];
81116 }
82117
118+ /**
119+ * データソース数を取得する
120+ * @return データソース数
121+ */
122+ public int getDataWidth() {
123+ return datas.length;
124+ }
125+
126+ /**
127+ * データソースと、値を指定してデータをセットする.<br>
128+ * 同じデータソースですでにデータがある場合はリストとして追加される.<br>
129+ * @param column データソース添字
130+ * @param value データ、nullは空文字として登録される
131+ */
83132 public void add(int column, String value) {
84133 if (value == null) {
85134 value = "";
@@ -104,6 +153,11 @@ public class KeyMatchedDataModel {
104153 }
105154 }
106155
156+ /**
157+ * 各データソースの中の最大のデータ数.<br>
158+ * すべてのデータソースにひとつもデータがなければ0となる.<br>
159+ * @return 最大のデータ数
160+ */
107161 public int getMaxCount() {
108162 int mx = 0;
109163 int dataWidth = datas.length;
@@ -116,6 +170,11 @@ public class KeyMatchedDataModel {
116170 return mx;
117171 }
118172
173+ /**
174+ * 指定したデータソースのデータの個数を返す.
175+ * @param column 添字
176+ * @return データの個数、未登録ならば0
177+ */
119178 public int getCount(int column) {
120179 if (column < 0 || column >= datas.length) {
121180 // 範囲外、データがないので0を返す.
@@ -128,10 +187,21 @@ public class KeyMatchedDataModel {
128187 List<String> lst = (List<String>) datas[column];
129188 return lst.size();
130189 }
131- // リストでなければ単一要素なので1を返す
132- return 1;
190+ // 非nullで、リストでなければ単一要素なので1を返す
191+ if (data != null) {
192+ return 1;
193+ }
194+ // nullであればデータは未設定なので0
195+ return 0;
133196 }
134197
198+ /**
199+ * 指定したデータソースの指定した番号のデータを取り出す.<br>
200+ * 範囲外、もしくはデータ未登録である場合は空文字が返される.<br>
201+ * @param column データソース番号
202+ * @param rowIndex データのインデックス、getCountで得られる個数分
203+ * @return データ、無し、もしくは範囲外の場合は空文字
204+ */
135205 public String get(int column, int rowIndex) {
136206 if (column < 0 || column >= datas.length) {
137207 return "";
@@ -161,8 +231,16 @@ public class KeyMatchedDataModel {
161231 }
162232
163233
234+ /**
235+ * キーの判定方法を示すキーマッチャ
236+ */
164237 private KeyMatcher keyMatcher = KeyMatcher.TEXT;
165238
239+ /**
240+ * キーの判定方法を設定する.<br>
241+ * 設定後は{@link #remap() }を呼び出して再構築しないかぎり反映されない.<br>
242+ * @param keyMatcher
243+ */
166244 public void setKeyMatcher(KeyMatcher keyMatcher) {
167245 if (keyMatcher == null) {
168246 throw new IllegalArgumentException();
@@ -171,16 +249,28 @@ public class KeyMatchedDataModel {
171249 this.keyMatcher = keyMatcher;
172250 }
173251
252+ /**
253+ * キーの判定方法を取得する.
254+ * @return
255+ */
174256 public KeyMatcher getKeyMatcher() {
175257 return keyMatcher;
176258 }
177259
178260
179261
262+ /**
263+ * データソース数を返す.<br>
264+ * @return データソース数
265+ */
180266 public int getNumOfLineDataLists() {
181267 return lineDataLists.size();
182268 }
183-
269+
270+ /**
271+ * データソースを追加する.
272+ * @param lineDataList データソース
273+ */
184274 public void addLineDataList(LineDataList lineDataList) {
185275 if (lineDataList == null) {
186276 throw new IllegalArgumentException();
@@ -188,42 +278,44 @@ public class KeyMatchedDataModel {
188278 lineDataLists.add(lineDataList);
189279 }
190280
281+ /**
282+ * データソースを削除する.
283+ * @param idx データソース
284+ */
191285 public void removeLineDataList(int idx) {
192286 lineDataLists.remove(idx);
193287 }
194-
288+
289+ /**
290+ * 指定されたインデックスのデータソースを取得する
291+ * @param idx インデックス
292+ * @return データソース
293+ */
195294 public LineDataList getLineDataList(int idx) {
196295 return lineDataLists.get(idx);
197296 }
198-
297+
298+ /**
299+ * データソースのタイトルを取得する.<br>
300+ * タイトル自身はデータソースが保持しているため、これはアクセスヘルパである.<br>
301+ * @param columnIndex データソースのインデックス
302+ * @return タイトル
303+ */
199304 public String getTitle(int columnIndex) {
200305 return getLineDataList(columnIndex).getTitle();
201306 }
202307
203- public int getRowCount() {
204- return rowNumMaps.size();
205- }
206-
207- public String getKeyAt(int rowIndex) {
208- if (rowIndex < 0 || rowIndex >= rowNumMaps.size()) {
209- return null;
210- }
211- return rowNumMaps.get(rowIndex).getRowKey().toString();
212- }
213-
214- public String getValueAt(int rowIndex, int columnIndex) {
215- if (rowIndex < 0 || rowIndex >= rowNumMaps.size()) {
216- return null;
217- }
218- RowNumMap rowNumMap = rowNumMaps.get(rowIndex);
219- RowValues rowValues = rowNumMap.getRowValues();
220- int rowNumber = rowNumMap.getRowNumber();
221- return rowValues.get(columnIndex, rowNumber);
222- }
223308
224309
310+ /**
311+ * キーと値のリストに選別されたデータ表現
312+ */
225313 private Map<RowKey, RowValues> dataMap = Collections.emptyMap();
226314
315+
316+ /**
317+ * データソースをキーに従って分類しマッピングする.<br>
318+ */
227319 public void remap() {
228320 TreeMap<RowKey, RowValues> map = new TreeMap<RowKey, RowValues>();
229321
@@ -257,45 +349,14 @@ public class KeyMatchedDataModel {
257349 this.dataMap = map;
258350 }
259351
260- private static class RowNumMap {
261-
262- private final RowKey rowKey;
263-
264- private final RowValues rowValues;
265-
266- private final int rowNumber;
267-
268- public RowNumMap(RowKey rowKey, RowValues rowValues, int rowNumber) {
269- this.rowKey = rowKey;
270- this.rowValues = rowValues;
271- this.rowNumber = rowNumber;
272- }
273-
274- public RowKey getRowKey() {
275- return rowKey;
276- }
277-
278- public RowValues getRowValues() {
279- return rowValues;
280- }
281-
282- public int getRowNumber() {
283- return rowNumber;
284- }
285- }
286-
287- private List<RowNumMap> rowNumMaps = Collections.emptyList();
288352
289- public void renumber() {
290- ArrayList<RowNumMap> rows = new ArrayList<RowNumMap>();
291- for (Map.Entry<RowKey, RowValues> entry : dataMap.entrySet()) {
292- RowKey rowKey = entry.getKey();
293- RowValues rowValues = entry.getValue();
294- int numOfRows = rowValues.getMaxCount();
295- for (int rowNumber = 0; rowNumber < numOfRows; rowNumber++) {
296- rows.add(new RowNumMap(rowKey, rowValues, rowNumber));
297- }
298- }
299- this.rowNumMaps = rows;
353+ @Override
354+ public Set<Entry<RowKey, RowValues>> entrySet() {
355+ return dataMap.entrySet();
356+ }
357+
358+ @Override
359+ public int size() {
360+ return dataMap.size();
300361 }
301362 }
--- /dev/null
+++ b/src/textkeymatcher/entity/KeyMatchedRowView.java
@@ -0,0 +1,189 @@
1+/*
2+ * To change this template, choose Tools | Templates
3+ * and open the template in the editor.
4+ */
5+package textkeymatcher.entity;
6+
7+import java.util.ArrayList;
8+import java.util.Collections;
9+import java.util.List;
10+import java.util.Map;
11+import javax.swing.table.AbstractTableModel;
12+import textkeymatcher.entity.KeyMatchedRowMap.RowKey;
13+import textkeymatcher.entity.KeyMatchedRowMap.RowValues;
14+
15+/**
16+ * データソースをキーと値に分解し、キーごとに集約されたデータマップから、
17+ * テーブル形式のグリッド状態にデータを展開する.<br>
18+ * ひとつのキーに複数の値がある場合、同じキーの行が個数分だけ展開されます.<br>
19+ * 列はキーと各データソース分となります.<br>
20+ * @author seraphy
21+ */
22+public class KeyMatchedRowView extends AbstractTableModel {
23+
24+ /**
25+ * RowKeyとRowValuesへのアクセス方法を示すオブジェクト.<br>
26+ */
27+ private static class RowNumMap {
28+
29+ /**
30+ * キー`
31+ */
32+ private final RowKey rowKey;
33+
34+ /**
35+ * 各データソースごとの値のセット
36+ */
37+ private final RowValues rowValues;
38+
39+ /**
40+ * 値が複数行ある場合の行番号(0ベース)
41+ * 単一であれば0となる.
42+ */
43+ private final int rowNumber;
44+
45+
46+ public RowNumMap(RowKey rowKey, RowValues rowValues, int rowNumber) {
47+ this.rowKey = rowKey;
48+ this.rowValues = rowValues;
49+ this.rowNumber = rowNumber;
50+ }
51+
52+ public RowKey getRowKey() {
53+ return rowKey;
54+ }
55+
56+ public RowValues getRowValues() {
57+ return rowValues;
58+ }
59+
60+ public int getRowNumber() {
61+ return rowNumber;
62+ }
63+ }
64+
65+
66+ /**
67+ * 行データのリスト.<br>
68+ * 各要素に列データへのアクセス方法が格納されている.<br>
69+ */
70+ private List<RowNumMap> rowNumMaps = Collections.emptyList();
71+
72+ /**
73+ * 列数
74+ */
75+ private int numOfColumns;
76+
77+
78+ /**
79+ * 行数
80+ * @return
81+ */
82+ @Override
83+ public int getRowCount() {
84+ return rowNumMaps.size();
85+ }
86+
87+ /**
88+ * 指定した行のキーデータ(キー判定方法による文字列表現)を取得します.<br>
89+ * @param rowIndex 行
90+ * @return キーデータ`
91+ */
92+ public String getKeyAt(int rowIndex) {
93+ if (rowIndex < 0 || rowIndex >= rowNumMaps.size()) {
94+ return null;
95+ }
96+ return rowNumMaps.get(rowIndex).getRowKey().toString();
97+ }
98+
99+ /**
100+ * 指定した行のデータ部を取得します.<br>
101+ * @param rowIndex 行
102+ * @param columnIndex データ列
103+ * @return データ、なければ空文字
104+ */
105+ public String getDataAt(int rowIndex, int columnIndex) {
106+ if (rowIndex < 0 || rowIndex >= rowNumMaps.size()) {
107+ return null;
108+ }
109+ RowNumMap rowNumMap = rowNumMaps.get(rowIndex);
110+ RowValues rowValues = rowNumMap.getRowValues();
111+ int rowNumber = rowNumMap.getRowNumber();
112+ return rowValues.get(columnIndex, rowNumber);
113+ }
114+
115+ /**
116+ * 第一列をキー、それ以降をデータ列として1つのテーブルのカラムとしてアクセスする.<br>
117+ * @param rowIndex 行
118+ * @param columnIndex 列、0はキー、それ以降はデータ列
119+ * @return キーまたはデータの文字列、該当ない場合は空文字
120+ */
121+ @Override
122+ public String getValueAt(int rowIndex, int columnIndex) {
123+ if (rowIndex < 0 || rowIndex >= rowNumMaps.size()) {
124+ return null;
125+ }
126+ if (columnIndex == 0) {
127+ return getKeyAt(rowIndex);
128+ }
129+ return getDataAt(rowIndex, columnIndex - 1);
130+ }
131+
132+ /**
133+ * キーおよび列のデータ型.<br>
134+ * すべてStringである.<br>
135+ * @param i 列、0列はキー、それ以降はデータ列
136+ * @return 列のデータ形式
137+ */
138+ @Override
139+ public Class<?> getColumnClass(int i) {
140+ return String.class;
141+ }
142+
143+ /**
144+ * キー列 + データ列数を返す.<br>
145+ * @return 列数
146+ */
147+ @Override
148+ public int getColumnCount() {
149+ return 1 + numOfColumns;
150+ }
151+
152+
153+ /**
154+ * データマップに従って、あらたしくグリッドを生成しなおします.<br>
155+ * @param dataMap データマップ
156+ */
157+ public void renumbering(Map<RowKey, RowValues> dataMap) {
158+ if (dataMap == null) {
159+ throw new IllegalArgumentException();
160+ }
161+
162+ int numOfMaxColumns = 0;
163+ ArrayList<RowNumMap> rows = new ArrayList<RowNumMap>();
164+ for (Map.Entry<RowKey, RowValues> entry : dataMap.entrySet()) {
165+ RowKey rowKey = entry.getKey();
166+ RowValues rowValues = entry.getValue();
167+
168+ // このキーに対していくつのデータソースが存在するのか?
169+ // (最大列数の決定のため)
170+ int dataWidth = rowValues.getDataWidth();
171+ if (numOfMaxColumns < dataWidth) {
172+ numOfMaxColumns = dataWidth;
173+ }
174+
175+ // このキーに対して最大何行のデータがついているか?
176+ int numOfRows = rowValues.getMaxCount();
177+
178+ // 行数分だけ同じキーを繰り返す.
179+ for (int rowNumber = 0; rowNumber < numOfRows; rowNumber++) {
180+ rows.add(new RowNumMap(rowKey, rowValues, rowNumber));
181+ }
182+ }
183+
184+ this.rowNumMaps = rows;
185+ this.numOfColumns = numOfMaxColumns;
186+
187+ fireTableStructureChanged();
188+ }
189+}
--- a/src/textkeymatcher/ui/ImportDataDialog.form
+++ b/src/textkeymatcher/ui/ImportDataDialog.form
@@ -39,34 +39,33 @@
3939 <Layout>
4040 <DimensionLayout dim="0">
4141 <Group type="103" groupAlignment="0" attributes="0">
42- <Group type="102" alignment="0" attributes="0">
42+ <Group type="102" attributes="0">
4343 <EmptySpace max="-2" attributes="0"/>
4444 <Component id="jLabel4" min="-2" max="-2" attributes="0"/>
4545 <EmptySpace max="-2" attributes="0"/>
46- <Component id="titleTextField" pref="343" max="32767" attributes="0"/>
46+ <Component id="titleTextField" pref="356" max="32767" attributes="0"/>
4747 <EmptySpace max="-2" attributes="0"/>
4848 </Group>
49- <Component id="inputSourcePanel" alignment="0" max="32767" attributes="1"/>
49+ <Component id="btnPanel" alignment="0" pref="475" max="32767" attributes="0"/>
50+ <Component id="KeyValueColumnPanel" alignment="0" max="32767" attributes="0"/>
5051 <Component id="dataFormatPanel" alignment="0" max="32767" attributes="1"/>
51- <Component id="jPanel1" alignment="0" max="32767" attributes="0"/>
52- <Component id="btnPanel" alignment="0" pref="462" max="32767" attributes="0"/>
52+ <Component id="inputSourcePanel" alignment="0" max="32767" attributes="1"/>
5353 </Group>
5454 </DimensionLayout>
5555 <DimensionLayout dim="1">
5656 <Group type="103" groupAlignment="0" attributes="0">
57- <Group type="102" alignment="1" attributes="0">
58- <EmptySpace max="32767" attributes="0"/>
57+ <Group type="102" alignment="0" attributes="0">
5958 <Group type="103" groupAlignment="3" attributes="0">
6059 <Component id="jLabel4" alignment="3" min="-2" max="-2" attributes="0"/>
6160 <Component id="titleTextField" alignment="3" min="-2" max="-2" attributes="0"/>
6261 </Group>
63- <EmptySpace type="unrelated" max="-2" attributes="0"/>
64- <Component id="inputSourcePanel" min="-2" pref="206" max="-2" attributes="0"/>
65- <EmptySpace type="unrelated" max="-2" attributes="0"/>
62+ <EmptySpace max="-2" attributes="0"/>
63+ <Component id="inputSourcePanel" max="32767" attributes="0"/>
64+ <EmptySpace max="-2" attributes="0"/>
6665 <Component id="dataFormatPanel" min="-2" max="-2" attributes="0"/>
67- <EmptySpace type="unrelated" max="-2" attributes="0"/>
68- <Component id="jPanel1" min="-2" max="-2" attributes="0"/>
69- <EmptySpace type="unrelated" max="-2" attributes="0"/>
66+ <EmptySpace max="-2" attributes="0"/>
67+ <Component id="KeyValueColumnPanel" min="-2" max="-2" attributes="0"/>
68+ <EmptySpace max="-2" attributes="0"/>
7069 <Component id="btnPanel" min="-2" max="-2" attributes="0"/>
7170 </Group>
7271 </Group>
@@ -93,7 +92,7 @@
9392 <Group type="103" groupAlignment="0" attributes="0">
9493 <Group type="102" alignment="1" attributes="0">
9594 <EmptySpace min="-2" pref="29" max="-2" attributes="0"/>
96- <Component id="directTextAreaSP" pref="384" max="32767" attributes="0"/>
95+ <Component id="directTextAreaSP" pref="397" max="32767" attributes="0"/>
9796 </Group>
9897 <Component id="loadTextRadioButton" alignment="0" min="-2" max="-2" attributes="0"/>
9998 <Group type="102" alignment="0" attributes="0">
@@ -102,9 +101,9 @@
102101 <Group type="102" alignment="0" attributes="0">
103102 <Component id="jLabel3" min="-2" max="-2" attributes="0"/>
104103 <EmptySpace type="separate" max="-2" attributes="0"/>
105- <Component id="charsetComboBox" pref="213" max="32767" attributes="0"/>
104+ <Component id="charsetComboBox" pref="226" max="32767" attributes="0"/>
106105 </Group>
107- <Component id="loadFileTextField" pref="300" max="32767" attributes="0"/>
106+ <Component id="loadFileTextField" pref="313" max="32767" attributes="0"/>
108107 </Group>
109108 <EmptySpace max="-2" attributes="0"/>
110109 <Component id="loadFileButton" min="-2" max="-2" attributes="0"/>
@@ -132,8 +131,8 @@
132131 <EmptySpace type="unrelated" max="-2" attributes="0"/>
133132 <Component id="directRadioButton" min="-2" max="-2" attributes="0"/>
134133 <EmptySpace max="-2" attributes="0"/>
135- <Component id="directTextAreaSP" min="-2" pref="48" max="-2" attributes="0"/>
136- <EmptySpace pref="10" max="32767" attributes="0"/>
134+ <Component id="directTextAreaSP" max="32767" attributes="0"/>
135+ <EmptySpace max="32767" attributes="0"/>
137136 </Group>
138137 </Group>
139138 </DimensionLayout>
@@ -163,6 +162,9 @@
163162 </Component>
164163 <Component class="javax.swing.JButton" name="loadFileButton">
165164 <Properties>
165+ <Property name="action" type="javax.swing.Action" editor="org.netbeans.modules.swingapp.ActionEditor">
166+ <action class="textkeymatcher.ui.ImportDataDialog" id="onBrowseFile" methodName="onBrowseFile"/>
167+ </Property>
166168 <Property name="text" type="java.lang.String" resourceKey="loadFileButton.text"/>
167169 <Property name="name" type="java.lang.String" value="loadFileButton" noResource="true"/>
168170 </Properties>
@@ -242,14 +244,14 @@
242244 <Group type="102" alignment="0" attributes="0">
243245 <Component id="simpleSplitRadioButton" min="-2" max="-2" attributes="0"/>
244246 <EmptySpace min="-2" pref="38" max="-2" attributes="0"/>
245- <Component id="simpleSplitComboBox" pref="265" max="32767" attributes="0"/>
247+ <Component id="simpleSplitComboBox" pref="278" max="32767" attributes="0"/>
246248 </Group>
247249 <Component id="regularExpRadioButton" alignment="0" min="-2" max="-2" attributes="0"/>
248250 </Group>
249251 </Group>
250252 <Group type="102" alignment="0" attributes="0">
251253 <EmptySpace min="-2" pref="39" max="-2" attributes="0"/>
252- <Component id="regularExpTextField" pref="391" max="32767" attributes="0"/>
254+ <Component id="regularExpTextField" pref="404" max="32767" attributes="0"/>
253255 </Group>
254256 </Group>
255257 <EmptySpace max="-2" attributes="0"/>
@@ -381,16 +383,16 @@
381383 </Component>
382384 </SubComponents>
383385 </Container>
384- <Container class="javax.swing.JPanel" name="jPanel1">
386+ <Container class="javax.swing.JPanel" name="KeyValueColumnPanel">
385387 <Properties>
386388 <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
387389 <Border info="org.netbeans.modules.form.compat2.border.TitledBorderInfo">
388- <TitledBorder title="&#x30ad;&#x30fc;&#x30fb;&#x30c7;&#x30fc;&#x30bf;&#x5217;&#x306e;&#x6307;&#x5b9a;">
389- <Property name="titleX" resourceKey="jPanel1.border.title"/>
390+ <TitledBorder title="&#x30ad;&#x30fc;&#x30fb;&#x5024;&#x306e;&#x30ab;&#x30e9;&#x30e0;">
391+ <Property name="titleX" resourceKey="KeyValueColumnPanel.border.title"/>
390392 </TitledBorder>
391393 </Border>
392394 </Property>
393- <Property name="name" type="java.lang.String" value="jPanel1" noResource="true"/>
395+ <Property name="name" type="java.lang.String" value="KeyValueColumnPanel" noResource="true"/>
394396 </Properties>
395397
396398 <Layout>
@@ -400,14 +402,14 @@
400402 <EmptySpace max="-2" attributes="0"/>
401403 <Component id="jLabel1" min="-2" max="-2" attributes="0"/>
402404 <EmptySpace type="separate" max="-2" attributes="0"/>
403- <Component id="keyColumnSpinner" pref="77" max="32767" attributes="0"/>
404- <EmptySpace min="-2" pref="32" max="-2" attributes="0"/>
405- <Component id="jLabel2" min="-2" max="-2" attributes="0"/>
406- <EmptySpace type="unrelated" max="-2" attributes="0"/>
407- <Component id="valueColumnSpinner" pref="77" max="32767" attributes="0"/>
405+ <Component id="keyColumnSpinner" min="-2" pref="63" max="-2" attributes="0"/>
408406 <EmptySpace max="-2" attributes="0"/>
407+ <Component id="jLabel2" min="-2" max="-2" attributes="0"/>
408+ <EmptySpace min="-2" pref="2" max="-2" attributes="0"/>
409+ <Component id="valueColumnSpinner" min="-2" pref="58" max="-2" attributes="0"/>
410+ <EmptySpace type="separate" max="-2" attributes="0"/>
409411 <Component id="fullLineCheckBox" min="-2" max="-2" attributes="0"/>
410- <EmptySpace pref="36" max="32767" attributes="0"/>
412+ <EmptySpace pref="104" max="32767" attributes="0"/>
411413 </Group>
412414 </Group>
413415 </DimensionLayout>
@@ -420,8 +422,8 @@
420422 <Component id="jLabel2" alignment="3" min="-2" max="-2" attributes="0"/>
421423 <Component id="fullLineCheckBox" alignment="3" min="-2" max="-2" attributes="0"/>
422424 </Group>
423- <Component id="valueColumnSpinner" alignment="0" min="-2" max="-2" attributes="0"/>
424425 <Component id="keyColumnSpinner" alignment="0" min="-2" max="-2" attributes="0"/>
426+ <Component id="valueColumnSpinner" alignment="0" min="-2" max="-2" attributes="0"/>
425427 </Group>
426428 <EmptySpace max="32767" attributes="0"/>
427429 </Group>
--- a/src/textkeymatcher/ui/ImportDataDialog.java
+++ b/src/textkeymatcher/ui/ImportDataDialog.java
@@ -13,6 +13,7 @@ package textkeymatcher.ui;
1313 import java.awt.Component;
1414 import java.awt.event.InputEvent;
1515 import java.awt.event.KeyEvent;
16+import java.io.File;
1617 import java.nio.charset.Charset;
1718 import java.util.ArrayList;
1819 import java.util.List;
@@ -22,10 +23,12 @@ import javax.swing.DefaultComboBoxModel;
2223 import javax.swing.DefaultListCellRenderer;
2324 import javax.swing.InputMap;
2425 import javax.swing.JComponent;
26+import javax.swing.JFileChooser;
2527 import javax.swing.JList;
2628 import javax.swing.JRootPane;
2729 import javax.swing.KeyStroke;
2830 import javax.swing.ListCellRenderer;
31+import javax.swing.filechooser.FileFilter;
2932 import org.apache.commons.lang3.StringUtils;
3033 import org.jdesktop.application.Action;
3134 import textkeymatcher.service.PredefinedSimpleSplitCharColumnSplitter;
@@ -131,7 +134,7 @@ public class ImportDataDialog extends javax.swing.JDialog {
131134 filler1 = new javax.swing.Box.Filler(new java.awt.Dimension(0, 0), new java.awt.Dimension(0, 0), new java.awt.Dimension(32767, 0));
132135 cancelButton = new javax.swing.JButton();
133136 importButton = new javax.swing.JButton();
134- jPanel1 = new javax.swing.JPanel();
137+ KeyValueColumnPanel = new javax.swing.JPanel();
135138 jLabel1 = new javax.swing.JLabel();
136139 jLabel2 = new javax.swing.JLabel();
137140 fullLineCheckBox = new javax.swing.JCheckBox();
@@ -172,6 +175,8 @@ public class ImportDataDialog extends javax.swing.JDialog {
172175 binding = org.jdesktop.beansbinding.Bindings.createAutoBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, importDataDialogModel, org.jdesktop.beansbinding.ELProperty.create("${sourceFile}"), loadFileTextField, org.jdesktop.beansbinding.BeanProperty.create("text"));
173176 bindingGroup.addBinding(binding);
174177
178+ javax.swing.ActionMap actionMap = org.jdesktop.application.Application.getInstance(textkeymatcher.TextKeyMatcherApp.class).getContext().getActionMap(ImportDataDialog.class, this);
179+ loadFileButton.setAction(actionMap.get("onBrowseFile")); // NOI18N
175180 loadFileButton.setText(resourceMap.getString("loadFileButton.text")); // NOI18N
176181 loadFileButton.setName("loadFileButton"); // NOI18N
177182
@@ -211,7 +216,7 @@ public class ImportDataDialog extends javax.swing.JDialog {
211216 .addGroup(inputSourcePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
212217 .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, inputSourcePanelLayout.createSequentialGroup()
213218 .addGap(29, 29, 29)
214- .addComponent(directTextAreaSP, javax.swing.GroupLayout.DEFAULT_SIZE, 384, Short.MAX_VALUE))
219+ .addComponent(directTextAreaSP, javax.swing.GroupLayout.DEFAULT_SIZE, 397, Short.MAX_VALUE))
215220 .addComponent(loadTextRadioButton)
216221 .addGroup(inputSourcePanelLayout.createSequentialGroup()
217222 .addGap(29, 29, 29)
@@ -219,8 +224,8 @@ public class ImportDataDialog extends javax.swing.JDialog {
219224 .addGroup(javax.swing.GroupLayout.Alignment.LEADING, inputSourcePanelLayout.createSequentialGroup()
220225 .addComponent(jLabel3)
221226 .addGap(18, 18, 18)
222- .addComponent(charsetComboBox, 0, 213, Short.MAX_VALUE))
223- .addComponent(loadFileTextField, javax.swing.GroupLayout.DEFAULT_SIZE, 300, Short.MAX_VALUE))
227+ .addComponent(charsetComboBox, 0, 226, Short.MAX_VALUE))
228+ .addComponent(loadFileTextField, javax.swing.GroupLayout.DEFAULT_SIZE, 313, Short.MAX_VALUE))
224229 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
225230 .addComponent(loadFileButton))
226231 .addComponent(directRadioButton))
@@ -241,8 +246,8 @@ public class ImportDataDialog extends javax.swing.JDialog {
241246 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
242247 .addComponent(directRadioButton)
243248 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
244- .addComponent(directTextAreaSP, javax.swing.GroupLayout.PREFERRED_SIZE, 48, javax.swing.GroupLayout.PREFERRED_SIZE)
245- .addContainerGap(10, Short.MAX_VALUE))
249+ .addComponent(directTextAreaSP)
250+ .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
246251 );
247252
248253 dataFormatPanel.setBorder(javax.swing.BorderFactory.createTitledBorder(resourceMap.getString("dataFormatPanel.border.title"))); // NOI18N
@@ -286,11 +291,11 @@ public class ImportDataDialog extends javax.swing.JDialog {
286291 .addGroup(dataFormatPanelLayout.createSequentialGroup()
287292 .addComponent(simpleSplitRadioButton)
288293 .addGap(38, 38, 38)
289- .addComponent(simpleSplitComboBox, 0, 265, Short.MAX_VALUE))
294+ .addComponent(simpleSplitComboBox, 0, 278, Short.MAX_VALUE))
290295 .addComponent(regularExpRadioButton)))
291296 .addGroup(dataFormatPanelLayout.createSequentialGroup()
292297 .addGap(39, 39, 39)
293- .addComponent(regularExpTextField, javax.swing.GroupLayout.DEFAULT_SIZE, 391, Short.MAX_VALUE)))
298+ .addComponent(regularExpTextField, javax.swing.GroupLayout.DEFAULT_SIZE, 404, Short.MAX_VALUE)))
294299 .addContainerGap())
295300 );
296301 dataFormatPanelLayout.setVerticalGroup(
@@ -317,7 +322,6 @@ public class ImportDataDialog extends javax.swing.JDialog {
317322 gridBagConstraints.weightx = 1.0;
318323 btnPanel.add(filler1, gridBagConstraints);
319324
320- javax.swing.ActionMap actionMap = org.jdesktop.application.Application.getInstance(textkeymatcher.TextKeyMatcherApp.class).getContext().getActionMap(ImportDataDialog.class, this);
321325 cancelButton.setAction(actionMap.get("onCancel")); // NOI18N
322326 cancelButton.setText(resourceMap.getString("cancelButton.text")); // NOI18N
323327 cancelButton.setName("cancelButton"); // NOI18N
@@ -334,8 +338,8 @@ public class ImportDataDialog extends javax.swing.JDialog {
334338 gridBagConstraints.gridy = 0;
335339 btnPanel.add(importButton, gridBagConstraints);
336340
337- jPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder(resourceMap.getString("jPanel1.border.title"))); // NOI18N
338- jPanel1.setName("jPanel1"); // NOI18N
341+ KeyValueColumnPanel.setBorder(javax.swing.BorderFactory.createTitledBorder(resourceMap.getString("KeyValueColumnPanel.border.title"))); // NOI18N
342+ KeyValueColumnPanel.setName("KeyValueColumnPanel"); // NOI18N
339343
340344 jLabel1.setText(resourceMap.getString("jLabel1.text")); // NOI18N
341345 jLabel1.setName("jLabel1"); // NOI18N
@@ -361,33 +365,33 @@ public class ImportDataDialog extends javax.swing.JDialog {
361365 binding = org.jdesktop.beansbinding.Bindings.createAutoBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, importDataDialogModel, org.jdesktop.beansbinding.ELProperty.create("${valueColumn}"), valueColumnSpinner, org.jdesktop.beansbinding.BeanProperty.create("value"));
362366 bindingGroup.addBinding(binding);
363367
364- javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
365- jPanel1.setLayout(jPanel1Layout);
366- jPanel1Layout.setHorizontalGroup(
367- jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
368- .addGroup(jPanel1Layout.createSequentialGroup()
368+ javax.swing.GroupLayout KeyValueColumnPanelLayout = new javax.swing.GroupLayout(KeyValueColumnPanel);
369+ KeyValueColumnPanel.setLayout(KeyValueColumnPanelLayout);
370+ KeyValueColumnPanelLayout.setHorizontalGroup(
371+ KeyValueColumnPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
372+ .addGroup(KeyValueColumnPanelLayout.createSequentialGroup()
369373 .addContainerGap()
370374 .addComponent(jLabel1)
371375 .addGap(18, 18, 18)
372- .addComponent(keyColumnSpinner, javax.swing.GroupLayout.DEFAULT_SIZE, 77, Short.MAX_VALUE)
373- .addGap(32, 32, 32)
374- .addComponent(jLabel2)
375- .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
376- .addComponent(valueColumnSpinner, javax.swing.GroupLayout.DEFAULT_SIZE, 77, Short.MAX_VALUE)
376+ .addComponent(keyColumnSpinner, javax.swing.GroupLayout.PREFERRED_SIZE, 63, javax.swing.GroupLayout.PREFERRED_SIZE)
377377 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
378+ .addComponent(jLabel2)
379+ .addGap(2, 2, 2)
380+ .addComponent(valueColumnSpinner, javax.swing.GroupLayout.PREFERRED_SIZE, 58, javax.swing.GroupLayout.PREFERRED_SIZE)
381+ .addGap(18, 18, 18)
378382 .addComponent(fullLineCheckBox)
379- .addContainerGap(36, Short.MAX_VALUE))
383+ .addContainerGap(104, Short.MAX_VALUE))
380384 );
381- jPanel1Layout.setVerticalGroup(
382- jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
383- .addGroup(jPanel1Layout.createSequentialGroup()
384- .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
385- .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
385+ KeyValueColumnPanelLayout.setVerticalGroup(
386+ KeyValueColumnPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
387+ .addGroup(KeyValueColumnPanelLayout.createSequentialGroup()
388+ .addGroup(KeyValueColumnPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
389+ .addGroup(KeyValueColumnPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
386390 .addComponent(jLabel1)
387391 .addComponent(jLabel2)
388392 .addComponent(fullLineCheckBox))
389- .addComponent(valueColumnSpinner, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
390- .addComponent(keyColumnSpinner, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
393+ .addComponent(keyColumnSpinner, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
394+ .addComponent(valueColumnSpinner, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
391395 .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
392396 );
393397
@@ -407,27 +411,26 @@ public class ImportDataDialog extends javax.swing.JDialog {
407411 .addContainerGap()
408412 .addComponent(jLabel4)
409413 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
410- .addComponent(titleTextField, javax.swing.GroupLayout.DEFAULT_SIZE, 343, Short.MAX_VALUE)
414+ .addComponent(titleTextField, javax.swing.GroupLayout.DEFAULT_SIZE, 356, Short.MAX_VALUE)
411415 .addContainerGap())
412- .addComponent(inputSourcePanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
416+ .addComponent(btnPanel, javax.swing.GroupLayout.DEFAULT_SIZE, 475, Short.MAX_VALUE)
417+ .addComponent(KeyValueColumnPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
413418 .addComponent(dataFormatPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
414- .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
415- .addComponent(btnPanel, javax.swing.GroupLayout.DEFAULT_SIZE, 462, Short.MAX_VALUE)
419+ .addComponent(inputSourcePanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
416420 );
417421 layout.setVerticalGroup(
418422 layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
419- .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
420- .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
423+ .addGroup(layout.createSequentialGroup()
421424 .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
422425 .addComponent(jLabel4)
423426 .addComponent(titleTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
424- .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
425- .addComponent(inputSourcePanel, javax.swing.GroupLayout.PREFERRED_SIZE, 206, javax.swing.GroupLayout.PREFERRED_SIZE)
426- .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
427+ .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
428+ .addComponent(inputSourcePanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
429+ .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
427430 .addComponent(dataFormatPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
428- .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
429- .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
430- .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
431+ .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
432+ .addComponent(KeyValueColumnPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
433+ .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
431434 .addComponent(btnPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
432435 );
433436
@@ -504,7 +507,63 @@ public class ImportDataDialog extends javax.swing.JDialog {
504507 firePropertyChange("enableAccept", old, isEnableAccept());
505508 }
506509
510+
511+ /**
512+ * テキストファイル拡張子フィルタ
513+ */
514+ private static final FileFilter TEXT_FILE_FILTER = new FileFilter() {
515+
516+ @Override
517+ public boolean accept(File file) {
518+ if (file.isDirectory()) {
519+ return true;
520+ }
521+ String name = file.getName();
522+ return name.toLowerCase().endsWith(".txt");
523+ }
524+
525+ @Override
526+ public String getDescription() {
527+ return "Text (*.txt)";
528+ }
529+ };
530+
531+ /**
532+ * 最後に使用したディレクトリ
533+ */
534+ private File lastUseDirectory;
535+
536+ public File getLastUseDirectory() {
537+ return lastUseDirectory;
538+ }
539+
540+ public void setLastUseDirectory(File lastUseDirectory) {
541+ this.lastUseDirectory = lastUseDirectory;
542+ }
543+
544+ /**
545+ * ファイルを選択する
546+ */
547+ @Action
548+ public void onBrowseFile() {
549+ JFileChooser fileChooser = new JFileChooser(lastUseDirectory);
550+ fileChooser.setAcceptAllFileFilterUsed(true);
551+ fileChooser.addChoosableFileFilter(TEXT_FILE_FILTER);
552+ fileChooser.setFileFilter(TEXT_FILE_FILTER);
553+ int ret = fileChooser.showOpenDialog(this);
554+ if (ret != JFileChooser.APPROVE_OPTION) {
555+ // cancel
556+ return;
557+ }
558+
559+ File selectedFile = fileChooser.getSelectedFile();
560+ lastUseDirectory = selectedFile.getParentFile();
561+
562+ importDataDialogModel.setSourceFile(selectedFile.getPath());
563+ }
564+
507565 // Variables declaration - do not modify//GEN-BEGIN:variables
566+ private javax.swing.JPanel KeyValueColumnPanel;
508567 private javax.swing.JPanel btnPanel;
509568 private javax.swing.JButton cancelButton;
510569 private javax.swing.JComboBox charsetComboBox;
@@ -523,7 +582,6 @@ public class ImportDataDialog extends javax.swing.JDialog {
523582 private javax.swing.JLabel jLabel2;
524583 private javax.swing.JLabel jLabel3;
525584 private javax.swing.JLabel jLabel4;
526- private javax.swing.JPanel jPanel1;
527585 private javax.swing.JSpinner keyColumnSpinner;
528586 private javax.swing.JButton loadFileButton;
529587 private javax.swing.JTextField loadFileTextField;
--- a/src/textkeymatcher/ui/model/DataViewTableModel.java
+++ b/src/textkeymatcher/ui/model/DataViewTableModel.java
@@ -4,60 +4,34 @@
44 */
55 package textkeymatcher.ui.model;
66
7-import javax.swing.table.AbstractTableModel;
8-import textkeymatcher.entity.KeyMatchedDataModel;
7+import textkeymatcher.entity.KeyMatchedRowMap;
8+import textkeymatcher.entity.KeyMatchedRowView;
99 import textkeymatcher.entity.LineDataList;
1010
1111 /**
1212 *
1313 * @author seraphy
1414 */
15-public class DataViewTableModel extends AbstractTableModel {
16-
17- private KeyMatchedDataModel dataModel = new KeyMatchedDataModel();
15+public class DataViewTableModel extends KeyMatchedRowView {
1816
17+ private KeyMatchedRowMap rowMap = new KeyMatchedRowMap();
18+
1919 public void addLineDataList(LineDataList lineDataList) {
2020 if (lineDataList == null) {
2121 throw new IllegalArgumentException();
2222 }
23- dataModel.addLineDataList(lineDataList);
24- dataModel.remap();
25- dataModel.renumber();
26- fireTableStructureChanged();
27- }
28-
29- @Override
30- public int getColumnCount() {
31- return 1 + dataModel.getNumOfLineDataLists();
32- }
23+ rowMap.addLineDataList(lineDataList);
24+ rowMap.remap();
3325
34- @Override
35- public Class<?> getColumnClass(int i) {
36- return String.class;
26+ renumbering(rowMap);
3727 }
38-
28+
3929 @Override
4030 public String getColumnName(int i) {
4131 if (i == 0) {
4232 return "Key";
4333 }
44- int column = i - 1;
45- return dataModel.getTitle(column);
34+ int column = i - 1; // 左端はキーカラム固定
35+ return rowMap.getTitle(column);
4636 }
47-
48- @Override
49- public int getRowCount() {
50- return dataModel.getRowCount();
51- }
52-
53- @Override
54- public Object getValueAt(int rowIndex, int columnIndex) {
55- if (columnIndex == 0) {
56- return dataModel.getKeyAt(rowIndex);
57-
58- } else {
59- return dataModel.getValueAt(rowIndex, columnIndex - 1);
60- }
61- }
62-
6337 }
--- a/src/textkeymatcher/ui/model/ImportDataDialogModel.java
+++ b/src/textkeymatcher/ui/model/ImportDataDialogModel.java
@@ -11,7 +11,7 @@ import org.jdesktop.application.AbstractBean;
1111 import textkeymatcher.service.PredefinedSimpleSplitCharColumnSplitter;
1212
1313 /**
14- *
14+ * データインポートダイアログのモデル
1515 * @author seraphy
1616 */
1717 public class ImportDataDialogModel extends AbstractBean {
--- a/src/textkeymatcher/ui/resources/ImportDataDialog.properties
+++ b/src/textkeymatcher/ui/resources/ImportDataDialog.properties
@@ -19,9 +19,11 @@ SIMPLE_SEMICOLON_SPLIT.text=SemiColon
1919 SIMPLE_ASTER_SPLIT.text=Asterisk
2020 SINGLE_SPACE_SPLIT.text=Space
2121 SPACES_SPLIT.text=Spaces
22-jPanel1.border.title=\u30ad\u30fc\u30fb\u30c7\u30fc\u30bf\u5217\u306e\u6307\u5b9a
23-jLabel1.text=jLabel1
24-jLabel2.text=jLabel2
25-fullLineCheckBox.text=\u884c\u5168\u4f53
26-jLabel3.text=jLabel3
27-jLabel4.text=jLabel4
22+jLabel1.text=Key
23+jLabel2.text=Data
24+fullLineCheckBox.text=Line
25+jLabel3.text=Charset
26+jLabel4.text=Name
27+KeyValueColumnPanel.border.title=Columns
28+onBrowseFile.Action.shortDescription=
29+onBrowseFile.Action.text=
--- a/src/textkeymatcher/ui/resources/ImportDataDialog_ja_JP.properties
+++ b/src/textkeymatcher/ui/resources/ImportDataDialog_ja_JP.properties
@@ -19,9 +19,11 @@ SIMPLE_SEMICOLON_SPLIT.text=\u30bb\u30df\u30b3\u30ed\u30f3\u533a\u5207\u308a
1919 SIMPLE_ASTER_SPLIT.text=\u30a2\u30b9\u30bf\u30ea\u30b9\u30af\u533a\u5207\u308a
2020 SINGLE_SPACE_SPLIT.text=\u7a7a\u767d\u533a\u5207\u308a(\u5358\u4e00\u7a7a\u767d)
2121 SPACES_SPLIT.text=\u7a7a\u767d\u533a\u5207\u308a
22-jPanel1.border.title=\u30ad\u30fc\u30fb\u30c7\u30fc\u30bf\u5217\u306e\u6307\u5b9a
2322 jLabel1.text=\u30ad\u30fc\u5217:
2423 jLabel2.text=\u30c7\u30fc\u30bf\u5217:
2524 fullLineCheckBox.text=\u884c\u5168\u4f53
2625 jLabel3.text=\u6587\u5b57\u30b3\u30fc\u30c9:
2726 jLabel4.text=\u30c7\u30fc\u30bf\u5217\u540d:
27+KeyValueColumnPanel.border.title=\u30ad\u30fc\u30fb\u5024\u306e\u30ab\u30e9\u30e0
28+onBrowseFile.Action.text=
29+onBrowseFile.Action.shortDescription=