org.eclipse.actf.visualization.engines.lowvision

## Class PageEvaluation

- java.lang.Object
- - org.eclipse.actf.visualization.engines.lowvision.PageEvaluation

    public class PageEvaluation
    extends Object

Utility class to evaluate accessibility of `IPageImage`

### Constructor Summary

Constructors
Constructor and Description
`PageEvaluation(IPageImage _pageImage)` Constructor of PageEvaluation utility

### Method Summary

Methods
`List<IProblemItem>` `check(LowVisionType type, String urlS, int frameId)` Evaluate accessibility of target `IPageImage`
`void` `generateReport(String _path, String _htmlName, String _imgName, List<IProblemItem> _problemGroupArray)` Generate report file from `IProblemItem` list.
`String[]` `getAllowedBackgroundColors()` Get allowed background colors
`String[]` `getAllowedForegroundColors()` Get allowed foreground colors
`ImagePositionInfo[]` `getInteriorImagePosition()` Get interior image position (e.g., position in HTML page image)
`IPageImage` `getPageImage()` Get target `IPageImage`
`void` `setAllowedColors(String[] _fg, String[] _bg)` Set allowed foreground/background colors
`void` `setCurrentStyles(Map<String,ICurrentStyles> _styleMap)`
`void` `setInteriorImagePosition(ImagePositionInfo[] infoArray)` Set interior image position (e.g., position in HTML page image)
`void` `unsupportedModeReport(File targetFile)` Generate report file for unsupported mode

### Methods inherited from class java.lang.Object

`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### PageEvaluation

    public PageEvaluation(IPageImage _pageImage)

Constructor of PageEvaluation utility

Parameters:
  `_pageImage` - target `IPageImage`

### Method Detail

#### getPageImage

    public IPageImage getPageImage()

Get target `IPageImage`

Returns:
  target `IPageImage`

#### getInteriorImagePosition

    public ImagePositionInfo[] getInteriorImagePosition()

Get interior image position (e.g., position in HTML page image)

Returns:
  array of `ImagePositionInfo`

#### setInteriorImagePosition

    public void setInteriorImagePosition(ImagePositionInfo[] infoArray)

Set interior image position (e.g., position in HTML page image)

Parameters:
  `infoArray` - array of `ImagePositionInfo`

#### setCurrentStyles

    public void setCurrentStyles(Map<String,ICurrentStyles> _styleMap)

Parameters:
  `_styleMap` -

#### getAllowedForegroundColors

    public String[] getAllowedForegroundColors()

Get allowed foreground colors

Returns:
  array of allowed foreground colors

#### getAllowedBackgroundColors

    public String[] getAllowedBackgroundColors()

Get allowed background colors

Returns:
  array of allowed background colors

#### setAllowedColors

    public void setAllowedColors(String[] _fg,
                        String[] _bg)

Set allowed foreground/background colors

Parameters:
  `_fg` - array of allowed foreground colors
  `_bg` - array of allowed background colors

#### check

    public List<IProblemItem> check(LowVisionType type,
                           String urlS,
                           int frameId)

Evaluate accessibility of target `IPageImage`

Parameters:
  `type` - target low vision type
  `urlS` - target's URL
  `frameId` - target's frame ID
Returns:
  found accessibility issues as list of `IProblemItem`
See Also:
  `LowVisionType`

#### unsupportedModeReport

    public void unsupportedModeReport(File targetFile)
                               throws LowVisionException

Generate report file for unsupported mode

Parameters:
  `targetFile` - target file path to save report
Throws:
  `LowVisionException`

#### generateReport

    public void generateReport(String _path,
                      String _htmlName,
                      String _imgName,
                      List<IProblemItem> _problemGroupArray)
                        throws LowVisionException

Generate report file from `IProblemItem` list.

Parameters:
  `_path` - target path
  `_htmlName` - report file name
  `_imgName` - report image file name
  `_problemGroupArray` - target `IProblemItem` list
Throws:
  `LowVisionException`