本文整理汇总了Java中gov.nasa.worldwind.util.Logging.getMessage方法的典型用法代码示例。如果您正苦于以下问题:Java Logging.getMessage方法的具体用法?Java Logging.getMessage怎么用?Java Logging.getMessage使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类gov.nasa.worldwind.util.Logging
的用法示例。
在下文中一共展示了Logging.getMessage方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: pick
import gov.nasa.worldwind.util.Logging; //导入方法依赖的package包/类
protected void pick(DrawContext dc, RectTile tile, Point pickPoint)
{
if (dc == null)
{
String msg = Logging.getMessage("nullValue.DrawContextIsNull");
Logging.logger().severe(msg);
throw new IllegalArgumentException(msg);
}
if (tile.ri == null || tile.ri.vertices == null)
return;
renderTrianglesWithUniqueColors(dc, tile);
PickedObject po = this.resolvePick(dc, tile, pickPoint);
if (po != null)
dc.addPickedObject(po);
}
示例2: ScalingTiledImageLayer
import gov.nasa.worldwind.util.Logging; //导入方法依赖的package包/类
public ScalingTiledImageLayer(LevelSet levelSet)
{
if (levelSet == null)
{
String message = Logging.getMessage("nullValue.LevelSetIsNull");
Logging.logger().severe(message);
throw new IllegalArgumentException(message);
}
this.levels = new LevelSet(levelSet); // the caller's levelSet may change internally, so we copy it.
this.setValue(AVKey.SECTOR, this.levels.getSector());
// this.createTopLevelTiles();
this.setPickEnabled(false); // textures are assumed to be terrain unless specifically indicated otherwise.
this.tileCountName = this.getName() + " Tiles";
// this.checkResources(); // Check whether resources are present, and perform any necessary initialization.
}
示例3: getImage
import gov.nasa.worldwind.util.Logging; //导入方法依赖的package包/类
private BufferedImage getImage(TextureTile tile, String mimeType, int timeout) throws Exception
{
// Read the image from disk.
BufferedImage image = this.requestImage(tile, mimeType);
Thread.sleep(1); // generates InterruptedException if thread has been interupted
if (image != null)
return image;
// Retrieve it from the net since it's not on disk.
this.downloadImage(tile, mimeType, timeout);
// Try to read from disk again after retrieving it from the net.
image = this.requestImage(tile, mimeType);
Thread.sleep(1); // generates InterruptedException if thread has been interupted
if (image == null)
{
String message =
Logging.getMessage("layers.TiledImageLayer.ImageUnavailable", tile.getPath());
throw new RuntimeException(message);
}
return image;
}
示例4: BasicScalingTiledImageLayer
import gov.nasa.worldwind.util.Logging; //导入方法依赖的package包/类
BasicScalingTiledImageLayer(String restorableStateInXml)
{
this(restorableStateToParams(restorableStateInXml));
RestorableSupport rs;
try
{
rs = RestorableSupport.parse(restorableStateInXml);
}
catch (Exception e)
{
// Parsing the document specified by stateInXml failed.
String message = Logging.getMessage("generic.ExceptionAttemptingToParseStateXml", restorableStateInXml);
Logging.logger().severe(message);
throw new IllegalArgumentException(message, e);
}
this.doRestoreState(rs, null);
}
示例5: getParamsFromDocument
import gov.nasa.worldwind.util.Logging; //导入方法依赖的package包/类
protected static AVList getParamsFromDocument(Element domElement, AVList params)
{
if (domElement == null)
{
String message = Logging.getMessage("nullValue.DocumentIsNull");
Logging.logger().severe(message);
throw new IllegalArgumentException(message);
}
if (params == null)
params = new AVListImpl();
getTiledImageLayerConfigParams(domElement, params);
setFallbacks(params);
return params;
}
示例6: TellervoLayerManagerLayer
import gov.nasa.worldwind.util.Logging; //导入方法依赖的package包/类
public TellervoLayerManagerLayer(WorldWindow wwd, LayerList visibleLayers)
{
if (wwd == null)
{
String msg = Logging.getMessage("nullValue.WorldWindow");
Logging.logger().severe(msg);
throw new IllegalArgumentException(msg);
}
this.wwd = wwd;
for(Layer layer : visibleLayers)
{
this.visibleLayerNames.add(layer.getName());
}
this.initialize();
}
示例7: setFont
import gov.nasa.worldwind.util.Logging; //导入方法依赖的package包/类
/**
* Set the <code>Font</code> used to draw the layer list text.
*
* @param font the <code>Font</code> used to draw the layer list text.
*/
public void setFont(Font font)
{
if (font == null)
{
String message = Logging.getMessage("nullValue.FontIsNull");
Logging.logger().severe(message);
throw new IllegalArgumentException(message);
}
if (!this.font.equals(font))
{
this.font = font;
this.annotation.getAttributes().setFont(font);
this.update();
}
}
示例8: handleCursorPositionChange
import gov.nasa.worldwind.util.Logging; //导入方法依赖的package包/类
private void handleCursorPositionChange(final PositionEvent event) {
final Position newPos = event.getPosition();
if (newPos != null) {
latDisplay = makeAngleDescription("Lat", newPos.getLatitude(), coordDecimalPlaces);
lonDisplay = makeAngleDescription("Lon", newPos.getLongitude(), coordDecimalPlaces);
elevDisplay = makeCursorElevationDescription(_ww
.getModel()
.getGlobe()
.getElevation(newPos.getLatitude(), newPos.getLongitude()));
//Need to force an extra draw. without this the displayed value lags the actual when just moving cursor
if ((previousPos != null)
&& (previousPos.getLatitude().compareTo(newPos.getLatitude()) != 0)
&& (previousPos.getLongitude().compareTo(newPos.getLongitude()) != 0)) {
this._ww.redraw();
}
} else {
latDisplay = "";
lonDisplay = Logging.getMessage("term.OffGlobe");
elevDisplay = "";
}
previousPos = newPos;
}
示例9: initBGTexture
import gov.nasa.worldwind.util.Logging; //导入方法依赖的package包/类
private void initBGTexture(final DrawContext dc) {
try {
InputStream iconStream = this.getClass().getResourceAsStream("/" + iconFilePath_bg);
if (iconStream == null) {
final File iconFile = new File(iconFilePath_bg);
if (iconFile.exists()) {
iconStream = new FileInputStream(iconFile);
}
}
final TextureData textureData = OGLUtil.newTextureData(dc.getGL().getGLProfile(), iconStream, false);
iconTexture = TextureIO.newTexture(textureData);
iconTexture.bind(dc.getGL());
this.bgWidth = iconTexture.getWidth();
this.bgHeight = iconTexture.getHeight();
} catch (final IOException e) {
final String msg = Logging.getMessage("layers.IOExceptionDuringInitialization");
Logging.logger().severe(msg);
throw new WWRuntimeException(msg, e);
}
}
示例10: setEventSource
import gov.nasa.worldwind.util.Logging; //导入方法依赖的package包/类
public void setEventSource(final WorldWindow newEventSource) {
if (newEventSource == null) {
final String msg = Logging.getMessage("nullValue.WorldWindow");
Logging.logger().severe(msg);
throw new IllegalArgumentException(msg);
}
if (this._ww != null) {
this._ww.removePositionListener(this);
this._ww.removeRenderingListener(this);
}
newEventSource.addPositionListener(this);
newEventSource.addRenderingListener(this);
this._ww = newEventSource;
}
示例11: run
import gov.nasa.worldwind.util.Logging; //导入方法依赖的package包/类
public void run() {
// TODO: check to ensure load is still needed
final java.net.URL textureURL = this.layer.getDataFileStore().findFile(tile.getPath(), false);
if (textureURL != null && !this.layer.isTextureExpired(tile, textureURL)) {
if (this.layer.loadTexture(tile, textureURL)) {
layer.getLevels().unmarkResourceAbsent(tile);
this.layer.firePropertyChange(AVKey.LAYER, null, this);
return;
} else {
// Assume that something's wrong with the file and delete it.
this.layer.getDataFileStore().removeFile(textureURL);
layer.getLevels().markResourceAbsent(tile);
String message = Logging.getMessage("generic.DeletedCorruptDataFile", textureURL);
Logging.logger().info(message);
}
}
this.layer.downloadTexture(this.tile);
}
示例12: getOutOfScopeSize
import gov.nasa.worldwind.util.Logging; //导入方法依赖的package包/类
public long getOutOfScopeSize(String unit, int interval)
{
if (unit == null)
{
String message = Logging.getMessage("nullValue.TimeUnit");
Logging.logger().severe(message);
throw new IllegalArgumentException(message);
}
long previousTime = computeTimeOffset(unit, interval);
long size = 0;
for (LeafInfo leaf : this.sortedLeafDirs)
{
if (leaf.lastUsed > previousTime)
break;
size += leaf.size;
}
return size;
}
示例13: computeDirectorySize
import gov.nasa.worldwind.util.Logging; //导入方法依赖的package包/类
protected static long computeDirectorySize(File dir)
{
long size = 0;
File[] files = dir.listFiles();
for (File file : files)
{
try
{
FileInputStream fis = new FileInputStream(file);
size += fis.available();
fis.close();
}
catch (IOException e)
{
String message = Logging.getMessage("generic.ExceptionWhileComputingSize", file.getAbsolutePath());
Logging.logger().fine(message);
}
}
return size;
}
示例14: render
import gov.nasa.worldwind.util.Logging; //导入方法依赖的package包/类
protected void render(DrawContext dc, RectTile tile)
{
if (dc == null)
{
String msg = Logging.getMessage("nullValue.DrawContextIsNull");
Logging.logger().severe(msg);
throw new IllegalArgumentException(msg);
}
this.render(dc, tile, 1);
}
示例15: getSurfacePoint
import gov.nasa.worldwind.util.Logging; //导入方法依赖的package包/类
protected Vec4 getSurfacePoint(RectTile tile, Angle latitude, Angle longitude)
{
if (latitude == null || longitude == null)
{
String msg = Logging.getMessage("nullValue.LatLonIsNull");
Logging.logger().severe(msg);
throw new IllegalArgumentException(msg);
}
if (!tile.sector.contains(latitude, longitude))
{
// not on this geometry
return null;
}
if (tile.ri == null)
return null;
double lat = latitude.getDegrees();
double lon = longitude.getDegrees();
double bottom = tile.sector.getMinLatitude().getDegrees();
double top = tile.sector.getMaxLatitude().getDegrees();
double left = tile.sector.getMinLongitude().getDegrees();
double right = tile.sector.getMaxLongitude().getDegrees();
double leftDecimal = (lon - left) / (right - left);
double bottomDecimal = (lat - bottom) / (top - bottom);
int row = (int) (bottomDecimal * (tile.density));
int column = (int) (leftDecimal * (tile.density));
double l = createPosition(column, leftDecimal, tile.ri.density);
double h = createPosition(row, bottomDecimal, tile.ri.density);
Vec4 result = interpolate(row, column, l, h, tile.ri);
result = result.add3(tile.ri.referenceCenter);
return result;
}