• R/O
  • SSH
  • HTTPS

Commit

Frequently used words (click to add to your profile)

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

カルネージハートエクサのチームデータ編集ツール JAVAベース


Commit MetaInfo

Revision11 (tree)
Time2015-06-07 18:22:05
Authormanjihq

Log Message

マッチデータ編集機能の追加

Change Summary

Incremental Difference

--- chexaFormation/trunk/src/chexaformation/Main.java (revision 10)
+++ chexaFormation/trunk/src/chexaformation/Main.java (revision 11)
@@ -12,7 +12,7 @@
1212 */
1313 public class Main {
1414
15- static public final String app_version = "Version 1.2";
15+ static public final String app_version = "Version 2.0";
1616 static public String cheDataDir = null;
1717 static public String cheMatchDataDir = null;
1818 static public String cheTextDataDir = null;
--- chexaFormation/trunk/src/chexaformation/mainForm.java (revision 10)
+++ chexaFormation/trunk/src/chexaformation/mainForm.java (revision 11)
@@ -39,6 +39,7 @@
3939
4040 openTeam = new javax.swing.JButton();
4141 makeMatchData = new javax.swing.JButton();
42+ editMatchData = new javax.swing.JButton();
4243 mainPanel = new chexaformation.TeamListPanel();
4344
4445 setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
@@ -62,6 +63,14 @@
6263 }
6364 });
6465
66+ editMatchData.setFont(new java.awt.Font("Monospaced", 0, 12)); // NOI18N
67+ editMatchData.setText(bundle.getString("editMatchData")); // NOI18N
68+ editMatchData.addActionListener(new java.awt.event.ActionListener() {
69+ public void actionPerformed(java.awt.event.ActionEvent evt) {
70+ editMatchDataActionPerformed(evt);
71+ }
72+ });
73+
6574 javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
6675 getContentPane().setLayout(layout);
6776 layout.setHorizontalGroup(
@@ -71,8 +80,10 @@
7180 .addComponent(openTeam)
7281 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
7382 .addComponent(makeMatchData)
74- .addContainerGap(214, Short.MAX_VALUE))
75- .addComponent(mainPanel, javax.swing.GroupLayout.DEFAULT_SIZE, 412, Short.MAX_VALUE)
83+ .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
84+ .addComponent(editMatchData)
85+ .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
86+ .addComponent(mainPanel, javax.swing.GroupLayout.DEFAULT_SIZE, 416, Short.MAX_VALUE)
7687 );
7788 layout.setVerticalGroup(
7889 layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
@@ -79,7 +90,8 @@
7990 .addGroup(layout.createSequentialGroup()
8091 .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
8192 .addComponent(openTeam)
82- .addComponent(makeMatchData))
93+ .addComponent(makeMatchData)
94+ .addComponent(editMatchData))
8395 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
8496 .addComponent(mainPanel, javax.swing.GroupLayout.DEFAULT_SIZE, 398, Short.MAX_VALUE))
8597 );
@@ -122,12 +134,15 @@
122134 getString("titleMatchWindow"),
123135 false);
124136 che.set_fname("NEWMATCH.CHE");
137+ che.set_match_name("マッチデータ");
125138 che.clear_oke();
126- dlg.add(new MatchDataPanel(che));
139+ MatchDataPanel panel = new MatchDataPanel(che);
140+ dlg.add(panel);
127141 dlg.pack();
128142 Point pos = this.getLocation();
129143 pos.x += this.getWidth();
130144 dlg.setLocation(pos);
145+ panel.update_title();
131146 dlg.setVisible(true);
132147 } else {
133148 Main.mesg_box(this,
@@ -148,7 +163,59 @@
148163 }
149164 }
150165 }//GEN-LAST:event_makeMatchDataActionPerformed
166+
167+ private void editMatchDataActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_editMatchDataActionPerformed
168+ // TODO add your handling code here:
169+ int nret;
170+ JFileChooser fdlg = new JFileChooser(Main.cheMatchDataDir);
171+ String filterTitle
172+ = java.util.ResourceBundle.getBundle("chexaformation/resource").
173+ getString("filterTitleCHE");
174+ FileNameExtensionFilter ffilter
175+ = new FileNameExtensionFilter(filterTitle, "CHE");
176+ fdlg.setFileFilter(ffilter);
177+ nret = fdlg.showOpenDialog(getRootPane().getParent());
178+ if (nret == JFileChooser.APPROVE_OPTION) {
179+ File ifile = fdlg.getSelectedFile();
180+ cheFile che = new cheFile(ifile.getAbsolutePath());
181+ Main.cheMatchDataDir = ifile.getParent();
182+ if (che.load() == true) {
183+ if (che.is_teamfile() == false) {
184+ JDialog dlg = new JDialog(this,
185+ java.util.ResourceBundle.getBundle(
186+ "chexaformation/resource").
187+ getString("titleMatchWindow"),
188+ false);
189+ MatchDataPanel panel = new MatchDataPanel(che);
190+ dlg.add(panel);
191+ dlg.pack();
192+ Point pos = this.getLocation();
193+ pos.x += this.getWidth();
194+ dlg.setLocation(pos);
195+ panel.update_title();
196+ dlg.setVisible(true);
197+ } else {
198+ Main.mesg_box(this,
199+ java.util.ResourceBundle.getBundle(
200+ "chexaformation/resource").getString("loadCHE"),
201+ java.util.ResourceBundle.getBundle(
202+ "chexaformation/resource").
203+ getString("errNotMatchData"),
204+ ifile.getAbsolutePath());
205+ }
206+ } else {
207+ Main.mesg_box(this,
208+ java.util.ResourceBundle.getBundle(
209+ "chexaformation/resource").getString("loadCHE"),
210+ java.util.ResourceBundle.getBundle(
211+ "chexaformation/resource").getString("faileReadCHE"),
212+ ifile.getAbsolutePath());
213+ }
214+ }
215+ }//GEN-LAST:event_editMatchDataActionPerformed
216+
151217 // Variables declaration - do not modify//GEN-BEGIN:variables
218+ private javax.swing.JButton editMatchData;
152219 private chexaformation.TeamListPanel mainPanel;
153220 private javax.swing.JButton makeMatchData;
154221 private javax.swing.JButton openTeam;