Curtis's solution works well if you know the order of the actions that
trigger the
cell's doAction() method - since you know ahead of time which actions to
ignore.
I'm trying to implement a more general solution to process calls to
doAction() based
only on the type of activity that triggered them, e.g.
if (doAction is triggered by a pick) {
pickProcess();
}
else if (doAction is triggered by data change) {
changeProcess();
}
else {
someOtherProcess();
}
I tried to solve this by subclassing the CellImpl class and overriding the
thingChanged() method
so that I could examine the ThingChangedEvent object passed to this method.
Unfortunately, this
doesn't help since there is no useful information in the ThingChangedEvent
object.
Alternatively, listening for mouse events (generated from the picks)
doesn't seem the way to go
since ThingsChangedEvents are "lossy" and I don't see how they could be
matched up with the
corresponding mouse events.
Any suggestions?
Alan
--------------------------------------------------------------------------------------------------------
Alan Kalvin Ph.D., kalvin@xxxxxxxxxx, (914) 784-6907, Visual Analysis
Group,
IBM T. J. Watson Research Center, P. O. Box 704, Yorktown Heights, NY 10598
--------------------------------------------------------------------------------------------------------
"A hen is only an egg's way of making another egg." - Samuel Butler
>>
--------------------------------------------------------------------------------------------------------
>> To: Doug Lindholm <lind@xxxxxxxx>
>> Subject: Re: Pick
>> From: Curtis Rueden <curtis@xxxxxxxxxxxxx>
>> Date: Tue, 05 Feb 2002 14:36:02 -0600
>> In-reply-to: <3C601F3D.F5CE9344@xxxxxxxx>
>>
---------------------------------------------------------------------------------------------------------
>> Hi Doug,
>> I usually handle that situation by adding an "ignoreNextAction" flag
>> that I set to true just before calling cell.enableAction(). Then,
>> in the Cell's doAction() method, I put:
>> if (ignoreNextAction) {
>> ignoreNextAction = false;
>> return;
>> }
>> as the first couple of lines for the method.
>> -Curtis
>> At 12:06 PM 2/5/2002, Doug Lindholm wrote:
>> >I have a CellImpl handling "picks" for my data with a
>> >PickManipulationRendererJ3D. I also have GUI hooks that allow the user
>> >to turn off/on the data using the renderer's toggle method. However,
>> >when I
>> >toggle the thing on, it performs the CellImpl's action. How can I make
>> >the CellImpl respond only to "picks" but not other things?