[piccolo2d-dev] Re: PScrollPane and interactingRenderQuality

2009-10-10 Thread Lionel

Many thanx for the tip.

I've done that (issue 131) and tested what you suggest (in the
constructor)... However, I'm not very confident that it goes in the
right direction (I'm not very experienced with swing/awt).

Of course I can add an adjustmentlistener in the PScrollPane
constructor but then I'd need to overload setVerticalScrollBar() and
setHorizontalScrollBar() from JScrollPane to make sure that:
- I remove the listener before I get rid of the old ScrollBar
- and reassign/reset this listener to the newly added ScrollBar...

...but...
Is this really it ? Are there any other methods that require to be
patched/overriden (other than setXXXScrollBar() ) ?

Another thing that makes me believe there could be a smarter solution
is that PScrollPane uses a Component in its constructor, not a PCanvas
(is it meant to be used with anything else ?)... This requires extra
verifications in the listener because setInteracting() can only be
called on PComponent/PCanvas... In this context, it seems like we are
trying to force a generic class into a specific bahaviour... but its
just a feeling...

Again, thanx for the tip, and if you feel that adding an adjustment
listener is the right way to proceed, then I'll implement it totally
and post a patch in the issue 131 tracking page.

sincerely,
Lionel
--~--~-~--~~~---~--~~
Piccolo2D Developers Group: http://groups.google.com/group/piccolo2d-dev?hl=en
-~--~~~~--~~--~--~---



[piccolo2d-dev] Re: PScrollPane and interactingRenderQuality

2009-10-06 Thread Michael Heuer

Lionel wrote:

 Hi every body !

 I'm a piccolo fan for a few years. I have only coded a couple of
 projects with this framework but it really rocks. I'm glad piccolo2D
 is taking over !

 I'm facing a little issue ... maybe a bug ? ... concerning PScrollPane
 and the rendering quality during interaction.
 If you move the canvas around by just clicking on it (regular
 PPanEventHandler) then the rendering quality changes as the user is
 interacting... the final high quality rendering is properly set when
 the interaction stops.

 This behaviour does not happen with the scroll pane when the user
 interacts with the scroll bars... Can anyone point me in a direction
 where I could solve this ?

 If there are some modifications to be done to piccolo itself, I can
 try to do it and post my work back... (if I manage to do it
 properly ! :o)

 Thanx in advance for your tips !

There is a method setInteracting(boolean) on PComponent

http://www.piccolo2d.org/doc/piccolo2d.java/release-1.2.1/apidocs/edu/umd/cs/piccolo/PComponent.html#setInteracting(boolean)

Somewhere in PScrollPane we need to add calls to set interacting to
true on scrollbar mouse down and to set interacting to false on mouse
up.  Could you create a new issue at

http://code.google.com/p/piccolo2d/issues/list

for this?  Thanks,

   michael

--~--~-~--~~~---~--~~
Piccolo2D Developers Group: http://groups.google.com/group/piccolo2d-dev?hl=en
-~--~~~~--~~--~--~---