Package org.compiere.swing
Class ColorBlind
- java.lang.Object
-
- org.compiere.swing.ColorBlind
-
public class ColorBlind extends Object
Color Blind Utilities. These utilities help to show how color blind/challenged see colors. Created by Thomas Wolfmaier. Copyright (C) 1999-2005 HCIRN. All rights reserved.- Version:
- $Id: ColorBlind.java,v 1.2 2006/07/30 00:52:23 jjanke Exp $
- Author:
- Thomas Wolfmaier
- See Also:
- HCIRN
-
-
Field Summary
Fields Modifier and Type Field Description static String[]COLORBLIND_TYPEColor Blindness Type - 0=nonestatic intDEUTERANOPIAstatic intNORMALstatic intPROTANOPIAstatic intTRITANOPIA
-
Constructor Summary
Constructors Constructor Description ColorBlind()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static intgetColorType()Get Color Type for Color Blind viewstatic ColorgetDichromatColor(Color color)Convert "normal" color to Dichromat Color based on set color typestatic ColorgetDichromatColor(Color color, int colorType)Convert "normal" color to Dichromat Colorstatic ColorUIResourcegetDichromatColorUIResource(ColorUIResource color)Convert "normal" color to Dichromat Color based on set color typestatic ColorgetDichromatColorUIResource(ColorUIResource color, int colorType)Convert "normal" color to Dichromat Colorstatic voidsetColorType(int colorType)Set Color Type for Color Blind view
-
-
-
Field Detail
-
COLORBLIND_TYPE
public static final String[] COLORBLIND_TYPE
Color Blindness Type - 0=none
-
NORMAL
public static final int NORMAL
- See Also:
- Constant Field Values
-
PROTANOPIA
public static final int PROTANOPIA
- See Also:
- Constant Field Values
-
DEUTERANOPIA
public static final int DEUTERANOPIA
- See Also:
- Constant Field Values
-
TRITANOPIA
public static final int TRITANOPIA
- See Also:
- Constant Field Values
-
-
Method Detail
-
setColorType
public static void setColorType(int colorType)
Set Color Type for Color Blind view- Parameters:
colorType- (0 = none)
-
getColorType
public static int getColorType()
Get Color Type for Color Blind view- Returns:
- colorType (0 = none)
-
getDichromatColorUIResource
public static ColorUIResource getDichromatColorUIResource(ColorUIResource color)
Convert "normal" color to Dichromat Color based on set color type- Parameters:
color- Java Color object containing values for RGB- Returns:
- Dichromat Color
-
getDichromatColorUIResource
public static Color getDichromatColorUIResource(ColorUIResource color, int colorType)
Convert "normal" color to Dichromat Color- Parameters:
color- Java Color object containing values for RGBcolorType- PROTANOPIA = 1, DEUTERANOPIA = 2 or TRITANOPIA = 3 as declared above- Returns:
- Dichromat Color
-
getDichromatColor
public static Color getDichromatColor(Color color)
Convert "normal" color to Dichromat Color based on set color type- Parameters:
color- Java Color object containing values for RGB- Returns:
- Dichromat Color
-
-