当前位置: 首页>>代码示例>>Java>>正文


Java Configuration.setValue方法代码示例

本文整理汇总了Java中gov.nasa.worldwind.Configuration.setValue方法的典型用法代码示例。如果您正苦于以下问题:Java Configuration.setValue方法的具体用法?Java Configuration.setValue怎么用?Java Configuration.setValue使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在gov.nasa.worldwind.Configuration的用法示例。


在下文中一共展示了Configuration.setValue方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: setCacheLocation

import gov.nasa.worldwind.Configuration; //导入方法依赖的package包/类
/**
 * Set the map cache location
 * 
 * @param location
 */
public static void setCacheLocation(String location) {
	StringBuilder sb = new StringBuilder("<?xml version=\"1.0\"?>");

	sb.append("<dataFileStore><writeLocations><location wwDir=\"");
	sb.append(location);
	sb.append("\" create=\"true\"/></writeLocations></dataFileStore>");
	try {

		File file = File.createTempFile("adsc", ".xml");
		file.deleteOnExit();
		FileWriter fw = new java.io.FileWriter(file);

		fw.write(sb.toString());
		fw.close();
		Configuration.setValue(
				AVKey.DATA_FILE_STORE_CONFIGURATION_FILE_NAME, file
						.getAbsolutePath());
		
		
	} catch (IOException e) {
		e.printStackTrace();
	}
}
 
开发者ID:ltrr-arizona-edu,项目名称:tellervo,代码行数:29,代码来源:WWJUtil.java

示例2: setProxyPort

import gov.nasa.worldwind.Configuration; //导入方法依赖的package包/类
/**
 * Set the value of the field proxyPort
 * @param proxyPort the new proxyPort to set
 */
public void setProxyPort(final String proxyPort) {
	_proxyPort = proxyPort;
	if (proxyPort == null || "".equals(proxyPort)) {
		Configuration.removeKey(AVKey.URL_PROXY_PORT);
		Configuration.removeKey(AVKey.URL_PROXY_TYPE);
		System.getProperties().remove("http.proxyPort");
	} else {
		Configuration.setValue(AVKey.URL_PROXY_PORT, proxyPort);
		Configuration.setValue(AVKey.URL_PROXY_TYPE, Proxy.Type.HTTP);
		System.setProperty("http.proxyPort", proxyPort);
	}
}
 
开发者ID:leolewis,项目名称:openvisualtraceroute,代码行数:17,代码来源:Env.java

示例3: setProxyHost

import gov.nasa.worldwind.Configuration; //导入方法依赖的package包/类
/**
 * Set the value of the field proxyHost
 * @param proxyHost the new proxyHost to set
 */
public void setProxyHost(final String proxyHost) {
	_proxyHost = proxyHost;
	if (proxyHost == null || "".equals(proxyHost)) {
		Configuration.removeKey(AVKey.URL_PROXY_HOST);
		Configuration.removeKey(AVKey.URL_PROXY_TYPE);
		System.getProperties().remove("http.proxyHost");
	} else {
		Configuration.setValue(AVKey.URL_PROXY_HOST, proxyHost);
		Configuration.setValue(AVKey.URL_PROXY_TYPE, Proxy.Type.HTTP);
		System.setProperty("http.proxyHost", proxyHost);
	}
}
 
开发者ID:leolewis,项目名称:openvisualtraceroute,代码行数:17,代码来源:Env.java

示例4: GISFrame

import gov.nasa.worldwind.Configuration; //导入方法依赖的package包/类
public GISFrame(MarkerLayer layer, Boolean isMiniMap, Double initLat, Double initLong)
{
	this.isMiniMap = isMiniMap;
	Configuration.setValue(AVKey.INITIAL_LATITUDE, initLat);
	Configuration.setValue(AVKey.INITIAL_LONGITUDE, initLong);
	Configuration.setValue(AVKey.INITIAL_PITCH, 45);
	Configuration.setValue(AVKey.INITIAL_ALTITUDE, 180000);
	setupGui(layer);
	setupMenus();
}
 
开发者ID:ltrr-arizona-edu,项目名称:tellervo,代码行数:11,代码来源:GISFrame.java


注:本文中的gov.nasa.worldwind.Configuration.setValue方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。