Article View: borland.public.jbuilder.java.swing
Article #9278Re: JTable, move selected rows using a mouse
From: Werner Moschina
Date: Wed, 19 Apr 2000 00:00
Date: Wed, 19 Apr 2000 00:00
22 lines
1562 bytes
1562 bytes
"David M. Karr" writes > Frankly, I wouldn't try to implement it this way. This would be "surprising" > behavior from the user's point of view. I've done this with auxiliary buttons > attached to the right side of the table that perform "move up" and "move down" > functions. That's the way my implementation works this time. I can drag contiguous selections and single rows. The movement of discontiguous selections is not useful in my application, because it easy could cause mistakes and force undo I don't think, that dragging rows is a "surprising behaviour, but this is not part of this newsgroup. > A simple way to provide it from the > datamodel's point of view would be to implement a "swap" method, given two row > numbers. You can then implement any row movement in terms of that method. That's exactly the way of my implementation. :-) Regards, Werner
Technical Details
Message-ID:
<38FDBA58.522771D8@stutensee.net>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<38F6E0DB.B6552FDE@stutensee.net> <38FABF39.9BCA4B7B@cwcom.co.uk> <38FAF193.2BFFE952@stutensee.net> <uya6cfuk1.fsf@attws.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 111d45,f0e52445185f02d8 X-Google-Attributes: gid111d45,public From: Werner Moschina <wmo@stutensee.net> Subject: Re: JTable, move selected rows using a mouse Date: 2000/04/19 Message-ID: <38FDBA58.522771D8@stutensee.net> X-Deja-AN: 613136722 Content-Transfer-Encoding: 7bit References: <38F6E0DB.B6552FDE@stutensee.net> <38FABF39.9BCA4B7B@cwcom.co.uk> <38FAF193.2BFFE952@stutensee.net> <uya6cfuk1.fsf@attws.com> X-Accept-Language: de Content-Type: text/plain; charset=us-ascii Organization: Another Netscape Collabra Server User Mime-Version: 1.0 Newsgroups: borland.public.jbuilder.java.swing