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

📄 framewizard.java

📁 基于Java的地图数据管理软件。使用MySQL数据库管理系统。
💻 JAVA
字号:
package net.aetherial.gis.our.allauto.frame;

import java.awt.*;
import javax.swing.*;
import net.aetherial.gis.surface.ItemValue;
import java.io.File;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import net.aetherial.gis.our.FrameOur;
import net.aetherial.gis.our.allauto.create.RunAll;
import javax.swing.border.TitledBorder;

/**
 * <p>Title: </p>
 *
 * <p>Description: </p>
 *
 * <p>Copyright: Copyright (c) 2004</p>
 *
 * <p>Company: </p>
 *
 * @author not attributable
 * @version 1.0
 */
public class FrameWizard
    extends JFrame {
  BorderLayout borderLayout1 = new BorderLayout();
  JSplitPane jSplitPane1 = new JSplitPane();
  JPanel jPanelTop = new JPanel();
  FunctionSelect functionselect = new FunctionSelect();
  PathSelect pathSelect = new PathSelect();
  BorderLayout borderLayout2 = new BorderLayout();
  JPanel jPanelbutton = new JPanel();
  JButton jButton1 = new JButton();
  private FrameOur fo = null;
  JPanel jPanel1 = new JPanel();
  JLabel jStatusBar = new JLabel();
  BorderLayout borderLayout3 = new BorderLayout();
  public FrameWizard(FrameOur fo) {
    try {
      jbInit();
      this.fo = fo;
    }
    catch (Exception exception) {
      exception.printStackTrace();
    }
  }
  private void init(){
    jSplitPane1.setDividerLocation(198);
    Dimension screenDim = Toolkit.getDefaultToolkit().getScreenSize();
    this.setTitle("所有功能集成在一起");
    this.setSize(500,421);
    this.setLocation(
        (screenDim.width - 500) / 2,
        (screenDim.height - 421) / 2
        );
    this.setIconImage(ItemValue.getImage("HSDIlogo.gif"));
  }


  private void jbInit() throws Exception {
    getContentPane().setLayout(borderLayout1);
    jPanelTop.setLayout(borderLayout2);
    jButton1.setActionCommand("jButtonRun");
    jButton1.setText("运行");
    jButton1.addActionListener(new FrameWizard_jButton1_actionAdapter(this));
    pathSelect.setMinimumSize(new Dimension(458, 140));
    pathSelect.setPreferredSize(new Dimension(458, 140));
    jPanelTop.setMinimumSize(new Dimension(458, 100));
    jPanelTop.setPreferredSize(new Dimension(458, 100));
    jPanel1.setBorder(BorderFactory.createLoweredBevelBorder());
    jPanel1.setLayout(borderLayout3);
    jStatusBar.setText(" ");
    this.getContentPane().add(jSplitPane1, java.awt.BorderLayout.CENTER);
    jSplitPane1.setMinimumSize(new Dimension(12, 27));
    jSplitPane1.setPreferredSize(new Dimension(12, 27));
    jSplitPane1.add(jPanelTop, JSplitPane.TOP);
    jSplitPane1.add(functionselect, JSplitPane.BOTTOM);
    jPanelTop.add(pathSelect, java.awt.BorderLayout.NORTH);
    jPanelTop.add(jPanelbutton, java.awt.BorderLayout.SOUTH);
    jPanelbutton.add(jButton1);
    this.getContentPane().add(jPanel1, java.awt.BorderLayout.SOUTH);
    jPanel1.add(jStatusBar, java.awt.BorderLayout.CENTER);
    jSplitPane1.setOrientation(JSplitPane.VERTICAL_SPLIT);
    this.init();

  }
  /**
   * 设置状态条文字
   */
  public void setStatusBarText(String text){
    this.jStatusBar.setText(text);
  }

  /**
   * 设置程序开始的时候状态
   */
  public void setStart(){
    this.jButton1.setEnabled(false);
    this.setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);
    this.fo.hide();
    ItemValue.setShowDialogMessage(false);
  }

  /**
   * 设置程序结果的时候状态
   */
  public void setEnd() {
    this.jButton1.setEnabled(true);
    this.setDefaultCloseOperation(JFrame.HIDE_ON_CLOSE);
    this.fo.show();
    ItemValue.setShowDialogMessage(true);
    this.toFront();
  }

  /**
   * 弹出报警信息
   */
  public void msg(String string){
      JOptionPane.showMessageDialog(this, string,
                                    string,
                                    JOptionPane.WARNING_MESSAGE);

    }
    /**
     * 弹出报警信息
     */
    public int msgQuestion(String string,String title) {
      return JOptionPane.showConfirmDialog(this, string,
                                    title,
                                    JOptionPane.OK_CANCEL_OPTION);

    }

    public static void main(String args[]) {
      FrameWizard fw = new FrameWizard(null);
    fw.show();
  }
  private String printParam(){
    String n = "";
    final String ln = "\r\n";
    n = n + "***************************" + ln;
    n = n + "PathSelect:" + ln;
    n = n + "PathSelect.getInputPath():" + pathSelect.getInputPath() + ln;
    n = n + "PathSelect.getOutputPath():" + pathSelect.getOutputPath() + ln;
    n = n + "PathSelect.getArrayPath():" + pathSelect.getArrayPath() + ln;
    n = n + "***************************" + ln;
    n = n + "FunctionSelect:" + ln;
    n = n + "functionselect.isSelectPickup():" + functionselect.isSelectPickup() + ln;
    n = n + "functionselect.isSelectTable():" + functionselect.isSelectTable() + ln;
    n = n + "functionselect.isSelectShp():" + functionselect.isSelectShp() + ln;
    n = n + "***************************" + ln;
    n = n + "Height:" + this.getHeight() + ln;
    n = n + "DividerLocation:" + this.jSplitPane1.getDividerLocation() + ln;
    return n;
  }
  public void jButton1_actionPerformed(ActionEvent e) {
//    System.out.println(this.printParam());
      RunAll run = new RunAll(this);
      run.setPath(this.pathSelect.getInputPath(),this.pathSelect.getOutputPath(),this.pathSelect.getArrayPath());
      run.setFrameOur(this.fo);
      run.start();
  }

  /**
   * 设置是否需要生成PickupFile
   */
  public boolean getIsCreatePickupFile(){
    return this.functionselect.isSelectPickup();
  }
  /**
   * 是否需要生成SHP文件
   */
  public boolean getIsCreateSHP(){
    return this.functionselect.isSelectShp();
  }
  /**
   * 是否需要生成Excel文件
   */
  public boolean getIsCreateExcel(){
    return this.functionselect.isSelectTable();
  }
  /**
   * 是否需要生成统计文件
   */
  public boolean getIsCreateStastic(){
    return this.functionselect.isSelectStastic();
  }


}

class FrameWizard_jButton1_actionAdapter
    implements ActionListener {
  private FrameWizard adaptee;
  FrameWizard_jButton1_actionAdapter(FrameWizard adaptee) {
    this.adaptee = adaptee;
  }

  public void actionPerformed(ActionEvent e) {
    adaptee.jButton1_actionPerformed(e);
  }
}

⌨️ 快捷键说明

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