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


Java Logging.getMessage方法代码示例

本文整理汇总了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);
}
 
开发者ID:iedadata,项目名称:geomapapp,代码行数:18,代码来源:MYEBSRectangularTessellator.java

示例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.
	}
 
开发者ID:iedadata,项目名称:geomapapp,代码行数:20,代码来源:ScalingTiledImageLayer.java

示例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;
}
 
开发者ID:iedadata,项目名称:geomapapp,代码行数:24,代码来源:ScalingTiledImageLayer.java

示例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);
}
 
开发者ID:iedadata,项目名称:geomapapp,代码行数:20,代码来源:BasicScalingTiledImageLayer.java

示例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;
}
 
开发者ID:iedadata,项目名称:geomapapp,代码行数:18,代码来源:BasicScalingTiledImageLayer.java

示例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();
}
 
开发者ID:ltrr-arizona-edu,项目名称:tellervo,代码行数:19,代码来源:TellervoLayerManagerLayer.java

示例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();
    }
}
 
开发者ID:ltrr-arizona-edu,项目名称:tellervo,代码行数:22,代码来源:TellervoLayerManagerLayer.java

示例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;
}
 
开发者ID:wolfgang-ch,项目名称:mytourbook,代码行数:25,代码来源:StatusLayer.java

示例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);
	}
}
 
开发者ID:wolfgang-ch,项目名称:mytourbook,代码行数:22,代码来源:StatusLayer.java

示例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;
}
 
开发者ID:wolfgang-ch,项目名称:mytourbook,代码行数:18,代码来源:StatusLayer.java

示例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);
}
 
开发者ID:TheHortonMachine,项目名称:hortonmachine,代码行数:21,代码来源:BasicMercatorTiledImageLayer.java

示例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;
}
 
开发者ID:TheHortonMachine,项目名称:hortonmachine,代码行数:23,代码来源:FileStoreDataSet.java

示例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;
}
 
开发者ID:TheHortonMachine,项目名称:hortonmachine,代码行数:23,代码来源:FileStoreDataSet.java

示例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);
}
 
开发者ID:iedadata,项目名称:geomapapp,代码行数:12,代码来源:MYEBSRectangularTessellator.java

示例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;
}
 
开发者ID:iedadata,项目名称:geomapapp,代码行数:41,代码来源:MYEBSRectangularTessellator.java


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