Class ColorPool


  • public class ColorPool
    extends java.lang.Object
    Caches Colors, and automatically manages their disposal.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static ColorPool forWidget​(com.diffplug.common.swt.ControlWrapper wrapper)
      Returns a ColorPool for the given ControlWrapper, creating one if necessary.
      static ColorPool forWidget​(Widget widget)
      Returns a ColorPool for the given Widget, creating one if necessary.
      Color getColor​(RGB rgb)
      Returns a Color for the given RGB value.
      • Methods inherited from class java.lang.Object

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

      • getColor

        public Color getColor​(RGB rgb)
        Returns a Color for the given RGB value.
      • forWidget

        public static ColorPool forWidget​(Widget widget)
        Returns a ColorPool for the given Widget, creating one if necessary.
      • forWidget

        public static ColorPool forWidget​(com.diffplug.common.swt.ControlWrapper wrapper)
        Returns a ColorPool for the given ControlWrapper, creating one if necessary.