📄 codemanager.java
字号:
.addGap(44, 44, 44) .addComponent(openFolderButton) .addGap(34, 34, 34) .addComponent(buttonGetFileList) .addGap(44, 44, 44) .addComponent(uploadButton) .addGap(36, 36, 36) .addComponent(downloadButton) .addContainerGap(109, Short.MAX_VALUE)) ); fileMenuItem1.setText("File"); menuItemDownloadManager.setText("DownloadManager"); menuItemDownloadManager.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { menuItemDownloadManagerActionPerformed(evt); } }); fileMenuItem1.add(menuItemDownloadManager); fileMenuItem1.add(jSeparator2); fileExitMenuItem.setText("Exit"); fileExitMenuItem.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { fileExitMenuItemActionPerformed(evt); } }); fileMenuItem1.add(fileExitMenuItem); jMenuBar2.add(fileMenuItem1); editMenuItem1.setText("Edit"); jMenuItem1.setText("Add"); editMenuItem1.add(jMenuItem1); jMenuBar2.add(editMenuItem1); toolsMenuItem.setText("Tools"); optionsMenuItem.setText("Options"); toolsMenuItem.add(optionsMenuItem); jMenuBar2.add(toolsMenuItem); helpMenuItem.setText("Help"); aboutMenuItem.setText("About"); helpMenuItem.add(aboutMenuItem); jMenuBar2.add(helpMenuItem); labelPath1.setText("Selected local path: "); labelPath1.setVerticalAlignment(javax.swing.SwingConstants.TOP); labelPath1.setAutoscrolls(true); labelPath1.setHorizontalTextPosition(javax.swing.SwingConstants.LEFT); labelPath1.setVerticalTextPosition(javax.swing.SwingConstants.TOP); fileMenuItem2.setText("File"); menuItemDownloadManager1.setText("DownloadManager"); menuItemDownloadManager1.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { menuItemDownloadManagerActionPerformed(evt); } }); fileMenuItem2.add(menuItemDownloadManager1); fileMenuItem2.add(jSeparator3); fileExitMenuItem1.setText("Exit"); fileExitMenuItem1.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { fileExitMenuItemActionPerformed(evt); } }); fileMenuItem2.add(fileExitMenuItem1); jMenuBar3.add(fileMenuItem2); editMenuItem2.setText("Edit"); jMenuItem2.setText("Add"); editMenuItem2.add(jMenuItem2); jMenuBar3.add(editMenuItem2); toolsMenuItem1.setText("Tools"); optionsMenuItem1.setText("Options"); toolsMenuItem1.add(optionsMenuItem1); jMenuBar3.add(toolsMenuItem1); helpMenuItem1.setText("Help"); aboutMenuItem1.setText("About"); helpMenuItem1.add(aboutMenuItem1); jMenuBar3.add(helpMenuItem1); fileMenuItem3.setText("File"); menuItemDownloadManager2.setText("DownloadManager"); menuItemDownloadManager2.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { menuItemDownloadManagerActionPerformed(evt); } }); fileMenuItem3.add(menuItemDownloadManager2); fileMenuItem3.add(jSeparator4); fileExitMenuItem2.setText("Exit"); fileExitMenuItem2.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { fileExitMenuItemActionPerformed(evt); } }); fileMenuItem3.add(fileExitMenuItem2); jMenuBar4.add(fileMenuItem3); editMenuItem3.setText("Edit"); jMenuItem3.setText("Add"); editMenuItem3.add(jMenuItem3); jMenuBar4.add(editMenuItem3); toolsMenuItem2.setText("Tools"); optionsMenuItem2.setText("Options"); toolsMenuItem2.add(optionsMenuItem2); jMenuBar4.add(toolsMenuItem2); helpMenuItem2.setText("Help"); aboutMenuItem2.setText("About"); helpMenuItem2.add(aboutMenuItem2); jMenuBar4.add(helpMenuItem2); setJMenuBar(jMenuBar4); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addGap(20, 20, 20) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(logPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup() .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 263, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(18, 18, 18) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(labelPath, javax.swing.GroupLayout.DEFAULT_SIZE, 148, Short.MAX_VALUE) .addComponent(labelPath1, javax.swing.GroupLayout.DEFAULT_SIZE, 148, Short.MAX_VALUE))) .addComponent(jProgressBar1, javax.swing.GroupLayout.DEFAULT_SIZE, 614, Short.MAX_VALUE)) .addGap(18, 18, 18) .addComponent(progressLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 88, javax.swing.GroupLayout.PREFERRED_SIZE))) .addGap(52, 52, 52)) ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addComponent(logPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addGap(12, 12, 12) .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 363, javax.swing.GroupLayout.PREFERRED_SIZE)) .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addGroup(layout.createSequentialGroup() .addGap(47, 47, 47) .addComponent(labelPath1, javax.swing.GroupLayout.PREFERRED_SIZE, 29, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(labelPath, javax.swing.GroupLayout.PREFERRED_SIZE, 29, javax.swing.GroupLayout.PREFERRED_SIZE))) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(progressLabel) .addComponent(jProgressBar1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addContainerGap(88, Short.MAX_VALUE)) ); java.awt.Dimension screenSize = java.awt.Toolkit.getDefaultToolkit().getScreenSize(); setBounds((screenSize.width-800)/2, (screenSize.height-640)/2, 800, 640); }// </editor-fold>//GEN-END:initComponents /** This method is called from within the constructor to initialize customizely the form. */ private void customizeComponents() { } private void fileExitMenuItemActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_fileExitMenuItemActionPerformed System.exit(0);}//GEN-LAST:event_fileExitMenuItemActionPerformed private void menuItemDownloadManagerActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_menuItemDownloadManagerActionPerformed // TODO add your handling code here: DownloadManager downloadManager = new DownloadManager(); downloadManager.setVisible(true); this.dispose(); }//GEN-LAST:event_menuItemDownloadManagerActionPerformed private void downloadButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_downloadButtonActionPerformed // TODO add your handling code here: downloading(); SourceCodeDownload(); complete();}//GEN-LAST:event_downloadButtonActionPerformed @SuppressWarnings("deprecation") private void logonButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_logonButtonActionPerformed // TODO add your handling code here: Logon(this.usernameTextField.getText(), this.passwordTextField.getText()); }//GEN-LAST:event_logonButtonActionPerformed private void logoutButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_logoutButtonActionPerformed // TODO add your handling code here: this.Logout(); stop(); }//GEN-LAST:event_logoutButtonActionPerformed private void openFolderButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_openFolderButtonActionPerformed // TODO add your handling code here: ChooseFolder(); }//GEN-LAST:event_openFolderButtonActionPerformed private void buttonGetFileListActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonGetFileListActionPerformed // TODO add your handling code here: this.labelPath.setText(fileTree.getCurrentNodePath());}//GEN-LAST:event_buttonGetFileListActionPerformed private void uploadButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_uploadButtonActionPerformed // TODO add your handling code here: try { FilesUpload(); } catch (Exception e) { System.err.println(e); } }//GEN-LAST:event_uploadButtonActionPerformed @SuppressWarnings({"static-access", "deprecation"})
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -