Dmitry wrote: >> The JmolPopup is not part of the JmolViewer ... it is considered external user interface that the application must provide. > > well my goal is to build my application on top of Jmol suit > Jmol class is a example how to embed viewer into the custom > application
OK > JApplet is another one I am not suggesting that you use the JmolApplet. But if you want to learn how to use the JmolPopup then you can look at the JmolApplet code. > for some reasons (so far I don't think is is relevant for that > discussion) I'd like to build my own > wrapper (Application) around the Jmol > so I prefer to change API as less as possible if at all > I think that JMolPopup class is a part of Jmol suit > so I'd prefer not to change it I don't think that you need to make any changes to the JmolPopup class. But your wrapper must receive the events and activate it. Take a look at examples/Integration.java Compile it and run it. It does not have any popup menu support. > to resolve my problem would be enough to make > addMenu... methods public BTW, in that case > application/applet developer could add additional > application/applet OK, I now understand that you are asking a separate question. > specific menu items that are specific to that application > other way to handle it would be to provide some method like > addCustomMenu to the JMolPopup class, so I'll be able > to add any arbitrary submenu to the main Jmol menu You are asking for extensions to the JmolPopup class. We may be able to do that. >> I consider the JmolViewer a component. If people >> need additional functionality, then we should modify >> the API to provide access to what they need. >> If you have special needs/requirements/wishes then >> I'll be glad to discuss it. > > well I respectfully disagree, > for example we use some special url handlers (not just http:, file:) so I'd like to override some methods from JMolViewer > in that particular case I solved the problem by using inline function: I load file from our URI into the memory and after that call function with String argument > that's OK ( I have instance of JMolViewer as a member of my wrapper class) but in that case > better solution would be just override appropriate JMolViewer method Here is the problem. The file io code in the JmolViewer is terrible ... it is embarassingly ugly. Much of this is caused by the fact that it must run as an application (easy) and as an applet (difficult). I hope to completely rewrite that code. If you subclass the existing code then your code will break. Within the internals of the JmolViewer, I still want the flexibility to throw away the code and rewrite it ... without asking anybody or notifying anybody about what I am going to do. On the other hand, if we talk about a mechanism to provide an API for your request. Then we can put that in ... I'll preserve the API ... but I can still throw away the implementation. >>> 3. if I understand right in order to add new reader I have to modify ModelResolver class [snip] >> If you only want to support a proprietary file format, or if you don't even have a file but want to load from your own data structures, then you >> should consider implementing your own ModelAdapter. > > yes, that could be a good way to do so, I'll consider that, definitely OK If you decide that you need to extend the capabilities of the SmarterModelAdapter then let me know and we will investigate extending it along the lines you suggested. >>> 5. what is the status of generating molecular surfaces? >> For example, the engine today can render individual triangles, but not meshes. And there is no support for any type of phong/gourand shading. > > :-( > > so if I render my triangles as individual triangles (as you said I have ability to render individual triangles) > I won't get nice picture I understand without shading > from other hand I can calculate color of every triangle by myself (and simulate light source) Well, not exactly. The shading on the triangles *will* be calculated correctly. But these are true flat *triangles*. So the color is exactly the same for every pixel of the triangle. This means that your tessellated surface will look like it is made up of triangles ... it will look like a geodesic dome. phong or gourand shading plays tricks with the shading so that the lighting changes across the triangle. It does this by taking the orientation of the adjoining triangles (within a mesh) into account. This is the work that needs to be done. > few words to explain my situation: > > we created some molecular viewer based on gl4java, but > it was not optimized for big molecules and didn't have > full cartoon support so we decided to use Jmol, especially > after releasing of ver.10 OK, good > surface was important feature that we had in our opengl > viewer also we had some engine to calculating electrostatic > potential for proteins based on some virtual charges > so we was able to color our surfaces in appropriate way OK, I understand. Many people are interested in surfaces. It will require several weeks of concentrated effort for me to implement it, and I simply have not been able to allocate the time to do it. No one else has asked for custom coloring, but that seems like a very good idea. > transparency was quite important too" we were able to show part of the molecule but > in the same time we were able to show whole picture by drawing > "invisible" part of the molecule as a "ghost" A future version of Jmol will support a simple transparency that will allow you to achieve this effect. > Jmol has very powerful scripting inherited from RasMol and it's very big pro argument to use Jmol Good. > thanks again for your very good answers My pleasure. > we would like to contribute to Jmol project if possible Good. Miguel ------------------------------------------------------- This SF.net email is sponsored by: IT Product Guide on ITManagersJournal Use IT products in your business? Tell us what you think of them. Give us Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more http://productguide.itmanagersjournal.com/guidepromo.tmpl _______________________________________________ Jmol-developers mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jmol-developers
