From 18 Jan, 2021 0:00 UTC: All services will be temporary unavailable for maintenance
  • R/O
  • SSH
  • HTTPS

提交

Frequently used words (click to add to your profile)

javaandroidc++linuxc#objective-ccocoa誰得qtrubypythonwindowsphpgamebathyscaphegui翻訳comegattwitterframeworkbtronvb.net計画中(planning stage)testdomarduinodirectxpreviewerゲームエンジン

無人機動兵器ダンジョン探索ゲーム JAVAベース


Commit MetaInfo

修订版23 (tree)
时间2015-06-12 19:34:27
作者manjihq

Log Message

ファイルダイアログに拡張子フィルタを設定した

更改概述

差异

--- CarnageHack2/trunk/src/CarnageHack/OkeSoftPanel.java (revision 22)
+++ CarnageHack2/trunk/src/CarnageHack/OkeSoftPanel.java (revision 23)
@@ -414,6 +414,7 @@
414414 FileDialog fd = new FileDialog(CarnageHack.getFrame(),
415415 "SAVE SOFTWARE", FileDialog.SAVE);
416416 fd.setDirectory(datadir);
417+ fd.setFilenameFilter(new OkeSoftFilter(true));
417418 fd.setFile(software.get_filename());
418419 fd.setVisible(true);
419420 String fname = fd.getFile();
@@ -430,6 +431,7 @@
430431 FileDialog fd = new FileDialog(CarnageHack.getFrame(),
431432 "LOAD SOFTWARE", FileDialog.LOAD);
432433 fd.setDirectory(datadir);
434+ fd.setFilenameFilter(new OkeSoftFilter(true));
433435 fd.setFile(software.get_filename());
434436 fd.setVisible(true);
435437 String fname = fd.getFile();
--- CarnageHack2/trunk/src/CarnageHack/OkeHardPanel.java (revision 22)
+++ CarnageHack2/trunk/src/CarnageHack/OkeHardPanel.java (revision 23)
@@ -668,6 +668,7 @@
668668 CarnageHack.resource.getString("titleSAVEHARDWARE"),
669669 FileDialog.SAVE);
670670 fd.setDirectory(datadir);
671+ fd.setFilenameFilter(new OkeHardFilter(true));
671672 fd.setVisible(true);
672673 String fname = fd.getFile();
673674 if (fname != null) {
@@ -683,7 +684,8 @@
683684 FileDialog fd = new FileDialog(CarnageHack.getFrame(),
684685 CarnageHack.resource.getString("titleLOADHARDWARE"),
685686 FileDialog.LOAD);
686- fd.setDirectory(System.getProperty("user.home", "."));
687+ fd.setDirectory(datadir);
688+ fd.setFilenameFilter(new OkeHardFilter(true));
687689 fd.setVisible(true);
688690 String fname = fd.getFile();
689691 if (fname != null) {
@@ -692,11 +694,13 @@
692694 select_combo((Choice) getComponent(1),
693695 hardware.get_mainweapon().get_name());
694696 action("MAINWEAPON", hardware.get_mainweapon().get_name());
695- ((TextField) getComponent(4)).setText(Integer.toString(hardware.get_main_bullette()));
697+ ((TextField) getComponent(4)).setText(Integer.
698+ toString(hardware.get_main_bullette()));
696699 select_combo((Choice) getComponent(6),
697700 hardware.get_subweapon().get_name());
698701 action("SUBWEAPON", hardware.get_subweapon().get_name());
699- ((TextField) getComponent(9)).setText(Integer.toString(hardware.get_sub_bullette()));
702+ ((TextField) getComponent(9)).setText(Integer.
703+ toString(hardware.get_sub_bullette()));
700704 select_combo((Choice) getComponent(11),
701705 hardware.get_cpu().get_name());
702706 action("CPU", hardware.get_cpu().get_name());