net.sourceforge.javaocr.scanner
Class DocumentScannerListenerAdaptor

java.lang.Object
  extended by net.sourceforge.javaocr.scanner.DocumentScannerListenerAdaptor
All Implemented Interfaces:
DocumentScannerListener

Deprecated. duspicates functionality

public class DocumentScannerListenerAdaptor
extends Object
implements DocumentScannerListener

Empty implementation of DocumentScannerListener interface which can be subclassed and only have the needed methods overridden. This prevents implementing classes from being forced to implement all methods in the interface.

Author:
Ronald B. Cemer

Field Summary
private static Logger LOG
          Deprecated.  
 
Constructor Summary
DocumentScannerListenerAdaptor()
          Deprecated.  
 
Method Summary
 void beginDocument(PixelImage pixelImage)
          Deprecated. This method is called when scanning of the document begins.
 void beginRow(PixelImage pixelImage, int y1, int y2)
          Deprecated. This method is called when scanning of a row of text within the document begins.
 void endDocument(PixelImage pixelImage)
          Deprecated. This method is called when scanning of the document is complete.
 void endRow(PixelImage pixelImage, int y1, int y2)
          Deprecated. This method is called when scanning of a row of text within the document is complete.
 void processChar(PixelImage pixelImage, int x1, int y1, int x2, int y2, int rowY1, int rowY2)
          Deprecated. This method is called to process a character or group of characters within the document.
 void processSpace(PixelImage pixelImage, int x1, int y1, int x2, int y2)
          Deprecated. This method is called to process a space within the document.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOG

private static final Logger LOG
Deprecated. 
Constructor Detail

DocumentScannerListenerAdaptor

public DocumentScannerListenerAdaptor()
Deprecated. 
Method Detail

beginDocument

public void beginDocument(PixelImage pixelImage)
Deprecated. 
Description copied from interface: DocumentScannerListener
This method is called when scanning of the document begins.

Specified by:
beginDocument in interface DocumentScannerListener
Parameters:
pixelImage - The PixelImage containing the document which is being scanned.

beginRow

public void beginRow(PixelImage pixelImage,
                     int y1,
                     int y2)
Deprecated. 
Description copied from interface: DocumentScannerListener
This method is called when scanning of a row of text within the document begins.

Specified by:
beginRow in interface DocumentScannerListener
Parameters:
pixelImage - The PixelImage containing the document which is being scanned.
y1 - The y position of the top pixel row of the row of text that is being scanned.
y2 - The y position of the pixel row immediately below the last pixel row of the row of text that is being scanned. This is always one more than the last pixel row of the row of text that is being scanned.

processChar

public void processChar(PixelImage pixelImage,
                        int x1,
                        int y1,
                        int x2,
                        int y2,
                        int rowY1,
                        int rowY2)
Deprecated. 
Description copied from interface: DocumentScannerListener
This method is called to process a character or group of characters within the document.

Note that when two or more characters are connected together without enough whitespace to determine where the first one ends and the next one begins, the document scanner may not be able to split the characters properly. If this occurs, then two or more characters may be included in a single call to this method. In this case, it is the responsibility of this method to process all characters included in the area passed into this method.

Specified by:
processChar in interface DocumentScannerListener
Parameters:
pixelImage - The PixelImage containing the document which is being scanned.
x1 - The x position of the first pixel column of the character or group of characters being scanned.
y1 - The y position of the top pixel row of the row of text that is being scanned.
x2 - The x position of the pixel column immediately to the right of the last pixel column of the character or group of characters being scanned. This is always one more than the last pixel column of the character or group of characters that is being scanned.
y2 - The y position of the pixel row immediately below the last pixel row of the row of text that is being scanned. This is always one more than the last pixel row of the row of text that is being scanned.
rowY1 - The y position of the top scan line of the row.
rowY2 - The y position of the scan line immediately below the bottom of the row.

processSpace

public void processSpace(PixelImage pixelImage,
                         int x1,
                         int y1,
                         int x2,
                         int y2)
Deprecated. 
Description copied from interface: DocumentScannerListener
This method is called to process a space within the document.

A space is simply an area of whitespace between two characters that is deemed by the document scanner to be wide enough to represent a space character.

Specified by:
processSpace in interface DocumentScannerListener
Parameters:
pixelImage - The PixelImage containing the document which is being scanned.
x1 - The x position of the first pixel column of the character or group of characters being scanned.
y1 - The y position of the top pixel row of the row of text that is being scanned.
x2 - The x position of the pixel column immediately to the right of the last pixel column of the character or group of characters being scanned. This is always one more than the last pixel column of the character or group of characters that is being scanned.
y2 - The y position of the pixel row immediately below the last pixel row of the row of text that is being scanned. This is always one more than the last pixel row of the row of text that is being scanned.

endRow

public void endRow(PixelImage pixelImage,
                   int y1,
                   int y2)
Deprecated. 
Description copied from interface: DocumentScannerListener
This method is called when scanning of a row of text within the document is complete.

Specified by:
endRow in interface DocumentScannerListener
Parameters:
pixelImage - The PixelImage containing the document which is being scanned.
y1 - The y position of the top pixel row of the row of text that is being scanned.
y2 - The y position of the pixel row immediately below the last pixel row of the row of text that is being scanned. This is always one more than the last pixel row of the row of text that is being scanned.

endDocument

public void endDocument(PixelImage pixelImage)
Deprecated. 
Description copied from interface: DocumentScannerListener
This method is called when scanning of the document is complete.

Specified by:
endDocument in interface DocumentScannerListener
Parameters:
pixelImage - The PixelImage containing the document which is being scanned.


Copyright © -2012. All Rights Reserved.