Bug 559607
Change-Id: If91672e27dcecf607df80f4753913ec9521ea1fe
diff --git a/plugins/org.eclipse.actf.visualization.engines.lowvision/src/messages.properties b/plugins/org.eclipse.actf.visualization.engines.lowvision/src/messages.properties
index 13735b0..16fb8ef 100644
--- a/plugins/org.eclipse.actf.visualization.engines.lowvision/src/messages.properties
+++ b/plugins/org.eclipse.actf.visualization.engines.lowvision/src/messages.properties
@@ -1,5 +1,5 @@
###############################################################################
-# Copyright (c) 2007, 2008 IBM Corporation and others.
+# Copyright (c) 2007, 2020 IBM Corporation and others.
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Eclipse Public License v1.0
# which accompanies this distribution, and is available at
@@ -29,6 +29,8 @@
ContrastRatio = Contrast Ratio
TargetString = Corresponding Texts
BackgroundImage = (If background image is turned off, the contrast ratio might not be enough.)
+FixedSizeFontWarning = Font size might be fixed. \uff08unsupported font-size definitions, etc. This message is also shown in the case where font-size is unspecified.\uff09
+FixedSmallFontWarning = This text is too small and its font size might be fixed. \uff08unsupported font-size definitions, etc.\uff09
#
# lowvision.ScoreUtil
#
diff --git a/plugins/org.eclipse.actf.visualization.engines.lowvision/src/messages_ja.properties b/plugins/org.eclipse.actf.visualization.engines.lowvision/src/messages_ja.properties
index 0fb6d03..73445ef 100644
--- a/plugins/org.eclipse.actf.visualization.engines.lowvision/src/messages_ja.properties
+++ b/plugins/org.eclipse.actf.visualization.engines.lowvision/src/messages_ja.properties
@@ -1,5 +1,5 @@
###############################################################################
-# Copyright (c) 2007, 2008 IBM Corporation and others.
+# Copyright (c) 2007, 2020 IBM Corporation and others.
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Eclipse Public License v1.0
# which accompanies this distribution, and is available at
@@ -29,6 +29,8 @@
ContrastRatio = \u30b3\u30f3\u30c8\u30e9\u30b9\u30c8\u6bd4
TargetString = \u5bfe\u8c61\u6587\u5b57\u5217
BackgroundImage = (\u3082\u3057\u80cc\u666f\u753b\u50cf\u304c\u975e\u8868\u793a\u306b\u3055\u308c\u305f\u5834\u5408\u3001\u6587\u5b57\u8272\u3068\u80cc\u666f\u8272\u306e\u30b3\u30f3\u30c8\u30e9\u30b9\u30c8\u6bd4\u306b\u554f\u984c\u304c\u3042\u308b\u53ef\u80fd\u6027\u304c\u3042\u308a\u307e\u3059\u3002)
+FixedSizeFontWarning = \u56fa\u5b9a\u30b5\u30a4\u30ba\u306e\u30d5\u30a9\u30f3\u30c8\u304c\u4f7f\u308f\u308c\u3066\u3044\u308b\u53ef\u80fd\u6027\u304c\u3042\u308a\u307e\u3059 \uff08\u30b5\u30dd\u30fc\u30c8\u3055\u308c\u3066\u3044\u306a\u3044\u30d5\u30a9\u30f3\u30c8\u30b5\u30a4\u30ba\u6307\u5b9a\u3084\u3001\u672a\u6307\u5b9a\u306e\u5834\u5408\u3082\u3053\u306e\u30e1\u30c3\u30bb\u30fc\u30b8\u304c\u8868\u793a\u3055\u308c\u308b\u5834\u5408\u304c\u3042\u308a\u307e\u3059\uff09
+FixedSmallFontWarning = \u3053\u306e\u6587\u5b57\u306f\u5c0f\u3055\u3059\u304e\u307e\u3059\u3002\u3055\u3089\u306b\u56fa\u5b9a\u30b5\u30a4\u30ba\u306e\u30d5\u30a9\u30f3\u30c8\u304c\u4f7f\u308f\u308c\u3066\u3044\u308b\u53ef\u80fd\u6027\u304c\u3042\u308a\u307e\u3059 \uff08\u30b5\u30dd\u30fc\u30c8\u3055\u308c\u3066\u3044\u306a\u3044\u30d5\u30a9\u30f3\u30c8\u30b5\u30a4\u30ba\u6307\u5b9a\u306e\u5834\u5408\u3082\u3053\u306e\u30e1\u30c3\u30bb\u30fc\u30b8\u304c\u8868\u793a\u3055\u308c\u308b\u5834\u5408\u304c\u3042\u308a\u307e\u3059\uff09
#
# lowvision.ScoreUtil
#
diff --git a/plugins/org.eclipse.actf.visualization.engines.lowvision/src/org/eclipse/actf/visualization/engines/lowvision/PageEvaluation.java b/plugins/org.eclipse.actf.visualization.engines.lowvision/src/org/eclipse/actf/visualization/engines/lowvision/PageEvaluation.java
index 1d2a8fc..a11afb6 100644
--- a/plugins/org.eclipse.actf.visualization.engines.lowvision/src/org/eclipse/actf/visualization/engines/lowvision/PageEvaluation.java
+++ b/plugins/org.eclipse.actf.visualization.engines.lowvision/src/org/eclipse/actf/visualization/engines/lowvision/PageEvaluation.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2003, 2008 IBM Corporation and Others
+ * Copyright (c) 2003, 2020 IBM Corporation and Others
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -35,7 +35,7 @@
import org.eclipse.actf.visualization.internal.engines.lowvision.ScoreUtil;
import org.eclipse.actf.visualization.internal.engines.lowvision.image.Int2D;
import org.eclipse.actf.visualization.internal.engines.lowvision.io.ImageWriter;
-import org.eclipse.actf.visualization.internal.engines.lowvision.problem.LowVisionProblem;
+import org.eclipse.actf.visualization.internal.engines.lowvision.problem.ILowVisionProblem;
import org.eclipse.actf.visualization.internal.engines.lowvision.problem.LowVisionProblemException;
import org.eclipse.actf.visualization.internal.engines.lowvision.problem.LowVisionProblemGroup;
import org.eclipse.actf.visualization.internal.engines.lowvision.problem.ProblemItemLV;
@@ -215,7 +215,7 @@
if (curElement == null) {
continue;
}
- LowVisionProblem[] curProblemArray = curElement.check(type,
+ ILowVisionProblem[] curProblemArray = curElement.check(type,
allowedForegroundColors, allowedBackgroundColors);
int curLen = 0;
if (curProblemArray != null) {
@@ -224,7 +224,7 @@
// convert to LowVisionProblemGroup
for (int j = 0; j < curLen; j++) {
- Vector<LowVisionProblem> tmpVec = new Vector<LowVisionProblem>();
+ Vector<ILowVisionProblem> tmpVec = new Vector<ILowVisionProblem>();
tmpVec.addElement(curProblemArray[j]);
LowVisionProblemGroup lvpGroup = null;
try {
diff --git a/plugins/org.eclipse.actf.visualization.engines.lowvision/src/org/eclipse/actf/visualization/internal/engines/lowvision/DecisionMaker.java b/plugins/org.eclipse.actf.visualization.engines.lowvision/src/org/eclipse/actf/visualization/internal/engines/lowvision/DecisionMaker.java
index 3b2abe7..8801780 100644
--- a/plugins/org.eclipse.actf.visualization.engines.lowvision/src/org/eclipse/actf/visualization/internal/engines/lowvision/DecisionMaker.java
+++ b/plugins/org.eclipse.actf.visualization.engines.lowvision/src/org/eclipse/actf/visualization/internal/engines/lowvision/DecisionMaker.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2003, 2008 IBM Corporation and Others
+ * Copyright (c) 2003, 2020 IBM Corporation and Others
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -7,6 +7,7 @@
*
* Contributors:
* Junji MAEDA - initial API and implementation
+ * IBM Corporation - initial API and implementation
*******************************************************************************/
package org.eclipse.actf.visualization.internal.engines.lowvision;
@@ -28,6 +29,7 @@
import org.eclipse.actf.visualization.internal.engines.lowvision.image.Topology;
import org.eclipse.actf.visualization.internal.engines.lowvision.image.Vector3D;
import org.eclipse.actf.visualization.internal.engines.lowvision.problem.ColorProblem;
+import org.eclipse.actf.visualization.internal.engines.lowvision.problem.ILowVisionProblem;
import org.eclipse.actf.visualization.internal.engines.lowvision.problem.LowVisionProblem;
import org.eclipse.actf.visualization.internal.engines.lowvision.problem.LowVisionProblemException;
@@ -529,8 +531,8 @@
/*
* merge problems in the same container
*/
- public static boolean areSameGroupProblems(LowVisionProblem _p1,
- LowVisionProblem _p2) throws LowVisionProblemException {
+ public static boolean areSameGroupProblems(ILowVisionProblem _p1,
+ ILowVisionProblem _p2) throws LowVisionProblemException {
if (_p1.isGroup() || _p2.isGroup()) {
throw new LowVisionProblemException(
"ProblemGroup cannot be grouped any more.");
diff --git a/plugins/org.eclipse.actf.visualization.engines.lowvision/src/org/eclipse/actf/visualization/internal/engines/lowvision/Messages.java b/plugins/org.eclipse.actf.visualization.engines.lowvision/src/org/eclipse/actf/visualization/internal/engines/lowvision/Messages.java
index 99b980d..d481095 100644
--- a/plugins/org.eclipse.actf.visualization.engines.lowvision/src/org/eclipse/actf/visualization/internal/engines/lowvision/Messages.java
+++ b/plugins/org.eclipse.actf.visualization.engines.lowvision/src/org/eclipse/actf/visualization/internal/engines/lowvision/Messages.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2008 IBM Corporation and Others
+ * Copyright (c) 2007, 2020 IBM Corporation and Others
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -43,6 +43,8 @@
public static String ContrastRatio;
public static String TargetString;
public static String BackgroundImage;
+ public static String FixedSizeFontWarning;
+ public static String FixedSmallFontWarning;
static {
NLS.initializeMessages(BUNDLE_NAME, Messages.class);
diff --git a/plugins/org.eclipse.actf.visualization.engines.lowvision/src/org/eclipse/actf/visualization/internal/engines/lowvision/PageElement.java b/plugins/org.eclipse.actf.visualization.engines.lowvision/src/org/eclipse/actf/visualization/internal/engines/lowvision/PageElement.java
index 35a5165..bc13a1f 100644
--- a/plugins/org.eclipse.actf.visualization.engines.lowvision/src/org/eclipse/actf/visualization/internal/engines/lowvision/PageElement.java
+++ b/plugins/org.eclipse.actf.visualization.engines.lowvision/src/org/eclipse/actf/visualization/internal/engines/lowvision/PageElement.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2003, 2011 IBM Corporation and Others
+ * Copyright (c) 2003, 2020 IBM Corporation and Others
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -21,13 +21,14 @@
import org.eclipse.actf.visualization.engines.lowvision.LowVisionException;
import org.eclipse.actf.visualization.engines.lowvision.LowVisionType;
import org.eclipse.actf.visualization.engines.lowvision.image.ImageException;
+import org.eclipse.actf.visualization.eval.problem.ILowvisionProblemSubtype;
import org.eclipse.actf.visualization.internal.engines.lowvision.checker.W3CColorChecker;
import org.eclipse.actf.visualization.internal.engines.lowvision.color.ColorCSS;
import org.eclipse.actf.visualization.internal.engines.lowvision.color.ColorException;
import org.eclipse.actf.visualization.internal.engines.lowvision.color.ColorIRGB;
import org.eclipse.actf.visualization.internal.engines.lowvision.problem.ColorProblem;
import org.eclipse.actf.visualization.internal.engines.lowvision.problem.FixedSizeFontProblem;
-import org.eclipse.actf.visualization.internal.engines.lowvision.problem.FixedSmallFontProblem;
+import org.eclipse.actf.visualization.internal.engines.lowvision.problem.ILowVisionProblem;
import org.eclipse.actf.visualization.internal.engines.lowvision.problem.LowVisionProblem;
import org.eclipse.actf.visualization.internal.engines.lowvision.problem.LowVisionProblemException;
import org.eclipse.actf.visualization.internal.engines.lowvision.problem.ProhibitedBackgroundColorProblem;
@@ -50,11 +51,6 @@
static final double IE_SMALLER_SCALING = 1.00; // "smaller" in largest
// (experimental)
- // severity for fixed size font (0-1)
- public static final double SEVERITY_FIXED_SIZE_FONT = 0.25;
- public static final double SEVERITY_SMALL_FONT = 0.25;
- public static final double SEVERITY_FIXED_SMALL_FONT = SEVERITY_FIXED_SIZE_FONT
- + SEVERITY_SMALL_FONT;
// severity for color problems
public static final double SEVERITY_PROHIBITED_FOREGROUND_COLOR = 0.5;
public static final double SEVERITY_PROHIBITED_BACKGROUND_COLOR = 0.5;
@@ -65,24 +61,22 @@
// text check
@SuppressWarnings("nls")
- private static final String[] nonTextTagNames = { "area", "base",
- "basefont", "br", "col", "colgroup", "frame", "frameset", "head",
- "html", "hr", "img", "isindex", "link", "meta", "optgroup",
- "param", "script", "select", "style", "title" };
+ private static final String[] nonTextTagNames = { "area", "base", "basefont", "br", "col", "colgroup", "frame",
+ "frameset", "head", "html", "hr", "img", "isindex", "link", "meta", "optgroup", "param", "script", "select",
+ "style", "title" };
// tags that change font size when that succeeded pt from <body>
@SuppressWarnings("nls")
- private static final String[] fontSizeChangeTags = { "big", "code", "h1",
- "h2", "h3", "h5", "h6", "kbd", "pre", "samp", "small", "sub",
- "sup", "tt" };
+ private static final String[] fontSizeChangeTags = { "big", "code", "h1", "h2", "h3", "h5", "h6", "kbd", "pre",
+ "samp", "small", "sub", "sup", "tt" };
/*
- * tags that usually uses same font size (can change by using %,em,ex)
- * -> now we can change font size of these elements
+ * tags that usually uses same font size (can change by using %,em,ex) ->
+ * now we can change font size of these elements
*/
-// @SuppressWarnings("nls")
-// private static final String[] alwaysFixedFontSizeTags = { "button",
-// "option", "textarea" };
+ // @SuppressWarnings("nls")
+ // private static final String[] alwaysFixedFontSizeTags = { "button",
+ // "option", "textarea" };
public static final int UNSET_POSITION = -1;
@@ -172,9 +166,8 @@
}
// _lvType: for LowVision error check
- public LowVisionProblem[] check(LowVisionType _lvType,
- String[] allowedFgColors, String[] allowedBgColors) {
- Vector<LowVisionProblem> problemVec = new Vector<LowVisionProblem>();
+ public ILowVisionProblem[] check(LowVisionType _lvType, String[] allowedFgColors, String[] allowedBgColors) {
+ Vector<ILowVisionProblem> problemVec = new Vector<ILowVisionProblem>();
// ignore elements not in the rendered area
if (x < 0 || y < 0) {
@@ -195,9 +188,8 @@
try {
fsfp = checkFixedSizeFont(_lvType);
} catch (LowVisionException e) {
- DebugUtil.errMsg(this,
- "Error occurred in checking fixed-size font: id = " //$NON-NLS-1$
- + this.id);
+ DebugUtil.errMsg(this, "Error occurred in checking fixed-size font: id = " //$NON-NLS-1$
+ + this.id);
e.printStackTrace();
}
@@ -205,8 +197,7 @@
try {
sfp = checkSmallFont(_lvType);
} catch (LowVisionException e) {
- DebugUtil.errMsg(this,
- "Error occurred in checking small font: id = " + this.id); //$NON-NLS-1$
+ DebugUtil.errMsg(this, "Error occurred in checking small font: id = " + this.id); //$NON-NLS-1$
e.printStackTrace();
}
@@ -215,16 +206,37 @@
// double proba = Math.max( fsfp.getProbability(),
// sfp.getProbability() );
- // use fixed severity
- double proba = PageElement.SEVERITY_FIXED_SMALL_FONT;
- FixedSmallFontProblem newProblem = null;
- try {
- newProblem = new FixedSmallFontProblem(this, _lvType, proba);
- newProblem.setElement(fsfp.getElement());
- problemVec.addElement(newProblem);
- } catch (LowVisionProblemException e) {
- e.printStackTrace();
+ int type = fsfp.getLowVisionProblemType();
+ String attrName = null;
+ switch (type) {
+ case ILowvisionProblemSubtype.LOWVISION_FIXED_SIZE_FONT_PROBLEM:
+ attrName = fsfp.getAttrName();
+ try {
+ fsfp.changeType(ILowvisionProblemSubtype.LOWVISION_FIXED_SMALL_FONT_PROBLEM);
+ if (attrName != null && !attrName.isEmpty()) {
+ fsfp.setAttrName(attrName);
+ }
+ problemVec.addElement(fsfp);
+ } catch (LowVisionProblemException e) {
+ e.printStackTrace();
+ }
+ break;
+ case ILowvisionProblemSubtype.LOWVISION_FIXED_SIZE_FONT_WARNING:
+ attrName = fsfp.getAttrName();
+ try {
+ fsfp.changeType(ILowvisionProblemSubtype.LOWVISION_FIXED_SMALL_FONT_WARNIG);
+ if (attrName != null && !attrName.isEmpty()) {
+ fsfp.setAttrName(attrName);
+ }
+ problemVec.addElement(fsfp);
+ } catch (LowVisionProblemException e) {
+ e.printStackTrace();
+ }
+ break;
+ default:
+ DebugUtil.errMsg(this, "not fixed size font error/warning: type = " + type); //$NON-NLS-1$
}
+ // use fixed severity
} else if (fsfp != null) {
problemVec.addElement(fsfp);
} else if (sfp != null) {
@@ -250,8 +262,8 @@
}
if ((pfcp != null) && (pbcp != null)) {// fg/bg
try {
- problemVec.addElement(new ProhibitedBothColorsProblem(this,
- _lvType, PageElement.SEVERITY_PROHIBITED_BOTH_COLORS));
+ problemVec.addElement(
+ new ProhibitedBothColorsProblem(this, _lvType, PageElement.SEVERITY_PROHIBITED_BOTH_COLORS));
} catch (LowVisionProblemException lvpe) {
lvpe.printStackTrace();
}
@@ -264,15 +276,14 @@
}
int size = problemVec.size();
- LowVisionProblem[] problemArray = new LowVisionProblem[size];
+ ILowVisionProblem[] problemArray = new ILowVisionProblem[size];
for (int i = 0; i < size; i++) {
problemArray[i] = problemVec.elementAt(i);
}
return (problemArray);
}
- private List<ColorProblem> checkColors(LowVisionType _lvType)
- throws LowVisionException {
+ private List<ColorProblem> checkColors(LowVisionType _lvType) throws LowVisionException {
List<ColorProblem> result = new ArrayList<ColorProblem>();
@@ -293,8 +304,8 @@
return (result);
}
- boolean hasBgImage = (style.getComputedBackgroundImage() != null && !style
- .getComputedBackgroundImage().equalsIgnoreCase("none"));
+ boolean hasBgImage = (style.getComputedBackgroundImage() != null
+ && !style.getComputedBackgroundImage().equalsIgnoreCase("none"));
ColorIRGB fgOrg = new ColorIRGB(foregroundColor);
ColorIRGB bgOrg = new ColorIRGB(backgroundColor);
@@ -302,8 +313,7 @@
W3CColorChecker w3c = new W3CColorChecker(fgOrg, bgOrg);
double contrast = w3c.calcContrast();
if (contrast < 7) {
- ColorProblem cp = new ColorProblem(this, _lvType,
- w3c.calcSeverity());
+ ColorProblem cp = new ColorProblem(this, _lvType, w3c.calcSeverity());
cp.setElement(style.getElement());
cp.setContrast(contrast);
cp.setTargetStrings(style.getChildTexts());
@@ -361,8 +371,13 @@
private static final short FONT_SIZE_EM = 6; // em, ex
- private FixedSizeFontProblem checkFixedSizeFont(LowVisionType _lvType)
- throws LowVisionException {
+ private static final short FONT_SIZE_REM = 7; // rem
+
+ private static final short FONT_SIZE_V = 8; // vw, vh,vmin,vmax
+
+ private static final String[] FIXED_FONT_STRINGS = { "in", "cm", "mm", "pc", "px" };
+
+ private FixedSizeFontProblem checkFixedSizeFont(LowVisionType _lvType) throws LowVisionException {
// if (!(_lvType.doBlur())) {
// return (null);
// }
@@ -388,11 +403,36 @@
if (fontStr.indexOf(DELIM) == -1) {
fontStr = digitToFontSetting(fontStr);
short type = fontSizeType(fontStr);
- //TODO check "pt"
- if (type == FONT_SIZE_FIXED){ // not include "pt" because IE usually returns "pt"
+
+ if (type == FONT_SIZE_FIXED) {
+ // not include "pt" because IE usually returns "pt"
+ String typeS = null;
+
+ for (String tmpS : FIXED_FONT_STRINGS) {
+ if (fontStr.endsWith(tmpS)) {
+ typeS = tmpS;
+ }
+ }
+
try {
- FixedSizeFontProblem problem = new FixedSizeFontProblem(
- this, _lvType, PageElement.SEVERITY_FIXED_SIZE_FONT);
+ FixedSizeFontProblem problem;
+ problem = new FixedSizeFontProblem(ILowvisionProblemSubtype.LOWVISION_FIXED_SIZE_FONT_PROBLEM, this,
+ _lvType);
+ if (typeS != null) {
+ problem.setAttrName(typeS);
+ }
+ problem.setElement(style.getElement());
+ return (problem);
+ } catch (LowVisionProblemException e) {
+ e.printStackTrace();
+ return (null);
+ }
+ } else if (type == FONT_SIZE_PT) {
+ FixedSizeFontProblem problem;
+ try {
+ problem = new FixedSizeFontProblem(ILowvisionProblemSubtype.LOWVISION_FIXED_SIZE_FONT_WARNING, this,
+ _lvType);
+ problem.setAttrName("pt");
problem.setElement(style.getElement());
return (problem);
} catch (LowVisionProblemException e) {
@@ -421,8 +461,7 @@
}
StringTokenizer stTag = new StringTokenizer(tagName, DELIM);
if (stTag.countTokens() != tokenCount) {
- throw new LowVisionException(
- "# of tagNames and fontSizes did not match."); //$NON-NLS-1$
+ throw new LowVisionException("# of tagNames and fontSizes did not match."); //$NON-NLS-1$
}
String[] tagNameSequence = new String[tokenCount];
for (int i = tokenCount - 1; i >= 0; i--) {
@@ -466,17 +505,14 @@
if (tmpType == FONT_SIZE_FIXED) {
fixedFlag = true;
firstPtFlag = true;
- } else if (tmpType == FONT_SIZE_RELATIVE
- || tmpType == FONT_SIZE_ABSOLUTE) {
+ } else if (tmpType == FONT_SIZE_RELATIVE || tmpType == FONT_SIZE_ABSOLUTE) {
fixedFlag = false;
firstPtFlag = true;
} else if (tmpType == FONT_SIZE_PT) {
if (!firstPtFlag) {
firstPtFlag = true;
fixedFlag = false; // need check
- } else if (curType != FONT_SIZE_PT
- || fixedFlag == true
- || !isFontSizeChangeTag(tmpTag)) {
+ } else if (curType != FONT_SIZE_PT || fixedFlag == true || !isFontSizeChangeTag(tmpTag)) {
fixedFlag = true;
}
// else{
@@ -496,8 +532,8 @@
if (fixedFlag) {
try {
- FixedSizeFontProblem problem = new FixedSizeFontProblem(this,
- _lvType, PageElement.SEVERITY_FIXED_SIZE_FONT);
+ FixedSizeFontProblem problem = new FixedSizeFontProblem(
+ ILowvisionProblemSubtype.LOWVISION_FIXED_SIZE_FONT_PROBLEM, this, _lvType);
problem.setElement(style.getElement());
return (problem);
} catch (LowVisionProblemException e) {
@@ -513,14 +549,16 @@
private short fontSizeType(String _fontSize) {
String s = _fontSize.toLowerCase();
- if (s.endsWith("mm") || s.endsWith("cm") || s.endsWith("in") ||
- // s.endsWith("pt") || // pt is special
- s.endsWith("pc") || s.endsWith("px")) {
+ if (s.endsWith("vw") || s.endsWith("vh") || s.endsWith("vmin") || s.endsWith("vmax")) {
+ return (FONT_SIZE_V);
+ } else if (s.endsWith("mm") || s.endsWith("cm") || s.endsWith("in") || s.endsWith("pc") || s.endsWith("px")) {
return (FONT_SIZE_FIXED);
} else if (s.endsWith("pt")) {
return (FONT_SIZE_PT);
} else if (s.endsWith("%")) {
return (FONT_SIZE_PERCENT);
+ } else if (s.endsWith("rem")) {
+ return (FONT_SIZE_REM);
} else if (s.endsWith("em") || s.endsWith("ex")) {
return (FONT_SIZE_EM);
} else if (s.equals("smaller") || s.equals("larger")) {
@@ -531,8 +569,7 @@
}
@SuppressWarnings("nls")
- private String digitToFontSetting(String _fontStr)
- throws LowVisionException {
+ private String digitToFontSetting(String _fontStr) throws LowVisionException {
if (_fontStr.length() == 1) {
if (_fontStr.equals("1")) {
@@ -550,8 +587,7 @@
} else if (_fontStr.equals("7")) {
return ("xx-large");
} else {
- throw new LowVisionException("Invalid font size setting: "
- + _fontStr);
+ throw new LowVisionException("Invalid font size setting: " + _fontStr);
}
} else if (_fontStr.startsWith("+")) {
if (_fontStr.equals("+1")) {
@@ -570,8 +606,7 @@
// used in some pages
return ("100%");
} else {
- throw new LowVisionException("Invalid font size setting: "
- + _fontStr);
+ throw new LowVisionException("Invalid font size setting: " + _fontStr);
}
} else if (_fontStr.startsWith("-")) {
if (_fontStr.equals("-1")) {
@@ -589,8 +624,7 @@
} else if (_fontStr.equals("-0")) {
return ("100%");
} else {
- throw new LowVisionException("Invalid font size setting: "
- + _fontStr);
+ throw new LowVisionException("Invalid font size setting: " + _fontStr);
}
} else {
return (_fontStr);
@@ -608,27 +642,26 @@
return (false);
}
-// private boolean isAlwaysFixedSizeFontTag(String _st) {
-// String s = _st.toLowerCase();
-// int index = s.indexOf(DELIM);
-// if (index > -1) {
-// s = s.substring(0, index);
-// }
-// int len = alwaysFixedFontSizeTags.length;
-// for (int i = 0; i < len; i++) {
-// if (s.equals(alwaysFixedFontSizeTags[i])) {
-// return (true);
-// }
-// }
-// return (false);
-// }
+ // private boolean isAlwaysFixedSizeFontTag(String _st) {
+ // String s = _st.toLowerCase();
+ // int index = s.indexOf(DELIM);
+ // if (index > -1) {
+ // s = s.substring(0, index);
+ // }
+ // int len = alwaysFixedFontSizeTags.length;
+ // for (int i = 0; i < len; i++) {
+ // if (s.equals(alwaysFixedFontSizeTags[i])) {
+ // return (true);
+ // }
+ // }
+ // return (false);
+ // }
/*
* note: reset at td/th is experimental behaviour in IE6
*/
@SuppressWarnings("nls")
- private SmallFontProblem checkSmallFont(LowVisionType _lvType)
- throws LowVisionException {
+ private SmallFontProblem checkSmallFont(LowVisionType _lvType) throws LowVisionException {
if (!(_lvType.doBlur())) {
return (null);
}
@@ -691,18 +724,20 @@
*
* define LARGEST as default to check the small size font in the LARGEST
* setting
+ *
*/
String curFontSize = fontSizeSettings[numFontSizeSettings - 1];
- if (fontSizeType(curFontSize) == FONT_SIZE_PT) {
- fontSizeSettings[numFontSizeSettings - 1] = IE_LARGEST_FONT;
- for (int i = numFontSizeSettings - 2; i >= 0; i--) {
- if (fontSizeSettings[i].equals(curFontSize)) {
- fontSizeSettings[i] = IE_LARGEST_FONT;
- } else {
- break;
- }
- }
- }
+ /*
+ * -> Do not replace "pt" values and evaluate it based on the value that
+ * used in IE. If the size is small, create warning.
+ */
+ /*
+ * if (fontSizeType(curFontSize) == FONT_SIZE_PT) {
+ * fontSizeSettings[numFontSizeSettings - 1] = IE_LARGEST_FONT; for (int
+ * i = numFontSizeSettings - 2; i >= 0; i--) { if
+ * (fontSizeSettings[i].equals(curFontSize)) { fontSizeSettings[i] =
+ * IE_LARGEST_FONT; } else { break; } } }
+ */
float scaling = 1.0f; // smaller, larger, em, ex, %
short curType = FONT_SIZE_UNKNOWN;
@@ -729,33 +764,48 @@
}
break;
} else if (curType == FONT_SIZE_PERCENT) {
- double value = Double.parseDouble(curFontSize.substring(0,
- curFontSize.length() - 1));
+ double value = Double.parseDouble(curFontSize.substring(0, curFontSize.length() - 1));
scaling *= (value / 100.0);
+ } else if (curType == FONT_SIZE_REM) {
+ // TODO get Root(html element) font size and evaluate size
+ // (font size check for relative spec is currently not used )
} else if (curType == FONT_SIZE_EM) {
double value = 0.0;
- value = Double.parseDouble(curFontSize.substring(0,
- curFontSize.length() - 2));
+ value = Double.parseDouble(curFontSize.substring(0, curFontSize.length() - 2));
if (curFontSize.endsWith("ex")) {
value /= 2.0;
}
scaling *= (value * IE_EM_SCALING);
+ } else if (curType == FONT_SIZE_V) {
+ // TODO get viewport and evaluate size
+ // (font size check for relative spec is currently not used )
} else if (curFontSize.equals("larger")) {
scaling *= IE_LARGER_SCALING;
} else if (curFontSize.equals("smaller")) {
scaling *= IE_SMALLER_SCALING;
} else {
- throw new LowVisionException("unknown font size setting: "
- + curFontSize);
+ throw new LowVisionException("unknown font size setting: " + curFontSize);
}
}
- if (curType != FONT_SIZE_FIXED && curType != FONT_SIZE_PT
- && curType != FONT_SIZE_ABSOLUTE) {
+
+ if (curType == FONT_SIZE_V || curType == FONT_SIZE_REM || curType == FONT_SIZE_UNKNOWN) {
+ return (null);
+ }
+
+ if (curType != FONT_SIZE_FIXED && curType != FONT_SIZE_PT && curType != FONT_SIZE_ABSOLUTE) {
curFontSize = IE_LARGEST_FONT;
}
- float value = Float.parseFloat(curFontSize.substring(0,
- curFontSize.length() - 2));
+ float value;
+ try {
+ // value = Float.parseFloat(curFontSize.substring(0,
+ // curFontSize.length() - 2));
+ String numPart = curFontSize.replaceAll("[^0-9\\.]", "");
+ value = Float.parseFloat(numPart);
+ } catch (Exception e) {
+ throw new LowVisionException("unknown font size unit: " + curFontSize);
+ }
+
float sizeInMm = 0.0f;
if (curFontSize.endsWith("in")) {
sizeInMm = LengthUtil.in2mm(value);
@@ -770,8 +820,7 @@
} else if (curFontSize.endsWith("px")) {
sizeInMm = LengthUtil.px2mm(value);
} else {
- throw new LowVisionException("unknown font size unit: "
- + curFontSize);
+ throw new LowVisionException("unknown font size unit: " + curFontSize);
}
sizeInMm *= scaling;
@@ -787,8 +836,7 @@
if (severity > 0.0) {
try {
// fixed severity
- SmallFontProblem problem = new SmallFontProblem(this, _lvType,
- PageElement.SEVERITY_SMALL_FONT);
+ SmallFontProblem problem = new SmallFontProblem(this, _lvType);
problem.setElement(style.getElement());
return (problem);
} catch (LowVisionProblemException e) {
@@ -800,9 +848,8 @@
}
}
- private ProhibitedForegroundColorProblem checkAllowedForegroundColors(
- LowVisionType _lvType, String[] _allowedColors)
- throws LowVisionException {
+ private ProhibitedForegroundColorProblem checkAllowedForegroundColors(LowVisionType _lvType,
+ String[] _allowedColors) throws LowVisionException {
if (_allowedColors == null) {
return (null);
}
@@ -833,9 +880,8 @@
templateColor = new ColorIRGB(curColorString);
} catch (ColorException ce) {
ce.printStackTrace();
- throw new LowVisionException(
- "ColorException occurs while converting String \"" //$NON-NLS-1$
- + curColorString + "\" to a color."); //$NON-NLS-1$
+ throw new LowVisionException("ColorException occurs while converting String \"" //$NON-NLS-1$
+ + curColorString + "\" to a color."); //$NON-NLS-1$
}
if (templateColor.equals(foregroundColor)) {
return (null);
@@ -851,9 +897,8 @@
}
}
- private ProhibitedBackgroundColorProblem checkAllowedBackgroundColors(
- LowVisionType _lvType, String[] _allowedColors)
- throws LowVisionException {
+ private ProhibitedBackgroundColorProblem checkAllowedBackgroundColors(LowVisionType _lvType,
+ String[] _allowedColors) throws LowVisionException {
if (_allowedColors == null) {
return (null);
}
@@ -878,9 +923,8 @@
templateColor = new ColorIRGB(curColorString);
} catch (ColorException ce) {
ce.printStackTrace();
- throw new LowVisionException(
- "ColorException occurs while converting String \"" //$NON-NLS-1$
- + curColorString + "\" to a color."); //$NON-NLS-1$
+ throw new LowVisionException("ColorException occurs while converting String \"" //$NON-NLS-1$
+ + curColorString + "\" to a color."); //$NON-NLS-1$
}
if (templateColor.equals(backgroundColor)) {
return (null);
diff --git a/plugins/org.eclipse.actf.visualization.engines.lowvision/src/org/eclipse/actf/visualization/internal/engines/lowvision/checker/CharacterChecker.java b/plugins/org.eclipse.actf.visualization.engines.lowvision/src/org/eclipse/actf/visualization/internal/engines/lowvision/checker/CharacterChecker.java
index 3603ac3..f798bdb 100644
--- a/plugins/org.eclipse.actf.visualization.engines.lowvision/src/org/eclipse/actf/visualization/internal/engines/lowvision/checker/CharacterChecker.java
+++ b/plugins/org.eclipse.actf.visualization.engines.lowvision/src/org/eclipse/actf/visualization/internal/engines/lowvision/checker/CharacterChecker.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2008 IBM Corporation and Others
+ * Copyright (c) 2008, 2020 IBM Corporation and Others
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -7,6 +7,7 @@
*
* Contributors:
* Junji MAEDA - initial API and implementation
+ * IBM Corporation - initial API and implementation
*******************************************************************************/
package org.eclipse.actf.visualization.internal.engines.lowvision.checker;
@@ -33,6 +34,7 @@
import org.eclipse.actf.visualization.internal.engines.lowvision.operator.LowVisionFilter;
import org.eclipse.actf.visualization.internal.engines.lowvision.problem.BlurProblem;
import org.eclipse.actf.visualization.internal.engines.lowvision.problem.ColorProblem;
+import org.eclipse.actf.visualization.internal.engines.lowvision.problem.ILowVisionProblem;
import org.eclipse.actf.visualization.internal.engines.lowvision.problem.LowVisionProblem;
import org.eclipse.actf.visualization.internal.engines.lowvision.problem.LowVisionProblemException;
import org.eclipse.actf.visualization.internal.engines.lowvision.problem.LowVisionProblemGroup;
@@ -582,7 +584,7 @@
Stack<LowVisionProblem> searchStack = new Stack<LowVisionProblem>();
searchStack.push(_curProb);
while (!searchStack.empty()) {
- LowVisionProblem sProb = searchStack.pop();
+ ILowVisionProblem sProb = searchStack.pop();
for (int i = 0; i < _size; i++) {
if (_idMap[i] == 0) {
LowVisionProblem tmpProb = _tmpVec.elementAt(i);
@@ -603,7 +605,7 @@
private void makeProblemGroupByID(Vector<LowVisionProblemGroup> _resultVec,
int _id, Vector<LowVisionProblem> _tmpVec, int _size, int[] _idMap)
throws ImageException {
- Vector<LowVisionProblem> groupVector = new Vector<LowVisionProblem>();
+ Vector<ILowVisionProblem> groupVector = new Vector<ILowVisionProblem>();
for (int i = 0; i < _size; i++) {
if (_idMap[i] == _id) {
diff --git a/plugins/org.eclipse.actf.visualization.engines.lowvision/src/org/eclipse/actf/visualization/internal/engines/lowvision/image/InteriorImage.java b/plugins/org.eclipse.actf.visualization.engines.lowvision/src/org/eclipse/actf/visualization/internal/engines/lowvision/image/InteriorImage.java
index f972211..7e3bce1 100644
--- a/plugins/org.eclipse.actf.visualization.engines.lowvision/src/org/eclipse/actf/visualization/internal/engines/lowvision/image/InteriorImage.java
+++ b/plugins/org.eclipse.actf.visualization.engines.lowvision/src/org/eclipse/actf/visualization/internal/engines/lowvision/image/InteriorImage.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2003, 2008 IBM Corporation and Others
+ * Copyright (c) 2003, 2020 IBM Corporation and Others
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -7,6 +7,7 @@
*
* Contributors:
* Junji MAEDA - initial API and implementation
+ * IBM Corporation - initial API and implementation
*******************************************************************************/
package org.eclipse.actf.visualization.internal.engines.lowvision.image;
@@ -23,6 +24,7 @@
import org.eclipse.actf.visualization.internal.engines.lowvision.DecisionMaker;
import org.eclipse.actf.visualization.internal.engines.lowvision.color.ColorIRGB;
import org.eclipse.actf.visualization.internal.engines.lowvision.operator.LowVisionFilter;
+import org.eclipse.actf.visualization.internal.engines.lowvision.problem.ILowVisionProblem;
import org.eclipse.actf.visualization.internal.engines.lowvision.problem.ImageColorProblem;
import org.eclipse.actf.visualization.internal.engines.lowvision.problem.LowVisionProblem;
import org.eclipse.actf.visualization.internal.engines.lowvision.problem.LowVisionProblemException;
@@ -224,7 +226,7 @@
return (null);
}
- Vector<LowVisionProblem> problemVector = new Vector<LowVisionProblem>();
+ Vector<ILowVisionProblem> problemVector = new Vector<ILowVisionProblem>();
try {
for (int k = 0; k < numLargeComponents - 1; k++) {
for (int l = k + 1; l < numLargeComponents; l++) {
@@ -311,7 +313,7 @@
// search problems should be merged with curProb
LowVisionProblem curProb = _vec.elementAt(curSize - 1);
_vec.removeElementAt(curSize - 1);
- Vector<LowVisionProblem> curVec = new Vector<LowVisionProblem>();
+ Vector<ILowVisionProblem> curVec = new Vector<ILowVisionProblem>();
curVec.addElement(curProb);
short curType = curProb.getType();
@@ -343,8 +345,8 @@
return (answerVec);
}
- private class CompareByProbability implements Comparator<LowVisionProblem> {
- public int compare(LowVisionProblem _o1, LowVisionProblem _o2) {
+ private class CompareByProbability implements Comparator<ILowVisionProblem> {
+ public int compare(ILowVisionProblem _o1, ILowVisionProblem _o2) {
double diff = _o2.getProbability() - _o1.getProbability();
if (diff > 0) {
return (1);
diff --git a/plugins/org.eclipse.actf.visualization.engines.lowvision/src/org/eclipse/actf/visualization/internal/engines/lowvision/problem/BlurProblem.java b/plugins/org.eclipse.actf.visualization.engines.lowvision/src/org/eclipse/actf/visualization/internal/engines/lowvision/problem/BlurProblem.java
index 1822fb0..4fd7f51 100644
--- a/plugins/org.eclipse.actf.visualization.engines.lowvision/src/org/eclipse/actf/visualization/internal/engines/lowvision/problem/BlurProblem.java
+++ b/plugins/org.eclipse.actf.visualization.engines.lowvision/src/org/eclipse/actf/visualization/internal/engines/lowvision/problem/BlurProblem.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2003, 2008 IBM Corporation and Others
+ * Copyright (c) 2003, 2020 IBM Corporation and Others
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -7,6 +7,7 @@
*
* Contributors:
* Junji MAEDA - initial API and implementation
+ * IBM Corporation - initial API and implementation
*******************************************************************************/
package org.eclipse.actf.visualization.internal.engines.lowvision.problem;
@@ -38,8 +39,7 @@
}
protected void setRecommendations() throws LowVisionProblemException {
- numRecommendations = 2;
- recommendations = new LowVisionRecommendation[numRecommendations];
+ recommendations = new LowVisionRecommendation[2];
recommendations[0] = new EnlargeTextRecommendation(this);
recommendations[1] = new EnlargeLineRecommendation(this);
}
diff --git a/plugins/org.eclipse.actf.visualization.engines.lowvision/src/org/eclipse/actf/visualization/internal/engines/lowvision/problem/ChangableFontRecommendation.java b/plugins/org.eclipse.actf.visualization.engines.lowvision/src/org/eclipse/actf/visualization/internal/engines/lowvision/problem/ChangableFontRecommendation.java
index 0186b6b..ad03b1e 100644
--- a/plugins/org.eclipse.actf.visualization.engines.lowvision/src/org/eclipse/actf/visualization/internal/engines/lowvision/problem/ChangableFontRecommendation.java
+++ b/plugins/org.eclipse.actf.visualization.engines.lowvision/src/org/eclipse/actf/visualization/internal/engines/lowvision/problem/ChangableFontRecommendation.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2003, 2008 IBM Corporation and Others
+ * Copyright (c) 2003, 2020 IBM Corporation and Others
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -7,6 +7,7 @@
*
* Contributors:
* Junji MAEDA - initial API and implementation
+ * IBM Corporation - initial API and implementation
*******************************************************************************/
package org.eclipse.actf.visualization.internal.engines.lowvision.problem;
@@ -14,11 +15,7 @@
import org.eclipse.actf.visualization.internal.engines.lowvision.Messages;
public class ChangableFontRecommendation extends LowVisionRecommendation {
- public ChangableFontRecommendation(LowVisionProblem _prob)
- throws LowVisionProblemException {
- super(
- CHANGABLE_FONT_RECOMMENDATION,
- _prob,
- Messages.ChangableFontRecommendation_Do_not_use_fixed_size_font__1);
+ public ChangableFontRecommendation(ILowVisionProblem _prob) throws LowVisionProblemException {
+ super(CHANGABLE_FONT_RECOMMENDATION, _prob, Messages.ChangableFontRecommendation_Do_not_use_fixed_size_font__1);
}
}
diff --git a/plugins/org.eclipse.actf.visualization.engines.lowvision/src/org/eclipse/actf/visualization/internal/engines/lowvision/problem/ColorProblem.java b/plugins/org.eclipse.actf.visualization.engines.lowvision/src/org/eclipse/actf/visualization/internal/engines/lowvision/problem/ColorProblem.java
index c03aa38..cc1c703 100644
--- a/plugins/org.eclipse.actf.visualization.engines.lowvision/src/org/eclipse/actf/visualization/internal/engines/lowvision/problem/ColorProblem.java
+++ b/plugins/org.eclipse.actf.visualization.engines.lowvision/src/org/eclipse/actf/visualization/internal/engines/lowvision/problem/ColorProblem.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2003, 2011 IBM Corporation and Others
+ * Copyright (c) 2003, 2020 IBM Corporation and Others
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -7,6 +7,7 @@
*
* Contributors:
* Junji MAEDA - initial API and implementation
+ * IBM Corporation - initial API and implementation
*******************************************************************************/
package org.eclipse.actf.visualization.internal.engines.lowvision.problem;
@@ -47,8 +48,7 @@
}
protected void setRecommendations() throws LowVisionProblemException{
- numRecommendations = 1;
- recommendations = new LowVisionRecommendation[numRecommendations];
+ recommendations = new LowVisionRecommendation[1];
recommendations[0] = new EnoughContrastRecommendation( this, foregroundColor, backgroundColor );
}
diff --git a/plugins/org.eclipse.actf.visualization.engines.lowvision/src/org/eclipse/actf/visualization/internal/engines/lowvision/problem/DontRelyOnColorRecommendation.java b/plugins/org.eclipse.actf.visualization.engines.lowvision/src/org/eclipse/actf/visualization/internal/engines/lowvision/problem/DontRelyOnColorRecommendation.java
index 562b92f..23ba702 100644
--- a/plugins/org.eclipse.actf.visualization.engines.lowvision/src/org/eclipse/actf/visualization/internal/engines/lowvision/problem/DontRelyOnColorRecommendation.java
+++ b/plugins/org.eclipse.actf.visualization.engines.lowvision/src/org/eclipse/actf/visualization/internal/engines/lowvision/problem/DontRelyOnColorRecommendation.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2003, 2008 IBM Corporation and Others
+ * Copyright (c) 2003, 2020 IBM Corporation and Others
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -7,6 +7,7 @@
*
* Contributors:
* Junji MAEDA - initial API and implementation
+ * IBM Corporation - initial API and implementation
*******************************************************************************/
package org.eclipse.actf.visualization.internal.engines.lowvision.problem;
@@ -17,7 +18,7 @@
// TBD more detailed recommendation (border, hatchung, line type, etc.)
- public DontRelyOnColorRecommendation(LowVisionProblem _prob)
+ public DontRelyOnColorRecommendation(ILowVisionProblem _prob)
throws LowVisionProblemException {
super(
DONT_RELY_ON_COLOR_RECOMMENDATION,
diff --git a/plugins/org.eclipse.actf.visualization.engines.lowvision/src/org/eclipse/actf/visualization/internal/engines/lowvision/problem/EnlargeLineRecommendation.java b/plugins/org.eclipse.actf.visualization.engines.lowvision/src/org/eclipse/actf/visualization/internal/engines/lowvision/problem/EnlargeLineRecommendation.java
index d3031c2..ba039b7 100644
--- a/plugins/org.eclipse.actf.visualization.engines.lowvision/src/org/eclipse/actf/visualization/internal/engines/lowvision/problem/EnlargeLineRecommendation.java
+++ b/plugins/org.eclipse.actf.visualization.engines.lowvision/src/org/eclipse/actf/visualization/internal/engines/lowvision/problem/EnlargeLineRecommendation.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2003, 2008 IBM Corporation and Others
+ * Copyright (c) 2003, 2020 IBM Corporation and Others
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -7,6 +7,7 @@
*
* Contributors:
* Junji MAEDA - initial API and implementation
+ * IBM Corporation - initial API and implementation
*******************************************************************************/
package org.eclipse.actf.visualization.internal.engines.lowvision.problem;
@@ -14,7 +15,7 @@
import org.eclipse.actf.visualization.internal.engines.lowvision.Messages;
public class EnlargeLineRecommendation extends LowVisionRecommendation {
- public EnlargeLineRecommendation(LowVisionProblem _prob)
+ public EnlargeLineRecommendation(ILowVisionProblem _prob)
throws LowVisionProblemException {
super(
ENLARGE_LINE_RECOMMENDATION,
diff --git a/plugins/org.eclipse.actf.visualization.engines.lowvision/src/org/eclipse/actf/visualization/internal/engines/lowvision/problem/EnlargeTextRecommendation.java b/plugins/org.eclipse.actf.visualization.engines.lowvision/src/org/eclipse/actf/visualization/internal/engines/lowvision/problem/EnlargeTextRecommendation.java
index c997700..344239b 100644
--- a/plugins/org.eclipse.actf.visualization.engines.lowvision/src/org/eclipse/actf/visualization/internal/engines/lowvision/problem/EnlargeTextRecommendation.java
+++ b/plugins/org.eclipse.actf.visualization.engines.lowvision/src/org/eclipse/actf/visualization/internal/engines/lowvision/problem/EnlargeTextRecommendation.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2003, 2008 IBM Corporation and Others
+ * Copyright (c) 2003, 2020 IBM Corporation and Others
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -7,6 +7,7 @@
*
* Contributors:
* Junji MAEDA - initial API and implementation
+ * IBM Corporation - initial API and implementation
*******************************************************************************/
package org.eclipse.actf.visualization.internal.engines.lowvision.problem;
@@ -14,7 +15,7 @@
import org.eclipse.actf.visualization.internal.engines.lowvision.Messages;
public class EnlargeTextRecommendation extends LowVisionRecommendation{
- public EnlargeTextRecommendation( LowVisionProblem _prob ) throws LowVisionProblemException{
+ public EnlargeTextRecommendation( ILowVisionProblem _prob ) throws LowVisionProblemException{
super( ENLARGE_TEXT_RECOMMENDATION, _prob, Messages.EnlargeTextRecommendation_Enlarge_the_text__1 );
}
}
diff --git a/plugins/org.eclipse.actf.visualization.engines.lowvision/src/org/eclipse/actf/visualization/internal/engines/lowvision/problem/EnoughContrastRecommendation.java b/plugins/org.eclipse.actf.visualization.engines.lowvision/src/org/eclipse/actf/visualization/internal/engines/lowvision/problem/EnoughContrastRecommendation.java
index b7a4ad2..cc07eef 100644
--- a/plugins/org.eclipse.actf.visualization.engines.lowvision/src/org/eclipse/actf/visualization/internal/engines/lowvision/problem/EnoughContrastRecommendation.java
+++ b/plugins/org.eclipse.actf.visualization.engines.lowvision/src/org/eclipse/actf/visualization/internal/engines/lowvision/problem/EnoughContrastRecommendation.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2003, 2008 IBM Corporation and Others
+ * Copyright (c) 2003, 2020 IBM Corporation and Others
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -7,6 +7,7 @@
*
* Contributors:
* Junji MAEDA - initial API and implementation
+ * IBM Corporation - initial API and implementation
*******************************************************************************/
package org.eclipse.actf.visualization.internal.engines.lowvision.problem;
@@ -28,7 +29,7 @@
private int recommendedForegroundColor = -1;
private int recommendedBackgroundColor = -1;
- public EnoughContrastRecommendation( LowVisionProblem _prob, int _fg, int _bg ) throws LowVisionProblemException{
+ public EnoughContrastRecommendation( ILowVisionProblem _prob, int _fg, int _bg ) throws LowVisionProblemException{
super( ENOUGH_CONTRAST_RECOMMENDATION, _prob, Messages.EnoughContrastRecommendation_Provide_enough_contrast_between_foreground_and_background_colors__1 );
originalForegroundColor = _fg;
originalBackgroundColor = _bg;
diff --git a/plugins/org.eclipse.actf.visualization.engines.lowvision/src/org/eclipse/actf/visualization/internal/engines/lowvision/problem/FixedSizeFontProblem.java b/plugins/org.eclipse.actf.visualization.engines.lowvision/src/org/eclipse/actf/visualization/internal/engines/lowvision/problem/FixedSizeFontProblem.java
index b308112..a97028a 100644
--- a/plugins/org.eclipse.actf.visualization.engines.lowvision/src/org/eclipse/actf/visualization/internal/engines/lowvision/problem/FixedSizeFontProblem.java
+++ b/plugins/org.eclipse.actf.visualization.engines.lowvision/src/org/eclipse/actf/visualization/internal/engines/lowvision/problem/FixedSizeFontProblem.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2003, 2008 IBM Corporation and Others
+ * Copyright (c) 2003, 2020 IBM Corporation and Others
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -7,24 +7,113 @@
*
* Contributors:
* Junji MAEDA - initial API and implementation
+ * IBM Corporation - initial API and implementation
*******************************************************************************/
package org.eclipse.actf.visualization.internal.engines.lowvision.problem;
+import org.eclipse.actf.util.logging.DebugPrintUtil;
import org.eclipse.actf.visualization.engines.lowvision.LowVisionType;
import org.eclipse.actf.visualization.internal.engines.lowvision.Messages;
import org.eclipse.actf.visualization.internal.engines.lowvision.PageElement;
-public class FixedSizeFontProblem extends LowVisionProblem{
- public FixedSizeFontProblem( PageElement _pe, LowVisionType _lvType, double _proba ) throws LowVisionProblemException{
- super( LOWVISION_FIXED_SIZE_FONT_PROBLEM, _lvType, Messages.FixedSizeFontProblem_Fixed_size_font_is_used__1, _pe, _proba );
- // fontSize = _pe.getFontSize();
+public class FixedSizeFontProblem extends LowVisionProblem {
+
+ // severity for fixed size font (0-1)
+ public static final double SEVERITY_FIXED_SMALL_FONT = 1.0;
+ public static final double SEVERITY_FIXED_SIZE_FONT = 0.75;
+
+ private static String getDescriptionFromType(int type) {
+ switch (type) {
+ case LOWVISION_FIXED_SIZE_FONT_PROBLEM:
+ return Messages.FixedSizeFontProblem_Fixed_size_font_is_used__1;
+ case LOWVISION_FIXED_SIZE_FONT_WARNING:
+ return Messages.FixedSizeFontWarning;
+ case LOWVISION_FIXED_SMALL_FONT_PROBLEM:
+ return Messages.FixedSmallFontProblem_This_text_is_too_small_and_its_font_size_is_fixed__1;
+ case LOWVISION_FIXED_SMALL_FONT_WARNIG:
+ return Messages.FixedSmallFontWarning;
+ default:
+ DebugPrintUtil.devOrDebugPrintln("undefined type");
+ return "";
+ }
+ }
+
+ private static double getProbabilityFromType(int type) {
+ switch (type) {
+ case LOWVISION_FIXED_SIZE_FONT_PROBLEM:
+ return SEVERITY_FIXED_SIZE_FONT;
+ case LOWVISION_FIXED_SIZE_FONT_WARNING:
+ return 0;
+ case LOWVISION_FIXED_SMALL_FONT_PROBLEM:
+ return SEVERITY_FIXED_SMALL_FONT;
+ case LOWVISION_FIXED_SMALL_FONT_WARNIG:
+ return SEVERITY_FIXED_SMALL_FONT / 2;
+ default:
+ DebugPrintUtil.devOrDebugPrintln("undefined type");
+ return 0;
+ }
+ }
+
+ private String attrName = "";
+
+ public FixedSizeFontProblem(int _problemType, PageElement _pe, LowVisionType _lvType)
+ throws LowVisionProblemException {
+ super(_problemType, _lvType, getDescriptionFromType(_problemType), _pe, getProbabilityFromType(_problemType));
setRecommendations();
}
- protected void setRecommendations() throws LowVisionProblemException{
- numRecommendations = 1;
- recommendations = new LowVisionRecommendation[numRecommendations];
- recommendations[0] = new ChangableFontRecommendation( this );
+ protected void setRecommendations() throws LowVisionProblemException {
+ setRecommendations(this.getLowVisionProblemType());
}
+
+ private void setRecommendations(int type) throws LowVisionProblemException {
+ switch (type) {
+ case LOWVISION_FIXED_SIZE_FONT_PROBLEM:
+ case LOWVISION_FIXED_SIZE_FONT_WARNING:
+ recommendations = new LowVisionRecommendation[1];
+ recommendations[0] = new ChangableFontRecommendation(this);
+ break;
+ case LOWVISION_FIXED_SMALL_FONT_PROBLEM:
+ case LOWVISION_FIXED_SMALL_FONT_WARNIG:
+ recommendations = new LowVisionRecommendation[2];
+ recommendations[0] = new EnlargeTextRecommendation(this);
+ recommendations[1] = new ChangableFontRecommendation(this);
+ break;
+ default:
+ DebugPrintUtil.devOrDebugPrintln("undefined type");
+ recommendations = new LowVisionRecommendation[0];
+ }
+ }
+
+ public void changeType(int type) throws LowVisionProblemException {
+ switch (type) {
+ case LOWVISION_FIXED_SIZE_FONT_PROBLEM:
+ case LOWVISION_FIXED_SIZE_FONT_WARNING:
+ case LOWVISION_FIXED_SMALL_FONT_PROBLEM:
+ case LOWVISION_FIXED_SMALL_FONT_WARNIG:
+ this.problemType = type;
+ this.description = getDescriptionFromType(type);
+ this.probability = getProbabilityFromType(type);
+ setRecommendations(type);
+ break;
+ default:
+ DebugPrintUtil.devOrDebugPrintln("changeType: undefined type");
+ }
+
+ }
+
+ public void setAttrName(String _attrName) {
+ if (_attrName == null || _attrName.isEmpty()) {
+ attrName = "";
+ } else {
+ this.description = getDescriptionFromType(this.getLowVisionProblemType()) + " (" + _attrName + ")";
+ attrName = _attrName;
+ }
+ }
+
+ public String getAttrName() {
+ return attrName;
+ }
+
}
diff --git a/plugins/org.eclipse.actf.visualization.engines.lowvision/src/org/eclipse/actf/visualization/internal/engines/lowvision/problem/FixedSmallFontProblem.java b/plugins/org.eclipse.actf.visualization.engines.lowvision/src/org/eclipse/actf/visualization/internal/engines/lowvision/problem/FixedSmallFontProblem.java
deleted file mode 100644
index 987ba83..0000000
--- a/plugins/org.eclipse.actf.visualization.engines.lowvision/src/org/eclipse/actf/visualization/internal/engines/lowvision/problem/FixedSmallFontProblem.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2008 IBM Corporation and Others
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Junji MAEDA - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.actf.visualization.internal.engines.lowvision.problem;
-
-import org.eclipse.actf.visualization.engines.lowvision.LowVisionType;
-import org.eclipse.actf.visualization.internal.engines.lowvision.Messages;
-import org.eclipse.actf.visualization.internal.engines.lowvision.PageElement;
-
-//FixedSizeFontProblem and SmallFontProblem
-
-public class FixedSmallFontProblem extends LowVisionProblem{
- public FixedSmallFontProblem( PageElement _pe, LowVisionType _lvType, double _proba ) throws LowVisionProblemException{
- super( LOWVISION_FIXED_SMALL_FONT_PROBLEM, _lvType, Messages.FixedSmallFontProblem_This_text_is_too_small_and_its_font_size_is_fixed__1, _pe, _proba );
- // fontSize = _pe.getFontSize();
- setRecommendations();
- }
-
- protected void setRecommendations() throws LowVisionProblemException{
- numRecommendations = 2;
- recommendations = new LowVisionRecommendation[numRecommendations];
- recommendations[0] = new EnlargeTextRecommendation( this );
- recommendations[1] = new ChangableFontRecommendation( this );
- }
-
-}
diff --git a/plugins/org.eclipse.actf.visualization.engines.lowvision/src/org/eclipse/actf/visualization/internal/engines/lowvision/problem/ILowVisionProblem.java b/plugins/org.eclipse.actf.visualization.engines.lowvision/src/org/eclipse/actf/visualization/internal/engines/lowvision/problem/ILowVisionProblem.java
new file mode 100644
index 0000000..7065acb
--- /dev/null
+++ b/plugins/org.eclipse.actf.visualization.engines.lowvision/src/org/eclipse/actf/visualization/internal/engines/lowvision/problem/ILowVisionProblem.java
@@ -0,0 +1,81 @@
+/*******************************************************************************
+ * Copyright (c) 2003, 2020 IBM Corporation and Others
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Junji MAEDA - initial API and implementation
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.actf.visualization.internal.engines.lowvision.problem;
+
+import java.io.PrintStream;
+import java.io.PrintWriter;
+
+import org.eclipse.actf.visualization.engines.lowvision.LowVisionType;
+import org.eclipse.actf.visualization.engines.lowvision.image.IPageImage;
+import org.eclipse.actf.visualization.internal.engines.lowvision.PageElement;
+import org.eclipse.actf.visualization.internal.engines.lowvision.image.Int2D;
+import org.eclipse.actf.visualization.internal.engines.lowvision.image.PageComponent;
+import org.w3c.dom.Element;
+
+public interface ILowVisionProblem {
+
+ int UNSET_POSITION = -1;
+ int DEFAULT_PRIORITY = 0;
+ //061024
+ short LOWVISION_PROBLEM = 0;
+
+ short getType();
+
+ LowVisionType getLowVisionType();
+
+ // LowVision Error type (Color, Blur, etc.)
+ int getLowVisionProblemType();
+
+ String getDescription() throws LowVisionProblemException;
+
+ IPageImage getPageImage();
+
+ int getX();
+
+ int getY();
+
+ int getWidth();
+
+ int getHeight();
+
+ int getPriority();
+
+ double getProbability();
+
+ int getIntProbability();
+
+ double getCharacterScore();
+
+ LowVisionRecommendation[] getRecommendations();
+
+ boolean isGroup();
+
+ short getComponentType() throws LowVisionProblemException;
+
+ PageComponent getPageComponent() throws LowVisionProblemException;
+
+ PageElement getPageElement();
+
+ String toString();
+
+ void dump(PrintStream _ps, boolean _doRecommendations) throws LowVisionProblemException;
+
+ void dump(PrintWriter _pw, boolean _doRecommendations) throws LowVisionProblemException;
+
+ void drawSurroundingBox(Int2D _img);
+
+ Element getElement();
+
+ void setElement(Element element);
+
+}
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.visualization.engines.lowvision/src/org/eclipse/actf/visualization/internal/engines/lowvision/problem/ImageColorProblem.java b/plugins/org.eclipse.actf.visualization.engines.lowvision/src/org/eclipse/actf/visualization/internal/engines/lowvision/problem/ImageColorProblem.java
index 0b93068..79f9542 100644
--- a/plugins/org.eclipse.actf.visualization.engines.lowvision/src/org/eclipse/actf/visualization/internal/engines/lowvision/problem/ImageColorProblem.java
+++ b/plugins/org.eclipse.actf.visualization.engines.lowvision/src/org/eclipse/actf/visualization/internal/engines/lowvision/problem/ImageColorProblem.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2003, 2008 IBM Corporation and Others
+ * Copyright (c) 2003, 2020 IBM Corporation and Others
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -7,6 +7,7 @@
*
* Contributors:
* Junji MAEDA - initial API and implementation
+ * IBM Corporation - initial API and implementation
*******************************************************************************/
package org.eclipse.actf.visualization.internal.engines.lowvision.problem;
@@ -52,8 +53,7 @@
}
protected void setRecommendations() throws LowVisionProblemException{
- numRecommendations = 1;
- recommendations = new LowVisionRecommendation[numRecommendations];
+ recommendations = new LowVisionRecommendation[1];
recommendations[0] = new DontRelyOnColorRecommendation( this );
}
diff --git a/plugins/org.eclipse.actf.visualization.engines.lowvision/src/org/eclipse/actf/visualization/internal/engines/lowvision/problem/LowVisionProblem.java b/plugins/org.eclipse.actf.visualization.engines.lowvision/src/org/eclipse/actf/visualization/internal/engines/lowvision/problem/LowVisionProblem.java
index 62c73d0..7c652a7 100644
--- a/plugins/org.eclipse.actf.visualization.engines.lowvision/src/org/eclipse/actf/visualization/internal/engines/lowvision/problem/LowVisionProblem.java
+++ b/plugins/org.eclipse.actf.visualization.engines.lowvision/src/org/eclipse/actf/visualization/internal/engines/lowvision/problem/LowVisionProblem.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2003, 2008 IBM Corporation and Others
+ * Copyright (c) 2003, 2020 IBM Corporation and Others
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -7,6 +7,7 @@
*
* Contributors:
* Junji MAEDA - initial API and implementation
+ * IBM Corporation - initial API and implementation
*******************************************************************************/
package org.eclipse.actf.visualization.internal.engines.lowvision.problem;
@@ -24,13 +25,7 @@
import org.w3c.dom.Element;
-public abstract class LowVisionProblem implements ILowvisionProblemSubtype{
- public static final int UNSET_POSITION = -1;
- public static final int DEFAULT_PRIORITY = 0;
-
- //061024
- public static final short LOWVISION_PROBLEM = 0;
-
+public abstract class LowVisionProblem implements ILowvisionProblemSubtype, ILowVisionProblem{
IPageImage pageImage = null;
LowVisionType lowVisionType = null;
int problemType;
@@ -46,7 +41,7 @@
double probability = 0.0; //
double characterScore = 0.0; //
- int numRecommendations = 0; // recommendations.length;
+ //int numRecommendations = 0; // recommendations.length;
LowVisionRecommendation[] recommendations = null;
boolean isGroupFlag = false; // is LowVisionProblemGroup?
@@ -110,54 +105,118 @@
protected abstract void setRecommendations() throws LowVisionProblemException;
+ /* (non-Javadoc)
+ * @see org.eclipse.actf.visualization.internal.engines.lowvision.problem.ILowVisionProblem#getType()
+ */
+ @Override
public short getType() {
return( LOWVISION_PROBLEM );
}
+ /* (non-Javadoc)
+ * @see org.eclipse.actf.visualization.internal.engines.lowvision.problem.ILowVisionProblem#getLowVisionType()
+ */
+ @Override
public LowVisionType getLowVisionType(){
return( lowVisionType );
}
// LowVision Error type (Color, Blur, etc.)
+ /* (non-Javadoc)
+ * @see org.eclipse.actf.visualization.internal.engines.lowvision.problem.ILowVisionProblem#getLowVisionProblemType()
+ */
+ @Override
public int getLowVisionProblemType(){
return( problemType );
}
+ /* (non-Javadoc)
+ * @see org.eclipse.actf.visualization.internal.engines.lowvision.problem.ILowVisionProblem#getDescription()
+ */
+ @Override
public String getDescription() throws LowVisionProblemException{
return( description );
}
+ /* (non-Javadoc)
+ * @see org.eclipse.actf.visualization.internal.engines.lowvision.problem.ILowVisionProblem#getPageImage()
+ */
+ @Override
public IPageImage getPageImage(){
return( pageImage );
}
+ /* (non-Javadoc)
+ * @see org.eclipse.actf.visualization.internal.engines.lowvision.problem.ILowVisionProblem#getX()
+ */
+ @Override
public int getX(){
return( left );
}
+ /* (non-Javadoc)
+ * @see org.eclipse.actf.visualization.internal.engines.lowvision.problem.ILowVisionProblem#getY()
+ */
+ @Override
public int getY(){
return( top );
}
+ /* (non-Javadoc)
+ * @see org.eclipse.actf.visualization.internal.engines.lowvision.problem.ILowVisionProblem#getWidth()
+ */
+ @Override
public int getWidth(){
return( width );
}
+ /* (non-Javadoc)
+ * @see org.eclipse.actf.visualization.internal.engines.lowvision.problem.ILowVisionProblem#getHeight()
+ */
+ @Override
public int getHeight(){
return( height );
}
+ /* (non-Javadoc)
+ * @see org.eclipse.actf.visualization.internal.engines.lowvision.problem.ILowVisionProblem#getPriority()
+ */
+ @Override
public int getPriority(){
return( priority );
}
+ /* (non-Javadoc)
+ * @see org.eclipse.actf.visualization.internal.engines.lowvision.problem.ILowVisionProblem#getProbability()
+ */
+ @Override
public double getProbability(){
return( probability );
}
+ /* (non-Javadoc)
+ * @see org.eclipse.actf.visualization.internal.engines.lowvision.problem.ILowVisionProblem#getIntProbability()
+ */
+ @Override
public int getIntProbability(){
return( (int)(Math.rint(probability*100.0)) );
}
+ /* (non-Javadoc)
+ * @see org.eclipse.actf.visualization.internal.engines.lowvision.problem.ILowVisionProblem#getCharacterScore()
+ */
+ @Override
public double getCharacterScore(){
return( characterScore );
}
+ /* (non-Javadoc)
+ * @see org.eclipse.actf.visualization.internal.engines.lowvision.problem.ILowVisionProblem#getRecommendations()
+ */
+ @Override
public LowVisionRecommendation[] getRecommendations(){
return( recommendations );
}
+ /* (non-Javadoc)
+ * @see org.eclipse.actf.visualization.internal.engines.lowvision.problem.ILowVisionProblem#isGroup()
+ */
+ @Override
public boolean isGroup(){
return( isGroupFlag );
}
+ /* (non-Javadoc)
+ * @see org.eclipse.actf.visualization.internal.engines.lowvision.problem.ILowVisionProblem#getComponentType()
+ */
+ @Override
public short getComponentType() throws LowVisionProblemException{
if( !isGroupFlag ){
return( componentType );
@@ -166,6 +225,10 @@
throw new LowVisionProblemException( "componentType cannot be gotten from a ProblemGroup." ); //$NON-NLS-1$
}
}
+ /* (non-Javadoc)
+ * @see org.eclipse.actf.visualization.internal.engines.lowvision.problem.ILowVisionProblem#getPageComponent()
+ */
+ @Override
public PageComponent getPageComponent() throws LowVisionProblemException{
if( !isGroupFlag ){
return( pageComponent );
@@ -175,10 +238,18 @@
}
}
+ /* (non-Javadoc)
+ * @see org.eclipse.actf.visualization.internal.engines.lowvision.problem.ILowVisionProblem#getPageElement()
+ */
+ @Override
public PageElement getPageElement(){
return( pageElement );
}
+ /* (non-Javadoc)
+ * @see org.eclipse.actf.visualization.internal.engines.lowvision.problem.ILowVisionProblem#toString()
+ */
+ @Override
@SuppressWarnings("nls")
public String toString(){
String compTypeString = null;
@@ -204,15 +275,23 @@
sb.append( ", " );
sb.append( "Probability=" + (int)(Math.rint(probability*100.0)) );
sb.append( ", " );
- sb.append( "#Recommendations=" + numRecommendations );
+ sb.append( "#Recommendations=" + recommendations.length );
return( sb.toString() );
}
+ /* (non-Javadoc)
+ * @see org.eclipse.actf.visualization.internal.engines.lowvision.problem.ILowVisionProblem#dump(java.io.PrintStream, boolean)
+ */
+ @Override
public void dump( PrintStream _ps, boolean _doRecommendations ) throws LowVisionProblemException{
PrintWriter pw = new PrintWriter( _ps, true );
dump( pw, _doRecommendations );
}
+ /* (non-Javadoc)
+ * @see org.eclipse.actf.visualization.internal.engines.lowvision.problem.ILowVisionProblem#dump(java.io.PrintWriter, boolean)
+ */
+ @Override
@SuppressWarnings("nls")
public void dump( PrintWriter _pw, boolean _doRecommendations ) throws LowVisionProblemException{
_pw.println( "----------" );
@@ -243,6 +322,10 @@
0x00ffffff, 0x00ff0000, 0x0000ff00
};
+ /* (non-Javadoc)
+ * @see org.eclipse.actf.visualization.internal.engines.lowvision.problem.ILowVisionProblem#drawSurroundingBox(org.eclipse.actf.visualization.internal.engines.lowvision.image.Int2D)
+ */
+ @Override
public void drawSurroundingBox( Int2D _img ){
int x0 = getX();
int y0 = getY();
@@ -259,16 +342,24 @@
}
}
- public static void drawAllSurroundingBoxes( LowVisionProblem[] _problems, Int2D _img ){
+ public static void drawAllSurroundingBoxes( ILowVisionProblem[] _problems, Int2D _img ){
for( int k=0; k<_problems.length; k++ ){
_problems[k].drawSurroundingBox( _img );
}
}
+ /* (non-Javadoc)
+ * @see org.eclipse.actf.visualization.internal.engines.lowvision.problem.ILowVisionProblem#getElement()
+ */
+ @Override
public Element getElement() {
return element;
}
+ /* (non-Javadoc)
+ * @see org.eclipse.actf.visualization.internal.engines.lowvision.problem.ILowVisionProblem#setElement(org.w3c.dom.Element)
+ */
+ @Override
public void setElement(Element element) {
this.element = element;
}
diff --git a/plugins/org.eclipse.actf.visualization.engines.lowvision/src/org/eclipse/actf/visualization/internal/engines/lowvision/problem/LowVisionProblemGroup.java b/plugins/org.eclipse.actf.visualization.engines.lowvision/src/org/eclipse/actf/visualization/internal/engines/lowvision/problem/LowVisionProblemGroup.java
index e139f54..488eb6e 100644
--- a/plugins/org.eclipse.actf.visualization.engines.lowvision/src/org/eclipse/actf/visualization/internal/engines/lowvision/problem/LowVisionProblemGroup.java
+++ b/plugins/org.eclipse.actf.visualization.engines.lowvision/src/org/eclipse/actf/visualization/internal/engines/lowvision/problem/LowVisionProblemGroup.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2003, 2008 IBM Corporation and Others
+ * Copyright (c) 2003, 2020 IBM Corporation and Others
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -7,6 +7,7 @@
*
* Contributors:
* Junji MAEDA - initial API and implementation
+ * IBM Corporation - initial API and implementation
*******************************************************************************/
package org.eclipse.actf.visualization.internal.engines.lowvision.problem;
@@ -22,31 +23,29 @@
public class LowVisionProblemGroup extends LowVisionProblem {
int numProblems; // problems.length;
- LowVisionProblem[] problems;
+ ILowVisionProblem[] problems;
- LowVisionProblem representative = null;
+ ILowVisionProblem representative = null;
- double sumCharacterScores; //
+ double sumCharacterScores; //
double groupScore; // (sumCharacterScore/area)
- public LowVisionProblemGroup(Vector<LowVisionProblem> _vec)
- throws LowVisionProblemException {
+ public LowVisionProblemGroup(Vector<ILowVisionProblem> _vec) throws LowVisionProblemException {
numProblems = _vec.size();
if (numProblems <= 0) {
- throw new LowVisionProblemException(
- "No instance belong to the group."); //$NON-NLS-1$
+ throw new LowVisionProblemException("No instance belong to the group."); //$NON-NLS-1$
}
problems = new LowVisionProblem[numProblems];
representative = _vec.elementAt(0);
problems[0] = representative;
- this.pageImage = representative.pageImage;
- this.lowVisionType = representative.lowVisionType;
- this.problemType = representative.problemType;
- this.componentType = representative.componentType;
- this.description = representative.description;
- sumCharacterScores = representative.characterScore;
+ this.pageImage = representative.getPageImage();
+ this.lowVisionType = representative.getLowVisionType();
+ this.problemType = representative.getLowVisionProblemType();
+ this.componentType = representative.getComponentType();
+ this.description = representative.getDescription();
+ sumCharacterScores = representative.getCharacterScore();
setRecommendations();
this.isGroupFlag = true;
@@ -55,10 +54,9 @@
int tmpTop = representative.getY();
int tmpBottom = tmpTop + representative.getHeight();
for (int i = 1; i < numProblems; i++) {
- LowVisionProblem curProb = _vec.elementAt(i);
- if (curProb.problemType != this.problemType) {
- throw new LowVisionProblemException(
- "Problems of different types cannot be grouped."); //$NON-NLS-1$
+ ILowVisionProblem curProb = _vec.elementAt(i);
+ if (curProb.getLowVisionProblemType() != this.problemType) {
+ throw new LowVisionProblemException("Problems of different types cannot be grouped."); //$NON-NLS-1$
}
problems[i] = curProb;
int curLeft = curProb.getX();
@@ -77,7 +75,7 @@
if (tmpBottom < curBottom) {
tmpBottom = curBottom;
}
- sumCharacterScores += curProb.characterScore;
+ sumCharacterScores += curProb.getCharacterScore();
}
this.left = tmpLeft;
this.top = tmpTop;
@@ -90,22 +88,20 @@
}
protected void setRecommendations() {
- this.numRecommendations = representative.numRecommendations;
- this.recommendations = representative.recommendations;
+ this.recommendations = representative.getRecommendations();
}
private void calcProbability() throws LowVisionProblemException {
if (numProblems <= 0) {
- throw new LowVisionProblemException(
- "There are no Problems in this ProblemGroup."); //$NON-NLS-1$
+ throw new LowVisionProblemException("There are no Problems in this ProblemGroup."); //$NON-NLS-1$
}
probability = 0.0;
// double problemArea = 0.0;
double maxProba = 0.0;
for (int i = 0; i < numProblems; i++) {
- LowVisionProblem curProb = problems[i];
- if (maxProba < curProb.probability) {
- maxProba = curProb.probability;
+ ILowVisionProblem curProb = problems[i];
+ if (maxProba < curProb.getProbability()) {
+ maxProba = curProb.getProbability();
}
// double curArea = curProb.width * curProb.height;
// probability += (curProb.probability * curArea);
@@ -127,18 +123,17 @@
}
private void calcPriority() throws LowVisionProblemException {
- if (problems[0].pageComponent == null) {
+ if (problems[0].getPageComponent() == null) {
priority = 0;
return;
}
- IPageImage pi = problems[0].pageComponent.getPageImage();
+ IPageImage pi = problems[0].getPageComponent().getPageImage();
if (problemType == LowVisionProblem.LOWVISION_IMAGE_COLOR_PROBLEM) {
priority = 0;
} else {
if (pi == null) {
- throw new LowVisionProblemException(
- "PageImage of the Problem is null."); //$NON-NLS-1$
+ throw new LowVisionProblemException("PageImage of the Problem is null."); //$NON-NLS-1$
}
int pageWidth = pi.getWidth();
int pageHeight = pi.getHeight();
@@ -146,7 +141,7 @@
}
}
- public LowVisionProblem getRepresentative() {
+ public ILowVisionProblem getRepresentative() {
return (representative);
}
@@ -154,7 +149,7 @@
return (numProblems);
}
- public LowVisionProblem[] getProblems() {
+ public ILowVisionProblem[] getProblems() {
return (problems);
}
diff --git a/plugins/org.eclipse.actf.visualization.engines.lowvision/src/org/eclipse/actf/visualization/internal/engines/lowvision/problem/LowVisionRecommendation.java b/plugins/org.eclipse.actf.visualization.engines.lowvision/src/org/eclipse/actf/visualization/internal/engines/lowvision/problem/LowVisionRecommendation.java
index 070c801..2cb5c80 100644
--- a/plugins/org.eclipse.actf.visualization.engines.lowvision/src/org/eclipse/actf/visualization/internal/engines/lowvision/problem/LowVisionRecommendation.java
+++ b/plugins/org.eclipse.actf.visualization.engines.lowvision/src/org/eclipse/actf/visualization/internal/engines/lowvision/problem/LowVisionRecommendation.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2003, 2008 IBM Corporation and Others
+ * Copyright (c) 2003, 2020 IBM Corporation and Others
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -7,6 +7,7 @@
*
* Contributors:
* Junji MAEDA - initial API and implementation
+ * IBM Corporation - initial API and implementation
*******************************************************************************/
package org.eclipse.actf.visualization.internal.engines.lowvision.problem;
@@ -25,11 +26,11 @@
//
short recommendationType;
- LowVisionProblem problem;
+ ILowVisionProblem problem;
String description;
int priority;
- public LowVisionRecommendation( short _type, LowVisionProblem _prob, String _desc ) throws LowVisionProblemException{
+ public LowVisionRecommendation( short _type, ILowVisionProblem _prob, String _desc ) throws LowVisionProblemException{
recommendationType = _type;
problem = _prob;
description = _desc;
diff --git a/plugins/org.eclipse.actf.visualization.engines.lowvision/src/org/eclipse/actf/visualization/internal/engines/lowvision/problem/ProhibitedBackgroundColorProblem.java b/plugins/org.eclipse.actf.visualization.engines.lowvision/src/org/eclipse/actf/visualization/internal/engines/lowvision/problem/ProhibitedBackgroundColorProblem.java
index f5dbe38..0e7847a 100644
--- a/plugins/org.eclipse.actf.visualization.engines.lowvision/src/org/eclipse/actf/visualization/internal/engines/lowvision/problem/ProhibitedBackgroundColorProblem.java
+++ b/plugins/org.eclipse.actf.visualization.engines.lowvision/src/org/eclipse/actf/visualization/internal/engines/lowvision/problem/ProhibitedBackgroundColorProblem.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2004, 2008 IBM Corporation and Others
+ * Copyright (c) 2004, 2020 IBM Corporation and Others
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -7,6 +7,7 @@
*
* Contributors:
* Junji MAEDA - initial API and implementation
+ * IBM Corporation - initial API and implementation
*******************************************************************************/
package org.eclipse.actf.visualization.internal.engines.lowvision.problem;
@@ -33,8 +34,7 @@
}
protected void setRecommendations() throws LowVisionProblemException{
- numRecommendations = 1;
- recommendations = new LowVisionRecommendation[numRecommendations];
+ recommendations = new LowVisionRecommendation[1];
recommendations[0] = new UseAllowedColorRecommendation( this );
}
diff --git a/plugins/org.eclipse.actf.visualization.engines.lowvision/src/org/eclipse/actf/visualization/internal/engines/lowvision/problem/ProhibitedBothColorsProblem.java b/plugins/org.eclipse.actf.visualization.engines.lowvision/src/org/eclipse/actf/visualization/internal/engines/lowvision/problem/ProhibitedBothColorsProblem.java
index 2432208..229b6dd 100644
--- a/plugins/org.eclipse.actf.visualization.engines.lowvision/src/org/eclipse/actf/visualization/internal/engines/lowvision/problem/ProhibitedBothColorsProblem.java
+++ b/plugins/org.eclipse.actf.visualization.engines.lowvision/src/org/eclipse/actf/visualization/internal/engines/lowvision/problem/ProhibitedBothColorsProblem.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2004, 2008 IBM Corporation and Others
+ * Copyright (c) 2004, 2020 IBM Corporation and Others
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -7,6 +7,7 @@
*
* Contributors:
* Junji MAEDA - initial API and implementation
+ * IBM Corporation - initial API and implementation
*******************************************************************************/
package org.eclipse.actf.visualization.internal.engines.lowvision.problem;
@@ -33,8 +34,7 @@
}
protected void setRecommendations() throws LowVisionProblemException{
- numRecommendations = 1;
- recommendations = new LowVisionRecommendation[numRecommendations];
+ recommendations = new LowVisionRecommendation[1];
recommendations[0] = new UseAllowedColorRecommendation( this );
}
diff --git a/plugins/org.eclipse.actf.visualization.engines.lowvision/src/org/eclipse/actf/visualization/internal/engines/lowvision/problem/ProhibitedForegroundColorProblem.java b/plugins/org.eclipse.actf.visualization.engines.lowvision/src/org/eclipse/actf/visualization/internal/engines/lowvision/problem/ProhibitedForegroundColorProblem.java
index 84fa109..51438ac 100644
--- a/plugins/org.eclipse.actf.visualization.engines.lowvision/src/org/eclipse/actf/visualization/internal/engines/lowvision/problem/ProhibitedForegroundColorProblem.java
+++ b/plugins/org.eclipse.actf.visualization.engines.lowvision/src/org/eclipse/actf/visualization/internal/engines/lowvision/problem/ProhibitedForegroundColorProblem.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2004, 2008 IBM Corporation and Others
+ * Copyright (c) 2004, 2020 IBM Corporation and Others
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -7,6 +7,7 @@
*
* Contributors:
* Junji MAEDA - initial API and implementation
+ * IBM Corporation - initial API and implementation
*******************************************************************************/
package org.eclipse.actf.visualization.internal.engines.lowvision.problem;
@@ -34,8 +35,7 @@
}
protected void setRecommendations() throws LowVisionProblemException{
- numRecommendations = 1;
- recommendations = new LowVisionRecommendation[numRecommendations];
+ recommendations = new LowVisionRecommendation[1];
recommendations[0] = new UseAllowedColorRecommendation( this );
}
diff --git a/plugins/org.eclipse.actf.visualization.engines.lowvision/src/org/eclipse/actf/visualization/internal/engines/lowvision/problem/SmallFontProblem.java b/plugins/org.eclipse.actf.visualization.engines.lowvision/src/org/eclipse/actf/visualization/internal/engines/lowvision/problem/SmallFontProblem.java
index 10767fa..d161ee0 100644
--- a/plugins/org.eclipse.actf.visualization.engines.lowvision/src/org/eclipse/actf/visualization/internal/engines/lowvision/problem/SmallFontProblem.java
+++ b/plugins/org.eclipse.actf.visualization.engines.lowvision/src/org/eclipse/actf/visualization/internal/engines/lowvision/problem/SmallFontProblem.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2004, 2008 IBM Corporation and Others
+ * Copyright (c) 2004, 2020 IBM Corporation and Others
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -7,6 +7,7 @@
*
* Contributors:
* Junji MAEDA - initial API and implementation
+ * IBM Corporation - initial API and implementation
*******************************************************************************/
package org.eclipse.actf.visualization.internal.engines.lowvision.problem;
@@ -18,16 +19,19 @@
/*
* detected by using HTML DOM
*/
-public class SmallFontProblem extends LowVisionProblem{
- public SmallFontProblem( PageElement _pe, LowVisionType _lvType, double _proba ) throws LowVisionProblemException{
- super( LOWVISION_SMALL_FONT_PROBLEM, _lvType, Messages.SmallFontProblem_This_text_is_too_small__1, _pe, _proba );
+public class SmallFontProblem extends LowVisionProblem {
+
+ public static final double SEVERITY_SMALL_FONT = 0.25;
+
+ public SmallFontProblem(PageElement _pe, LowVisionType _lvType) throws LowVisionProblemException {
+ super(LOWVISION_SMALL_FONT_PROBLEM, _lvType, Messages.SmallFontProblem_This_text_is_too_small__1, _pe,
+ SEVERITY_SMALL_FONT);
// fontSize = _pe.getFontSize();
setRecommendations();
}
- protected void setRecommendations() throws LowVisionProblemException{
- numRecommendations = 1;
- recommendations = new LowVisionRecommendation[numRecommendations];
- recommendations[0] = new EnlargeTextRecommendation( this );
+ protected void setRecommendations() throws LowVisionProblemException {
+ recommendations = new LowVisionRecommendation[1];
+ recommendations[0] = new EnlargeTextRecommendation(this);
}
}
diff --git a/plugins/org.eclipse.actf.visualization.engines.lowvision/src/org/eclipse/actf/visualization/internal/engines/lowvision/problem/UseAllowedColorRecommendation.java b/plugins/org.eclipse.actf.visualization.engines.lowvision/src/org/eclipse/actf/visualization/internal/engines/lowvision/problem/UseAllowedColorRecommendation.java
index df813f0..97d53be 100644
--- a/plugins/org.eclipse.actf.visualization.engines.lowvision/src/org/eclipse/actf/visualization/internal/engines/lowvision/problem/UseAllowedColorRecommendation.java
+++ b/plugins/org.eclipse.actf.visualization.engines.lowvision/src/org/eclipse/actf/visualization/internal/engines/lowvision/problem/UseAllowedColorRecommendation.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2004, 2008 IBM Corporation and Others
+ * Copyright (c) 2004, 2020 IBM Corporation and Others
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -7,6 +7,7 @@
*
* Contributors:
* Junji MAEDA - initial API and implementation
+ * IBM Corporation - initial API and implementation
*******************************************************************************/
package org.eclipse.actf.visualization.internal.engines.lowvision.problem;
@@ -14,7 +15,7 @@
import org.eclipse.actf.visualization.internal.engines.lowvision.Messages;
public class UseAllowedColorRecommendation extends LowVisionRecommendation{
- public UseAllowedColorRecommendation( LowVisionProblem _prob ) throws LowVisionProblemException{
+ public UseAllowedColorRecommendation( ILowVisionProblem _prob ) throws LowVisionProblemException{
super( USE_ALLOWED_COLOR_RECOMMENDATION, _prob, Messages.UseAllowedColorRecommendation_Use_a_color_allowed_by_the_design_guideline__1 );
}
}
diff --git a/plugins/org.eclipse.actf.visualization.eval/resources/checkitem.xml b/plugins/org.eclipse.actf.visualization.eval/resources/checkitem.xml
index f19499f..b3c39ad 100644
--- a/plugins/org.eclipse.actf.visualization.eval/resources/checkitem.xml
+++ b/plugins/org.eclipse.actf.visualization.eval/resources/checkitem.xml
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<!--
- Copyright (c) 2005, 2016 IBM Corporation and others.
+ Copyright (c) 2005, 2020 IBM Corporation and others.
All rights reserved. This program and the accompanying materials
are made available under the terms of the Eclipse Public License v1.0
which accompanies this distribution, and is available at
@@ -730,6 +730,31 @@
<desc>Background image.</desc>
</description>
</checkitem>
+ <checkitem type="user" id="L_11">
+ <guideline>
+ <gItem id="3.4" name="WCAG"/>
+ <gItem techniques="C12,C13,C14" id="1.4.4" name="JIS"/>
+ <gItem techniques="C12,C13,C14" id="1.4.4" name="WCAG 2.0"/>
+ </guideline>
+ <metrics>
+ <mItem score="5" name="Perceivable"/>
+ </metrics>
+ <description>
+ <desc>Font size might be fixed. (unsupported font-size definitions, etc. This message is also shown in the case where font-size is unspecified.)</desc>
+ </description>
+ </checkitem>
+ <checkitem type="warning" id="L_12">
+ <guideline>
+ <gItem techniques="C12,C13,C14" id="1.4.4" name="JIS"/>
+ <gItem techniques="C12,C13,C14" id="1.4.4" name="WCAG 2.0"/>
+ </guideline>
+ <metrics>
+ <mItem score="5" name="Perceivable"/>
+ </metrics>
+ <description>
+ <desc>This text is too small and its font size might be fixed. (unsupported font-size definitions, etc.)</desc>
+ </description>
+ </checkitem>
<checkitem type="error" id="B_38">
<guideline>
<gItem id="1.1" name="WCAG"/>
diff --git a/plugins/org.eclipse.actf.visualization.eval/resources/description.properties b/plugins/org.eclipse.actf.visualization.eval/resources/description.properties
index c145db3..9d20b4f 100644
--- a/plugins/org.eclipse.actf.visualization.eval/resources/description.properties
+++ b/plugins/org.eclipse.actf.visualization.eval/resources/description.properties
@@ -1,5 +1,5 @@
###############################################################################
-# Copyright (c) 2005, 2016 IBM Corporation and others.
+# Copyright (c) 2005, 2020 IBM Corporation and others.
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Eclipse Public License v1.0
# which accompanies this distribution, and is available at
@@ -60,4 +60,6 @@
L_4 = Do not use fixed-size font.
L_5 = This text is too small.
L_6 = This text is too small and its font size is fixed.
-L_10 = This area has background image. Please confirm the contrast between text and background, and confirm important information is not provided only by background image. .{0}
\ No newline at end of file
+L_10 = This area has background image. Please confirm the contrast between text and background, and confirm important information is not provided only by background image. .{0}
+L_11 = Font size might be fixed. \uff08unsupported font-size definitions, etc. This message is also shown in the case where font-size is unspecified.\uff09
+L_12 = This text is too small and its font size might be fixed. \uff08unsupported font-size definitions, etc.\uff09
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.visualization.eval/resources/description_ja.properties b/plugins/org.eclipse.actf.visualization.eval/resources/description_ja.properties
index b733346..3ffb69f 100644
--- a/plugins/org.eclipse.actf.visualization.eval/resources/description_ja.properties
+++ b/plugins/org.eclipse.actf.visualization.eval/resources/description_ja.properties
@@ -1,5 +1,5 @@
###############################################################################
-# Copyright (c) 2005, 2016 IBM Corporation and others.
+# Copyright (c) 2005, 2020 IBM Corporation and others.
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Eclipse Public License v1.0
# which accompanies this distribution, and is available at
@@ -60,4 +60,6 @@
L_4 = \u56fa\u5b9a\u30b5\u30a4\u30ba\u306e\u30d5\u30a9\u30f3\u30c8\u306f\u4f7f\u308f\u306a\u3044\u3067\u304f\u3060\u3055\u3044\u3002
L_5 = \u3053\u306e\u6587\u5b57\u306f\u5c0f\u3055\u3059\u304e\u307e\u3059\u3002
L_6 = \u3053\u306e\u6587\u5b57\u306f\u5c0f\u3055\u3059\u304e\u307e\u3059\u3002\u3055\u3089\u306b\u56fa\u5b9a\u30b5\u30a4\u30ba\u306e\u30d5\u30a9\u30f3\u30c8\u304c\u4f7f\u308f\u308c\u3066\u3044\u307e\u3059\u3002
-L_10 = \u30b9\u30bf\u30a4\u30eb\u30b7\u30fc\u30c8\u3067\u80cc\u666f\u753b\u50cf\u304c\u6307\u5b9a\u3055\u308c\u3066\u3044\u307e\u3059\u3002\u6587\u5b57\u8272\u3068\u80cc\u666f\u8272\u306e\u9593\u306e\u30b3\u30f3\u30c8\u30e9\u30b9\u30c8\u6bd4\u304c\u5341\u5206\u304b\u3001\u80cc\u666f\u753b\u50cf\u306e\u307f\u306b\u3088\u3063\u3066\u91cd\u8981\u306a\u60c5\u5831\u3092\u4f1d\u3048\u3066\u3044\u306a\u3044\u304b\u78ba\u8a8d\u3057\u3066\u304f\u3060\u3055\u3044\u3002{0}
\ No newline at end of file
+L_10 = \u30b9\u30bf\u30a4\u30eb\u30b7\u30fc\u30c8\u3067\u80cc\u666f\u753b\u50cf\u304c\u6307\u5b9a\u3055\u308c\u3066\u3044\u307e\u3059\u3002\u6587\u5b57\u8272\u3068\u80cc\u666f\u8272\u306e\u9593\u306e\u30b3\u30f3\u30c8\u30e9\u30b9\u30c8\u6bd4\u304c\u5341\u5206\u304b\u3001\u80cc\u666f\u753b\u50cf\u306e\u307f\u306b\u3088\u3063\u3066\u91cd\u8981\u306a\u60c5\u5831\u3092\u4f1d\u3048\u3066\u3044\u306a\u3044\u304b\u78ba\u8a8d\u3057\u3066\u304f\u3060\u3055\u3044\u3002{0}
+L_11 = \u56fa\u5b9a\u30b5\u30a4\u30ba\u306e\u30d5\u30a9\u30f3\u30c8\u304c\u4f7f\u308f\u308c\u3066\u3044\u308b\u53ef\u80fd\u6027\u304c\u3042\u308a\u307e\u3059 \uff08\u30b5\u30dd\u30fc\u30c8\u3055\u308c\u3066\u3044\u306a\u3044\u30d5\u30a9\u30f3\u30c8\u30b5\u30a4\u30ba\u6307\u5b9a\u3084\u3001\u672a\u6307\u5b9a\u306e\u5834\u5408\u3082\u3053\u306e\u30e1\u30c3\u30bb\u30fc\u30b8\u304c\u8868\u793a\u3055\u308c\u308b\u5834\u5408\u304c\u3042\u308a\u307e\u3059\uff09
+L_12 = \u3053\u306e\u6587\u5b57\u306f\u5c0f\u3055\u3059\u304e\u307e\u3059\u3002\u3055\u3089\u306b\u56fa\u5b9a\u30b5\u30a4\u30ba\u306e\u30d5\u30a9\u30f3\u30c8\u304c\u4f7f\u308f\u308c\u3066\u3044\u308b\u53ef\u80fd\u6027\u304c\u3042\u308a\u307e\u3059 \uff08\u30b5\u30dd\u30fc\u30c8\u3055\u308c\u3066\u3044\u306a\u3044\u30d5\u30a9\u30f3\u30c8\u30b5\u30a4\u30ba\u6307\u5b9a\u306e\u5834\u5408\u3082\u3053\u306e\u30e1\u30c3\u30bb\u30fc\u30b8\u304c\u8868\u793a\u3055\u308c\u308b\u5834\u5408\u304c\u3042\u308a\u307e\u3059\uff09
\ No newline at end of file
diff --git a/plugins/org.eclipse.actf.visualization.eval/src/org/eclipse/actf/visualization/eval/problem/ILowvisionProblemSubtype.java b/plugins/org.eclipse.actf.visualization.eval/src/org/eclipse/actf/visualization/eval/problem/ILowvisionProblemSubtype.java
index bdc8b8a..ae3b3e1 100644
--- a/plugins/org.eclipse.actf.visualization.eval/src/org/eclipse/actf/visualization/eval/problem/ILowvisionProblemSubtype.java
+++ b/plugins/org.eclipse.actf.visualization.eval/src/org/eclipse/actf/visualization/eval/problem/ILowvisionProblemSubtype.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2004, 2008 IBM Corporation and Others
+ * Copyright (c) 2004, 2020 IBM Corporation and Others
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -25,4 +25,6 @@
public static final int LOWVISION_PROHIBITED_FOREGROUND_COLOR_PROBLEM = 8;
public static final int LOWVISION_PROHIBITED_BACKGROUND_COLOR_PROBLEM = 9;
public static final int LOWVISION_BACKGROUND_IMAGE_WARNING = 10;
+ public static final int LOWVISION_FIXED_SIZE_FONT_WARNING = 11; //for pt
+ public static final int LOWVISION_FIXED_SMALL_FONT_WARNIG =12; //for pt
}
diff --git a/plugins/org.eclipse.actf.visualization.lowvision/src/org/eclipse/actf/visualization/lowvision/eval/SummaryEvaluationLV.java b/plugins/org.eclipse.actf.visualization.lowvision/src/org/eclipse/actf/visualization/lowvision/eval/SummaryEvaluationLV.java
index 4f1dccf..53936f2 100644
--- a/plugins/org.eclipse.actf.visualization.lowvision/src/org/eclipse/actf/visualization/lowvision/eval/SummaryEvaluationLV.java
+++ b/plugins/org.eclipse.actf.visualization.lowvision/src/org/eclipse/actf/visualization/lowvision/eval/SummaryEvaluationLV.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2005, 2011 IBM Corporation and Others
+ * Copyright (c) 2005, 2020 IBM Corporation and Others
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -72,8 +72,8 @@
public String getOverview() {
StringBuffer tmpSB = new StringBuffer(512);
- int problemCount[] = new int[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
- int severeCount[] = new int[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
+ int problemCount[] = new int[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
+ int severeCount[] = new int[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
for (int i = 0; i < _problems.length; i++) {
IProblemItemImage curProblem = _problems[i];