亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? gpsdatalogger.java

?? gpsLogger是一個基于手機或PDA的個人移動導航(車載導航)系統中記錄gps信息的小工具
?? JAVA
?? 第 1 頁 / 共 2 頁
字號:
//********************************************************************
//***                    gpsDataLogger 0.12                      ***
//***                      April 14, 2007                          ***
//***                  (c)2007 Glenn Hollowell                     ***
//***                     glenn@blepsias.net                       ***
//***  **********************************************************  ***
//***  Software is provided "AS IS," without a warranty of any     ***
//***  kind. ALL EXPRESS OR IMPLIED REPRESENTATIONS AND WARRANTIES,***
//***  INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS  ***
//***  FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY    ***
//***  EXCLUDED. THE ENTIRE RISK ARISING OUT OF USING THE SOFTWARE ***
//***  IS ASSUMED BY THE USER. See the GNU General Public License  ***
//***  for more details.                                           ***
//***  **********************************************************  ***
//***  This program was written to use while conducting aerial     ***
//***  surveys of salmon migration in rivers and near shore areas. ***
//***  A primary objective was to create an application that could ***
//***  be used with minimal visual contact w/the device. This will ***
//***  1) minimize the possibility of air sickness, and 2) maximize***
//***  the amount of time that the observer can spend observing    ***
//***  events outside of the aircraft.                             ***
//***  *********************************************************** ***
//***  The application was written using the SuperWaba toolset     ***
//***  developed by Guilherme Hazan and his fine staff at          ***
//***  Superwaba, Ltd. Superwaba is a proprietary development      ***
//***  environment based in part on the Waba development           ***
//***  environment developed by WabaSoft, Inc.                     ***                         ***
//********************************************************************                              


/*********************************************************************
Todo
-What's up with 5-way center knob, (IKeys.ENTER) it does not send event...
-fix PotHole omission
-fix location field lengths to prevent populating adjacent columns
    +1)Eyak Lake East Beaches (220)...~31chars
    +25)Martin River above Ragged
    +73)Eyak Lake wesr beaches (220)...~32chars
 **/

import litebase.*;
import waba.sys.*;
import waba.ui.*;
import waba.sys.Convert;
import waba.sys.Time;
import waba.sys.Vm;
import waba.ui.ControlEvent;
import waba.ui.Event;
import waba.ui.Label;
import waba.ui.MainWindow;
import waba.ui.MessageBox;
import waba.io.File;
import litebase.LitebaseConnection;
import litebase.ResultSet;


public class gpsDataLogger extends MainWindow{
	String szChangeLog = "19 June 2007-|  +Cleaned up 5-Way species |and location table browse.|  +Added n = zero count option|  ";
	LitebaseConnection driver;
	TabPanel tp;
	public dataCapture dataCapture;	
	public dataEdit dataEdit;
	public dataGps dataGps;
	public Grid grid;
	public locationEdit locationEdit;
	public speciesEdit speciesEdit;
	MessageBox mbExitApplication,mbCreateCsvFile,mbPurgeTrackLog,mbPurgeMainTable,mbMainTableDeleted,mbTrackLogTableDeleted,mbAboutGpsDataLogger,mbChangeLog;
	private MenuBar mbar; 
	static String szPlatform = Settings.platform;//gets host device information
	//returned strings are "Java", "PalmOS", "Win32", "WindowsCE",or "PocketPC"
	static String szWidth = Convert.toString(Settings.screenWidth,1);
	static String szHeight = Convert.toString(Settings.screenHeight,1);
	static String []szLocationLookup = {""};
	static String []szSpeciesLookup = {""};
	static String szValid = "";
	
	static String szLat, szLatNs, szLong, szLongEw, szTime;
	
	static int iPortNumber = 8;
	static int iFirstLocationIteration = 0;
	static int iFirstSpeciesIteration = 0;
	static int iEmptyLocationLookupTable = 0;
	static int iEmptySpeciesLookupTable = 0;
	static int iTrackLogInterval = 5000;
	static int iTrackLogFlag = 0;
	
	
	public gpsDataLogger(){
		super("gpsDataLogger 0.12b",TAB_ONLY_BORDER);
		if (!Settings.onDevice)
			waba.applet.JavaBridge.showMsgs = false;
		setDoubleBuffer(true);
		Settings.setUIStyle(Settings.Flat);
		driver = LitebaseConnection.getInstance("AZoe");
		String []szLocationLookup;//maybe delete??
		String []szSpeciesLookup;//maybe delete??
		InterceptSystemKeys();		
	}
	public void onStart(){
		if (!verifyDrivers()) 
			return;
		CreateMainTable();
		CreateTrackLogTable();
		CreateLocationLookupTable();
		CreateSpeciesLookupTable();
		//gps variables to move between containers
		szLat = szLatNs = szLong = szLongEw = szTime = "";
		//menubar titles and dropdown fields
		String col0[] = {"File","Edit Location Table","Edit Species Table","Purge Main Table","Purge TrackLog Table","Make *.csv files","Exit application"};//first dropdown title and item.
		String col1[] = {"Settings","Restart Bluetooth","Start/Stop TrackLog"};//second dropdown title and items.		
		String col2[] = {"Info","About gpsDataLogger 0.12","About SuperWaba VM","DeviceOS, screensize","General Instructions"};//third dropdown title and item.
		//Instantiate menubar
		setMenuBar(mbar = new MenuBar(new String[][]{col0,col1,col2}));
		//Strings for tab labels, then create tab panels
		String []tpCaptions = {"Data Capture","Data Edit","Table","GPS"};
		add(tp = new TabPanel(tpCaptions));
		tp.setBorderStyle(Window.NO_BORDER);
		tp.setRect(getClientRect()); 
		//Grid column headers... Note: Grid setup must be first otherwise grid overlays tp #0. Bug??
		String []gridCaptions = {"rowid","Timestamp","Species","Count","Location","Terrain","Latitude","N/S","Longitude","E/W","Sky","Water","Overall","Live"};
		//Instantiate tab panels
		tp.setPanel(2,grid = new Grid(gridCaptions,false));		
		tp.setPanel(0,dataCapture = new dataCapture());
		tp.setPanel(1,dataEdit = new dataEdit());
		tp.setPanel(3,dataGps = new dataGps());	
		
		//creates string array from lookup tables, then loads into comboboxes
		LoadSpeciesComboBoxStringArray();
		LoadLocationComboBoxStringArray();
		invalidateRS(); //loads updated grid on grid tab
		/*
		 * locationEdit = locationEdit.instance was up in Public gpsDataLogger, 
		 * but this requires a lookup table. Would get an exception thrown
		 * if there had not been a lookup table created yet. Check this out
		 * and delete if not so...
		 */ 		
		locationEdit = locationEdit.instance;	
		speciesEdit = speciesEdit.instance;
		//below loads ComboBox correctly when CB is in 0 tab place
		dataCapture.updateSpeciesComboBox();
		dataCapture.updateLocationComboBox();		
		dataCapture.cbLocation.repaintNow();
		dataCapture.cbSpecies.repaintNow();	
		dataCapture.ShowSum();
	}
	public void invalidateRS(){ //refreshes grid to match main data table		
		ResultSet rs = driver.executeQuery("select rowid,time_stamp,species,surveycount,location,terrain,latitude,latns,longitude,longew,sky,water,overall,live,lastUpdated from surveyDB");
		//rs.setDecimalPlaces(5,2); //investigate this...
		if (rs.first()) // checks to see if rs is new, (empty)
			grid.setItems(rs.getStrings(-1,true,false));
		else 
			grid.clear();
		rs.close();
	}
	////////////////////////////Start Main Table methods//////////////////////////////
	private void CreateMainTable(){//main data table
		try{
			driver.execute("create table surveyDB(time_stamp char(16), species char(30), surveycount int, location char(50), terrain char(30), latitude char(16), latns char(2), longitude char(16), longew char (2), sky char(2), water char(2), overall char(2), live char(12), lastUpdated long)");
		}		
		catch (AlreadyCreatedException ace) {} 
		catch (DriverException pe){
			Vm.debug(pe.getMessage()); 
		}
	}
	private void CreateMainTableIndexes(){
		driver.execute("CREATE INDEX IDX_0 ON surveyDB(rowid)"); // the index names are completely ignored
		driver.execute("CREATE INDEX IDX_1 ON surveyDB(time_stamp)");	
		//new MessageBox("Attention","Main Table Indexes May have been created").popupModal();
	}
	private void PurgeMainTable(){     	  
		driver.executeUpdate("drop table surveyDB");	
		grid.clear();
	}
///////////////End Main Table methods, Start trackLog table methods/////////////////////
	
	private void CreateTrackLogTable(){//table to store Track Log table, (i.e., snail tracks, bread crumbs, etc...
		try{
			driver.execute("create table trackLog(time_stamp char(16), latitude char(16), latns char(2), longitude char(16), longew char (2))");
		}		
		catch (AlreadyCreatedException ace) {} 
		catch (DriverException pe){
			Vm.debug(pe.getMessage()); 
		}
	}
	private void PurgeTrackLogTable(){     	  
		driver.executeUpdate("drop table trackLog");	
	}
///////////////End trackLog Table methods, Start Location Lookup table methods/////////////////////
	
	private void CreateLocationLookupTable(){ //reference table that comboboxes are populated from.
		try{
			driver.execute("create table locationLookupDB(location char(50), lastUpdated long)");
			driver.execute("CREATE INDEX IDX_0 ON locationLookupDB(rowid)"); // the index names are completely ignored
			driver.execute("CREATE INDEX IDX_1 ON locationLookupDB(location)");
		}
		catch (AlreadyCreatedException ace) {} 
		catch (DriverException pe){
			Vm.debug(pe.getMessage()); 
		}
	} 
	private void CreateLocationLookupTableIndexes(){
		driver.execute("CREATE INDEX IDX_0 ON locationLookupDB(rowid)"); // the index names are completely ignored
		driver.execute("CREATE INDEX IDX_1 ON locationLookupDB(location)");	
		new MessageBox("Attention","Location Lookup Table Indexes May have been created").popupModal();
	}
///////////////End Location Lookup Table methods...Start Species Lookup table methods//////////////////
/////////////// Start Species Lookup table methods/////////////////////
	private void CreateSpeciesLookupTable(){ //reference table that comboboxes are populated from.
		try{
			driver.execute("create table speciesLookupDB(species char(50), lastUpdated long)");
			driver.execute("CREATE INDEX IDX_0 ON speciesLookupDB(rowid)"); // the index names are completely ignored
			driver.execute("CREATE INDEX IDX_1 ON speciesLookupDB(species)");
		}
		catch (AlreadyCreatedException ace) {} 
		catch (DriverException pe){
			Vm.debug(pe.getMessage()); 
		}
	} 
	/*
	 * Delete this if not needed, other wise fix it.
	 */
	private void CreateSpeciesLookupTableIndexes(){
		driver.execute("CREATE INDEX IDX_0 ON speciesLookupDB(rowid)"); // the index names are completely ignored
		driver.execute("CREATE INDEX IDX_1 ON speciesLookupDB(species)");	
		new MessageBox("Attention","Species Lookup Table Indexes May have been created").popupModal();
	}
///////////////////////////End Species Lookup Table methods//////////////////////////////
	
	public boolean LoadLocationComboBoxStringArray(){ //sets initial string length 
		ResultSet rs = driver.executeQuery("select rowid,location from locationLookupDB");
		rs.first();
		if (!rs.first()){//checks to see if the lookup table is empty, if so
			repaintNow();   //a messagebox is posted to the user
			//new MessageBox("Attention","LocationLookup Table is empty, | please enter a field.").popupModal();
			iEmptyLocationLookupTable = 1; //sets flag to be read by datacapture.updateLocationComboBox().			
			return(true);// Read comments there for explanation.
		}	
		else{//iterates through lookup table and loads string array that populates cbLocation 
			szLocationLookup[0] = rs.getString("location");
			int i = 1;
			while (rs.next()){
				//make string array dynamic
				if (i >= szLocationLookup.length) {
					String[] tmp = new String[szLocationLookup.length + 1];
					Vm.copyArray(szLocationLookup, 0, tmp, 0, szLocationLookup.length);
					szLocationLookup = tmp;
				} 	  			 
				szLocationLookup[i] = rs.getString("location");			    			 
				++i;			    			 
			}
		}
		return true;
	}   	
	public boolean LoadSpeciesComboBoxStringArray(){ //sets initial string length 
		ResultSet rs = driver.executeQuery("select rowid,species from speciesLookupDB");
		rs.first();
		if (!rs.first()){//checks to see if the lookup table is empty, if so
			repaintNow();   //a messagebox is posted to the user
			//new MessageBox("Attention","SpeciesLookup Table is empty, | please enter a field.").popupModal();
			iEmptySpeciesLookupTable = 1; //sets flag to be read by datacapture.updateSpeciesComboBox().			
			return(true);// Read comments there for explanation.
		}	
		else{//sets string that populates cbSpecies to rs from lookuptable
			szSpeciesLookup[0] = rs.getString("species");
			int i = 1;
			while (rs.next()){
				//make string array dynamic
				if (i >= szSpeciesLookup.length) {
					String[] tmp = new String[szSpeciesLookup.length + 1];
					Vm.copyArray(szSpeciesLookup, 0, tmp, 0, szSpeciesLookup.length);
					szSpeciesLookup = tmp;
				} 	  			 
				szSpeciesLookup[i] = rs.getString("species");			    			 
				++i;			    			 
			}
		}
		return true;
	}  
	private boolean verifyDrivers(){
		try{
			Class.forName("litebase.LitebaseConnection");
		}
		catch (ClassNotFoundException cnfe){
			add(new Label("Please install file|litebase.LitebaseConnection"),CENTER,TOP);
			return false;
		}
		return true;
	}
	/*********************************************************************************
	 * 		     Does carriage return for CSV file creation
	 **********************************************************************************/
	private static byte []enter = {(byte)'\r',(byte)'\n'};	
	/*********************************************************************************
	 *           Makes .csv file on the device of the surveyDB data table
	 **********************************************************************************/	
	protected void makeCsvFileSurveyDB(){ 
		int iFlag = 0;//sets up header row on first iteration through while loop
		
		String sb = "Time_stamp,Species,Count,Location,Terrain,Latitude,N-S,Longitude,E-W,Sky,Water,Overall,Live,RowId";
		
		String szDateTime;		//creates timestamp for the filename
		long T = new Time().getTimeLong();
		szDateTime = Convert.toString(T,1);		  

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美日韩中字一区| 天天爽夜夜爽夜夜爽精品视频| 精品影院一区二区久久久| 欧美精品一卡两卡| 久久国产三级精品| 国产日韩一级二级三级| 成人毛片老司机大片| 国产精品视频在线看| 色综合久久九月婷婷色综合| 亚洲精品日韩一| 欧美日韩国产美| 久久精品久久久精品美女| www日韩大片| 99久久精品一区二区| 亚洲国产精品嫩草影院| 在线电影院国产精品| 国产在线看一区| 亚洲欧美另类图片小说| 欧美日韩久久一区| 国产美女av一区二区三区| 国产精品国产三级国产| 欧美日韩在线三级| 国产精品夜夜嗨| 一区二区三区在线观看欧美| 日韩丝袜美女视频| aaa欧美大片| 亚洲成a人片在线观看中文| 日韩免费视频一区二区| 成人免费视频app| 日韩精品成人一区二区在线| 国产日韩欧美一区二区三区乱码| 色94色欧美sute亚洲线路一久| 免费精品99久久国产综合精品| 国产拍欧美日韩视频二区| 欧美最新大片在线看| 国产一区二区毛片| 亚洲国产精品久久艾草纯爱| 国产亚洲精品7777| 制服丝袜亚洲色图| a在线播放不卡| 久久狠狠亚洲综合| 亚洲免费观看视频| 久久精品日韩一区二区三区| 欧美日韩久久久| www.日韩av| 国产乱一区二区| 日本欧洲一区二区| 一区二区三区在线免费观看| 国产欧美精品一区| 日韩欧美精品三级| 欧美调教femdomvk| av资源网一区| 国产成人在线网站| 精品一区二区三区的国产在线播放| 亚洲精品日韩专区silk| 国产精品国产三级国产aⅴ入口| 日韩欧美精品在线视频| 777色狠狠一区二区三区| 色一情一伦一子一伦一区| 国产精品一区二区不卡| 美女性感视频久久| 日韩国产精品91| 图片区日韩欧美亚洲| 亚洲国产乱码最新视频 | 激情五月婷婷综合| 日韩一区欧美二区| 亚洲一区二区视频在线| 亚洲精品免费播放| 亚洲激情av在线| 自拍偷拍亚洲激情| 国产精品不卡视频| 国产精品的网站| 亚洲人xxxx| 亚洲人成在线播放网站岛国| 国产精品久久二区二区| 最好看的中文字幕久久| 亚洲人成电影网站色mp4| 亚洲女厕所小便bbb| 亚洲日本一区二区三区| 亚洲天堂a在线| 日韩伦理av电影| 一区二区在线看| 亚洲丰满少妇videoshd| 丝袜诱惑制服诱惑色一区在线观看 | 欧美区视频在线观看| 欧洲亚洲国产日韩| 欧美日韩成人在线| 制服丝袜av成人在线看| 日韩一区二区三区视频在线| 91精品国产免费久久综合| 欧美一区二区黄色| 26uuu亚洲综合色欧美| 久久久www成人免费毛片麻豆| 国产亚洲污的网站| 亚洲啪啪综合av一区二区三区| 1区2区3区国产精品| 一级女性全黄久久生活片免费| 亚洲成人手机在线| 久久aⅴ国产欧美74aaa| 国产超碰在线一区| 一本色道**综合亚洲精品蜜桃冫| 欧美午夜精品免费| 欧美一卡二卡三卡四卡| 欧美国产欧美亚州国产日韩mv天天看完整 | 欧美日本一区二区三区| 日韩视频一区在线观看| 久久久久久久久久久电影| 国产精品毛片久久久久久久| 一区二区视频免费在线观看| 日韩电影免费在线看| 国产精品一卡二| 91黄色小视频| 久久久亚洲午夜电影| 一区二区三区在线免费播放| 麻豆91在线播放| 91同城在线观看| 欧美一区二区黄色| 国产精品超碰97尤物18| 亚洲不卡av一区二区三区| 国产最新精品免费| 欧美在线短视频| 久久久午夜电影| 一区二区三区中文在线| 国产精品一卡二卡在线观看| 欧美亚洲综合另类| 国产日韩欧美精品一区| 香蕉av福利精品导航| 成人激情开心网| 91精品国产综合久久精品| 亚洲欧美在线另类| 激情综合色丁香一区二区| 色综合久久综合网97色综合| 欧美刺激脚交jootjob| 亚洲午夜羞羞片| 风间由美一区二区三区在线观看 | 亚洲一区中文日韩| 九九久久精品视频| 欧美无乱码久久久免费午夜一区 | kk眼镜猥琐国模调教系列一区二区| 欧美高清视频不卡网| 中文字幕一区二区三区av| 久久精品久久综合| 欧美二区在线观看| 一区二区三区四区不卡视频| 成人开心网精品视频| 久久老女人爱爱| 久久精品免费观看| 欧美一区二区三区不卡| 午夜精品一区二区三区三上悠亚| av不卡在线观看| 欧美—级在线免费片| 黄色日韩网站视频| 日韩免费观看高清完整版| 香蕉成人啪国产精品视频综合网| 色综合一个色综合| 国产精品免费视频网站| 国产成人综合在线| 国产午夜亚洲精品不卡| 久久国产精品区| 678五月天丁香亚洲综合网| 亚洲在线观看免费视频| 在线观看www91| 亚洲色图在线播放| 不卡av在线网| 国产精品伦理在线| 成人小视频免费在线观看| 久久―日本道色综合久久| 激情偷乱视频一区二区三区| 欧美成人一级视频| 日本不卡在线视频| 精品久久久久久综合日本欧美| 日本欧美一区二区三区乱码| 欧美一区午夜精品| 欧美aⅴ一区二区三区视频| 91精品国产综合久久蜜臀| 日本v片在线高清不卡在线观看| 日韩免费看的电影| 国产麻豆午夜三级精品| 欧美激情综合五月色丁香| 成人av在线电影| 一区二区中文字幕在线| 91黄色激情网站| 午夜影院久久久| 日韩精品在线网站| 国产麻豆精品95视频| 中文字幕一区视频| 欧美主播一区二区三区美女| 午夜成人免费电影| 精品国产伦一区二区三区观看方式| 国产在线视频一区二区| 中文字幕一区二区5566日韩| 欧美亚洲一区二区在线| 麻豆精品一二三| 日本一区二区高清| 在线免费精品视频| 免费三级欧美电影| 国产精品污www在线观看| 欧美在线|欧美| 国产一区在线精品| 亚洲视频中文字幕|