java.lang.Object
org.apache.batik.test.AbstractTest
org.apache.batik.test.svg.AbstractRenderingAccuracyTest
org.apache.batik.test.svg.SVGRenderingAccuracyTest
org.apache.batik.test.svg.PreconfiguredRenderingTest
org.apache.batik.test.svg.SamplesRenderingTest
org.apache.batik.test.svg.JSVGRenderingAccuracyTest
org.apache.batik.gvt.TextSelectionTest
- All Implemented Interfaces:
- org.apache.batik.swing.JSVGCanvasHandler.Delegate, org.apache.batik.test.Test
- public class TextSelectionTest
- extends org.apache.batik.test.svg.JSVGRenderingAccuracyTest
This test validates that the text selection API's work properly.
- Version:
- $Id: TextSelectionTest.java,v 1.6 2005/04/01 02:28:16 deweese Exp $
| Nested classes inherited from class org.apache.batik.test.svg.SVGRenderingAccuracyTest |
org.apache.batik.test.svg.SVGRenderingAccuracyTest.InternalPNGTranscoder |
| Fields inherited from class org.apache.batik.test.svg.AbstractRenderingAccuracyTest |
candidateReference, configuration, CONFIGURATION_RESOURCES, COULD_NOT_GENERATE_COMPARISON_IMAGES, COULD_NOT_LOAD_IMAGE, COULD_NOT_OPEN_VARIATION_URL, ENTRY_KEY_DIFFERENCE_IMAGE, ENTRY_KEY_INTERNAL_ERROR, ENTRY_KEY_REFERENCE_GENERATED_IMAGE_URI, ERROR_CANNOT_CREATE_TEMP_FILE, ERROR_CANNOT_CREATE_TEMP_FILE_STREAM, ERROR_CANNOT_OPEN_GENERATED_IMAGE, ERROR_CANNOT_OPEN_REFERENCE_IMAGE, ERROR_ERROR_WHILE_COMPARING_FILES, ERROR_SVG_RENDERING_NOT_ACCURATE, IMAGE_FILE_EXTENSION, IMAGE_TYPE_COMPARISON, IMAGE_TYPE_DIFF, refImgURL, saveVariation, svgURL, TEMP_FILE_PREFIX, TEMP_FILE_SUFFIX, tempDirectory, variationURL |
| Methods inherited from class org.apache.batik.test.svg.AbstractRenderingAccuracyTest |
buildDiffImage, compare, getCandidateReference, getImage, getImage, getNextTempFileName, getNextTempFileName, getSaveVariation, getTempDirectory, getURLFile, getVariationURL, imageToFile, makeCompareImage, makeRandomFileName, makeTempFileName, resolveURL, run, saveImage, saveImage, setCandidateReference, setConfig, setSaveVariation, setVariationURL |
| Methods inherited from class org.apache.batik.test.AbstractTest |
assertEquals, assertEquals, assertNull, assertTrue, error, getId, getParent, getQualifiedId, reportError, reportException, reportSuccess, runImpl, runImplBasic, setName, setParent |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
REFERENCE_DIR
public static final java.lang.String REFERENCE_DIR
- Directory for reference files
- See Also:
- Constant Field Values
VARIATION_DIR
public static final java.lang.String VARIATION_DIR
- See Also:
- Constant Field Values
CANDIDATE_DIR
public static final java.lang.String CANDIDATE_DIR
- See Also:
- Constant Field Values
ERROR_READING_SVG
public static final java.lang.String ERROR_READING_SVG
- Error when unable to load requested SVG file
{0} = file
{1} = exception
- See Also:
- Constant Field Values
ERROR_BAD_ID
public static final java.lang.String ERROR_BAD_ID
- Error id doesn't reference an element
{0} = id
- See Also:
- Constant Field Values
ERROR_ID_NOT_TEXT
public static final java.lang.String ERROR_ID_NOT_TEXT
- Error id doesn't reference a text element
{0} = id
{1} = element referenced
- See Also:
- Constant Field Values
ERROR_GETTING_SELECTION
public static final java.lang.String ERROR_GETTING_SELECTION
- Error couldn't get selection highlight specified.
{0} = id
{1} = start index
{2} = end index
{3} = exception
- See Also:
- Constant Field Values
ERROR_CANNOT_READ_REF_URL
public static final java.lang.String ERROR_CANNOT_READ_REF_URL
- Error when unable to read/open ref URL
{0} = URL
{1} = exception stack trace.
- See Also:
- Constant Field Values
ERROR_WRONG_RESULT
public static final java.lang.String ERROR_WRONG_RESULT
- Result didn't match reference result.
{0} = first byte of mismatch
- See Also:
- Constant Field Values
ERROR_NO_REFERENCE
public static final java.lang.String ERROR_NO_REFERENCE
- No Reference or Variation file to compaire with.
{0} = reference url
- See Also:
- Constant Field Values
ENTRY_KEY_ERROR_DESCRIPTION
public static final java.lang.String ENTRY_KEY_ERROR_DESCRIPTION
- See Also:
- Constant Field Values
textID
protected java.lang.String textID
start
protected int start
end
protected int end
TextSelectionTest
public TextSelectionTest(java.lang.String file,
java.lang.String textID,
java.lang.Integer start,
java.lang.Integer end)
- Constructor. ref is ignored if action == ROUND.
setId
public void setId(java.lang.String id)
- Description copied from class:
org.apache.batik.test.svg.PreconfiguredRenderingTest
- For preconfigured tests, the configuration has to be
derived from the test identifier. The identifier should
characterize the SVG file to be tested.
buildRefImgURL
protected java.lang.String buildRefImgURL(java.lang.String svgDir,
java.lang.String svgFile)
- Description copied from class:
org.apache.batik.test.svg.PreconfiguredRenderingTest
- Gives a chance to the subclass to control the construction
of the reference PNG file from the svgFile name
The refImgURL is built as:
getRefImagePrefix() + svgDir + getRefImageSuffix() + svgFile
buildVariationURL
public java.lang.String buildVariationURL(java.lang.String svgDir,
java.lang.String svgFile)
- Description copied from class:
org.apache.batik.test.svg.PreconfiguredRenderingTest
- Gives a chance to the subclass to control the construction
of the variation URL, which is built as:
getVariationPrefix() + svgDir + getVariationSuffix() + svgFile + PNG_EXTENSION
buildSaveVariationFile
public java.lang.String buildSaveVariationFile(java.lang.String svgDir,
java.lang.String svgFile)
- Description copied from class:
org.apache.batik.test.svg.PreconfiguredRenderingTest
- Gives a chance to the subclass to control the construction
of the saveVariation URL, which is built as:
getSaveVariationPrefix() + svgDir + getSaveVariationSuffix() + svgFile + PNG_EXTENSION
buildCandidateReferenceFile
public java.lang.String buildCandidateReferenceFile(java.lang.String svgDir,
java.lang.String svgFile)
- Description copied from class:
org.apache.batik.test.svg.PreconfiguredRenderingTest
- Gives a chance to the subclass to control the construction
of the candidateReference URL, which is built as:
getCandidatereferencePrefix() + svgDir + getCandidatereferenceSuffix() + svgFile + PNG_EXTENSION
getName
public java.lang.String getName()
- Returns this Test's name
createCanvasHandler
public org.apache.batik.swing.JSVGCanvasHandler createCanvasHandler()
canvasRendered
public void canvasRendered(org.apache.batik.swing.JSVGCanvas canvas)