本文整理汇总了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();
}
}
示例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);
}
}
示例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);
}
}
示例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();
}