Auto scrolling a node dragging

Just a quick question on this.

I noticed that on most of the example application, you can drag a node
to the edge of a JGoview and the view will autoscroll allowing the
drawing surface to effectively be enlarged, as an example the flower
example allows you to do that.

However on the Process Flow Editor (And SampleApp), this does not seem
to be the case, any idea on what is missing in that verses the other

Any idea on what the difference is between the two, I have an
application based on the Process Flow and would love to get
autoscrollign working


Autoscrolling is turned on in Processor too–it’s just that since JGoView.isDragsRealtime() is false, the JGoDocument isn’t automatically getting larger for you to be able to autoscroll beyond the existing document’s bounds.
You’ll note that even with isDragsRealtime() false, if you do have a document that is larger than the JGoView, you’ll be able to autoscroll while dragging objects.

Walter I flipped the realtime dragging to be true on the example and
still unable to get it to auto scroll. Within my code I have also added
the following within the class derived from JGoView

Insets ins = new Insets(12,12,12,12);

The result is that it scrolls once but does not appear to be
continually scrolling. I’m wondering if it is my Insets that are
messing things up on myside, although I did not notice that any of the
others had that set.

Any ideas on anything else to check?


OK, I just changed the line in the initialize method of to be:
Then autoscrolling while dragging a node seems to work just fine for me.

Hmm ok after a second recompile I got the ProcessView one working.
Still cant get my derived application working, so going to take a good
look at the code.

I do have a JGoOverview associated with the JGoView could that be interfering with the auto scroll action of the JGoView ?


OK my fault on this one. I ended up tracing the various calls and the
issue was in an handlemove() overide that I had done within my node
object. So not where I was initially thinking it was but after some
poking around I got it…

Walter thanks for baring with me on this. Much appreciated…

Hello, why this autoscroll doesnt work on an applet

If you are using older JREs, you may need to initialize drag-and-drop in the applet in a separate thread. I believe all of the sample applets have been coded this way.
For more information, also see Java Developer Connection bug 4225247.