Capture atom selection event

User 0224fcf261

04-09-2007 16:12:54

Hi,





Is it possible in the MSketchPane to capture an atom selection event ? I would like to display some information about an atom in a separate component when an atom is selected. I tried adding an ActionListener but it only seems to capture higher level events such as New, Open, add Graphic etc. Ideally the event should tell me which atom number(s) has been selected





Many thanks


Alistair

User f359e526a1

06-09-2007 10:00:37

Hello, if you have a look at the example at





http://www.chemaxon.com/marvin/examples/sketch-molchanged/MolChangedEventExample.java.txt





you will find that you can catch the "selectionChanged" event instead of the "mol" event (first line in the propertyChange() method).