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

📄 framefunction.java

📁 基于Java的地图数据管理软件。使用MySQL数据库管理系统。
💻 JAVA
📖 第 1 页 / 共 2 页
字号:
package net.aetherial.gis.our.auto.Frame;

import java.awt.*;
import javax.swing.*;
import com.borland.jbcl.layout.*;
import net.aetherial.gis.surface.ItemValue;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import net.aetherial.gis.our.auto.AllToWptTrkFile;
import net.aetherial.gis.our.FrameOur;
import net.aetherial.gis.our.auto.DeleteActive;
import net.aetherial.gis.our.auto.extend.PickUpTrack;
import net.aetherial.gis.our.auto.extend.AllFileToRSCut;
import net.aetherial.gis.our.auto.extend.CheckNoWPT;
import net.aetherial.gis.dataType.WptType;
import net.aetherial.gis.our.auto.extend.CreateExcel;
import java.awt.event.WindowEvent;
import java.awt.event.WindowAdapter;
import net.aetherial.gis.our.auto.extend.CheckNoTrk;
import net.aetherial.gis.our.auto.extend.CheckRepeatTrk;
import net.aetherial.gis.our.auto.extend.UniteAllFile;
import net.aetherial.gis.our.auto.extend.UniteAllWPT;
import net.aetherial.gis.our.auto.extend.CountAll;
import net.aetherial.gis.our.auto.extend.EncriptFile;
import net.aetherial.gis.our.auto.extend.Pickup8;
import net.aetherial.gis.our.auto.extend.CheckAllRepeat;
import net.aetherial.gis.our.auto.extend.PickupAverage;
import net.aetherial.gis.our.auto.extend.FillXZC;

/**
 * <p>Title: </p>
 *
 * <p>Description: </p>
 *
 * <p>Copyright: Copyright (c) 2004</p>
 *
 * <p>Company: </p>
 *
 * @author not attributable
 * @version 1.0
 */
public class FrameFunction
    extends JFrame {
  JPanel jPanel1 = new JPanel();
  XYLayout xYLayout1 = new XYLayout();
  BorderLayout borderLayout1 = new BorderLayout();
  JLabel jLabel1 = new JLabel();
  JLabel jLabel2 = new JLabel();
  JTextField pathIn = new JTextField();
  JTextField pathOut = new JTextField();
  JLabel jLabel3 = new JLabel();
  JLabel jLabel4 = new JLabel();
  JButton jRun = new JButton();
  JRadioButton jRadioButton1 = new JRadioButton();
  JRadioButton jRadioButton2 = new JRadioButton();
  JToolBar jToolBar1 = new JToolBar();
  JButton jButton2 = new JButton();
  private ButtonGroup group = new ButtonGroup();
  private String inputDirectory = "D:\\GPS\\source\\";
  private String outputDirectory = "D:\\GPS\\target\\";
  private FrameOur fo = null;
  JRadioButton jRadioButton3 = new JRadioButton();
  JComboBox jPickUp = new JComboBox();
  JRadioButton jRadioButton4 = new JRadioButton();
  JRadioButton jRadioButton5 = new JRadioButton();
  JRadioButton jRadioButton6 = new JRadioButton();
  JComboBox jComboIsXZC = new JComboBox();
  JRadioButton jRadioButton7 = new JRadioButton();
  JRadioButton jRadioButton8 = new JRadioButton();
  JRadioButton jRadioButton9 = new JRadioButton();
  JComboBox jComboBoxShpFile = new JComboBox();
  JRadioButton jRadioButton10 = new JRadioButton();
  JRadioButton jRadioButton11 = new JRadioButton();
  JRadioButton jRadioButton12 = new JRadioButton();
  JRadioButton jRadioButton13 = new JRadioButton();
  JRadioButton jRadioButton14 = new JRadioButton();
  JRadioButton jRadioButton15 = new JRadioButton();
  public FrameFunction() {
    try {
      jbInit();
    }
    catch (Exception exception) {
      exception.printStackTrace();
    }
  }
  public FrameFunction(FrameOur fo) {
    this();
    this.fo = fo;
  }
  private void setDirectory(){
    this.pathIn.setText(this.inputDirectory);
    this.pathOut.setText(this.outputDirectory);
  }
  private String getDirectoryString(String str){
    if (str.endsWith("\\")) {
      return str;
    }
    else if (str.endsWith("/")) {
      return str;
    }
    else {
      return str + "\\";
    }
  }
  private void getDirectory(){
    this.inputDirectory = getDirectoryString(pathIn.getText().trim());
    this.outputDirectory = getDirectoryString(pathOut.getText().trim());
  }
  private void jbInit() throws Exception {
    getContentPane().setLayout(borderLayout1);
    jLabel4.setText("输出路径:");
    jRun.setText("  运  行  ");
    jRun.addActionListener(new FrameFunction_jRun_actionAdapter(this));
    jRadioButton3.setText("提取生成文件");
    jRadioButton4.setText("按路面变化点切割");
    jRadioButton5.setText("检查没有关联航点的航迹");
    jRadioButton6.setText("生成Excel报表");
    this.addWindowListener(new FrameFunction_this_windowAdapter(this));
    jRadioButton7.setText("检查没有关联航迹的航点");
    jRadioButton8.setText("检查有没有完全一样的航迹");
    jRadioButton9.setText("合并并生成SHP");
    jRadioButton10.setText("提取所有航点并生成SHP");
    jRadioButton11.setText("统计数据");
    jRadioButton12.setText("加密数据");
    jRadioButton13.setText("提取里程大于8的航迹");
    jRadioButton14.setText("检查重复航迹");
    jRadioButton15.setText("匹配并填充行政村");
    group.add(jRadioButton1);
    group.add(jRadioButton2);
    group.add(jRadioButton3);
    group.add(jRadioButton4);
    group.add(jRadioButton5);
    group.add(jRadioButton6);
    group.add(jRadioButton7);
    group.add(jRadioButton8);
    group.add(jRadioButton9);
    group.add(jRadioButton10);
    group.add(jRadioButton11);
    group.add(jRadioButton12);
    group.add(jRadioButton13);
    group.add(jRadioButton14);
    group.add(jRadioButton15);
    jRadioButton1.setText("生成WptTrk文件");
    jRadioButton1.setSelected(true);
    jRadioButton2.setText("去除数字航点");
    this.jPickUp.addItem("国道");
    this.jPickUp.addItem("省道");
    this.jPickUp.addItem("县道");
    this.jPickUp.addItem("乡道");
    this.jPickUp.addItem("村道");
    this.jPickUp.addItem("行政村航迹");
    this.jPickUp.addItem("非行政村航迹");
    this.jPickUp.addItem(WptType.RS_A_good);
    this.jPickUp.addItem(WptType.RS_B_good);
    this.jPickUp.addItem(WptType.RS_C_type);
    this.jPickUp.addItem(WptType.RS_D_bad);
    this.jPickUp.addItem("2005年计划");
    this.jPickUp.addItem("2006年计划");
    this.jPickUp.addItem("2007年计划");
    this.jPickUp.addItem("2008年计划");
    this.jPickUp.addItem("行政村航点");
    this.jPickUp.addItem("自然村航点");
    this.jPickUp.addItem("桥梁航点");
    this.jPickUp.addItem("涵洞航点");
    this.jPickUp.addItem("隧道航点");
    this.jPickUp.addItem("渡口航点");
    this.jComboIsXZC.addItem("乡村道沟通行政村");
    this.jComboIsXZC.addItem("乡村道(非)沟通行政村");
    this.jComboIsXZC.addItem("县道砂石路");
    this.jComboIsXZC.addItem("县道土路");
    this.jComboIsXZC.addItem("没有限制");
//    this.jComboIsXZC.addItem("拟建(含行政村)");
//    this.jComboIsXZC.addItem("拟建(不含行政村)");
//    this.jComboIsXZC.addItem("含行政村");
//    this.jComboIsXZC.addItem("没有限制");//含行政村
    this.jComboBoxShpFile.addItem("高速");
    this.jComboBoxShpFile.addItem("国道");
    this.jComboBoxShpFile.addItem("省道");
    this.jComboBoxShpFile.addItem("县道");
    this.jComboBoxShpFile.addItem("乡道");
    this.jComboBoxShpFile.addItem("村道");
    this.jComboBoxShpFile.addItem("县道_底图");
    this.jComboBoxShpFile.addItem("县道_砂石");
    this.jComboBoxShpFile.addItem("县道_土路");
    this.jComboBoxShpFile.addItem("乡道_底图");
    this.jComboBoxShpFile.addItem("乡道_砂石");
    this.jComboBoxShpFile.addItem("乡道_土路");
    this.jComboBoxShpFile.addItem("乡道_行政村");
    this.jComboBoxShpFile.addItem("乡村道_底图");
    this.jComboBoxShpFile.addItem("乡村道_行政村");
    this.jComboBoxShpFile.addItem("村道_底图");
    this.jComboBoxShpFile.addItem("村道_行政村");
    this.jComboBoxShpFile.addItem("专用道_砂石");
    this.jComboBoxShpFile.addItem("专用道_底图");
    jButton2.setText("test");
    jLabel2.setBorder(BorderFactory.createEtchedBorder());
    pathIn.setText("");
    pathOut.setText("");
    jLabel3.setText("输入路径:");
    jPanel1.setLayout(xYLayout1);
    jPanel1.add(pathIn, new XYConstraints(100, 26, 247, -1));
    jPanel1.add(pathOut, new XYConstraints(100, 54, 248, -1));
    jPanel1.add(jLabel3, new XYConstraints(31, 23, 60, 25));
    jPanel1.add(jLabel2, new XYConstraints(20, 15, 371, 76));
    jPanel1.add(jRadioButton1, new XYConstraints(46, 112, -1, -1));
    jPanel1.add(jLabel4, new XYConstraints(31, 55, 68, 22));
    jToolBar1.add(jButton2);
    this.getContentPane().add(jToolBar1, java.awt.BorderLayout.NORTH);
    this.getContentPane().add(jPanel1, java.awt.BorderLayout.CENTER);
    jPanel1.add(jRadioButton4, new XYConstraints(199, 112, -1, -1));
    jPanel1.add(jComboBoxShpFile, new XYConstraints(164, 269, -1, -1));
    jPanel1.add(jPickUp, new XYConstraints(164, 302, -1, -1));
    jPanel1.add(jComboIsXZC, new XYConstraints(164, 336, -1, -1));
    jPanel1.add(jRun, new XYConstraints(172, 504, -1, -1));
    jPanel1.add(jRadioButton5, new XYConstraints(199, 148, -1, -1));
    jPanel1.add(jRadioButton7, new XYConstraints(199, 184, -1, -1));
    jPanel1.add(jRadioButton8, new XYConstraints(199, 217, -1, -1));
    jPanel1.add(jRadioButton13, new XYConstraints(199, 368, -1, -1));
    jPanel1.add(jRadioButton2, new XYConstraints(46, 148, 103, -1));
    jPanel1.add(jRadioButton10, new XYConstraints(46, 186, -1, -1));
    jPanel1.add(jRadioButton11, new XYConstraints(46, 222, -1, -1));
    jPanel1.add(jRadioButton9, new XYConstraints(46, 265, -1, -1));
    jPanel1.add(jRadioButton3, new XYConstraints(46, 297, 103, -1));
    jPanel1.add(jRadioButton6, new XYConstraints(46, 331, -1, -1));
    jPanel1.add(jRadioButton12, new XYConstraints(46, 368, -1, -1));
    jPanel1.add(jRadioButton14, new XYConstraints(46, 401, -1, -1));
    jPanel1.add(jLabel1, new XYConstraints(22, 99, 371, 398));
    jPanel1.add(jRadioButton15, new XYConstraints(199, 401, -1, -1));
    jLabel1.setBorder(BorderFactory.createEtchedBorder());
    this.init();
    this.setDirectory();
  }
  private void init(){
    Dimension screenDim = Toolkit.getDefaultToolkit().getScreenSize();
    this.setTitle("批处理文件");
    this.setSize(500,600);
    this.setLocation(
        (screenDim.width - 500) / 2,
        (screenDim.height - 600) / 2
        );
    this.setIconImage(ItemValue.getImage("HSDIlogo.gif"));
  }
  public static void main(String args[]){
    FrameFunction ff = new FrameFunction();
    ff.show();
  }

  public void jRun_actionPerformed(ActionEvent e) {
    this.getDirectory();
    this.hide();
    if(this.jRadioButton1.isSelected()){
      AllToWptTrkFile at = new AllToWptTrkFile(this.fo);
      at.setShowBetter(false);
      at.allToTrkWptFile(this.inputDirectory,this.outputDirectory);
    }else if(this.jRadioButton2.isSelected()){
      DeleteActive da = new DeleteActive(this.fo);
      da.delete(inputDirectory,outputDirectory);
    }else if(this.jRadioButton3.isSelected()){
      pickType();
    }else if(this.jRadioButton4.isSelected()){
      AllFileToRSCut tc = new AllFileToRSCut(this.fo);
      tc.setInputDirectory(this.inputDirectory);

⌨️ 快捷键说明

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