Article View: borland.public.jbuilder.java.swing
Article #10717Re: GridControl as drop target..
From: Paul Furbacher
Date: Fri, 13 Aug 1999 00:00
Date: Fri, 13 Aug 1999 00:00
33 lines
1930 bytes
1930 bytes
EA. wrote: > I'm trying to create a DropGridControl class which > extends GridControl class with added drop capabilities.. > i.e. you can drag from a JTree and drop into my > DropGridControl. > > Problem: You can ONLY drop when the tip of the > mouse cursor is positioned on top of the border > of my DropGridControl!! If the mouse cursor is INSIDE > my DropGridCotrol, I can see from the events debug > messages that the mouse cursor has "Entered" and "Exited" > the drop zone! i.e. it's saying that the mouse cursor has > passed the drop target, which is not true. I haven't played with this, but from having worked a lot with the GridControl, the debug messages potentially make sense. The Gridcontrol is extended, via GridView, from JScrollPane. JScrollPane is a composite component in the sense that it contains a JViewport. The actual "grid", called GridCore, is contained by the viewport. So, what you seem to be getting is a message that indeed, your drop target, the JScrollPane, consists only of that thin border around the "grid", and that the innards are not qualified as the drop target. My guess is that you need to make the GridCore the drop target. How you would do that is something others may be able to help you with (I haven't done anything with D&D in Java, yet). Paul Furbacher (TeamB)
Technical Details
Message-ID:
<37B420FA.9141763B@bilbo.bio.purdue.edu>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<37B18754.CD1D6F5C@magnus.uwaterloo.ca>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 111d45,6d04385e4cc36a3f X-Google-Attributes: gid111d45,public From: Paul Furbacher <pf@bilbo.bio.purdue.edu> Subject: Re: GridControl as drop target.. Date: 1999/08/13 Message-ID: <37B420FA.9141763B@bilbo.bio.purdue.edu> X-Deja-AN: 512254650 Content-Transfer-Encoding: 7bit References: <37B18754.CD1D6F5C@magnus.uwaterloo.ca> Content-Type: text/plain; charset=us-ascii Organization: Reverse Alchemy, Inc. Mime-Version: 1.0 Reply-To: pf@bilbo.bio.purdue.edu Newsgroups: borland.public.jbuilder.java.swing