hmmm, I guess I have to rephrase the question. I'm familiar to the fact that
if we want to add/change a live object, exception handlers first check
whether the neccessary capabilities were first set before the object could
be changed. These handlers could then be considered as "listeners".

I'm currently implementing a listener that detects whether an object has
been added, removed, a change in the object's geometry, appearance,
transform, was regrouped, ungrouped, moved, has done something specific for
that object, etc.  in the live scenegraph. I want to basically catch that
event and later undo it. I'm pretty sure I'm not the only one who wants to
implement this.

I tried storing all the necessary previous and current states of all the
objects in vectors/hastables. But the code is very messy. What's more, if
there were about 1000 objects, then i would be creating a lot of hastables,
vectors, etc.  Now, that's a very daunting task.

I'm looking at the package of javax.swing.undo and the Java3D fly demo. I
found one interesting interface -- SceneGraphChangeListener... but it only
listens for a branchgroup added to the locale, not a branchgroup added below
a certain branchgroup.

well, i'm still looking for a better way of implementing that listener.


-----Original Message-----
From: Kelvin Chung
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: 6/19/01 11:53 PM
Subject: Re: [JAVA3D] extending the class EventCatcher

Hi Daniel,

>X-Unix-From: [EMAIL PROTECTED]  Mon Jun 18 23:38:33 2001
>Delivered-To: [EMAIL PROTECTED]
>MIME-Version: 1.0
>Date: Tue, 19 Jun 2001 14:36:59 +0800
>From: Daniel Balaguer Yagan <[EMAIL PROTECTED]>
>Subject: [JAVA3D] extending the class EventCatcher
>To: [EMAIL PROTECTED]
>
>hi there,
>   Is there anyone of you guys familiar with the class
>javax.media.j3d.EventCatcher ?  I want to extend this class to
implemenent
>one of my created listeners. I was searching the docs but I couldn't
find
>it. I only know that this class implements ComponentListener,
FocusListener,
>MouseMotionListener, MouseListener, MouseMotionListener, and
WindowListener.
>If only I have it's source....
>
This is an internal class used by Java3D only and
can't extends by user program.

- Kelvin
------------
Java 3D Team
Sun Microsystems Inc.

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA3D-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to