Compiere Looks 1.2.1

org.compiere.plaf
Class ColorBlind

java.lang.Object
  |
  +--org.compiere.plaf.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-2002 HCIRN. All rights reserved.

Version:
$Id: ColorBlind.java,v 1.3 2002/03/17 02:29:49 jjanke Exp $
Author:
Thomas Wolfmaier
See Also:
HCIRN

Field Summary
static String[] COLORBLIND_TYPE
          Color Blindness Type - 0=none
static int DEUTERANOPIA
           
static int NORMAL
           
static int PROTANOPIA
           
static int TRITANOPIA
           
 
Constructor Summary
ColorBlind()
           
 
Method Summary
static int getColorType()
          Get Color Type for Color Blind view
static Color getDichromatColor(Color color)
          Convert "normal" color to Dichromat Color based on set color type
static Color getDichromatColor(Color color, int colorType)
          Convert "normal" color to Dichromat Color
static ColorUIResource getDichromatColorUIResource(ColorUIResource color)
          Convert "normal" color to Dichromat Color based on set color type
static Color getDichromatColorUIResource(ColorUIResource color, int colorType)
          Convert "normal" color to Dichromat Color
static void setColorType(int colorType)
          Set Color Type for Color Blind view
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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
Constructor Detail

ColorBlind

public ColorBlind()
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 RGB
colorType - 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

getDichromatColor

public static Color getDichromatColor(Color color,
                                      int colorType)
Convert "normal" color to Dichromat Color

Parameters:
color - Java Color object containing values for RGB
colorType - PROTANOPIA = 1, DEUTERANOPIA = 2 or TRITANOPIA = 3 as declared above
Returns:
Dichromat Color

Compiere Looks 1.2.1

Copyright (c) 1999-2003 ComPiere, Inc. - Author: Jorg Janke