NOTICE: This version of the NSF Unidata web site (archive.unidata.ucar.edu) is no longer being updated.
Current content can be found at unidata.ucar.edu.
To learn about what's going on, see About the Archive Site.
Donna: Regarding your note (below)...One way to think about this is to have your parent frame implement ActionListener and create an public actionPerformed() method in it. Your CellImpl could have an addActionListener() method where the parent frame could register to be informed of events by passing in its instance. When the CellImpl's doAction() was called, if the parent frame has registered, then the CellImpl can call it's actionPerformed() method to notify it that something has happened.
Hope that helps. tom Donna L Gresh wrote:
Ok, to start a different topic than SQL queries (though it's interesting to hear the various viewpoints), I am trying to figure out why my picking isn't working. I've implemented all my VisAD display stuff in a separate class, which extends JPanel, and have added a PickManipulationRenderer and CellImpl to manage the picking. That all works; when I right-click in the panel the doAction method gets called and some fields of my class get updated with data values. All fine and good, but what I *want* to happen is for the parent frame to be notified that something has happened, so that it can call some get* methods on the class, get the new values, and stick them into a label, say. But I've been unable to figure out how to get the parent frame to be notified. I tried putting a mouse listener on my class, but for some reason the event handlers are *not* being called when I use the mouse. Are the mouse events "eaten" in some way by visAD, or is something else going on? I am no expert in event handling, I admit. I'm trying to avoid building any knowledge of the parent frame into the VisAD-containing class, as I want it to be reusable in the future. Donna L. Gresh, Ph.D. IBM T.J. Watson Research Center (914) 945-2472 http://www.research.ibm.com/people/g/donnagresh gresh@xxxxxxxxxx
-- Tom Whittaker (tomw@xxxxxxxxxxxxx) University of Wisconsin-Madison Space Science and Engineering Center Cooperative Institute for Meteorological Satellite Studies Phone/VoiceMail: 608.262.2759
visad
archives: