本文整理汇总了Java中gov.nasa.worldwind.layers.Layer.getOpacity方法的典型用法代码示例。如果您正苦于以下问题:Java Layer.getOpacity方法的具体用法?Java Layer.getOpacity怎么用?Java Layer.getOpacity使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类gov.nasa.worldwind.layers.Layer
的用法示例。
在下文中一共展示了Layer.getOpacity方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: updateCreditButtonState
import gov.nasa.worldwind.layers.Layer; //导入方法依赖的package包/类
protected void updateCreditButtonState() {
LayerList ll = wwModel.getLayers();
for (int i = ll.size() - 1; i >= 0; i--) {
Layer l = ll.get(i);
if (l.isEnabled() && (l.getOpacity() > .2)) {
for (Class<?> c : l.getClass().getInterfaces())
if (c.equals( InfoSupplier.class )) {
((WWMapTools)tools).creditB.setEnabled(true);
return;
}
((WWMapTools)tools).creditB.setEnabled(false);
return;
}
}
((WWMapTools)tools).creditB.setEnabled(false);
}
示例2: isLayerVisible
import gov.nasa.worldwind.layers.Layer; //导入方法依赖的package包/类
private boolean isLayerVisible(Class<?> c) {
Layer layer = null;
for (Layer l : wwModel.getLayers())
if (c.isInstance(l)) {
layer = l;
break;
}
if (layer == null)
return false;
if (!layer.isEnabled())
return false;
if (layer.getOpacity() < .3)
return false;
return true;
}
示例3: makeLayerVisible
import gov.nasa.worldwind.layers.Layer; //导入方法依赖的package包/类
public synchronized void makeLayerVisible(Layer newLayer, boolean ignoreLayer) {
if (newLayer == null) return;
if (ignoreLayer)
layerManager.addIgnoredLayer(newLayer);
LayerList ll = wwModel.getLayers();
newLayer.setEnabled(true);
if (newLayer.getOpacity() < .3)
newLayer.setOpacity(1);
ll.remove(newLayer);
ll.add(ll.size(), newLayer);
if (!ignoreLayer)
setLayerManagerVisible(true);
}
示例4: updateSunAngleProvider
import gov.nasa.worldwind.layers.Layer; //导入方法依赖的package包/类
protected void updateSunAngleProvider() {
LayerList ll = wwModel.getLayers();
for (int i = ll.size() - 1; i >= 0; i--) {
Layer l = ll.get(i);
if (l.isEnabled() && (l.getOpacity() > .4) &&
true)
for (Class<?> c : l.getClass().getInterfaces())
if (c.equals( SunAngle.class ) && ((SunAngle) l).isSunValid()) {
compassLayer.setAngleSupplier((SunAngle) l);
return;
}
}
compassLayer.setAngleSupplier(null);
}
示例5: updateColorScaleProvider
import gov.nasa.worldwind.layers.Layer; //导入方法依赖的package包/类
protected void updateColorScaleProvider() {
LayerList ll = wwModel.getLayers();
for (int i = ll.size() - 1; i >= 0; i--) {
Layer l = ll.get(i);
if (l.isEnabled() && (l.getOpacity() > .2)) {
for (Class<?> c : l.getClass().getInterfaces())
if (c.equals( ColorScale.class ) && ((ColorScale) l).isColorScaleValid()) {
colorScaleLayer.setScaleSupplier((ColorScale) l);
return;
}
}
}
colorScaleLayer.setScaleSupplier(null);
}
示例6: showCredit
import gov.nasa.worldwind.layers.Layer; //导入方法依赖的package包/类
public void showCredit() {
LayerList ll = wwModel.getLayers();
for (int i = ll.size() - 1; i >= 0; i--) {
Layer l = ll.get(i);
if (l.isEnabled() && (l.getOpacity() > .2)) {
for (Class<?> c : l.getClass().getInterfaces())
if (c.equals( InfoSupplier.class )) {
String url = ((InfoSupplier) l).getInfoURL();
BrowseURL.browseURL(url);
}
return;
}
}
}
示例7: updateInfo
import gov.nasa.worldwind.layers.Layer; //导入方法依赖的package包/类
protected void updateInfo() {
if (lastPoint != null) {
Position position = WWMapTools.this.wwCanvas.getView().computePositionFromScreenPoint(lastPoint.x, lastPoint.y);
if (position != null) {
elev = WWMapTools.this.wwCanvas.getModel().getGlobe().getElevation(position.getLatitude(), position.getLongitude());
lat = position.getLatitude().getDegrees();
lon = position.getLongitude().getDegrees();
gridValue = Double.NaN;
LayerList ll = WWMapTools.this.wwCanvas.getModel().getLayers();
outer: for (int i = ll.size() - 1; i >= 0; i--) {
Layer l = ll.get(i);
if (l.isEnabled() && (l.getOpacity() > .4))
for (Class<?> c : l.getClass().getInterfaces())
if (c.equals( QueryableGridLayer.class )) {
QueryableGridLayer grid = (QueryableGridLayer) l;
if (grid.getValueUnits() == null) continue;
gridUnits = grid.getValueUnits().replaceAll("%", "%%");
gridValue = grid.getValueAt(lat, lon);
break outer;
}
}
}
}
updateInfoLabel();
}