源码文件FileDeleterFrame.java:<wbr style="line-height:25px"><wbr style="line-height:25px"><div style="line-height:25px"> <div style="line-height:25px"><span style="font-family:Arial,Helvetica,simsun,u5b8bu4f53; color:#3366ff; line-height:25px">package com.teleca.robin;</span></div> <div style="line-height:25px"><span style="font-family:Arial,Helvetica,simsun,u5b8bu4f53; color:#3366ff; line-height:25px">import java.io.*;</span></div> <div style="line-height:25px"><span style="font-family:Arial,Helvetica,simsun,u5b8bu4f53; color:#3366ff; line-height:25px">import java.awt.*;</span></div> <div style="line-height:25px"><span style="font-family:Arial,Helvetica,simsun,u5b8bu4f53; color:#3366ff; line-height:25px">import javax.swing.*;</span></div> <div style="line-height:25px"><span style="font-family:Arial,Helvetica,simsun,u5b8bu4f53; color:#3366ff; line-height:25px">import com.teleca.robin.lib.face.Console;</span></div> <div style="line-height:25px"><span style="font-family:Arial,Helvetica,simsun,u5b8bu4f53; color:#3366ff; line-height:25px">import com.teleca.robin.lib.util.TextAreaConsole;</span></div> <div style="line-height:25px"> <span style="font-family:Arial,Helvetica,simsun,u5b8bu4f53; color:#3366ff; line-height:25px">public class</span><span style="font-family:Arial,Helvetica,simsun,u5b8bu4f53; color:#ff6600; line-height:25px">FileDeleterFrame</span><span style="font-family:Arial,Helvetica,simsun,u5b8bu4f53; color:#3366ff; line-height:25px">extends JFrame {</span> </div> <div style="line-height:25px"><span style="font-family:Arial,Helvetica,simsun,u5b8bu4f53; color:#3366ff; line-height:25px"> </span></div> <div style="line-height:25px"><span style="font-family:Arial,Helvetica,simsun,u5b8bu4f53; color:#3366ff; line-height:25px"> /** Creates a new instance of fileManager */</span></div> <div style="line-height:25px"><span style="font-family:Arial,Helvetica,simsun,u5b8bu4f53; color:#3366ff; line-height:25px"> JPanel contentPane;</span></div> <div style="line-height:25px"><span style="font-family:Arial,Helvetica,simsun,u5b8bu4f53; color:#3366ff; line-height:25px"> BorderLayout borderLayout1 = new BorderLayout();</span></div> <div style="line-height:25px"><span style="font-family:Arial,Helvetica,simsun,u5b8bu4f53; color:#3366ff; line-height:25px"> Component component2 = Box.createHorizontalStrut(8);</span></div> <div style="line-height:25px"><span style="font-family:Arial,Helvetica,simsun,u5b8bu4f53; color:#3366ff; line-height:25px"> JEditorPane jEditorPane1 = new JEditorPane();</span></div> <div style="line-height:25px"><span style="font-family:Arial,Helvetica,simsun,u5b8bu4f53; color:#3366ff; line-height:25px"> JButton jButton1 = new JButton();</span></div> <div style="line-height:25px"><span style="font-family:Arial,Helvetica,simsun,u5b8bu4f53; color:#3366ff; line-height:25px"> String folderRoot;</span></div> <div style="line-height:25px"><span style="font-family:Arial,Helvetica,simsun,u5b8bu4f53; color:#3366ff; line-height:25px"> String fileNames;</span></div> <div style="line-height:25px"><span style="font-family:Arial,Helvetica,simsun,u5b8bu4f53; color:#3366ff; line-height:25px"> Console console;</span></div> <div style="line-height:25px"> <span style="font-family:Arial,Helvetica,simsun,u5b8bu4f53; color:#3366ff; line-height:25px"> public</span><span style="font-family:Arial,Helvetica,simsun,u5b8bu4f53; color:#ff6600; line-height:25px">FileDeleterFrame</span><span style="font-family:Arial,Helvetica,simsun,u5b8bu4f53; color:#3366ff; line-height:25px">() {</span> </div> <div style="line-height:25px"><span style="font-family:Arial,Helvetica,simsun,u5b8bu4f53; color:#3366ff; line-height:25px"> <span style="line-height:25px; white-space:pre"> </span>this("","");</span></div> <div style="line-height:25px"><span style="font-family:Arial,Helvetica,simsun,u5b8bu4f53; color:#3366ff; line-height:25px"> }</span></div> <div style="line-height:25px"> <span style="font-family:Arial,Helvetica,simsun,u5b8bu4f53; color:#3366ff; line-height:25px"> public</span><span style="font-family:Arial,Helvetica,simsun,u5b8bu4f53; color:#ff6600; line-height:25px">FileDeleterFram</span><span style="font-family:Arial,Helvetica,simsun,u5b8bu4f53; color:#ff6600; line-height:25px">e</span><span style="font-family:Arial,Helvetica,simsun,u5b8bu4f53; color:#3366ff; line-height:25px">(String folderRoot,String fileNames) {</span> </div> <div style="line-height:25px"><span style="font-family:Arial,Helvetica,simsun,u5b8bu4f53; color:#3366ff; line-height:25px"> <span style="line-height:25px; white-space:pre"> </span>if(folderRoot==null)</span></div> <div style="line-height:25px"><span style="font-family:Arial,Helvetica,simsun,u5b8bu4f53; color:#3366ff; line-height:25px"> <span style="line-height:25px; white-space:pre"> </span>folderRoot="";</span></div> <div style="line-height:25px"><span style="font-family:Arial,Helvetica,simsun,u5b8bu4f53; color:#3366ff; line-height:25px"> <span style="line-height:25px; white-space:pre"> </span>if(fileNames==null)</span></div> <div style="line-height:25px"><span style="font-family:Arial,Helvetica,simsun,u5b8bu4f53; color:#3366ff; line-height:25px"> <span style="line-height:25px; white-space:pre"> </span>fileNames="";</span></div> <div style="line-height:25px"><span style="font-family:Arial,Helvetica,simsun,u5b8bu4f53; color:#3366ff; line-height:25px"> <span style="line-height:25px; white-space:pre"> </span>this.folderRoot=folderRoot;</span></div> <div style="line-height:25px"><span style="font-family:Arial,Helvetica,simsun,u5b8bu4f53; color:#3366ff; line-height:25px"> <span style="line-height:25px; white-space:pre"> </span>this.fileNames=fileNames;</span></div> <div style="line-height:25px"><span style="font-family:Arial,Helvetica,simsun,u5b8bu4f53; color:#3366ff; line-height:25px"> <span style="line-height:25px; white-space:pre"> </span>init();</span></div> <div style="line-height:25px"><span style="font-family:Arial,Helvetica,simsun,u5b8bu4f53; color:#3366ff; line-height:25px"> }</span></div> <div style="line-height:25px"><span style="font-family:Arial,Helvetica,simsun,u5b8bu4f53; color:#3366ff; line-height:25px"> void init()</span></div> <div style="line-height:25px"><span style="font-family:Arial,Helvetica,simsun,u5b8bu4f53; color:#3366ff; line-height:25px"> {</span></div> <div style="line-height:25px"><span style="font-family:Arial,Helvetica,simsun,u5b8bu4f53; color:#3366ff; line-height:25px"> <span style="line-height:25px; white-space:pre"> </span>initComponents();</span></div> <div style="line-height:25px"><span style="font-family:Arial,Helvetica,simsun,u5b8bu4f53; color:#3366ff; line-height:25px"> setDefaultCloseOperation(EXIT_ON_CLOSE); <span style="line-height:25px; white-space:pre"> </span></span></div> <div style="line-height:25px"><span style="font-family:Arial,Helvetica,simsun,u5b8bu4f53; color:#3366ff; line-height:25px"> }</span></div> <div style="line-height:25px"><span style="font-family:Arial,Helvetica,simsun,u5b8bu4f53; color:#3366ff; line-height:25px"> // Variables declaration - do not modify//GEN-BEGIN:variables</span></div> <div style="line-height:25px"><span style="font-family:Arial,Helvetica,simsun,u5b8bu4f53; color:#3366ff; line-height:25px"> private javax.swing.JButton jButtonStart;</span></div> <div style="line-height:25px"><span style="font-family:Arial,Helvetica,simsun,u5b8bu4f53; color:#3366ff; line-height:25px"> private javax.swing.JButton jButtonExit;</span></div> <div style="line-height:25px"><span style="font-family:Arial,Helvetica,simsun,u5b8bu4f53; color:#3366ff; line-height:25px"> private javax.swing.JButton jButtonPauseReset;</span></div> <div style="line-height:25px"><span style="font-family:Arial,Helvetica,simsun,u5b8bu4f53; color:#3366ff; line-height:25px"> private javax.swing.JLabel jLabelFolderRoot;</span></div> <div style="line-height:25px"><span style="font-family:Arial,Helvetica,simsun,u5b8bu4f53; color:#3366ff; line-height:25px"> private javax.swing.JLabel jLabelNames;</span></div> <div style="line-height:25px"><span style="font-family:Arial,Helvetica,simsun,u5b8bu4f53; color:#3366ff; line-height:25px"> private javax.swing.JTextArea jTextAreaTip;</span></div> <div style="line-height:25px"><span style="font-family:Arial,Helvetica,simsun,u5b8bu4f53; color:#3366ff; line-height:25px"> private javax.swing.JTextField jTextFieldFolderRoot;</span></div> <div style="line-height:25px"><span style="font-family:Arial,Helvetica,simsun,u5b8bu4f53; color:#3366ff; line-height:25px"> private javax.swing.JTextField jTextFieldNames;</span></div> <div style="line-height:25px"><span style="font-family:Arial,Helvetica,simsun,u5b8bu4f53; color:#3366ff; line-height:25px"> // End of variables declaration//GEN-END:variables</span></div> <div style="line-height:25px"><span style="font-family:Arial,Helvetica,simsun,u5b8bu4f53; color:#3366ff; line-height:25px"> private void initComponents() {</span></div> <div style="line-height:25px"><span style="font-family:Arial,Helvetica,simsun,u5b8bu4f53; color:#3366ff; line-height:25px"><br style="line-height:25px"></span></div> <div style="line-height:25px"><span style="font-family:Arial,Helvetica,simsun,u5b8bu4f53; color:#3366ff; line-height:25px"> jButtonStart = new javax.swing.JButton();</span></div> <div style="line-height:25px"><span style="font-family:Arial,Helvetica,simsun,u5b8bu4f53; color:#3366ff; line-height:25px"> jButtonPauseReset = new javax.swing.JButton();</span></div> <div style="line-height:25px"><span style="font-family:Arial,Helvetica,simsun,u5b8bu4f53; color:#3366ff; line-height:25px"> jButtonExit = new javax.swing.JButton();</span></div> <div style="line-height:25px"><span style="font-family:Arial,Helvetica,simsun,u5b8bu4f53; color:#3366ff; line-height:25px"> jTextFieldFolderRoot = new javax.swing.JTextField(20);</span></div> <div style="line-height:25px"><span style="font-family:Arial,Helvetica,simsun,u5b8bu4f53; color:#3366ff; line-height:25px"> jTextFieldNames = new javax.swing.JTextField(20);</span></div> <div style="line-height:25px"><span style="font-family:Arial,Helvetica,simsun,u5b8bu4f53; color:#3366ff; line-height:25px"> jLabelFolderRoot = new javax.swing.JLabel();</span></div> <div style="line-height:25px"><span style="font-family:Arial,Helvetica,simsun,u5b8bu4f53; color:#3366ff; line-height:25px"> jLabelNames = new javax.swing.JLabel();</span></div> <div style="line-height:25px"><span style="font-family:Arial,Helvetica,simsun,u5b8bu4f53; color:#3366ff; line-height:25px"> jTextAreaTip = new javax.swing.JTextArea(10,50);</span></div> <div style="line-height:25px"><span style="font-family:Arial,Helvetica,simsun,u5b8bu4f53; line-height:25px"><span style="color:#3366ff; line-height:25px"> </span><span style="line-height:25px; color:rgb(51,102,255); white-space:pre"> <span style="line-height:25px; white-space:pre"></span></span><span style="color:#ff6600; line-height:25px">console=new TextAreaConsole(jTextAreaTip);</span></span></div> <div style="line-height:25px"><span style="font-family:Arial,Helvetica,simsun,u5b8bu4f53; color:#3366ff; line-height:25px"> setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);</span></div> <div style="line-height:25px"><span style="font-family:Arial,Helvetica,simsun,u5b8bu4f53; color:#3366ff; line-height:25px"> setName("Form"); // NOI18N</span></div> <div style="line-height:25px"><span style="font-family:Arial,Helvetica,simsun,u5b8bu4f53; color:#3366ff; line-height:25px"><br style="line-height:25px"></span></div> <div style="line-height:25px"><span style="font-family:Arial,Helvetica,simsun,u5b8bu4f53; color:#3366ff; line-height:25px"> jButtonStart.setText("Start"); // NOI18N</span></div> <div style="line-height:25px"><span style="font-family:Arial,Helvetica,simsun,u5b8bu4f53; color:#3366ff; line-height:25px"> jButtonStart.setName("jButtonStart"); // NOI18N</span></div> <div style="line-height:25px"><span style="font-family:Arial,Helvetica,simsun,u5b8bu4f53; color:#3366ff; line-height:25px"> jButtonStart.addActionListener(new java.awt.event.ActionListener() {</span></div> <div style="line-height:25px"><span style="font-family:Arial,Helvetica,simsun,u5b8bu4f53; color:#3366ff; line-height:25px"> public void actionPerformed(java.awt.event.ActionEvent evt) {</span></div> <div style="line-height:25px"><span style="font-family:Arial,Helvetica,simsun,u5b8bu4f53; color:#3366ff; line-height:25px"> start();</span></div> <div style="line-height:25px"><span style="font-family:Arial,Helvetica,simsun,u5b8bu4f53; color:#3366ff; line-height:25px"> }</span></div> <div style="line-height:25px"><span style="font-family:Arial,Helvetica,simsun,u5b8bu4f53; color:#3366ff; line-height:25px"> });</span></div> <div style="line-height:25px"><span style="font-family:Arial,Helvetica,simsun,u5b8bu4f53; color:#3366ff; line-height:25px"> jButtonPauseReset.setText("reset"); // NOI18N</span></div> <div style="line-height:25px"><span style="font-family:Arial,Helvetica,simsun,u5b8bu4f53; color:#3366ff; line-height:25px"> jButtonPauseReset.setName("jButtonPauseReset"); // NOI18N</span></div> <div style="line-height:25px"><span style="font-family:Arial,Helvetica,simsun,u5b8bu4f53; color:#3366ff; line-height:25px"> jButtonPauseReset.addActionListener(new java.awt.event.ActionListener() {</span></div> <div style="line-height:25px"><span style="font-family:Arial,Helvetica,simsun,u5b8bu4f53; color:#3366ff; line-height:25px"> public void actionPerformed(java.awt.event.ActionEvent evt) {</span></div> <div style="line-height:25px"><span style="font-family:Arial,Helvetica,simsun,u5b8bu4f53; color:#3366ff; line-height:25px"> reset();</span></div> <div style="line-height:25px"><span style="font-family:Arial,Helvetica,simsun,u5b8bu4f53; color:#3366ff; line-height:25px"> }</span></div> <div style="line-height:25px"><span style="font-family:Arial,Helvetica,simsun,u5b8bu4f53; color:#3366ff; line-height:25px"> });</span></div> <div style="line-height:25px"><span style="font-family:Arial,Helvetica,simsun,u5b8bu4f53; color:#3366ff; line-height:25px"> jButtonExit.setText("Exit"); // NOI18N</span></div> <div style="line-height:25px"><span style="font-family:Arial,Helvetica,simsun,u5b8bu4f53; color:#3366ff; line-height:25px"> jButtonExit.setName("jButtonExit"); // NOI18N</span></div> <div style="line-height:25px"><span style="font-family:Arial,Helvetica,simsun,u5b8bu4f53; color:#3366ff; line-height:25px"> jButtonExit.addActionListener(new java.awt.event.ActionListener() {</span></div> <div style="line-height:25px"><span style="font-family:Arial,Helvetica,simsun,u5b8bu4f53; color:#3366ff; line-height:25px"> public void actionPerformed(java.awt.event.ActionEvent evt) {</span></div> <div style="line-height:25px"><span style="font-family:Arial,Helvetica,simsun,u5b8bu4f53; color:#3366ff; line-height:25px"> System.exit(0);</span></div> <div style="line-height:25px"><span style="font-family:Arial,Helvetica,simsun,u5b8bu4f53; color:#3366ff; line-height:25px"> }</span></div> <div style="line-height:25px"><span style="font-family:Arial,Helvetica,simsun,u5b8bu4f53; color:#3366ff; line-height:25px"> });</span></div> <div style="line-height:25px"><span style="font-family:Arial,Helvetica,simsun,u5b8bu4f53; color:#3366ff; line-height:25px"> <span style="line-height:25px; white-space:pre"> </span>jButtonStart.setEnabled(true);</span></div> <div style="line-height:25px"><span style="font-family:Arial,Helvetica,simsun,u5b8bu4f53; color:#3366ff; line-height:25px"> jTextFieldFolderRoot.setText(folderRoot); // NOI18N</span></div> <div style="line-height:25px"><span style="font-family:Arial,Helvetica,simsun,u5b8bu4f53; color:#3366ff; line-height:25px"> jTextFieldFolderRoot.setName("jTextFieldFolderRoot"); // NOI18N</span></div> <div style="line-height:25px"><span style="font-family:Arial,Helvetica,simsun,u5b8bu4f53; color:#3366ff; line-height:25px"> jTextFieldFolderRoot.setHorizontalAlignment(JTextField.CENTER);</span></div> <div style="line-height:25px"><span style="font-family:Arial,Helvetica,simsun,u5b8bu4f53; color:#3366ff; line-height:25px"><br style="line-height:25px"></span></div> <div style="line-height:25px"><span style="font-family:Arial,Helvetica,simsun,u5b8bu4f53; color:#3366ff; line-height:25px"> jTextFieldNames.setText(fileNames); // NOI18N</span></div> <div style="line-height:25px"><span style="font-family:Arial,Helvetica,simsun,u5b8bu4f53; color:#3366ff; line-height:25px"> jTextFieldNames.setName("jTextFieldNames"); // NOI18N</span></div> <div style="line-height:25px"><span style="font-family:Arial,Helvetica,simsun,u5b8bu4f53; color:#3366ff; line-height:25px"> jTextFieldNames.setHorizontalAlignment(JTextField.CENTER);</span></div> <div style="line-height:25px"><span style="font-family:Arial,Helvetica,simsun,u5b8bu4f53; color:#3366ff; line-height:25px"><br style="line-height:25px"></span></div> <div style="line-height:25px"><span style="font-family:Arial,Helvetica,simsun,u5b8bu4f53; color:#3366ff; line-height:25px"> jLabelFolderRoot.setText("the root folder"); // NOI18N</span></div> <div style="line-height:25px"><span style="font-family:Arial,Helvetica,simsun,u5b8bu4f53; color:#3366ff; line-height:25px"> jLabelFolderRoot.setName("jLabelFolderRoot"); // NOI18N</span></div> <div style="line-height:25px"><span style="font-family:Arial,Helvetica,simsun,u5b8bu4f53; color:#3366ff; line-height:25px"><br style="line-height:25px"></span></div> <div style="line-height:25px"><span style="font-family:Arial,Helvetica,simsun,u5b8bu4f53; color:#3366ff; line-height:25px"> jLabelNames.setText("file or folder to delete"); // NOI18N</span></div> <div style="line-height:25px"><span style="font-family:Arial,Helvetica,simsun,u5b8bu4f53; color:#3366ff; line-height:25px"> jLabelNames.setName("jLabelNames"); // NOI18N</span></div> <div style="line-height:25px"><span style="font-family:Arial,Helvetica,simsun,u5b8bu4f53; color:#3366ff; line-height:25px"><br style="line-height:25px"></span></div> <div style="line-height:25px"><span style="font-family:Arial,Helvetica,simsun,u5b8bu4f53; color:#3366ff; line-height:25px"> jTextAreaTip.setText("idle"); // NOI18N</span></div> <div style="line-height:25px"><span style="font-family:Arial,Helvetica,simsun,u5b8bu4f53; color:#3366ff; line-height:25px"> jTextAreaTip.setName("jTextAreaTip"); // NOI18N</span></div> <div style="line-height:25px"><span style="font-family:Arial,Helvetica,simsun,u5b8bu4f53; color:#3366ff; line-height:25px"> jTextAreaTip.setWrapStyleWord(true);</span></div> <div style="line-height:25px"><span style="font-family:Arial,Helvetica,simsun,u5b8bu4f53; color:#3366ff; line-height:25px"> jTextAreaTip.setEditable(false);</span></div> <div style="line-height:25px"><span style="font-family:Arial,Helvetica,simsun,u5b8bu4f53; color:#3366ff; line-height:25px"> jTextAreaTip.setAutoscrolls(true);</span></div> <div style="line-height:25px"><span style="font-family:Arial,Helvetica,simsun,u5b8bu4f53; color:#ff6600; line-height:25px"> JPanel consolePanel=new JPanel();</span></div> <div style="line-height:25px"><span style="font-family:Arial,Helvetica,simsun,u5b8bu4f53; color:#ff6600; line-height:25px"> JScrollPane js=new JScrollPane(jTextAreaTip);</span></div> <div style="line-height:25px"><span style="font-family:Arial,Helvetica,simsun,u5b8bu4f53; color:#ff6600; line-height:25px"> consolePanel.setLayout(new GridLayout(1,1));</span></div> <div style="line-height:25px"><span style="font-family:Arial,Helvetica,simsun,u5b8bu4f53; color:#ff6600; line-height:25px"> consolePanel.add(js);</span></div> <div style="line-height:25px"><span style="font-family:Arial,Helvetica,simsun,u5b8bu4f53; color:#3366ff; line-height:25px"> javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());</span></div> <div style="line-height:25px"><span style="font-family:Arial,Helvetica,simsun,u5b8bu4f53; color:#3366ff; line-height:25px"> getContentPane().setLayout(layout);</span></div> <div style="line-height:25px"><span style="font-family:Arial,Helvetica,simsun,u5b8bu4f53; color:#3366ff; line-height:25px"> layout.setHorizontalGroup(</span></div> <div style="line-height:25px"><span style="font-family:Arial,Helvetica,simsun,u5b8bu4f53; color:#3366ff; line-height:25px"> layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)</span></div> <div style="line-height:25px"><span style="font-family:Arial,Helvetica,simsun,u5b8bu4f53; color:#3366ff; line-height:25px"> .addGroup(layout.createSequentialGroup()</span></div> <div style="line-height:25px"><span style="font-family:Arial,Helvetica,simsun,u5b8bu4f53; color:#3366ff; line-height:25px"> .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)</span></div> <div style="line-height:25px"><span style="font-family:Arial,Helvetica,simsun,u5b8bu4f53; color:#3366ff; line-height:25px"> .addGroup(layout.createSequentialGroup()</span></div> <div style="line-height:25px"><span style="font-family:Arial,Helvetica,simsun,u5b8bu4f53; color:#3366ff; line-height:25px"> .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)</span></div> <div style="line-height:25px"><span style="font-family:Arial,Helvetica,simsun,u5b8bu4f53; color:#3366ff; line-height:25px"> .addGroup(layout.createSequentialGroup()</span></div> <div style="line-height:25px"><span style="font-family:Arial,Helvetica,simsun,u5b8bu4f53; color:#3366ff; line-height:25px"> .addGap(71, 71, 71)</span></div> <div style="line-height:25px"><span style="font-family:Arial,Helvetica,simsun,u5b8bu4f53; color:#3366ff; line-height:25px"> .addComponent(jLabelNames))</span></div> <div style="line-height:25px"><span style="font-family:Arial,Helvetica,simsun,u5b8bu4f53; color:#3366ff; line-height:25px"> .addGroup(layout.createSequentialGroup()</span></div> <div style="line-height:25px"><span style="font-family:Arial,Helvetica,simsun,u5b8bu4f53; color:#3366ff; line-height:25px"> .addGap(70, 70, 70)</span></div> <div style="line-height:25px"><span style="font-family:Arial,Helvetica,simsun,u5b8bu4f53; color:#3366ff; line-height:25px"> .addComponent(jLabelFolderRoot))</span></div> <div style="line-height:25px"><span style="font-family:Arial,Helvetica,simsun,u5b8bu4f53; color:#3366ff; line-height:25px"> .addGroup(layout.createSequentialGroup()</span></div> <div style="line-height:25px"><span style="font-family:Arial,Helvetica,simsun,u5b8bu4f53; color:#3366ff; line-height:25px"> .addGap(90, 90, 90)</span></div> <div style="line-height:25px"><span style="font-family:Arial,Helvetica,simsun,u5b8bu4f53; color:#3366ff; line-height:25px"> .addComponent(jButtonStart))</span></div> <div style="line-height:25px"><span style="font-family:Arial,Helvetica,simsun,u5b8bu4f53; color:#3366ff; line-height:25px"> .addGroup(layout.createSequentialGroup()</span></div> <div style="line-height:25px"><span style="font-family:Arial,Helvetica,simsun,u5b8bu4f53; color:#3366ff; line-height:25px"> <span style="line-height:25px; white-space:pre"> </span>)</span></div> <div style="line-height:25px"><span style="font-family:Arial,Helvetica,simsun,u5b8bu4f53; color:#3366ff; line-height:25px"> )</span></div> <div style="line-height:25px"><span style="font-family:Arial,Helvetica,simsun,u5b8bu4f53; color:#3366ff; line-height:25px"> .addGap(10, 10, 10)</span></div> <div style="line-height:25px"><span style="font-family:Arial,Helvetica,simsun,u5b8bu4f53; color:#3366ff; line-height:25px"> .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) </span></div> <div style="line-height:25px"><span style="font-family:Arial,Helvetica,simsun,u5b8bu4f53; color:#3366ff; line-height:25px"> .addComponent(jTextFieldNames, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)</span></div> <div style="line-height:25px"><span style="font-family:Arial,Helvetica,simsun,u5b8bu4f53; color:#3366ff; line-height:25px"> .addComponent(jTextFieldFolderRoot, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) </span></div> <div style="line-height:25px"><span style="font-family:Arial,Helvetica,simsun,u5b8bu4f53; color:#3366ff; line-height:25px"> .addGroup(layout.createSequentialGroup()</span></div> <div style="line-height:25px"><span style="font-family:Arial,Helvetica,simsun,u5b8bu4f53; color:#3366ff; line-height:25px"> .addGap(20, 20, 20)</span></div> <div style="line-height:25px"><span style="font-family:Arial,Helvetica,simsun,u5b8bu4f53; color:#3366ff; line-height:25px"> .addComponent(jButtonPauseReset)</span></div> <div style="line-height:25px"><span style="font-family:Arial,Helvetica,simsun,u5b8bu4f53; color:#3366ff; line-height:25px"> )</span></div> <div style="line-height:25px"><span style="font-family:Arial,Helvetica,simsun,u5b8bu4f53; color:#3366ff; line-height:25px"> .addGroup(layout.createSequentialGroup()</span></div> <div style="line-height:25px"><span style="font-family:Arial,Helvetica,simsun,u5b8bu4f53; color:#3366ff; line-height:25px"> .addGap(180, 180, 180)</span></div> <div style="line-height:25px"><span style="font-family:Arial,Helvetica,simsun,u5b8bu4f53; color:#3366ff; line-height:25px"> .addComponent(jButtonExit)</span></div> <div style="line-height:25px"><span style="font-family:Arial,Helvetica,simsun,u5b8bu4f53; color:#3366ff; line-height:25px"> )</span></div> <div style="line-height:25px"><span style="font-family:Arial,Helvetica,simsun,u5b8bu4f53; color:#3366ff; line-height:25px"> )</span></div> <div style="line-height:25px"><span style="font-family:Arial,Helvetica,simsun,u5b8bu4f53; color:#3366ff; line-height:25px"> )</span></div> <div style="line-height:25px"><span style="font-family:Arial,Helvetica,simsun,u5b8bu4f53; color:#3366ff; line-height:25px"> .addGroup(layout.createSequentialGroup()</span></div> <div style="line-height:25px"><span style="font-family:Arial,Helvetica,simsun,u5b8bu4f53; color:#3366ff; line-height:25px"> .addGap(30, 30, 30)</span></div> <div style="line-height:25px"><span style="font-family:Arial,Helvetica,simsun,u5b8bu4f53; color:#3366ff; line-height:25px"> .addComponent(consolePanel)</span></div> <div style="line-height:25px"><span style="font-family:Arial,Helvetica,simsun,u5b8bu4f53; color:#3366ff; line-height:25px"> <span style="line-height:25px; white-space:pre"> </span>)</span></div> <div style="line-height:25px"><span style="font-family:Arial,Helvetica,simsun,u5b8bu4f53; color:#3366ff; line-height:25px"> )</span></div> <div style="line-height:25px"><span style="font-family:Arial,Helvetica,simsun,u5b8bu4f53; color:#3366ff; line-height:25px"> .addContainerGap(40, Short.MAX_VALUE))</span></div> <div style="line-height:25px"><span style="font-family:Arial,Helvetica,simsun,u5b8bu4f53; color:#3366ff; line-height:25px"> );</span></div> <div style="line-height:25px"><span style="font-family:Arial,Helvetica,simsun,u5b8bu4f53; color:#3366ff; line-height:25px"> layout.setVerticalGroup(</span></div> <div style="line-height:25px"><span style="font-family:Arial,Helvetica,simsun,u5b8bu4f53; color:#3366ff; line-height:25px"> layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)</span></div> <div style="line-height:25px"><span style="font-family:Arial,Helvetica,simsun,u5b8bu4f53; color:#3366ff; line-height:25px"> .addGroup(layout.createSequentialGroup()</span></div> <div style="line-height:25px"><span style="font-family:Arial,Helvetica,simsun,u5b8bu4f53; color:#3366ff; line-height:25px"> .addGap(63, 63, 63)</span></div> <div style="line-height:25px"><span style="font-family:Arial,Helvetica,simsun,u5b8bu4f53; color:#3366ff; line-height:25px"> .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)</span></div> <div style="line-height:25px"><span style="font-family:Arial,Helvetica,simsun,u5b8bu4f53; color:#3366ff; line-height:25px"> .addComponent(jLabelFolderRoot)</span></div> <div style="line-height:25px"><span style="font-family:Arial,Helvetica,simsun,u5b8bu4f53; color:#3366ff; line-height:25px"> .addComponent(jTextFieldFolderRoot, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))</span></div> <div style="line-height:25px"><span style="font-family:Arial,Helvetica,simsun,u5b8bu4f53; color:#3366ff; line-height:25px"> .addGap(29, 29, 29)</span></div> <div style="line-height:25px"><span style="font-family:Arial,Helvetica,simsun,u5b8bu4f53; color:#3366ff; line-height:25px"> .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)</span></div> <div style="line-height:25px"><span style="font-family:Arial,Helvetica,simsun,u5b8bu4f53; color:#3366ff; line-height:25px"> .addComponent(jLabelNames)</span></div> <div style="line-height:25px"><span style="font-family:Arial,Helvetica,simsun,u5b8bu4f53; color:#3366ff; line-height:25px"> .addComponent(jTextFieldNames, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))</span></div> <div style="line-height:25px"><span style="font-family:Arial,Helvetica,simsun,u5b8bu4f53; color:#3366ff; line-height:25px"> .addGap(62, 62, 62)</span></div> <div style="line-height:25px"><span style="font-family:Arial,Helvetica,simsun,u5b8bu4f53; color:#3366ff; line-height:25px"> .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)</span></div> <div style="line-height:25px"><span style="font-family:Arial,Helvetica,simsun,u5b8bu4f53; color:#3366ff; line-height:25px"> .addComponent(jButtonStart)</span></div> <div style="line-height:25px"><span style="font-family:Arial,Helvetica,simsun,u5b8bu4f53; color:#3366ff; line-height:25px"> .addComponent(jButtonPauseReset)</span></div> <div style="line-height:25px"><span style="font-family:Arial,Helvetica,simsun,u5b8bu4f53; color:#3366ff; line-height:25px"> .addComponent(jButtonExit))</span></div> <div style="line-height:25px"><span style="font-family:Arial,Helvetica,simsun,u5b8bu4f53; color:#3366ff; line-height:25px"> .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 34, Short.MAX_VALUE)</span></div> <div style="line-height:25px"><span style="font-family:Arial,Helvetica,simsun,u5b8bu4f53; color:#3366ff; line-height:25px"> .addComponent(consolePanel)</span></div> <div style="line-height:25px"><span style="font-family:Arial,Helvetica,simsun,u5b8bu4f53; color:#3366ff; line-height:25px"> .addGap(32, 32, 32))</span></div> <div style="line-height:25px"><span style="font-family:Arial,Helvetica,simsun,u5b8bu4f53; color:#3366ff; line-height:25px"> );</span></div> <div style="line-height:25px"><span style="font-family:Arial,Helvetica,simsun,u5b8bu4f53; color:#3366ff; line-height:25px"><br style="line-height:25px"></span></div> <div style="line-height:25px"><span style="font-family:Arial,Helvetica,simsun,u5b8bu4f53; color:#3366ff; line-height:25px"> pack();</span></div> <div style="line-height:25px"><span style="font-family:Arial,Helvetica,simsun,u5b8bu4f53; color:#3366ff; line-height:25px"> }// </editor-fold>//GEN-END:initComponents</span></div> <div style="line-height:25px"> <span style="font-family:Arial,Helvetica,simsun,u5b8bu4f53; color:#3366ff; line-height:25px"> private void</span><span style="font-family:Arial,Helvetica,simsun,u5b8bu4f53; color:#ff6600; line-height:25px">start</span><span style="font-family:Arial,Helvetica,simsun,u5b8bu4f53; color:#3366ff; line-height:25px">() {//GEN-FIRST:event_start</span> </div> <div style="line-height:25px"><span style="font-family:Arial,Helvetica,simsun,u5b8bu4f53; color:#3366ff; line-height:25px"> // TODO add your handling code here:</span></div> <div style="line-height:25px"><span style="font-family:Arial,Helvetica,simsun,u5b8bu4f53; color:#3366ff; line-height:25px"> <span style="line-height:25px; white-space:pre"> </span>folderRoot=jTextFieldFolderRoot.getText().trim();</span></div> <div style="line-height:25px"><span style="font-family:Arial,Helvetica,simsun,u5b8bu4f53; color:#3366ff; line-height:25px"> <span style="line-height:25px; white-space:pre"> </span>if(folderRoot==null||folderRoot.length()==0)</span></div> <div style="line-height:25px"><span style="font-family:Arial,Helvetica,simsun,u5b8bu4f53; color:#3366ff; line-height:25px"> <span style="line-height:25px; white-space:pre"> </span>{</span></div> <div style="line-height:25px"><span style="font-family:Arial,Helvetica,simsun,u5b8bu4f53; color:#3366ff; line-height:25px"> <span style="line-height:25px; white-space:pre"> </span>console.print("Please input the folder!");</span></div> <div style="line-height:25px"><span style="font-family:Arial,Helvetica,simsun,u5b8bu4f53; color:#3366ff; line-height:25px"> <span style="line-height:25px; white-space:pre"> </span>}</span></div> <div style="line-height:25px"><span style="font-family:Arial,Helvetica,simsun,u5b8bu4f53; color:#3366ff; line-height:25px"><span style="line-height:25px; white-space:pre"></span>File file=new File(folderRoot);</span></div> <div style="line-height:25px"><span style="font-family:Arial,Helvetica,simsun,u5b8bu4f53; color:#3366ff; line-height:25px"><span style="line-height:25px; white-space:pre"></span>if(!file.exists())</span></div> <div style="line-height:25px"><span style="font-family:Arial,Helvetica,simsun,u5b8bu4f53; color:#3366ff; line-height:25px"><span style="line-height:25px; white-space:pre"></span>{</span></div> <div style="line-height:25px"><span style="font-family:Arial,Helvetica,simsun,u5b8bu4f53; color:#3366ff; line-height:25px"><span style="line-height:25px; white-space:pre"></span>console.print("the folder:"+folderRoot+" is not exists");</span></div> <div style="line-height:25px"><span style="font-family:Arial,Helvetica,simsun,u5b8bu4f53; color:#3366ff; line-height:25px"><span style="line-height:25px; white-space:pre"></span>return;</span></div> <div style="line-height:25px"><span style="font-family:Arial,Helvetica,simsun,u5b8bu4f53; color:#3366ff; line-height:25px"><span style="line-height:25px; white-space:pre"></span>}</span></div> <div style="line-height:25px"><span style="font-family:Arial,Helvetica,simsun,u5b8bu4f53; color:#3366ff; line-height:25px"> <span style="line-height:25px; white-space:pre"> </span>String fileNames=jTextFieldNames.getText().trim();</span></div> <div style="line-height:25px"><span style="font-family:Arial,Helvetica,simsun,u5b8bu4f53; color:#ff6600; line-height:25px"> <span style="line-height:25px; white-space:pre"> </span>console.clear();</span></div> <div style="line-height:25px"><span style="font-family:Arial,Helvetica,simsun,u5b8bu4f53; color:#ff6600; line-height:25px"> <span style="line-height:25px; white-space:pre"> </span>Worker worker=new Worker(console,folderRoot,fileNames);</span></div> <div style="line-height:25px"><span style="font-family:Arial,Helvetica,simsun,u5b8bu4f53; color:#ff6600; line-height:25px"> <span style="line-height:25px; white-space:pre"> </span>worker.start();</span></div> <div style="line-height:25px"><span style="font-family:Arial,Helvetica,simsun,u5b8bu4f53; color:#3366ff; line-height:25px"> <span style="line-height:25px; white-space:pre"> </span>jButtonStart.setEnabled(false);</span></div> <div style="line-height:25px"><span style="font-family:Arial,Helvetica,simsun,u5b8bu4f53; color:#3366ff; line-height:25px"> <span style="line-height:25px; white-space:pre"> </span>jTextFieldFolderRoot.setEditable(false);</span></div> <div style="line-height:25px"><span style="font-family:Arial,Helvetica,simsun,u5b8bu4f53; color:#3366ff; line-height:25px"> <span style="line-height:25px; white-space:pre"> </span>jTextFieldNames.setEditable(false);</span></div> <div style="line-height:25px"><span style="font-family:Arial,Helvetica,simsun,u5b8bu4f53; color:#3366ff; line-height:25px"> }//GEN-LAST:event_start</span></div> <div style="line-height:25px"> <span style="font-family:Arial,Helvetica,simsun,u5b8bu4f53; color:#3366ff; line-height:25px"> private void</span><span style="font-family:Arial,Helvetica,simsun,u5b8bu4f53; color:#ff6600; line-height:25px">reset</span><span style="font-family:Arial,Helvetica,simsun,u5b8bu4f53; color:#3366ff; line-height:25px">()</span> </div> <div style="line-height:25px"><span style="font-family:Arial,Helvetica,simsun,u5b8bu4f53; color:#3366ff; line-height:25px"> {</span></div> <div style="line-height:25px"><span style="font-family:Arial,Helvetica,simsun,u5b8bu4f53; color:#3366ff; line-height:25px"> <span style="line-height:25px; white-space:pre"> </span>jButtonStart.setEnabled(true);</span></div> <div style="line-height:25px"><span style="font-family:Arial,Helvetica,simsun,u5b8bu4f53; color:#3366ff; line-height:25px"> <span style="line-height:25px; white-space:pre"> </span>jTextFieldFolderRoot.setEditable(true);</span></div> <div style="line-height:25px"><span style="font-family:Arial,Helvetica,simsun,u5b8bu4f53; color:#3366ff; line-height:25px"> <span style="line-height:25px; white-space:pre"> </span>jTextFieldNames.setEditable(true);</span></div> <div style="line-height:25px"><span style="font-family:Arial,Helvetica,simsun,u5b8bu4f53; color:#3366ff; line-height:25px"> <span style="line-height:25px; white-space:pre"> </span>jTextFieldFolderRoot.setText("");</span></div> <div style="line-height:25px"><span style="font-family:Arial,Helvetica,simsun,u5b8bu4f53; color:#3366ff; line-height:25px"> <span style="line-height:25px; white-space:pre"> </span>console.clear();</span></div> <div style="line-height:25px"><span style="font-family:Arial,Helvetica,simsun,u5b8bu4f53; color:#3366ff; line-height:25px"> <span style="line-height:25px; white-space:pre"> </span>console.println("reset");</span></div> <div style="line-height:25px"><span style="font-family:Arial,Helvetica,simsun,u5b8bu4f53; color:#3366ff; line-height:25px"> <span style="line-height:25px; white-space:pre"> </span>jTextFieldNames.setText("");</span></div> <div style="line-height:25px"><span style="font-family:Arial,Helvetica,simsun,u5b8bu4f53; color:#3366ff; line-height:25px"> }</span></div> <div style="line-height:25px"><span style="font-family:Arial,Helvetica,simsun,u5b8bu4f53; color:#3366ff; line-height:25px"> }</span></div> <div style="line-height:22px; color:rgb(153,51,0); font-family:Arial,Helvetica,simsun,u5b8bu4f53"> <br style="line-height:25px"> </div> </div> </wbr></wbr>