|
|
|
Re: How to get row/column index based on position at CompositeLayer [message #1186173 is a reply to message #1186068] |
Thu, 14 November 2013 14:27 |
Jan Krakora Messages: 477 Registered: December 2009 Location: Prague |
Senior Member |
|
|
Well, it's not working as I would expect.
Let's say the column header has 2 rows. Then, when I call
LayerUtil.convertRowPosition(compositeLayer, 0, bodyDataLayer);
LayerUtil.convertRowPosition(compositeLayer, 1, bodyDataLayer);
LayerUtil.convertRowPosition(compositeLayer, 2, bodyDataLayer);
LayerUtil.convertRowPosition(compositeLayer, 3, bodyDataLayer);
it returns 0, 0, 0, 1. That's confusing since I can't determine when the row position is really part of the bodyDataLayer.
I would expect -1, -1, 0, 1. Or am I missing the point here?
|
|
|
|
|
|
Re: How to get row/column index based on position at CompositeLayer [message #1186243 is a reply to message #1186201] |
Thu, 14 November 2013 15:24 |
Jan Krakora Messages: 477 Registered: December 2009 Location: Prague |
Senior Member |
|
|
Commands convert their position within AbstractPositionCommand#convertToTargetLayer(ILayer targetLayer) using the LayerCommandUtil class.
If I understand the code correctly, The LayerCommandUtil goes recursively through the layer stack to find the appropriate target position.
So when I use this code
LayerCommandUtil.convertRowPositionToTargetContext(new RowPositionCoordinate(compositeLayer, 0), bodyDataLayer);
LayerCommandUtil.convertRowPositionToTargetContext(new RowPositionCoordinate(compositeLayer, 1), bodyDataLayer);
LayerCommandUtil.convertRowPositionToTargetContext(new RowPositionCoordinate(compositeLayer, 2), bodyDataLayer);
LayerCommandUtil.convertRowPositionToTargetContext(new RowPositionCoordinate(compositeLayer, 3), bodyDataLayer);
it returns null, null, 0, 1. That's what I would expect. IMHO, this could be moved to the LayerUtil class.
|
|
|
|
Re: How to get row/column index based on position at CompositeLayer [message #1186273 is a reply to message #1186260] |
Thu, 14 November 2013 15:49 |
Jan Krakora Messages: 477 Registered: December 2009 Location: Prague |
Senior Member |
|
|
I use export to XSL. Some rows has a check box where I can select/unselect it to say whether they should be exported.
I had to create my own NatExporter class where I filter those rows.
BTW do you think it's a good idea to catch the FileNotFoundException in FileOutputStreamProvider#getOutputStream()?
When a user try to export to an opened file, nothing happens and the user could think that export was successful.
I have to check log file to see that the export fail because of java.io.FileNotFoundException.
[Updated on: Thu, 14 November 2013 15:57] Report message to a moderator
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.05321 seconds