Class AsyncImage

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Runnable

    class AsyncImage
    extends java.util.concurrent.atomic.AtomicReference<org.eclipse.swt.graphics.ImageData>
    implements java.lang.Runnable
    An async image that loads itself in the background on an image-fetcher thread. Once its loaded it will trigger a redraw. Sometimes redraws that are not really necessary can be triggered, but that is not relevant in terms of performance for this swt-component.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      private void checkThread​(org.eclipse.swt.widgets.Display display)  
      void dispose()  
      org.eclipse.swt.graphics.Image getImage​(org.eclipse.swt.widgets.Display display)  
      void run()  
      • Methods inherited from class java.util.concurrent.atomic.AtomicReference

        accumulateAndGet, compareAndExchange, compareAndExchangeAcquire, compareAndExchangeRelease, compareAndSet, get, getAcquire, getAndAccumulate, getAndSet, getAndUpdate, getOpaque, getPlain, lazySet, set, setOpaque, setPlain, setRelease, toString, updateAndGet, weakCompareAndSet, weakCompareAndSetAcquire, weakCompareAndSetPlain, weakCompareAndSetRelease, weakCompareAndSetVolatile
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • tileUrl

        private final java.lang.String tileUrl
      • stamp

        private volatile long stamp
      • image

        private org.eclipse.swt.graphics.Image image
      • removeTileFromCacheRunnable

        private java.lang.Runnable removeTileFromCacheRunnable
      • tileUpdatedRunnable

        private java.lang.Runnable tileUpdatedRunnable
    • Constructor Detail

      • AsyncImage

        AsyncImage​(GeoMapHelper geoMapHelper,
                   TileRef tile,
                   java.lang.String tileUrl)
    • Method Detail

      • run

        public void run()
        Specified by:
        run in interface java.lang.Runnable
      • getImage

        public org.eclipse.swt.graphics.Image getImage​(org.eclipse.swt.widgets.Display display)
      • dispose

        public void dispose()
      • checkThread

        private void checkThread​(org.eclipse.swt.widgets.Display display)