Class CursorCache


  • public class CursorCache
    extends java.lang.Object
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private static java.util.Map _cache  
    • Constructor Summary

      Constructors 
      Constructor Description
      CursorCache()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static void dispose()
      Disposes all cursors held in the cache.
      static org.eclipse.swt.graphics.Cursor getCursor​(int type)
      Returns a cursor that is also cached as to not create more handles for each time the cursor type is fetched.
      • Methods inherited from class java.lang.Object

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

      • _cache

        private static java.util.Map _cache
    • Constructor Detail

      • CursorCache

        public CursorCache()
    • Method Detail

      • getCursor

        public static org.eclipse.swt.graphics.Cursor getCursor​(int type)
        Returns a cursor that is also cached as to not create more handles for each time the cursor type is fetched.
        Parameters:
        type - Cursor Type to fetch
        Returns:
        Cursor
      • dispose

        public static void dispose()
        Disposes all cursors held in the cache.

        IMPORTANT: ONLY CALL WHEN YOU WANT TO DISPOSE ALL CACHED CURSORS!