• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Frequently used words (click to add to your profile)

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

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


Commit MetaInfo

Revisão425e45115dd4a6bc3ff078bf4f496a6cbd9b8658 (tree)
Hora2011-10-22 22:55:30
Autorseraphy <seraphy@192....>
Commiterseraphy

Mensagem de Log

・行フィルタの実装、追加

Mudança Sumário

Diff

--- a/src/textkeymatcher/entity/DisplayMode.java
+++ b/src/textkeymatcher/entity/DisplayMode.java
@@ -100,7 +100,77 @@ public enum DisplayMode implements RowFilter {
100100 return true;
101101 }
102102 }
103- return true;
103+ return false;
104+ }
105+ },
106+ UNIQUE() {
107+ @Override
108+ public boolean isAcceptable(RowValues values) {
109+ if (values == null) {
110+ throw new IllegalArgumentException();
111+ }
112+ int mx = values.getDataWidth();
113+ int validColumns = 0;
114+ for (int idx = 0; idx < mx; idx++) {
115+ int cnt = values.getCount(idx);
116+ if (cnt > 0) {
117+ // 1件以上のデータがあるカラムをカウントする.
118+ validColumns++;
119+ }
120+ }
121+ // データ列の個数が1であればユニーク
122+ return validColumns == 1;
123+ }
124+ },
125+ UNUNIQUE() {
126+ @Override
127+ public boolean isAcceptable(RowValues values) {
128+ if (values == null) {
129+ throw new IllegalArgumentException();
130+ }
131+ int mx = values.getDataWidth();
132+ int validColumns = 0;
133+ for (int idx = 0; idx < mx; idx++) {
134+ int cnt = values.getCount(idx);
135+ if (cnt > 0) {
136+ // 1件以上のデータがあるカラムをカウントする.
137+ validColumns++;
138+ }
139+ }
140+ // データ列の個数が1でなければアンユニーク
141+ return validColumns != 1;
142+ }
143+ },
144+ UNIQUE_ALL() {
145+ @Override
146+ public boolean isAcceptable(RowValues values) {
147+ if (values == null) {
148+ throw new IllegalArgumentException();
149+ }
150+ int mx = values.getDataWidth();
151+ int numOfData = 0;
152+ for (int idx = 0; idx < mx; idx++) {
153+ int cnt = values.getCount(idx);
154+ numOfData += cnt;
155+ }
156+ // データ数が1であればユニーク
157+ return numOfData == 1;
158+ }
159+ },
160+ UNUNIQUE_ALL() {
161+ @Override
162+ public boolean isAcceptable(RowValues values) {
163+ if (values == null) {
164+ throw new IllegalArgumentException();
165+ }
166+ int mx = values.getDataWidth();
167+ int numOfData = 0;
168+ for (int idx = 0; idx < mx; idx++) {
169+ int cnt = values.getCount(idx);
170+ numOfData += cnt;
171+ }
172+ // データ数が1でなければアンユニーク
173+ return numOfData != 1;
104174 }
105175 },
106176 ;
--- a/src/textkeymatcher/ui/TextKeyMatcherView.form
+++ b/src/textkeymatcher/ui/TextKeyMatcherView.form
@@ -15,7 +15,7 @@
1515 </DimensionLayout>
1616 <DimensionLayout dim="1">
1717 <Group type="103" groupAlignment="0" attributes="0">
18- <Component id="dataViewTableSP" alignment="0" pref="392" max="32767" attributes="0"/>
18+ <Component id="dataViewTableSP" alignment="0" pref="391" max="32767" attributes="0"/>
1919 </Group>
2020 </DimensionLayout>
2121 </Layout>
@@ -208,10 +208,12 @@
208208 <ComponentRef name="viewButtonGroup"/>
209209 </Property>
210210 <Property name="mnemonic" type="int" value="65"/>
211- <Property name="selected" type="boolean" value="true"/>
212211 <Property name="text" type="java.lang.String" resourceKey="allRadioButtonMenuItem.text"/>
213212 <Property name="name" type="java.lang.String" value="allRadioButtonMenuItem" noResource="true"/>
214213 </Properties>
214+ <BindingProperties>
215+ <BindingProperty name="selected" source="displayModeBinder" sourcePath="${all}" target="allRadioButtonMenuItem" targetPath="selected" updateStrategy="0" immediately="false"/>
216+ </BindingProperties>
215217 </MenuItem>
216218 <MenuItem class="javax.swing.JRadioButtonMenuItem" name="matchedRadioButtonMenuItem">
217219 <Properties>
@@ -222,6 +224,9 @@
222224 <Property name="text" type="java.lang.String" resourceKey="matchedRadioButtonMenuItem.text"/>
223225 <Property name="name" type="java.lang.String" value="matchedRadioButtonMenuItem" noResource="true"/>
224226 </Properties>
227+ <BindingProperties>
228+ <BindingProperty name="selected" source="displayModeBinder" sourcePath="${matched}" target="matchedRadioButtonMenuItem" targetPath="selected" updateStrategy="0" immediately="false"/>
229+ </BindingProperties>
225230 </MenuItem>
226231 <MenuItem class="javax.swing.JRadioButtonMenuItem" name="unmatchedRadioButtonMenuItem">
227232 <Properties>
@@ -232,6 +237,9 @@
232237 <Property name="text" type="java.lang.String" resourceKey="unmatchedRadioButtonMenuItem.text"/>
233238 <Property name="name" type="java.lang.String" value="unmatchedRadioButtonMenuItem" noResource="true"/>
234239 </Properties>
240+ <BindingProperties>
241+ <BindingProperty name="selected" source="displayModeBinder" sourcePath="${unmatched}" target="unmatchedRadioButtonMenuItem" targetPath="selected" updateStrategy="0" immediately="false"/>
242+ </BindingProperties>
235243 </MenuItem>
236244 <MenuItem class="javax.swing.JRadioButtonMenuItem" name="existsLeftRadioButtonMenuItem">
237245 <Properties>
@@ -242,6 +250,9 @@
242250 <Property name="text" type="java.lang.String" resourceKey="existsLeftRadioButtonMenuItem.text"/>
243251 <Property name="name" type="java.lang.String" value="existsLeftRadioButtonMenuItem" noResource="true"/>
244252 </Properties>
253+ <BindingProperties>
254+ <BindingProperty name="selected" source="displayModeBinder" sourcePath="${existsFirstColumn}" target="existsLeftRadioButtonMenuItem" targetPath="selected" updateStrategy="0" immediately="false"/>
255+ </BindingProperties>
245256 </MenuItem>
246257 <MenuItem class="javax.swing.JRadioButtonMenuItem" name="missingLeftRadioButtonMenuItem">
247258 <Properties>
@@ -252,6 +263,59 @@
252263 <Property name="text" type="java.lang.String" resourceKey="missingLeftRadioButtonMenuItem.text"/>
253264 <Property name="name" type="java.lang.String" value="missingLeftRadioButtonMenuItem" noResource="true"/>
254265 </Properties>
266+ <BindingProperties>
267+ <BindingProperty name="selected" source="displayModeBinder" sourcePath="${missingFirstColumn}" target="missingLeftRadioButtonMenuItem" targetPath="selected" updateStrategy="0" immediately="false"/>
268+ </BindingProperties>
269+ </MenuItem>
270+ <MenuItem class="javax.swing.JRadioButtonMenuItem" name="uniqueRadioButtonMenuItem">
271+ <Properties>
272+ <Property name="buttonGroup" type="javax.swing.ButtonGroup" editor="org.netbeans.modules.form.RADComponent$ButtonGroupPropertyEditor">
273+ <ComponentRef name="viewButtonGroup"/>
274+ </Property>
275+ <Property name="mnemonic" type="int" value="85"/>
276+ <Property name="text" type="java.lang.String" resourceKey="uniqueRadioButtonMenuItem.text"/>
277+ <Property name="name" type="java.lang.String" value="uniqueRadioButtonMenuItem" noResource="true"/>
278+ </Properties>
279+ <BindingProperties>
280+ <BindingProperty name="selected" source="displayModeBinder" sourcePath="${unique}" target="uniqueRadioButtonMenuItem" targetPath="selected" updateStrategy="0" immediately="false"/>
281+ </BindingProperties>
282+ </MenuItem>
283+ <MenuItem class="javax.swing.JRadioButtonMenuItem" name="jRadioButtonMenuItem1">
284+ <Properties>
285+ <Property name="buttonGroup" type="javax.swing.ButtonGroup" editor="org.netbeans.modules.form.RADComponent$ButtonGroupPropertyEditor">
286+ <ComponentRef name="viewButtonGroup"/>
287+ </Property>
288+ <Property name="text" type="java.lang.String" resourceKey="jRadioButtonMenuItem1.text"/>
289+ <Property name="name" type="java.lang.String" value="jRadioButtonMenuItem1" noResource="true"/>
290+ </Properties>
291+ <BindingProperties>
292+ <BindingProperty name="selected" source="displayModeBinder" sourcePath="${uniqueAll}" target="jRadioButtonMenuItem1" targetPath="selected" updateStrategy="0" immediately="false"/>
293+ </BindingProperties>
294+ </MenuItem>
295+ <MenuItem class="javax.swing.JRadioButtonMenuItem" name="ununiqueRadioButtonMenuItem">
296+ <Properties>
297+ <Property name="buttonGroup" type="javax.swing.ButtonGroup" editor="org.netbeans.modules.form.RADComponent$ButtonGroupPropertyEditor">
298+ <ComponentRef name="viewButtonGroup"/>
299+ </Property>
300+ <Property name="mnemonic" type="int" value="68"/>
301+ <Property name="text" type="java.lang.String" resourceKey="ununiqueRadioButtonMenuItem.text"/>
302+ <Property name="name" type="java.lang.String" value="ununiqueRadioButtonMenuItem" noResource="true"/>
303+ </Properties>
304+ <BindingProperties>
305+ <BindingProperty name="selected" source="displayModeBinder" sourcePath="${ununique}" target="ununiqueRadioButtonMenuItem" targetPath="selected" updateStrategy="0" immediately="false"/>
306+ </BindingProperties>
307+ </MenuItem>
308+ <MenuItem class="javax.swing.JRadioButtonMenuItem" name="jRadioButtonMenuItem2">
309+ <Properties>
310+ <Property name="buttonGroup" type="javax.swing.ButtonGroup" editor="org.netbeans.modules.form.RADComponent$ButtonGroupPropertyEditor">
311+ <ComponentRef name="viewButtonGroup"/>
312+ </Property>
313+ <Property name="text" type="java.lang.String" resourceKey="jRadioButtonMenuItem2.text"/>
314+ <Property name="name" type="java.lang.String" value="jRadioButtonMenuItem2" noResource="true"/>
315+ </Properties>
316+ <BindingProperties>
317+ <BindingProperty name="selected" source="displayModeBinder" sourcePath="${ununiqueAll}" target="jRadioButtonMenuItem2" targetPath="selected" updateStrategy="0" immediately="false"/>
318+ </BindingProperties>
255319 </MenuItem>
256320 </SubComponents>
257321 </Menu>
@@ -296,7 +360,7 @@
296360 <DimensionLayout dim="0">
297361 <Group type="103" groupAlignment="0" attributes="0">
298362 <Group type="102" alignment="1" attributes="0">
299- <Component id="statusMessageLabel" pref="235" max="32767" attributes="0"/>
363+ <Component id="statusMessageLabel" pref="225" max="32767" attributes="0"/>
300364 <EmptySpace max="-2" attributes="0"/>
301365 <Component id="progressBar" min="-2" max="-2" attributes="0"/>
302366 <EmptySpace max="-2" attributes="0"/>
@@ -359,6 +423,11 @@
359423 <AuxValue name="JavaCodeGenerator_InitCodePre" type="java.lang.String" value="keyMatcherBinder.bindDataViewTableModel(dataViewTableModel);"/>
360424 </AuxValues>
361425 </Component>
426+ <Component class="textkeymatcher.ui.model.DisplayModeBinder" name="displayModeBinder">
427+ <AuxValues>
428+ <AuxValue name="JavaCodeGenerator_InitCodePre" type="java.lang.String" value="displayModeBinder.bindDataViewTableModel(dataViewTableModel);"/>
429+ </AuxValues>
430+ </Component>
362431 </NonVisualComponents>
363432 <Properties>
364433 <Property name="component" type="javax.swing.JComponent" editor="org.netbeans.modules.form.ComponentChooserEditor">
--- a/src/textkeymatcher/ui/TextKeyMatcherView.java
+++ b/src/textkeymatcher/ui/TextKeyMatcherView.java
@@ -257,6 +257,10 @@ public class TextKeyMatcherView extends FrameView implements ExitListener {
257257 unmatchedRadioButtonMenuItem = new javax.swing.JRadioButtonMenuItem();
258258 existsLeftRadioButtonMenuItem = new javax.swing.JRadioButtonMenuItem();
259259 missingLeftRadioButtonMenuItem = new javax.swing.JRadioButtonMenuItem();
260+ uniqueRadioButtonMenuItem = new javax.swing.JRadioButtonMenuItem();
261+ jRadioButtonMenuItem1 = new javax.swing.JRadioButtonMenuItem();
262+ ununiqueRadioButtonMenuItem = new javax.swing.JRadioButtonMenuItem();
263+ jRadioButtonMenuItem2 = new javax.swing.JRadioButtonMenuItem();
260264 helpMenu = new javax.swing.JMenu();
261265 javax.swing.JMenuItem aboutMenuItem = new javax.swing.JMenuItem();
262266 statusPanel = new javax.swing.JPanel();
@@ -267,6 +271,7 @@ public class TextKeyMatcherView extends FrameView implements ExitListener {
267271 keyButtonGroup = new javax.swing.ButtonGroup();
268272 dataViewTableModel = new textkeymatcher.ui.model.DataViewTableModel();
269273 keyMatcherBinder = new textkeymatcher.ui.model.KeyMatcherBinder();
274+ displayModeBinder = new textkeymatcher.ui.model.DisplayModeBinder();
270275
271276 mainPanel.setName("mainPanel"); // NOI18N
272277
@@ -387,35 +392,92 @@ public class TextKeyMatcherView extends FrameView implements ExitListener {
387392
388393 viewButtonGroup.add(allRadioButtonMenuItem);
389394 allRadioButtonMenuItem.setMnemonic('A');
390- allRadioButtonMenuItem.setSelected(true);
391395 allRadioButtonMenuItem.setText(resourceMap.getString("allRadioButtonMenuItem.text")); // NOI18N
392396 allRadioButtonMenuItem.setName("allRadioButtonMenuItem"); // NOI18N
397+
398+ binding = org.jdesktop.beansbinding.Bindings.createAutoBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, displayModeBinder, org.jdesktop.beansbinding.ELProperty.create("${all}"), allRadioButtonMenuItem, org.jdesktop.beansbinding.BeanProperty.create("selected"));
399+ bindingGroup.addBinding(binding);
400+
393401 viewMenu.add(allRadioButtonMenuItem);
394402
395403 viewButtonGroup.add(matchedRadioButtonMenuItem);
396404 matchedRadioButtonMenuItem.setMnemonic('M');
397405 matchedRadioButtonMenuItem.setText(resourceMap.getString("matchedRadioButtonMenuItem.text")); // NOI18N
398406 matchedRadioButtonMenuItem.setName("matchedRadioButtonMenuItem"); // NOI18N
407+
408+ binding = org.jdesktop.beansbinding.Bindings.createAutoBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, displayModeBinder, org.jdesktop.beansbinding.ELProperty.create("${matched}"), matchedRadioButtonMenuItem, org.jdesktop.beansbinding.BeanProperty.create("selected"));
409+ bindingGroup.addBinding(binding);
410+
399411 viewMenu.add(matchedRadioButtonMenuItem);
400412
401413 viewButtonGroup.add(unmatchedRadioButtonMenuItem);
402414 unmatchedRadioButtonMenuItem.setMnemonic('N');
403415 unmatchedRadioButtonMenuItem.setText(resourceMap.getString("unmatchedRadioButtonMenuItem.text")); // NOI18N
404416 unmatchedRadioButtonMenuItem.setName("unmatchedRadioButtonMenuItem"); // NOI18N
417+
418+ binding = org.jdesktop.beansbinding.Bindings.createAutoBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, displayModeBinder, org.jdesktop.beansbinding.ELProperty.create("${unmatched}"), unmatchedRadioButtonMenuItem, org.jdesktop.beansbinding.BeanProperty.create("selected"));
419+ bindingGroup.addBinding(binding);
420+
405421 viewMenu.add(unmatchedRadioButtonMenuItem);
406422
407423 viewButtonGroup.add(existsLeftRadioButtonMenuItem);
408424 existsLeftRadioButtonMenuItem.setMnemonic('1');
409425 existsLeftRadioButtonMenuItem.setText(resourceMap.getString("existsLeftRadioButtonMenuItem.text")); // NOI18N
410426 existsLeftRadioButtonMenuItem.setName("existsLeftRadioButtonMenuItem"); // NOI18N
427+
428+ binding = org.jdesktop.beansbinding.Bindings.createAutoBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, displayModeBinder, org.jdesktop.beansbinding.ELProperty.create("${existsFirstColumn}"), existsLeftRadioButtonMenuItem, org.jdesktop.beansbinding.BeanProperty.create("selected"));
429+ bindingGroup.addBinding(binding);
430+
411431 viewMenu.add(existsLeftRadioButtonMenuItem);
412432
413433 viewButtonGroup.add(missingLeftRadioButtonMenuItem);
414434 missingLeftRadioButtonMenuItem.setMnemonic('2');
415435 missingLeftRadioButtonMenuItem.setText(resourceMap.getString("missingLeftRadioButtonMenuItem.text")); // NOI18N
416436 missingLeftRadioButtonMenuItem.setName("missingLeftRadioButtonMenuItem"); // NOI18N
437+
438+ binding = org.jdesktop.beansbinding.Bindings.createAutoBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, displayModeBinder, org.jdesktop.beansbinding.ELProperty.create("${missingFirstColumn}"), missingLeftRadioButtonMenuItem, org.jdesktop.beansbinding.BeanProperty.create("selected"));
439+ bindingGroup.addBinding(binding);
440+
417441 viewMenu.add(missingLeftRadioButtonMenuItem);
418442
443+ viewButtonGroup.add(uniqueRadioButtonMenuItem);
444+ uniqueRadioButtonMenuItem.setMnemonic('U');
445+ uniqueRadioButtonMenuItem.setText(resourceMap.getString("uniqueRadioButtonMenuItem.text")); // NOI18N
446+ uniqueRadioButtonMenuItem.setName("uniqueRadioButtonMenuItem"); // NOI18N
447+
448+ binding = org.jdesktop.beansbinding.Bindings.createAutoBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, displayModeBinder, org.jdesktop.beansbinding.ELProperty.create("${unique}"), uniqueRadioButtonMenuItem, org.jdesktop.beansbinding.BeanProperty.create("selected"));
449+ bindingGroup.addBinding(binding);
450+
451+ viewMenu.add(uniqueRadioButtonMenuItem);
452+
453+ viewButtonGroup.add(jRadioButtonMenuItem1);
454+ jRadioButtonMenuItem1.setText(resourceMap.getString("jRadioButtonMenuItem1.text")); // NOI18N
455+ jRadioButtonMenuItem1.setName("jRadioButtonMenuItem1"); // NOI18N
456+
457+ binding = org.jdesktop.beansbinding.Bindings.createAutoBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, displayModeBinder, org.jdesktop.beansbinding.ELProperty.create("${uniqueAll}"), jRadioButtonMenuItem1, org.jdesktop.beansbinding.BeanProperty.create("selected"));
458+ bindingGroup.addBinding(binding);
459+
460+ viewMenu.add(jRadioButtonMenuItem1);
461+
462+ viewButtonGroup.add(ununiqueRadioButtonMenuItem);
463+ ununiqueRadioButtonMenuItem.setMnemonic('D');
464+ ununiqueRadioButtonMenuItem.setText(resourceMap.getString("ununiqueRadioButtonMenuItem.text")); // NOI18N
465+ ununiqueRadioButtonMenuItem.setName("ununiqueRadioButtonMenuItem"); // NOI18N
466+
467+ binding = org.jdesktop.beansbinding.Bindings.createAutoBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, displayModeBinder, org.jdesktop.beansbinding.ELProperty.create("${ununique}"), ununiqueRadioButtonMenuItem, org.jdesktop.beansbinding.BeanProperty.create("selected"));
468+ bindingGroup.addBinding(binding);
469+
470+ viewMenu.add(ununiqueRadioButtonMenuItem);
471+
472+ viewButtonGroup.add(jRadioButtonMenuItem2);
473+ jRadioButtonMenuItem2.setText(resourceMap.getString("jRadioButtonMenuItem2.text")); // NOI18N
474+ jRadioButtonMenuItem2.setName("jRadioButtonMenuItem2"); // NOI18N
475+
476+ binding = org.jdesktop.beansbinding.Bindings.createAutoBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, displayModeBinder, org.jdesktop.beansbinding.ELProperty.create("${ununiqueAll}"), jRadioButtonMenuItem2, org.jdesktop.beansbinding.BeanProperty.create("selected"));
477+ bindingGroup.addBinding(binding);
478+
479+ viewMenu.add(jRadioButtonMenuItem2);
480+
419481 menuBar.add(viewMenu);
420482
421483 helpMenu.setMnemonic('H');
@@ -463,6 +525,8 @@ public class TextKeyMatcherView extends FrameView implements ExitListener {
463525
464526 keyMatcherBinder.bindDataViewTableModel(dataViewTableModel);
465527
528+ displayModeBinder.bindDataViewTableModel(dataViewTableModel);
529+
466530 setComponent(mainPanel);
467531 setMenuBar(menuBar);
468532 setStatusBar(statusPanel);
@@ -757,8 +821,11 @@ public class TextKeyMatcherView extends FrameView implements ExitListener {
757821 private javax.swing.JTable dataViewTable;
758822 private textkeymatcher.ui.model.DataViewTableModel dataViewTableModel;
759823 private javax.swing.JScrollPane dataViewTableSP;
824+ private textkeymatcher.ui.model.DisplayModeBinder displayModeBinder;
760825 private javax.swing.JRadioButtonMenuItem existsLeftRadioButtonMenuItem;
761826 private javax.swing.JMenu helpMenu;
827+ private javax.swing.JRadioButtonMenuItem jRadioButtonMenuItem1;
828+ private javax.swing.JRadioButtonMenuItem jRadioButtonMenuItem2;
762829 private javax.swing.JPopupMenu.Separator jSeparator1;
763830 private javax.swing.JPopupMenu.Separator jSeparator2;
764831 private javax.swing.ButtonGroup keyButtonGroup;
@@ -781,7 +848,9 @@ public class TextKeyMatcherView extends FrameView implements ExitListener {
781848 private javax.swing.JPanel statusPanel;
782849 private javax.swing.JRadioButtonMenuItem textIgnoreCaseRadioButtonMenuItem;
783850 private javax.swing.JRadioButtonMenuItem textNormalRadioButtonMenuItem;
851+ private javax.swing.JRadioButtonMenuItem uniqueRadioButtonMenuItem;
784852 private javax.swing.JRadioButtonMenuItem unmatchedRadioButtonMenuItem;
853+ private javax.swing.JRadioButtonMenuItem ununiqueRadioButtonMenuItem;
785854 private javax.swing.ButtonGroup viewButtonGroup;
786855 private javax.swing.JMenu viewMenu;
787856 private org.jdesktop.beansbinding.BindingGroup bindingGroup;
--- a/src/textkeymatcher/ui/model/DataViewTableModel.java
+++ b/src/textkeymatcher/ui/model/DataViewTableModel.java
@@ -252,6 +252,10 @@ public class DataViewTableModel extends KeyMatchedRowView implements TextKeyMatc
252252 renumbering(rowMap);
253253 }
254254
255+ /**
256+ * ディスプレイモードによる行フィルタを適用する.<br>
257+ * @param displayMode ディスプレイモード
258+ */
255259 public void setDisplayMode(DisplayMode displayMode) {
256260 if (displayMode == null) {
257261 throw new IllegalArgumentException();
@@ -261,10 +265,16 @@ public class DataViewTableModel extends KeyMatchedRowView implements TextKeyMatc
261265
262266 if (displayMode != oldValue) {
263267 propCng.firePropertyChange(PROPERTY_DISPLAY_MODE, oldValue, displayMode);
268+
269+ // 行フィルタを適用しなおす
264270 renumbering(rowMap);
265271 }
266272 }
267273
274+ /**
275+ * 現在適用されているディスプレイモード(行フィルタ)を取得する.
276+ * @return ディスプレイモード
277+ */
268278 public DisplayMode getDisplayMode() {
269279 return displayMode;
270280 }
--- a/src/textkeymatcher/ui/model/DisplayModeBinder.java
+++ b/src/textkeymatcher/ui/model/DisplayModeBinder.java
@@ -83,18 +83,30 @@ public class DisplayModeBinder extends AbstractBean {
8383 boolean oldUnmatched = oldValue == DisplayMode.UNMATCHED;
8484 boolean oldExistsFirst = oldValue == DisplayMode.EXISTS_FIRST_COLUMN;
8585 boolean oldMissingFirst = oldValue == DisplayMode.MISSING_FIRST_COLUMN;
86+ boolean oldUnique = oldValue == DisplayMode.UNIQUE;
87+ boolean oldUnunique = oldValue == DisplayMode.UNUNIQUE;
88+ boolean oldUniqueAll = oldValue == DisplayMode.UNIQUE_ALL;
89+ boolean oldUnuniqueAll = oldValue == DisplayMode.UNUNIQUE_ALL;
8690
8791 boolean newAll = newValue == DisplayMode.ALL;
8892 boolean newMatched = newValue == DisplayMode.MATCHED;
8993 boolean newUnmatched = newValue == DisplayMode.UNMATCHED;
9094 boolean newExistsFirst = newValue == DisplayMode.EXISTS_FIRST_COLUMN;
9195 boolean newMissingFirst = newValue == DisplayMode.MISSING_FIRST_COLUMN;
96+ boolean newUnique = newValue == DisplayMode.UNIQUE;
97+ boolean newUnunique = newValue == DisplayMode.UNUNIQUE;
98+ boolean newUniqueAll = newValue == DisplayMode.UNIQUE_ALL;
99+ boolean newUnuniqueAll = newValue == DisplayMode.UNUNIQUE_ALL;
92100
93101 firePropertyChange("all", oldAll, newAll);
94102 firePropertyChange("matched", oldMatched, newMatched);
95103 firePropertyChange("unmatched", oldUnmatched, newUnmatched);
96104 firePropertyChange("existsFirstColumn", oldExistsFirst, newExistsFirst);
97105 firePropertyChange("missingFirstColumn", oldMissingFirst, newMissingFirst);
106+ firePropertyChange("unique", oldUnique, newUnique);
107+ firePropertyChange("ununique", oldUnunique, newUnunique);
108+ firePropertyChange("uniqueAll", oldUniqueAll, newUniqueAll);
109+ firePropertyChange("ununiqueAll", oldUnuniqueAll, newUnuniqueAll);
98110 }
99111
100112 public void setAll(boolean enable) {
@@ -146,4 +158,44 @@ public class DisplayModeBinder extends AbstractBean {
146158 public boolean isMissingFirstColumn() {
147159 return getDisplayMode() == DisplayMode.MISSING_FIRST_COLUMN;
148160 }
161+
162+ public void setUnique(boolean enable) {
163+ if (enable) {
164+ setDisplayMode(DisplayMode.UNIQUE);
165+ }
166+ }
167+
168+ public boolean isUnique() {
169+ return getDisplayMode() == DisplayMode.UNIQUE;
170+ }
171+
172+ public void setUnunique(boolean enable) {
173+ if (enable) {
174+ setDisplayMode(DisplayMode.UNUNIQUE);
175+ }
176+ }
177+
178+ public boolean isUnunique() {
179+ return getDisplayMode() == DisplayMode.UNUNIQUE;
180+ }
181+
182+ public void setUniqueAll(boolean enable) {
183+ if (enable) {
184+ setDisplayMode(DisplayMode.UNIQUE_ALL);
185+ }
186+ }
187+
188+ public boolean isUniqueAll() {
189+ return getDisplayMode() == DisplayMode.UNIQUE_ALL;
190+ }
191+
192+ public void setUnuniqueAll(boolean enable) {
193+ if (enable) {
194+ setDisplayMode(DisplayMode.UNUNIQUE_ALL);
195+ }
196+ }
197+
198+ public boolean isUnuniqueAll() {
199+ return getDisplayMode() == DisplayMode.UNUNIQUE_ALL;
200+ }
149201 }
--- a/src/textkeymatcher/ui/resources/TextKeyMatcherView.properties
+++ b/src/textkeymatcher/ui/resources/TextKeyMatcherView.properties
@@ -65,3 +65,7 @@ onLoad.Action.accelerator=shortcut O
6565 onSave.Action.accelerator=shortcut S
6666 aboutMenuItem.text=\u30d0\u30fc\u30b8\u30e7\u30f3\u60c5\u5831...(A)
6767 dataViewTable.gridColor=153, 153, 153
68+uniqueRadioButtonMenuItem.text=Unique
69+ununiqueRadioButtonMenuItem.text=Ununique
70+jRadioButtonMenuItem1.text=Unique (Strict)
71+jRadioButtonMenuItem2.text=Ununique (Strict)
--- a/src/textkeymatcher/ui/resources/TextKeyMatcherView_ja_JP.properties
+++ b/src/textkeymatcher/ui/resources/TextKeyMatcherView_ja_JP.properties
@@ -1,8 +1,8 @@
11
22 fileMenu.text=\u30d5\u30a1\u30a4\u30eb(F)
3-dataMenu.text=\u30c7\u30fc\u30bf(D)
4-keyMenu.text=\u30ad\u30fc(K)
5-viewMenu.text=\u8868\u793a(V)
3+dataMenu.text=\u30c7\u30fc\u30bf\u64cd\u4f5c(D)
4+keyMenu.text=\u30ad\u30fc\u8b58\u5225(K)
5+viewMenu.text=\u884c\u30d5\u30a3\u30eb\u30bf(V)
66 helpMenu.text=\u30d8\u30eb\u30d7(H)
77 newMenuItem.text=\u65b0\u898f(N)
88 openMenuItem.text=\u958b\u304f(O)
@@ -56,3 +56,7 @@ onLoad.Action.accelerator=shortcut O
5656 onSave.Action.accelerator=shortcut S
5757 aboutMenuItem.text=\u30d0\u30fc\u30b8\u30e7\u30f3\u60c5\u5831...(A)
5858 dataViewTable.gridColor=153, 153, 153
59+uniqueRadioButtonMenuItem.text=\u30e6\u30cb\u30fc\u30af(U)
60+ununiqueRadioButtonMenuItem.text=\u975e\u30e6\u30cb\u30fc\u30af(D)
61+jRadioButtonMenuItem1.text=\u30e6\u30cb\u30fc\u30af(\u81ea\u5217\u3082\u5bfe\u8c61)
62+jRadioButtonMenuItem2.text=\u975e\u30e6\u30cb\u30fc\u30af(\u81ea\u5217\u3082\u5bfe\u8c61)
--- a/src/textkeymatcher/ui/resources/TextKeyMatcherView_ja_JP_MAC.properties
+++ b/src/textkeymatcher/ui/resources/TextKeyMatcherView_ja_JP_MAC.properties
@@ -37,11 +37,11 @@ dataMenu.text=\u30c7\u30fc\u30bf
3737 loadDataMenuItem.text=\u30c7\u30fc\u30bf\u306e\u53d6\u8fbc\u307f
3838 removeMenuItem.text=\u524a\u9664
3939 mergeMenuItem.text=\u7d50\u5408
40-keyMenu.text=\u30ad\u30fc
40+keyMenu.text=\u30ad\u30fc\u8b58\u5225
4141 textNormalRadioButtonMenuItem.text=\u6587\u5b57\u5217
4242 textIgnoreCaseRadioButtonMenuItem.text=\u6587\u5b57\u5217(\u5927\u6587\u5b57\u30fb\u5c0f\u6587\u5b57\u3092\u7121\u8996)
4343 numberRadioButtonMenuItem.text=\u6570\u5024
44-viewMenu.text=\u8868\u793a
44+viewMenu.text=\u884c\u30d5\u30a3\u30eb\u30bf
4545 allRadioButtonMenuItem.text=\u3059\u3079\u3066
4646 matchedRadioButtonMenuItem.text=\u4e00\u81f4\u306e\u307f
4747 unmatchedRadioButtonMenuItem.text=\u4e0d\u4e00\u81f4\u98f2\u307f
@@ -64,3 +64,8 @@ onNew.Action.accelerator=shortcut N
6464 onLoad.Action.accelerator=shortcut O
6565 onSave.Action.accelerator=shortcut S
6666 aboutMenuItem.text=\u30d0\u30fc\u30b8\u30e7\u30f3\u60c5\u5831...
67+uniqueRadioButtonMenuItem.text=\u30e6\u30cb\u30fc\u30af
68+ununiqueRadioButtonMenuItem.text=\u975e\u30e6\u30cb\u30fc\u30af
69+dataViewTable.gridColor=153, 153, 153
70+jRadioButtonMenuItem1.text=\u30e6\u30cb\u30fc\u30af(\u81ea\u5217\u3082\u5bfe\u8c61)
71+jRadioButtonMenuItem2.text=\u975e\u30e6\u30cb\u30fc\u30af(\u81ea\u5217\u3082\u5bfe\u8c61)