Package com.biglybt.ui.swt.utils
Class ColorCache
- java.lang.Object
-
- com.biglybt.ui.swt.utils.ColorCache
-
public class ColorCache extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ColorCache.MyAEDiagnosticsEvidenceGenerator
-
Field Summary
Fields Modifier and Type Field Description private static java.util.HashSet<org.eclipse.swt.graphics.Color>
colorsToDispose
private static boolean
DEBUG
private static boolean
forceNoColor
private static java.util.Map<java.lang.Long,org.eclipse.swt.graphics.Color>
mapColors
private static int
SYSTEMCOLOR_INDEXSTART
private static java.lang.String[]
systemColorNames
private static TimerEventPeriodic
timerColorCacheChecker
-
Constructor Summary
Constructors Constructor Description ColorCache()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description private static void
addColor(java.lang.Long key, org.eclipse.swt.graphics.Color color)
static void
dispose()
private static void
ensureMapColorsInitialized(org.eclipse.swt.graphics.Device device)
static org.eclipse.swt.graphics.Color
getColor(org.eclipse.swt.graphics.Device device, float[] hsb)
static org.eclipse.swt.graphics.Color
getColor(org.eclipse.swt.graphics.Device device, int[] rgb)
static org.eclipse.swt.graphics.Color
getColor(org.eclipse.swt.graphics.Device device, int red, int green, int blue)
static org.eclipse.swt.graphics.Color
getColor(org.eclipse.swt.graphics.Device device, java.lang.String value)
private static org.eclipse.swt.graphics.Color
getColor(org.eclipse.swt.graphics.Device device, java.lang.String c_value, boolean useScheme)
static org.eclipse.swt.graphics.Color
getColor(org.eclipse.swt.graphics.Device device, org.eclipse.swt.graphics.RGB rgb)
static org.eclipse.swt.graphics.Color
getRandomColor()
static org.eclipse.swt.graphics.Color
getSchemedColor(org.eclipse.swt.graphics.Device device, int red, int green, int blue)
static org.eclipse.swt.graphics.Color
getSchemedColor(org.eclipse.swt.graphics.Device device, java.lang.String value)
static void
reset()
-
-
-
Field Detail
-
DEBUG
private static final boolean DEBUG
-
mapColors
private static final java.util.Map<java.lang.Long,org.eclipse.swt.graphics.Color> mapColors
-
colorsToDispose
private static final java.util.HashSet<org.eclipse.swt.graphics.Color> colorsToDispose
-
SYSTEMCOLOR_INDEXSTART
private static final int SYSTEMCOLOR_INDEXSTART
- See Also:
- Constant Field Values
-
systemColorNames
private static final java.lang.String[] systemColorNames
-
timerColorCacheChecker
private static TimerEventPeriodic timerColorCacheChecker
-
forceNoColor
private static boolean forceNoColor
-
-
Method Detail
-
reset
public static void reset()
-
dispose
public static void dispose()
-
getSchemedColor
public static org.eclipse.swt.graphics.Color getSchemedColor(org.eclipse.swt.graphics.Device device, int red, int green, int blue)
-
getColor
public static org.eclipse.swt.graphics.Color getColor(org.eclipse.swt.graphics.Device device, int red, int green, int blue)
-
ensureMapColorsInitialized
private static void ensureMapColorsInitialized(org.eclipse.swt.graphics.Device device)
-
getColor
public static org.eclipse.swt.graphics.Color getColor(org.eclipse.swt.graphics.Device device, java.lang.String value)
-
getSchemedColor
public static org.eclipse.swt.graphics.Color getSchemedColor(org.eclipse.swt.graphics.Device device, java.lang.String value)
-
getColor
private static org.eclipse.swt.graphics.Color getColor(org.eclipse.swt.graphics.Device device, java.lang.String c_value, boolean useScheme)
-
addColor
private static void addColor(java.lang.Long key, org.eclipse.swt.graphics.Color color)
-
getColor
public static org.eclipse.swt.graphics.Color getColor(org.eclipse.swt.graphics.Device device, int[] rgb)
- Since:
- 3.0.4.3
-
getRandomColor
public static org.eclipse.swt.graphics.Color getRandomColor()
-
getColor
public static org.eclipse.swt.graphics.Color getColor(org.eclipse.swt.graphics.Device device, float[] hsb)
- Since:
- 3.1.1.1
-
getColor
public static org.eclipse.swt.graphics.Color getColor(org.eclipse.swt.graphics.Device device, org.eclipse.swt.graphics.RGB rgb)
- Parameters:
device
-rgb
-- Returns:
- Since:
- 3.1.1.1
-
-