|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.sourceforge.javaocr.scanner.DocumentScannerListenerAdaptor
public class DocumentScannerListenerAdaptor
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.
| 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 |
|---|
private static final Logger LOG
| Constructor Detail |
|---|
public DocumentScannerListenerAdaptor()
| Method Detail |
|---|
public void beginDocument(PixelImage pixelImage)
DocumentScannerListener
beginDocument in interface DocumentScannerListenerpixelImage - The PixelImage containing the document
which is being scanned.
public void beginRow(PixelImage pixelImage,
int y1,
int y2)
DocumentScannerListener
beginRow in interface DocumentScannerListenerpixelImage - 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.
public void processChar(PixelImage pixelImage,
int x1,
int y1,
int x2,
int y2,
int rowY1,
int rowY2)
DocumentScannerListenerNote 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.
processChar in interface DocumentScannerListenerpixelImage - 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.
public void processSpace(PixelImage pixelImage,
int x1,
int y1,
int x2,
int y2)
DocumentScannerListenerA 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.
processSpace in interface DocumentScannerListenerpixelImage - 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.
public void endRow(PixelImage pixelImage,
int y1,
int y2)
DocumentScannerListener
endRow in interface DocumentScannerListenerpixelImage - 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.public void endDocument(PixelImage pixelImage)
DocumentScannerListener
endDocument in interface DocumentScannerListenerpixelImage - The PixelImage containing the document
which is being scanned.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||