Closedown
This commit is contained in:
@@ -6,6 +6,7 @@ import ch.psi.utils.swing.MonitoredPanel;
|
||||
import ch.psi.pshell.ui.Panel;
|
||||
import ch.psi.utils.swing.SwingUtils;
|
||||
import ch.psi.wsaf.Task;
|
||||
import java.awt.Desktop;
|
||||
import java.io.File;
|
||||
import java.text.DateFormat;
|
||||
import java.text.SimpleDateFormat;
|
||||
@@ -176,6 +177,7 @@ public class TestingList extends Panel {
|
||||
jCheckBox1 = new javax.swing.JCheckBox();
|
||||
jScrollPane1 = new javax.swing.JScrollPane();
|
||||
jTextField1 = new javax.swing.JTextArea();
|
||||
jButtonOpenLog = new javax.swing.JButton();
|
||||
|
||||
setLayout(new java.awt.BorderLayout(10, 10));
|
||||
|
||||
@@ -248,6 +250,14 @@ public class TestingList extends Panel {
|
||||
jScrollPane1.setViewportView(jTextField1);
|
||||
|
||||
add(jScrollPane1, java.awt.BorderLayout.PAGE_START);
|
||||
|
||||
jButtonOpenLog.setIcon(new javax.swing.ImageIcon(getClass().getResource("/icons/log-icon.png"))); // NOI18N
|
||||
jButtonOpenLog.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
jButtonOpenLogActionPerformed(evt);
|
||||
}
|
||||
});
|
||||
add(jButtonOpenLog, java.awt.BorderLayout.LINE_END);
|
||||
}// </editor-fold>//GEN-END:initComponents
|
||||
|
||||
private void jButtonRunActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonRunActionPerformed
|
||||
@@ -317,8 +327,30 @@ public class TestingList extends Panel {
|
||||
updateStatus();
|
||||
// TODO add your handling code here:
|
||||
}//GEN-LAST:event_jTable1KeyTyped
|
||||
|
||||
private void jButtonOpenLogActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonOpenLogActionPerformed
|
||||
// TODO add your handling code here:
|
||||
if (System.getProperty("os.name").toLowerCase().contains("windows")) {
|
||||
String cmd;
|
||||
cmd = "rundll32 url.dll,FileProtocolHandler " + TESTS_LOG_DEFAULT_DIR;
|
||||
try {
|
||||
Runtime.getRuntime().exec(cmd);
|
||||
} catch (IOException ex) {
|
||||
Logger.getLogger(TestingList.class.getName()).log(Level.SEVERE, null, ex);
|
||||
}
|
||||
}
|
||||
else {
|
||||
File log = new File(TESTS_LOG_DEFAULT_DIR);
|
||||
try {
|
||||
Desktop.getDesktop().edit(log);
|
||||
} catch (IOException ex) {
|
||||
Logger.getLogger(TestingList.class.getName()).log(Level.SEVERE, null, ex);
|
||||
}
|
||||
}
|
||||
}//GEN-LAST:event_jButtonOpenLogActionPerformed
|
||||
|
||||
// Variables declaration - do not modify//GEN-BEGIN:variables
|
||||
private javax.swing.JButton jButtonOpenLog;
|
||||
private javax.swing.JButton jButtonRun;
|
||||
private javax.swing.JCheckBox jCheckBox1;
|
||||
private javax.swing.JScrollPane jScrollPane1;
|
||||
|
||||
Reference in New Issue
Block a user