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

📄 item.java

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

import jxl.Sheet;
import java.io.File;
import java.io.IOException;
import jxl.read.biff.BiffException;
import jxl.Workbook;

/**
 * <p>Title: </p>
 *
 * <p>Description: </p>
 *
 * <p>Copyright: Copyright (c) 2004</p>
 *
 * <p>Company: </p>
 *
 * @author not attributable
 * @version 1.0
 */
public class Item {
  private static Sheet sheet_xianzhen = null;
  private static Sheet sheet_jianzhicun = null;
  public Item() {
  }

  /**
   * 通过给予乡镇文件的路径,
   * 将私有的乡镇Sheet赋值
   */
  public static void setXiangzhen(String xiangzhenFile){
    Item.sheet_xianzhen = Item.getSheet(xiangzhenFile,"乡镇");
  }

  public static Sheet getXiangzhenSheet(){
    return Item.sheet_xianzhen;
  }

  public static void setJianzhicun(String jianzhicunFile){
    Item.sheet_jianzhicun = Item.getSheet(jianzhicunFile,"建制村");
  }

  public static Sheet getJianzhicunSheet(){
    return Item.sheet_jianzhicun;
  }


  private static Sheet getSheet(String fileName,String sheetName){
    Workbook workbook = null;
    try {
      workbook = Workbook.getWorkbook(new File(fileName));
    }
    catch (BiffException ex) {
      System.err.println(ex.getMessage() + " in Item.getSheet(String fileName,String sheetName) BiffException");
    }
    catch (IOException ex) {
      System.err.println(ex.getMessage() + " in Item.getSheet(String fileName,String sheetName) IOException");
    }
    if (workbook != null) {
      return workbook.getSheet(sheetName);
    }else{
      return null;
    }
  }

}

⌨️ 快捷键说明

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