JGoView/JScrollPane Drag/Drop Issue

Hi,

I’m encountering some odd behavior with the following scenario on JGo 5.03.

I have a JGoView within a JScrollPane, and I’ve implemented a d-n-d
mechanism to drag new objects from a palette to the JGoView. The idea
is that the JGoView can be larger than the JScrollPane viewport, and it
can be expanded by dragging objects to the right/bottom.

I perform the following:

  1. Drag/drop a new object from the palette onto the view. Works great.
  2. Click/drag that new object off the lower right corner of the view.
    This causes the JGoView to grow, and the JScrollPane to scroll, as
    expected. When I release the drag, the new object remains where I would
    expect. I can use the scrollbars to scroll back and forth across the
    newly expanded JGoView. All good.
  3. Attempt to drag/drop a new object from the palette onto the JGoView.
    If I drop this object anywhere within the original boundaries of the
    view (prior to the drag/resize from step #2), it works just fine. If I
    attempt to drop the new object into the new region created by the
    resize in step #2, it automatically snaps back to a location within the
    original boundaries of the JGoView. Its coordinates after the drop
    suggest that its (x,y) coordinates are equal to its visual position
    relative to the JScrollPane viewport origin, rather than the JGoView
    origin (hope that made sense).
  4. After the drop in step #3, I can click/drag the new object into the expanded region from step #2, and it works just fine.

Has anyone encountered behavior like this? Are there any special
JScrollbar/JGoView settings I need to use when enclosed in a
JScrollPane?

Thanks.

David Tompkins

tompkins AT adobe DOT com

I don’t know of any particular problems, but I must say that most people don’t use JScrollPanes for scrolling JGoViews. The scrolling support that JGoView provides ought to handle what I think you want to do.