apsexton / bateman-ocr

Tools and experiments in the OCR of the Bateman Manuscripts
ISC License
0 stars 5 forks source link

Add next and previous page actions #9

Open apsexton opened 8 years ago

apsexton commented 8 years ago

After issue #8 is completed, the system is still only able to deal with the first page in the TIFF file. Add "next page" and "previous page" actions with accelerators and attach them to menu and toolbar to handle loading the next page and previous page in the TIFF file (hint: see the imageNo argument to gte.utils.ImageFile.getBufferedImage(...)).

Take care to disable next page if the current page is the last in the file, disable previous page if the current page is the first in the file and disable both if there is no file opened or there are no images in the file, and re-enable them if you move to a page not at the ends.

Make sure to make the generated image move with the loaded image, but only actually load the Component objects if they are required, i.e. if the toggle action is triggered so that the generated image must be drawn.