Class ColorCache

java.lang.Object
org.eclipse.nebula.widgets.calendarcombo.ColorCache

public class ColorCache
extends java.lang.Object
  • Field Details

  • Method Details

    • disposeAll

      public static void disposeAll()
      Disposes all colors held in the cache and colors created when class is created.

      IMPORTANT: ONLY CALL WHEN YOU WANT TO DISPOSE THE WIDGET USING THIS CLASS!

      If you only wish to dispose colors you have created through the use of the class, please use disposeCachedColors()

      See Also:
      disposeCachedColor()
    • disposeCachedColor

      public static void disposeCachedColor()
      Disposes the cached colors only.
    • getWhite

      public static org.eclipse.swt.graphics.Color getWhite()
      Returns the color white R255, G255, B255
      Returns:
      White color
    • getBlack

      public static org.eclipse.swt.graphics.Color getBlack()
      Returns the color black R0, G0, B0
      Returns:
      Black color
    • getColor

      public static org.eclipse.swt.graphics.Color getColor​(org.eclipse.swt.graphics.RGB rgb)
      Returns a color that is also cached if it has not been created before.
      Parameters:
      rgb - RGB colors
      Returns:
      Color
    • getColor

      public static org.eclipse.swt.graphics.Color getColor​(int r, int g, int b)
      Returns a color that is also cached if it has not been created before.
      Parameters:
      r - Red
      g - Green
      b - Blue
      Returns:
      Color