• R/O
  • SSH
  • HTTPS

Commit

Frequently used words (click to add to your profile)

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

作業部屋の使い方を試しています。


Commit MetaInfo

Revision65 (tree)
Time2014-07-31 14:22:25
Authortuna_p

Log Message

(empty log message)

Change Summary

Incremental Difference

--- trunk/HtmlTest2/src/Form/HtmlSearch.java (revision 64)
+++ trunk/HtmlTest2/src/Form/HtmlSearch.java (revision 65)
@@ -23,8 +23,14 @@
2323
2424 import Lib.HtmlParser;
2525 import Lib.SearchData;
26+import java.awt.Desktop;
2627 import java.io.File;
28+import java.io.IOException;
29+import java.net.URI;
30+import java.net.URISyntaxException;
2731 import java.util.*;
32+import java.util.logging.Level;
33+import java.util.logging.Logger;
2834 import javax.swing.JFileChooser;
2935 import javax.swing.filechooser.FileNameExtensionFilter;
3036 import org.jdesktop.observablecollections.ObservableCollections;
@@ -81,6 +87,8 @@
8187 jMenu1 = new javax.swing.JMenu();
8288 jMenuLoad = new javax.swing.JMenuItem();
8389 jMenuSave = new javax.swing.JMenuItem();
90+ jMenu3 = new javax.swing.JMenu();
91+ jMenuItem1 = new javax.swing.JMenuItem();
8492 jMenu2 = new javax.swing.JMenu();
8593
8694 jFileChooser1.setCurrentDirectory(new java.io.File("C:\\zz_work\\java"));
@@ -210,6 +218,18 @@
210218
211219 jMenuBar1.add(jMenu1);
212220
221+ jMenu3.setText("ツール");
222+
223+ jMenuItem1.setText("ブラウザで表示");
224+ jMenuItem1.addActionListener(new java.awt.event.ActionListener() {
225+ public void actionPerformed(java.awt.event.ActionEvent evt) {
226+ jMenuItem1ActionPerformed(evt);
227+ }
228+ });
229+ jMenu3.add(jMenuItem1);
230+
231+ jMenuBar1.add(jMenu3);
232+
213233 jMenu2.setText("検索");
214234 jMenu2.addMouseListener(new java.awt.event.MouseAdapter() {
215235 public void mouseClicked(java.awt.event.MouseEvent evt) {
@@ -322,6 +342,18 @@
322342 }
323343 }//GEN-LAST:event_jBtnSearchActionPerformed
324344
345+ private void jMenuItem1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem1ActionPerformed
346+ Desktop desktop = Desktop.getDesktop();
347+ String uriString = jTxtUrl.getText();
348+ try {
349+ URI uri = new URI(uriString);
350+ desktop.browse(uri);
351+
352+ } catch (URISyntaxException | IOException ex) {
353+ Logger.getLogger(HtmlSearch.class.getName()).log(Level.SEVERE, null, ex);
354+ }
355+ }//GEN-LAST:event_jMenuItem1ActionPerformed
356+
325357 /**
326358 * @param args the command line arguments
327359 */
@@ -366,7 +398,9 @@
366398 private javax.swing.JLabel jLabel1;
367399 private javax.swing.JMenu jMenu1;
368400 private javax.swing.JMenu jMenu2;
401+ private javax.swing.JMenu jMenu3;
369402 private javax.swing.JMenuBar jMenuBar1;
403+ private javax.swing.JMenuItem jMenuItem1;
370404 private javax.swing.JMenuItem jMenuLoad;
371405 private javax.swing.JMenuItem jMenuSave;
372406 private javax.swing.JPanel jPanel1;
--- trunk/HtmlTest2/src/Lib/HtmlParser.java (revision 64)
+++ trunk/HtmlTest2/src/Lib/HtmlParser.java (revision 65)
@@ -199,7 +199,7 @@
199199 /**
200200 * インターネット接続.
201201 */
202- public void getpageData() {
202+ private void getpageData() {
203203 try {
204204 URL url = new URL(UrlAdress);
205205 HttpURLConnection con = (HttpURLConnection)url.openConnection();