<snip>
     public void mouseMoved(MouseEvent e) {
        int pos = viewer.findNearestAtomIndex(e.getX(),e.getY());
        if ( pos == -1 ) { return ; }

String chainId = viewer.getAtomChain( pos) ;
String seqCode = viewer.getAtomSequenceCode( pos) ;
...
</snip>



So, currently that is the *only* data that you are getting from the viewer?



yes. - Actually this is only Residue / chain related data, so far no atoms are accessed.

Something else I would like to be able to, is to show the Jmol popup menu on right mouse click - but I did not succeed to see any effect of
viewer.popupMenu(e.getX(),e.getY());
but I did not have too much time to look into this and most likely it is just a bug on my side.



-- and if I may suggest another possible way to communicate with the viewer: Events and Event listeners could be added directly to the viewer class, instead of the JPanel. E.g. if the mouse is over an Atom, do a MouseOverAtomEvent. - So a event.getAtomIndex() could replace the viewer.findNearestAtomIndex() method. --- Just a thought.


Andreas

--
--------------------------------------------------

Andreas Prlic Wellcome Trust Sanger Institute
Hinxton, Cambridge CB10 1SA, UK






-------------------------------------------------------
This SF.Net email is sponsored by: InterSystems CACHE
FREE OODBMS DOWNLOAD - A multidimensional database that combines
robust object and relational technologies, making it a perfect match
for Java, C++,COM, XML, ODBC and JDBC. www.intersystems.com/match8
_______________________________________________
Jmol-developers mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jmol-developers

Reply via email to