Andreas wrote:

>>I have restructured some of the packaging of the Jmol source code.
>>
> that's very interesting and makes things much clearer! :-)

Good

>> * the JmolApplet and the Jmol application now use the
>>org.jmol.api.JmolViewer interface.
>>
> this is what I will need for my Application. - So from now on it needs
> to implement a  "JmolStatusListener", to get informed about e.g.
> "AtomPicked".

Yes.

The JmolStatusListener existed before, but it was harder to find.

I am not particularly happy with the way that the JmolStatusListener is
implemented. So it will probably be changing immediately after the v10
release.

> * How can an external application trigger the popup Menu ? - When I
> press the right mouse button in Jmol the JmolStatusListener recieves a
> "handlePopupMenu", but I do not know what to do next to actually display
> it. - would expect something like viewer.popupMenu(x,y) ?

Currently the popup menu is not part of the Viewer. Rather, the wrapper
application must supply it.

This is because (in the general case) the popup menu could be complicated
... awt for old JVMs + swing for everything else ... language
localizations ... etc.

Therefore, I left this outside.

I was thinking that I should implement a more fully functional JmolPanel
class that was swing only and that provided popup functionality.

In the meantime, you can look at src/JmolApplet.java and see how it
handles popups.

> * notifyAtomPicked returns an infoString.

It also passes an atomIndex

> The external application needs
> to parse this string in order to retreive info like Chain, etc. -
> Correct?

You can pass the atomIndex back in and ask for information about it.

> Can this string be substituted against a very simple atom
> container class / interface? - or do we get to the stage of the "low
> level" interfaces  .... Another idea would be to make the string look
> XML-ish so it is easier to parse...

My general thinking is that the event notification should not pass very
much information ... perhaps not even than the event type.

Then, there should be a separate set of entry points for querying about
the state.

As in:of an event of type 'atom-picked'
  1. you receive notification that some event occurred
  2. you ask and learn that the event was 'pick'
  3. you ask which atom was picked
  4. you ask for information about that atom


Q: What do you think?


Miguel



-------------------------------------------------------
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