org.eclipse.actf.visualization.engines.lowvision
Class LowVisionType

java.lang.Object
  extended by org.eclipse.actf.visualization.engines.lowvision.LowVisionType

public class LowVisionType
extends Object

This class defines low vision simulation type

See Also:
PageImageFactory

Field Summary
static int CVD_DEUTAN
          Color vision deficiency type: Deutan
static int CVD_PROTAN
          Color vision deficiency type: Protan
static int CVD_TRITAN
          Color vision deficiency type: Tritan
 
Constructor Summary
LowVisionType()
          Constructor of LowVisionType
 
Method Summary
 int convertColor(int _src)
          Convert target color based on current low vision simulation type configuration
 int countTypes()
          Get number of enabled simulation types
 boolean doBlur()
          Check if a blur type simulation is enabled
 boolean doChangeColors()
          Check if at least one of color related simulation (color vision deficiency, color filter, or glare) is enabled
 boolean doColorFilter()
          Check if a color filter type simulation is enabled
 boolean doCVD()
          Check if a color vision deficiency type simulation is enabled
 boolean doEyesight()
          Check if an eyesight type simulation is enabled
 boolean doGlare()
          Check if a glare type simulation is enabled
 float[] getColorFilterRGB()
          Get color filter value array (Red, Green and Blue).
 int getCVDType()
          Get target color vision deficiency type
 double getDisplayHeight()
          Get height of target display.
 int getDisplayResolution()
          Get vertical resolution of target display.
 double getEyeDisplayDistance()
          Get distance between user's eye and display.
 float getEyesightDegree()
          Get target eyesight degree of eyesight type simulation
 double getEyesightLength()
          Get indistinguishable length for target eyesight degree
 double getEyesightPixel()
          Get indistinguishable pixel size for target eyesight degree
 int getEyesightRadius()
          Get indistinguishable radius for target eyesight degree
 float getGlareDegree()
          Get target degree of glare
 void setColorFilter(boolean enable)
          Turn on/off a color filter type simulation
 void setColorFilterDegree(float _degree)
          Set degree of color filter
 void setCVD(boolean enable)
          Turn on/off a color vision deficiency type simulation
 void setCVDType(int cvd_type)
          Set target color vision deficiency type
 void setDisplayHeight(double height)
          Set display height in target environment
 void setDisplayResolution(int resolution)
          Set resolution of target display
 void setEyeDisplayDistance(double distance)
          Set distance between user's eye and display
 void setEyesight(boolean enable)
          Turn on/off an eyesight type simulation
 void setEyesightDegree(float _deg)
          Set target eyesight degree of eyesight type simulation
 void setGlare(boolean enable)
          Turn on/off a glare type simulation
 void setGlareDegree(float _deg)
          Set target degree of glare
 String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

CVD_PROTAN

public static final int CVD_PROTAN
Color vision deficiency type: Protan

See Also:
Constant Field Values

CVD_DEUTAN

public static final int CVD_DEUTAN
Color vision deficiency type: Deutan

See Also:
Constant Field Values

CVD_TRITAN

public static final int CVD_TRITAN
Color vision deficiency type: Tritan

See Also:
Constant Field Values
Constructor Detail

LowVisionType

public LowVisionType()
Constructor of LowVisionType

Method Detail

doEyesight

public boolean doEyesight()
Check if an eyesight type simulation is enabled

Returns:
true if the simulation is enabled

setEyesight

public void setEyesight(boolean enable)
Turn on/off an eyesight type simulation

Parameters:
enable - set true to turn on

getEyesightDegree

public float getEyesightDegree()
Get target eyesight degree of eyesight type simulation

Returns:
eyesight degree

setEyesightDegree

public void setEyesightDegree(float _deg)
                       throws LowVisionException
Set target eyesight degree of eyesight type simulation

Parameters:
_deg - target eyesight degree
Throws:
LowVisionException - if target degree is not positive value

getEyesightPixel

public double getEyesightPixel()
Get indistinguishable pixel size for target eyesight degree

Returns:
indistinguishable pixel size

getEyesightRadius

public int getEyesightRadius()
Get indistinguishable radius for target eyesight degree

Returns:
indistinguishable radius

getEyesightLength

public double getEyesightLength()
Get indistinguishable length for target eyesight degree

Returns:
indistinguishable length

doCVD

public boolean doCVD()
Check if a color vision deficiency type simulation is enabled

Returns:
true if the simulation is enabled

setCVD

public void setCVD(boolean enable)
Turn on/off a color vision deficiency type simulation

Parameters:
enable - set true to turn on

getCVDType

public int getCVDType()
Get target color vision deficiency type

Returns:
color vision deficiency type

setCVDType

public void setCVDType(int cvd_type)
                throws LowVisionException
Set target color vision deficiency type

Parameters:
cvd_type - target color vision deficiency type
Throws:
LowVisionException - if target type is not CVD_DEUTAN,CVD_PROTAN, or CVD_TRITAN

doColorFilter

public boolean doColorFilter()
Check if a color filter type simulation is enabled

Returns:
true if the simulation is enabled

setColorFilter

public void setColorFilter(boolean enable)
Turn on/off a color filter type simulation

Parameters:
enable - set true to turn on

getColorFilterRGB

public float[] getColorFilterRGB()
Get color filter value array (Red, Green and Blue). Each filter value is within range of [0.0, 1.0].

Returns:
color filter value array

setColorFilterDegree

public void setColorFilterDegree(float _degree)
                          throws LowVisionException
Set degree of color filter

Parameters:
_degree - degree of color filter
Throws:
LowVisionException - if resulting filter value exceeds the range of [0.0, 1.0].

doGlare

public boolean doGlare()
Check if a glare type simulation is enabled

Returns:
true if the simulation is enabled

setGlare

public void setGlare(boolean enable)
Turn on/off a glare type simulation

Parameters:
enable - set true to turn on

getGlareDegree

public float getGlareDegree()
Get target degree of glare

Returns:
degree of glare

setGlareDegree

public void setGlareDegree(float _deg)
Set target degree of glare

Parameters:
_deg - target degree of glare

countTypes

public int countTypes()
Get number of enabled simulation types

Returns:
number of enabled simulation types

doBlur

public boolean doBlur()
Check if a blur type simulation is enabled

Returns:
true if the simulation is enabled

doChangeColors

public boolean doChangeColors()
Check if at least one of color related simulation (color vision deficiency, color filter, or glare) is enabled

Returns:
true if color related simulation is enabled

convertColor

public int convertColor(int _src)
                 throws LowVisionException
Convert target color based on current low vision simulation type configuration

Parameters:
_src - target color
Returns:
resulting color
Throws:
LowVisionException

toString

public String toString()
Overrides:
toString in class Object

getDisplayHeight

public double getDisplayHeight()
Get height of target display. Default value is 20.8cm (14.1 inches).

Returns:
height of target display

getDisplayResolution

public int getDisplayResolution()
Get vertical resolution of target display. Default value is 1024.

Returns:
vertical resolution of target display

getEyeDisplayDistance

public double getEyeDisplayDistance()
Get distance between user's eye and display. Default value is 30cm.

Returns:
distance between user's eye and display

setDisplayHeight

public void setDisplayHeight(double height)
Set display height in target environment

Parameters:
height - target display height

setDisplayResolution

public void setDisplayResolution(int resolution)
Set resolution of target display

Parameters:
resolution - resolution of target display

setEyeDisplayDistance

public void setEyeDisplayDistance(double distance)
Set distance between user's eye and display

Parameters:
distance - distance between user's eye and display