garminconfiguration.java

来自「gps garmingpstool-src-0[1].9.tar.gz」· Java 代码 · 共 127 行

JAVA
127
字号
package net.aetherial.gis.garmin;import java.util.*;import org.w3c.dom.svg.*;import net.aetherial.gis.garmin.*;public final class GarminConfiguration {	private static boolean isInitialized = false;	private static int linkProtocolType = 000;	private static int deviceCommandProtocolType = 010;	private static int routeTransferProtocolType = 201;	private static int trackLogTransferProtocol = 300;	private static int waypointType = 101;	private static int routeHeaderType = 200;	private static int trackPointType = 300;	private static int trackHeadertype = 310;	private static int proximityWaypointType = 400;	private static int almanacType = 500;	private static String desc;	private static Hashtable currentTrackLog = null;	private static Hashtable currentWaypointLog = null;	private static SVGDocument svgDoc = null;	private static String tmpFile = null;	public static void setTmpFile (String n)	{		tmpFile = n;	}	public 	static String getTmpFile ()	{		return tmpFile;	} 	public static void initReceiver ()	{		ProductData pd = new ProductData ();		String [] pros = pd.getDataFormats ();		for (int i = 0; i < pros.length; i++)		{        		if (pros[i].equals ("D109"))        		{                		waypointType = 109;        		}        		else if (pros[i].equals ("D108"))        		{                		waypointType = 108;        		}			else if (pros[i].equals ("D103"))			{				waypointType = 103;			}			else if (pros[i].equals ("D301"))			{				trackPointType = 301;			}			else 			{				/* Add new types as features become implemented. */			}		}		desc = pd.getProductDescription ();		currentTrackLog = new Hashtable ();		currentWaypointLog = new Hashtable ();		GarminGMLDoc.resetGMLDoc ();			isInitialized = true;	}	public static int getWaypointType ()	{		return waypointType;	}	public static int getTrackPointType ()	{		return trackPointType;	}	public static boolean addWaypointToLog (String name)	{		if (currentWaypointLog.containsKey (name))			return false;		currentWaypointLog.put (name, name);				return true;	}	public static boolean addTrackToLog (String name)	{		if (currentTrackLog.containsKey (name))			return false;				currentTrackLog.put (name, name);		return true;	}	public static String getDesc ()	{		return desc;	}	public static void setSVGDoc (SVGDocument s)	{		svgDoc = s;	}	public static SVGDocument getSVGDoc ()	{		return svgDoc;	}	}

⌨️ 快捷键说明

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