I'm trying to put together a proof-of-concept for manual tabular entry, where a critical part is row highlighting in the image so the keyer does not loose track of their current line item.
Unfortunately, I'm missing some part of how the imageOverlay works -- the following code snippets do not seem to provide shading/overlay (which are all client-side in the gwt.rv.client.view package), with a button added to the UIBinder to trigger the example code (and I have additional debugging code in place to confirm the button is working).
Simple attempt to just create a shaded area:
- Code: Select all
public void drawoverlaybox(){
ReviewValidateView myview = this.presenter.getView();
ImageOverlayPanel iop = myview.imgOverlayPanel;
//draw a big box in the center area that is not outside the x/y boundaries of the test images
//requires gwt-java-math sources jar (NOT gwt-math) and adjustment to .gwt.xml to import package for
//BigInteger/BigDecimal support. Well, at least until upgraded to GWT 2.2 or greater.
Coordinates baseline = new Coordinates();
baseline.setX0(BigInteger.valueOf(300));
baseline.setX1(BigInteger.valueOf(1000));
baseline.setY0(BigInteger.valueOf(500));
baseline.setY1(BigInteger.valueOf(1000));
List<Coordinates> xy = new ArrayList<Coordinates>();
xy.add(baseline);
iop.processOverlay(xy, 0,0,1.0f);
}
Instead of direct overlay manipulation, make some table row/columns with predefined coordinates (the true intent, a new button called 'Guided Table'):
- Code: Select all
.....
//modified insertDeleteRow method in TableExtractionView....
Coordinates baseline = new Coordinates();
baseline.setX0(BigInteger.valueOf(300));
baseline.setX1(BigInteger.valueOf(1000));
baseline.setY0(BigInteger.valueOf(500));
baseline.setY1(BigInteger.valueOf(1000));
//modified createNewRow to ensure coordinates are not nulled if provided
for (Iterator iterator = columnList.iterator(); iterator.hasNext();) {
Column column = (Column) iterator.next();
column.setCoordinates(baseline);
}
row = createNewRow(columnList);
row.setRowCoordinates(baseline);
Neither of these scenarios seem to modify the overlay, is there something I'm missing? I admit I do not usually work on the eventbuses on the GUI side, so I may be missing something there. Normal overlay support (even on the table side) is working fine.
UPDATE: still no success, but I've tried several focusHandler events, I suspect maybe I'm missing something there. I'm not quite sure I know the difference between my manually created row/columns, and the ones that have been loaded from normal TableExtraction code. I did change from TextBox to a DocField w/ coordinates and using GWTValidatableControl.createGWTControl for a SuggestBox instead, but I'm still missing something.
(EDIT: this may be better served in the Integrator forum)
Thanks!
-Darren
