⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 movedatagui.java

📁 java 读写EXCEL文件的源码
💻 JAVA
📖 第 1 页 / 共 3 页
字号:
/********************************************************************
 *
 * $RCSfile: MoveDataGui.java,v $  $Revision: 1.1 $  $Date: 2003/09/22 08:06:24 $
 *
 * $Log: MoveDataGui.java,v $
 * Revision 1.1  2003/09/22 08:06:24  icestone
 * init
 *
 *
 *
 **********************************************************************/
package pcdmupgradedata;

import java.awt.*;
import javax.swing.*;
import com.borland.jbcl.layout.*;
import java.awt.event.*;
import java.sql.*;
import java.net.*;
import java.io.*;
import java.util.*;
import javax.swing.event.*;
import javax.swing.border.*;
/**
*功能:迁移主界面
*
*
*/

public class MoveDataGui extends JFrame {

  /**定义类调用*/
  private SelectPanel  selectpanel;
  private ChangeTypeDialog  changeTypeDialog;
  /**控件定义*/
  private JLabel statusBar = new JLabel();
  private JLabel jLabel1 = new JLabel();
  private JLabel jLabel2 = new JLabel(Const.BACKGROUND_IMAGE);
  private JLabel jLabel3 = new JLabel();
  private JLabel jLabel4 = new JLabel(Const.RARROW_IMAGE);
  private JLabel jLabel8 = new JLabel(Const.RARROW_IMAGE);
  private JLabel jLabel9 = new JLabel(Const.RARROW_IMAGE);
  private JLabel jLabel5 = new JLabel();
  private JLabel jLabel6 = new JLabel();
  private JLabel jLabel7 = new JLabel();

  private JPanel jPanel2 = new JPanel();
  private JButton jButton1 = new JButton(Const.CHECK_IMAGE);
  private JButton jButton2 = new JButton(Const.MOVE_IMAGE);
  private JButton jButton3 = new JButton(Const.BACK_IMAGE);
  private JButton jButton4 = new JButton(Const.COMPLETE_IMAGE);
  private JButton jButton10 = new JButton(Const.PERPAGE_IMAGE);
  private JButton jButton9 = new JButton(Const.NEXTPAGE_IMAGE);
  private JButton jButton5 = new JButton();
  private JButton jButton6 = new JButton();
  private JButton jButton_Excel = new JButton(Const.IMPORT_IMAGE);
  /**初始化进度条*/
  private JProgressBar jProgressBar1 = new JProgressBar(JProgressBar.HORIZONTAL,1,15000);
  private PaneLayout paneLayout1 = new PaneLayout();
  private PaneLayout paneLayout2 = new PaneLayout();
  private PaneLayout paneLayout3 = new PaneLayout();
  private JPanel jPanel1  = new JPanel();
  private JPanel  panel1  = new JPanel();
  private JPanel jPanel3  = new JPanel();
  private JPanel jPanel4  = new JPanel();
  private JPanel jPanel5  = new JPanel();
  private JPanel jPanel9  = new JPanel();
  private JPanel jPanel6  = new JPanel();
  private JPanel jPanel7  = new JPanel();
  private JPanel jPanel8  = new JPanel();
  private JPanel jPanel10 = new JPanel();
  private JPanel jPanel11 = new JPanel();
  private JPanel jPanel12 = new JPanel();

  private CardLayout cardLayout1 = new CardLayout();
  private CardLayout cardLayout2 = new CardLayout();
  private CardLayout cardLayout3 = new CardLayout();
  private CardLayout cardLayout4 = new CardLayout();
  private FlowLayout flowLayout1 = new FlowLayout();
  private ButtonGroup group_workChange = new ButtonGroup();
  private ButtonGroup group_workChange_2 = new ButtonGroup();
  private ButtonGroup group_workChange_3 = new ButtonGroup();

  private JRadioButton jRadioButton1 = new JRadioButton();
  private JRadioButton jRadioButton2 = new JRadioButton();
  private JCheckBox jCheckBox2 = new JCheckBox();
  private TitledBorder titledBorder1;

  private JRadioButton jRadioButton3 = new JRadioButton();
  private JRadioButton jRadioButton4 = new JRadioButton();
  private JRadioButton jRadioButton5 = new JRadioButton();
  private JRadioButton jRadioButton6 = new JRadioButton();

  private JTextArea jTextArea1 = new JTextArea();
  private JTextArea jTextArea2 = new JTextArea();
  private JTextArea jTextArea3 = new JTextArea();
  private JTextArea jTextArea4 = new JTextArea();
  private JTextArea jTextArea5 = new JTextArea();
  private JTextArea jTextArea6 = new JTextArea();
  /**内部全局变量*/
  Connection conn;
  private int selectValue;
  private String  bmtmp=null;
  private int LineNum;
  private final   int _ENDFLAG=15000;
  private final   int _STRFLAG=0;

  public  MoveDataGui(Connection con) {
     enableEvents(AWTEvent.WINDOW_EVENT_MASK);
     selectpanel=new SelectPanel(con);
   try {

      jbInit();
      pack();

      }
    catch(Exception ex) {
      ex.printStackTrace();
    }
    this.conn=con;
  }
  private void jbInit() throws Exception {
    titledBorder1 = new TitledBorder("");
    this.setResizable(false);
    this.setTitle("数据库升级转换");
    this.getContentPane().setLayout(null);
    this.setIconImage(Toolkit.getDefaultToolkit().getImage(Const.LOGO_PATH));

    panel1.setLayout(cardLayout3);
    statusBar.setFont(new java.awt.Font("DialogInput", 1, 10));
    statusBar.setBorder(BorderFactory.createLoweredBevelBorder());
    statusBar.setText("数据表将转换为中间表格式");
    statusBar.setBounds(new Rectangle(-5, 463, 662, 16));
    jPanel2.setBorder(BorderFactory.createEtchedBorder());
    jPanel2.setLayout(flowLayout1);
    jButton1.setText("数据调整入库");
    jButton1.setVisible(false);
    jButton1.addActionListener(new java.awt.event.ActionListener() {
      public void actionPerformed(ActionEvent e) {
        jButton1_actionPerformed(e);
      }
    });
    jButton2.setText("数据迁移");
    jButton2.setEnabled(false);
    jButton2.addActionListener(new java.awt.event.ActionListener() {
      public void actionPerformed(ActionEvent e) {
        jButton2_actionPerformed(e);
      }
    });
    jButton3.setText("取消");
    jButton3.addActionListener(new java.awt.event.ActionListener() {
      public void actionPerformed(ActionEvent e) {
        jButton3_actionPerformed(e);
      }
    });
    jLabel1.setText("");
    jLabel2.setText("");
    jPanel1.setLayout(paneLayout3);
    jPanel1.setBorder(BorderFactory.createEtchedBorder());
    jPanel1.setVisible(false);

    jPanel5.setBorder(BorderFactory.createEtchedBorder());
    jPanel5.setVisible(false);


    jPanel3.setBorder(BorderFactory.createEtchedBorder());
    jPanel3.setBounds(new Rectangle(1, 405, 644, 49));
    jPanel3.setLayout(cardLayout1);
    jButton4.setText("完成");
    jButton4.setVisible(false);
    jButton4.addActionListener(new java.awt.event.ActionListener() {
      public void actionPerformed(ActionEvent e) {
        jButton4_actionPerformed(e);
      }
    });
    jRadioButton1.setToolTipText("全库自动转换");
    jRadioButton1.setText("全库自动转换");
    jRadioButton1.setBounds(new Rectangle(42, 85, 97, 26));

    jRadioButton2.setToolTipText("自定义列表转换");
    jRadioButton2.setText("自定义列表转换");
    jRadioButton2.setBounds(new Rectangle(40, 199, 109, 26));


    jPanel4.setLayout(paneLayout2);
    jButton5.setText("迁移");
    jButton5.addActionListener(new java.awt.event.ActionListener() {
      public void actionPerformed(ActionEvent e) {
        jButton5_actionPerformed(e);
      }
    });
    jButton6.setToolTipText("");
    jButton6.setText("返回");
    jButton6.addActionListener(new java.awt.event.ActionListener() {
      public void actionPerformed(ActionEvent e) {
        jButton6_actionPerformed(e);
      }
    });
    jCheckBox2.setToolTipText("");
    jCheckBox2.setSelected(false);
    jCheckBox2.setText("全选标志");
    jCheckBox2.setEnabled(false);
    jCheckBox2.setBounds(new Rectangle(5, 383, 73, 20));
    jCheckBox2.addActionListener(new java.awt.event.ActionListener() {
      public void actionPerformed(ActionEvent e) {
        jCheckBox2_actionPerformed(e);
      }
    });
    jCheckBox2.setVisible(false);
    jButton9.setText("");
    jButton9.addActionListener(new java.awt.event.ActionListener() {
      public void actionPerformed(ActionEvent e) {
        jButton9_actionPerformed(e);
      }
    });
    jButton10.setToolTipText("");
    jButton10.setText("");
    jButton10.setEnabled(false);
    jButton10.addActionListener(new java.awt.event.ActionListener() {
      public void actionPerformed(ActionEvent e) {
        jButton10_actionPerformed(e);
      }
    });
    jPanel9.setLayout(null);
    jPanel6.setBorder(BorderFactory.createEtchedBorder());
    jPanel6.setLayout(cardLayout4);
    jRadioButton4.setText("数据调整入库");
    jRadioButton4.setBounds(new Rectangle(40, 167, 116, 39));
    jRadioButton4.addActionListener(new java.awt.event.ActionListener() {
      public void actionPerformed(ActionEvent e) {
        jRadioButton4_actionPerformed(e);
      }
    });
    jRadioButton3.setToolTipText("数据转换");
    jRadioButton3.setSelected(true);
    jRadioButton3.setText("数据转换");
    jRadioButton3.setBounds(new Rectangle(37, 68, 79, 24));
    jRadioButton5.setText("不需任何调整");
    jRadioButton5.setBounds(new Rectangle(48, 75, 97, 26));
    jRadioButton6.setToolTipText("调整关联设施类型");
    jRadioButton6.setText("调整关联设施类型");
    jRadioButton6.setBounds(new Rectangle(46, 206, 121, 26));
    jRadioButton6.addActionListener(new java.awt.event.ActionListener() {
      public void actionPerformed(ActionEvent e) {
        jRadioButton6_actionPerformed(e);
      }
    });
    jButton_Excel.setText("导入调整后数据表");
    jButton_Excel.setVisible(false);
    jButton_Excel.addActionListener(new java.awt.event.ActionListener() {
      public void actionPerformed(ActionEvent e) {
        jRadioButton4_actionPerformed(e);
      }
    });

    jLabel5.setText("正在建库");
    jLabel5.setBounds(new Rectangle(57, 50, 181, 18));
    jLabel6.setToolTipText("");
    jLabel6.setText("正在转换数据表:");
    jLabel6.setBounds(new Rectangle(55, 133, 97, 18));
    jLabel7.setText("正在结束转换");
    jLabel7.setBounds(new Rectangle(57, 217, 87, 18));
    jPanel7.setLayout(null);

    jPanel11.setLayout(paneLayout1);
    jPanel12.setBounds(new Rectangle(11, 8, 633, 375));
    jPanel12.setLayout(null);
    jPanel11.setBounds(new Rectangle(1, 0, 633, 375));
    selectpanel.setBounds(new Rectangle(0, 0, 633, 375));
    jPanel8.setLayout(null);
    jPanel10.setLayout(null);
    jTextArea1.setBackground(new Color(236, 233, 216));
    jTextArea1.setEditable(false);
    jTextArea1.setText(MessS.JA1);
    jTextArea1.setBounds(new Rectangle(35, 115, 255, 43));
    jTextArea2.setBackground(new Color(236, 233, 216));
    jTextArea2.setDisabledTextColor(new Color(236, 233, 216));
    jTextArea2.setEditable(false);
    jTextArea2.setText(MessS.JA2);
    jTextArea2.setBounds(new Rectangle(37, 227, 240, 61));
    jTextArea3.setBackground(new Color(236, 233, 216));
    jTextArea3.setToolTipText("");
    jTextArea3.setEditable(false);
    jTextArea3.setText(MessS.JA3);
    jTextArea3.setBounds(new Rectangle(46, 127, 228, 31));
    jTextArea4.setBackground(new Color(236, 233, 216));
    jTextArea4.setEditable(false);
    jTextArea4.setText(MessS.JA4);
    jTextArea4.setBounds(new Rectangle(46, 256, 247, 71));
    jTextArea5.setBackground(new Color(236, 233, 216));
    jTextArea5.setEditable(false);
    jTextArea5.setText(MessS.JA5);
    jTextArea5.setBounds(new Rectangle(44, 128, 239, 49));
    jTextArea6.setBackground(new Color(236, 233, 216));
    jTextArea6.setEditable(false);
    jTextArea6.setText(MessS.JA6);
    jTextArea6.setBounds(new Rectangle(42, 250, 248, 73));
    jLabel3.setText("");
    jLabel3.setBounds(new Rectangle(154, 132, 142, 18));
    jLabel4.setDisplayedMnemonic('0');
    jLabel4.setBounds(new Rectangle(10, 44, 41, 31));
    jLabel8.setBounds(new Rectangle(8, 125, 41, 34));
    jLabel9.setBounds(new Rectangle(10, 213, 42, 30));
    group_workChange.add (jRadioButton1);
    group_workChange.add (jRadioButton2);
    jRadioButton1.setSelected(true);
    jLabel4.setVisible(false);
    jLabel8.setVisible(false);
    jLabel9.setVisible(false);
    group_workChange_2.add (jRadioButton3);
    group_workChange_2.add (jRadioButton4);

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -