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

📄 coderule.java

📁 java 读写EXCEL文件的源码
💻 JAVA
字号:
/********************************************************************
 *
 * $RCSfile: codeRule.java,v $  $Revision: 1.1 $  $Date: 2003/09/22 08:06:23 $
 *
 * $Log: codeRule.java,v $
 * Revision 1.1  2003/09/22 08:06:23  icestone
 * init
 *
 *
 *
 **********************************************************************/
package pcdmupgradedata;

import java.awt.*;
import javax.swing.*;
import com.borland.jbcl.layout.*;
import java.awt.event.*;

/**
 * <p>Title: </p>
 * <p>Description: </p>
 * <p>Copyright: Copyright (c) 2003</p>
 * <p>Company: </p>
 * @author unascribed
 * @version 1.0
 */

public class codeRule extends JDialog {
  private JPanel panel1 = new JPanel();
  private JPanel jPanel1 = new JPanel();
  private JPanel jPanel2 = new JPanel();
  private CardLayout cardLayout1 = new CardLayout();
  private JTextField jTextField1 = new JTextField();
  private JButton jButton1 = new JButton();
  private JButton jButton2 = new JButton();
  private JButton jButton3 = new JButton();
  private JButton jButton4 = new JButton();
  private JButton jButton5 = new JButton();
  private JButton jButton6 = new JButton();
  private JButton jButton7 = new JButton();
  private JButton jButton8 = new JButton();
  private JPanel jPanel3 = new JPanel();
  private PaneLayout paneLayout1 = new PaneLayout();
  private JButton jButton9 = new JButton();
  private JButton jButton10 = new JButton();
  private JButton jButton11 = new JButton();
  String wholeCode="";
  private JButton jButton12 = new JButton();

  public codeRule(Frame frame, String title, boolean modal) {
    super(frame, title, modal);
    try {
      jbInit();
      pack();
    }
    catch(Exception ex) {
      ex.printStackTrace();
    }
  }

  public codeRule() {
    this(null, "系统原始编码规则",true);
  }
  void jbInit() throws Exception {
    panel1.setLayout(paneLayout1);
    jPanel1.setBorder(BorderFactory.createEtchedBorder());
    jPanel1.setLayout(cardLayout1);
    jPanel2.setBorder(BorderFactory.createEtchedBorder());
    jButton1.setToolTipText("");
    jButton1.setText("区域");
    jButton1.addActionListener(new java.awt.event.ActionListener() {
      public void actionPerformed(ActionEvent e) {
        jButton1_actionPerformed(e);
      }
    });
    jButton2.setText(".");
    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);
      }
    });
    jButton4.setText("/");
    jButton4.addActionListener(new java.awt.event.ActionListener() {
      public void actionPerformed(ActionEvent e) {
        jButton4_actionPerformed(e);
      }
    });
    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);
      }
    });
    jButton7.setToolTipText("");
    jButton7.setText("-");
    jButton7.addActionListener(new java.awt.event.ActionListener() {
      public void actionPerformed(ActionEvent e) {
        jButton7_actionPerformed(e);
      }
    });
    jButton8.setText(")");
    jButton8.addActionListener(new java.awt.event.ActionListener() {
      public void actionPerformed(ActionEvent e) {
        jButton8_actionPerformed(e);
      }
    });
    jPanel3.setBorder(BorderFactory.createEtchedBorder());
    jButton9.setText("确定");
    jButton9.addActionListener(new java.awt.event.ActionListener() {
      public void actionPerformed(ActionEvent e) {
        jButton9_actionPerformed(e);
      }
    });
    jButton10.setText("返回");
    jButton10.addActionListener(new java.awt.event.ActionListener() {
      public void actionPerformed(ActionEvent e) {
        jButton10_actionPerformed(e);
      }
    });
    jButton11.setText("设施类");
    jButton11.addActionListener(new java.awt.event.ActionListener() {
      public void actionPerformed(ActionEvent e) {
        jButton11_actionPerformed(e);
      }
    });
    jTextField1.addActionListener(new java.awt.event.ActionListener() {
      public void actionPerformed(ActionEvent e) {
        jTextField1_actionPerformed(e);
      }
    });
    jTextField1.addKeyListener(new java.awt.event.KeyAdapter() {
      public void keyPressed(KeyEvent e) {
        jTextField1_keyPressed(e);
      }
    });
    jButton12.setText("重新输入");
    jButton12.addActionListener(new java.awt.event.ActionListener() {
      public void actionPerformed(ActionEvent e) {
        jButton12_actionPerformed(e);
      }
    });
    getContentPane().add(panel1);
    panel1.add(jPanel3,  new PaneConstraints("jPanel3", "jPanel3", PaneConstraints.ROOT, 1.0f));
    jPanel3.add(jButton12, null);
    jPanel3.add(jButton9, null);
    jPanel3.add(jButton10, null);
    panel1.add(jPanel1,  new PaneConstraints("jPanel1", "jPanel3", PaneConstraints.TOP, 0.7285714f));
    jPanel1.add(jTextField1, "jTextField1");
    panel1.add(jPanel2,  new PaneConstraints("jPanel2", "jPanel1", PaneConstraints.BOTTOM, 0.7352941f));
    jPanel2.add(jButton1, null);
    jPanel2.add(jButton2, null);
    jPanel2.add(jButton3, null);
    jPanel2.add(jButton4, null);
    jPanel2.add(jButton5, null);
    jPanel2.add(jButton6, null);
    jPanel2.add(jButton7, null);
    jPanel2.add(jButton8, null);
    jPanel2.add(jButton11, null);
  }

  void jButton1_actionPerformed(ActionEvent e) {
         wholeCode+=jButton1.getText();
         jTextField1.setText(wholeCode);
  }

  void jButton2_actionPerformed(ActionEvent e) {
         wholeCode+=jButton2.getText();
         jTextField1.setText(wholeCode);
  }

  void jButton3_actionPerformed(ActionEvent e) {
         wholeCode+=jButton3.getText();
         jTextField1.setText(wholeCode);
  }

  void jButton4_actionPerformed(ActionEvent e) {
         wholeCode+=jButton4.getText();
         jTextField1.setText(wholeCode);
  }

  void jButton5_actionPerformed(ActionEvent e) {
         wholeCode+=jButton5.getText();
         jTextField1.setText(wholeCode);
  }

  void jButton6_actionPerformed(ActionEvent e) {
         wholeCode+=jButton6.getText();
         jTextField1.setText(wholeCode);

  }

  void jButton7_actionPerformed(ActionEvent e) {
         wholeCode+=jButton7.getText();
         jTextField1.setText(wholeCode);
  }

  void jButton8_actionPerformed(ActionEvent e) {
         wholeCode+=jButton8.getText();
         jTextField1.setText(wholeCode);
  }

  void jButton11_actionPerformed(ActionEvent e) {
         wholeCode+=jButton11.getText();
         jTextField1.setText(wholeCode);
  }

  void jButton9_actionPerformed(ActionEvent e) {
       this.dispose();
  }

  void jButton10_actionPerformed(ActionEvent e) {
       this.dispose();
  }

  void jTextField1_actionPerformed(ActionEvent e) {
 //       wholeCode=jTextField1.getText();
  }

  void jTextField1_keyPressed(KeyEvent e) {

  }

  void jButton12_actionPerformed(ActionEvent e) {
        wholeCode="";
        jTextField1.setText(wholeCode);
  }
}

⌨️ 快捷键说明

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