Package gov.nasa.worldwind

Examples of gov.nasa.worldwind.WorldWind


            if (source != null)
               this.imageSources.add(source);
         }
      }

      WorldWind wwd = WorldWind.getInstance();

      if (wwd == null)
         throw new Exception("wwd == null");

      if (!wwd.getMemoryCacheSet().containsCache(BUFFERED_IMAGE_CACHE_NAME))
      {
         long size = Configuration.getLongValue(BUFFERED_IMAGE_CACHE_SIZE, DEFAULT_BUFFERED_IMAGE_CACHE_SIZE);
         MemoryCache cache = new BasicMemoryCache((long) (0.85 * size), size);
         wwd.getMemoryCacheSet().addCache(BUFFERED_IMAGE_CACHE_NAME, cache);
      }


      this.initializeSlideShow();
   }
View Full Code Here


      this.readThread = null;
   }

   protected PowerOfTwoPaddedImage getImage(Object source) throws Exception
   {
      WorldWind wwd = WorldWind.getInstance();

      if (wwd == null)
         throw new Exception("wwd == null");

      return (PowerOfTwoPaddedImage) wwd.getMemoryCache(BUFFERED_IMAGE_CACHE_NAME).getObject(source);
   }
View Full Code Here

   protected boolean putImage(Object source, PowerOfTwoPaddedImage image) throws Exception
   {
      long sizeInBytes = ImageUtil.computeSizeInBytes(image.getPowerOfTwoImage());

      WorldWind wwd = WorldWind.getInstance();

      if (wwd == null)
         throw new Exception("wwd == null");

      MemoryCache cache = wwd.getMemoryCache(BUFFERED_IMAGE_CACHE_NAME);

      boolean addToCache = (sizeInBytes < cache.getCapacity());

      // If the image is too large for the cache, then do not add it to the cache.
      if (addToCache)
View Full Code Here

TOP

Related Classes of gov.nasa.worldwind.WorldWind

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.