Well, there is good news and bad news. The good news is that the selection
feedback slowdown issue that I am duplicating was not caused by the mouse
wheel zoom mod. The bad news is that the issue is also present in the OJ
1.3 release. It is not, as I thought, related to differences in
RenderManager. I suspect the selection renderer itself may be the
problem. Since SkyJUMP doesn't have the problem, it should be only a matter
of comparing the two.
For those who haven't duplicated the problem, you will need a large vector
layer. I used the contour layer (26MB) from the Madison county dataset
that I recently gave links to.
Not sure how all this relates to luca's right click mouse menu problem. It
may be related to how java allocates threads under linux.
@Luca, would you please try to duplicate the problem using the 1.3 release?
regards,
Larry
On Fri, Feb 19, 2010 at 8:38 AM, Larry Becker <becker.la...@gmail.com>wrote:
> Hi,
>
> I have duplicated a problem in OJ with selection feedback. When a large
> vector dataset is loaded, and mouse wheel zoom is used to zoom out,
> selection feedback stops working for a while. Note that the selection
> mechanism is still working as verified by the status panel, but items do not
> highlight in yellow. After a while, selection feedback starts working
> again. This problem does not exist in SkyJUMP so it is probably due to
> differences in the RenderManager.
>
> The mouse wheel modification (shown below) uses a timer to ensure that the
> view is redrawn after 700 ms. To prevent it from happening until that time,
> the RenderManager's setPaintingEnabled(false) method is used. In the
> Timer's actionPerformed method, it is set back to true and a repaintPanel is
> used to update the view. In SkyJUMP, the RenderManager itself has been
> modified to do this. It may be necessary to modify RenderManager in OJ to
> avoid this problem. I will look for a workaround first.
>
> Here is the old method of handling mouse wheel moved:
>
> public void mouseWheelMoved(MouseWheelEvent e) {
> int nclicks = e.getWheelRotation(); //negative is up/away
> try {
> double zoomFactor = (nclicks > 0)
> ? (1 / (Math.abs(nclicks)*WHEEL_ZOOM_IN_FACTOR)) :
> (Math.abs(nclicks)*WHEEL_ZOOM_IN_FACTOR);
> zoomAt(e.getPoint(), zoomFactor, false);
> } catch (Throwable t) {
> getPanel().getContext().handleThrowable(t);
> }
> }
>
> Here is the new method:
>
> public void mouseWheelMoved(MouseWheelEvent e) {
> int nclicks = e.getWheelRotation(); //negative is up/away
> mouseWheelCount = mouseWheelCount + nclicks;
> if (mouseWheelCount == 0)
> scale = 1d;
> else if (mouseWheelCount < 0)
> scale = Math.abs(mouseWheelCount)*WHEEL_ZOOM_IN_FACTOR;
> else
> scale = 1 / (mouseWheelCount*WHEEL_ZOOM_IN_FACTOR);
> try {
> if (mouseWheelUpdateTimer == null) {
> RenderingManager renderManager =
> getPanel().getRenderingManager();
> renderManager.setPaintingEnabled(false);
> mouseWheelUpdateTimer = new Timer(700,
> new ActionListener() {
> public void actionPerformed(ActionEvent e) {
> try {
> zoomAt(getCentre(), scale, false);
> mouseWheelUpdateTimer.stop();
> mouseWheelUpdateTimer = null;
> mouseWheelCount = 0;
> origImage = null;
> RenderingManager renderManager =
> getPanel().getRenderingManager();
> renderManager.setPaintingEnabled(true);
> renderManager.repaintPanel();
> } catch (NoninvertibleTransformException e1) {
> }
> }
> });
> mouseWheelUpdateTimer.start();
> mouseWheelUpdateTimer.setRepeats(false);
> cacheImage();
> scaleImageAtCentre(scale);
> } else {
> mouseWheelUpdateTimer.restart();
> scaleImageAtCentre(scale);
> }
> } catch (Throwable t) {
> getPanel().getContext().handleThrowable(t);
> }
> }
>
> regards,
> Larry
>
>
> On Fri, Feb 19, 2010 at 2:25 AM, luca marletta <lucama...@gmail.com>wrote:
>
>> Hi,
>> I'd like to check opinions about the new feature to speed up zoom is
>> very powerful but in my case causes a delay on on every other events
>> and it becomes really not much nice to work.
>>
>> I observe delay for window menu on right mouse click, select items and so
>> on.
>>
>> Could you write comment to understand if that is just my problem?
>>
>> luca
>>
>>
>> luca marletta
>> www.beopen.it
>>
>>
>> ------------------------------------------------------------------------------
>> Download Intel® Parallel Studio Eval
>> Try the new software tools for yourself. Speed compiling, find bugs
>> proactively, and fine-tune applications for parallel performance.
>> See why Intel Parallel Studio got high marks during beta.
>> http://p.sf.net/sfu/intel-sw-dev
>> _______________________________________________
>> Jump-pilot-devel mailing list
>> Jump-pilot-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel
>>
>
>
>
> --
> Larry Becker
> Integrated Systems Analysts, Inc.
>
--
Larry Becker
Integrated Systems Analysts, Inc.
------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Jump-pilot-devel mailing list
Jump-pilot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel