🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.api
Article #2699

Re: mouse motion with drag 'n drop

#2699
From: Joe Fessler
Date: Thu, 08 Jun 2000 00:00
37 lines
2314 bytes
That's it exactly... the extended JButton contains a myObject and using
dnd, I'm transferring it (myObject) from one button to another.  myObject
is a JavaBean, but not a component in the sense that it inherits from a
java Component.  Now the extended JButton is obviously a C/component and
they need to be capable of being repositioned on the JPanel by the user.

Like I said earlier, this solution seems kind of a kludge, but the only
way I can figure to pull off the dual nature of dnd with a
mousemotionlistener is to require the user to "switch modes"... i.e.
require them to select a item from a toolbar which then activates or
reinstates dnd listeners, and a second tool which switches the buttons
back to using the motionlisteners.  I'm a bit concerned about the
overhead of this as there may be quite a few buttons on the JPanel -
maybe a hundred or more but likely less than 500.

Any better idea?

-J

"John P. McGrath" wrote:

> On Wed, 07 Jun 2000 14:18:36 -0500, Joe Fessler wrote:
>
> > I guess it is kind of a picky distinction, but when the
> > object is being transferred, the containing JButton need
> > not be repositioned; whereas if the intent is to move the
> > containing JButton, then it obviously should reposition
> > relative to it's old spot in the JPanel.
>
> I am getting confused here.  You are saying that the JButton contains
> your object?  You are transferring it from one button to another?  Is
> this object a Component?
>
> --
> John P. McGrath
> <JPMcGrath@fast.net>
> <jpm@nscs.fast.net>
Technical Details
Message-ID: <393FB8D4.6C3B47E0@idir.net>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <393BC100.87AF3EB7@idir.net> <MPG.13a63b62a555a9e989990@forums.borland.com> <393D290C.ED9F9FC7@idir.net> <MPG.13a78d40c337c857989996@forums.borland.com> <393EA00B.15A48652@idir.net> <MPG.13a8d828c4806f119899a0@forums.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 1089d0,7648534fe4fd6be3
X-Google-Attributes: gid1089d0,public
From: Joe Fessler <jfessler@idir.net>
Subject: Re: mouse motion with drag 'n drop
Date: 2000/06/08
Message-ID: <393FB8D4.6C3B47E0@idir.net>
X-Deja-AN: 632647373
Content-Transfer-Encoding: 7bit
References: <393BC100.87AF3EB7@idir.net> <MPG.13a63b62a555a9e989990@forums.borland.com> <393D290C.ED9F9FC7@idir.net> <MPG.13a78d40c337c857989996@forums.borland.com> <393EA00B.15A48652@idir.net> <MPG.13a8d828c4806f119899a0@forums.borland.com>
X-Accept-Language: en,pdf
Content-Type: text/plain; charset=us-ascii
X-Trace: 8 Jun 2000 08:14:06 -0800, 127.0.0.1
MIME-Version: 1.0
Newsgroups: borland.public.jbuilder.java.api