GUI Customization

User 3d7989d1a7

28-05-2010 14:45:12


I have worked on creating the GUI customization I want for
my students.   However, I have
run into problems, some of which are probably me, others may be bugs.


1.     I
am using Mac OSX 10.6.3, Java 1.6.0_20-b02-279-10M3065, marvin 5.3.3


2.     I
have moved the marvin directory out of MarvinBeans  and into a directory related to the programs I am
writing.  The programs themselves
are set to link to that marvin directory for the applet to run and it
successfully does so.


3.     I
have done the customization process in iterations, at each step copying the
customization file in .chemaxon/5.3.3 with a new name.  That leaves me with an iterative backup
in case of errors.


4.     I
am using the Marvin configuration.


5.     I
find that the simple template (rings) is not checked in the view menu, though
it is visible and can be used. 
Using that menu to turn it on or off changes nothing.


6.     Using
view>customization>simple template does allow me to turn off any of the
rings, though it has no actual affect on the canvas.   They are all still on.


7.     Adding
the rings I want to the tools toolbar puts icons there, but they are inactive.


8.     I
frequently have issues with icons I install on toolbars being inactive.   Other times they are active.  (Another reason for the iterative
exercise described above.) 


So at this point I have a customization.xml file and a
variety of change files under different names in 5.3.3.


 Your directions now say to move that file to be “beside the
MarvinSketch applet”.  In the
marvin directory, I find no jar file named MarvinSketch.   The only MarvinSketch I find on
the disk is the MarvinSketch.app whing is not a web applet as far as I can
tell.


 But I am assuming that you want me to put my customization
file in this marvin directory.  I
am also assuming that since I will call it with the menuconfig parameter, I can
name this configuration file anything I want to, as long as my name and the
menuconfig name are consistent.


I am attaching two files.  The script I am using, and the customization file I have
developed.


 What am I doing wrong?


 


 


 




User 3d7989d1a7

30-05-2010 18:40:03

I will add one further question.  Is there any way to change the background color of the toolbars -- not the canvas itself?   I can do that.  I find that the toolbars vary considerably in color across browsers from almost white to gray.  It is sometimes difficult to distinguish the toolbar from a light-colored or white background.

User 3d7989d1a7

01-06-2010 12:41:46

And another question.  You can deal with all of these at once.  I think I have the GUI customization file now recognized.   The program with applet runs on my desktop and from my sites file on the Mac.   However, when I move it to the campus web server the marvin applet does not load.   I suspect it may relate to the location of the license file.  I have read the documentatio  and see the following licenseFile param.   Does this mean that the license file must be located in a chemaxon directory at the root of the campus file system, or at the root of my web site.  It looks like it needs to be at the file system root, but I am not sure you really mean that.



Licensing Applets


Example:




//msketch_param("licenseFile", "https://www.yourserver.com/chemaxon/license.cxl");



Restrictions:



ChemAxon 7c2d26e5cf

02-06-2010 22:29:17

If I understand you correctly, you have inserted below line into your applet code but you do not see its effect.


// msketch_param("licenseFile", "https://www.yourserver.com/chemaxon/license.cxl");


I guess that the problem is the backslashes at the beginning of the line. Those lines that starts with double slashes ( // ) are evaluated as comment by JavaScript. So this parameter is neglected in this case.


Just remove the slashes from the beginning of the line to active the licenseFile parameter in your example.

User 3d7989d1a7

02-06-2010 22:44:13

This I knew!!  I was simply trying to make sure that nothing got executed in the mail"-(  However, I have solved that part of the issue.  However, there were other questions raised.   Have you looked at those?  I am particularly interested with then issue of Firefox and Java 1.6. on the PC.   Is there a workaround for this?

ChemAxon 7c2d26e5cf

02-06-2010 22:49:48

 


Is there any way to change the background color of the toolbars

No, there is no applet parameter to do that.

User 3d7989d1a7

02-06-2010 22:51:02

With the variance of browsers, I think it would be useful to have one:-)


 

ChemAxon 7c2d26e5cf

02-06-2010 23:19:30

There are too more questions in this topic. Find to follow them. :)


- Icon inactive issue is not clear for me. Do you use any icon that is not bundled with Marvin?


- Java 1.6 issue: The newer Java versions (1.6.0_19 and higher) can also cause problems.


The security policy of these versions are more stricted than previous ones. Because of it, certain untrusted contents are not allowed to download by Java. Read more about in the topic.


https://www.chemaxon.com/forum/viewpost29192.htm


Probably, resource loading issue is linking to this Java bug. But in 5.3.3 we have already implemented workarounds by those part of the code where it can cause potenial problem. I can hardly believe but it can be possible that in certain case it is still buggy.


On the other hand, I can also imagine that the referred resource are not copied to the right place.


In Marvin applet, the codebase is the marvin directory (the same directory where jmarvin.jar is situated) references to any other resources have to be given relatively to this directory. Some properties and config files are wrapped into jars.


Anyway, if you set the debug level to 4 in the java console or investigate the access log of your web server, you can see which resources could not be accessed.

ChemAxon 5433b8e56b

02-06-2010 23:23:32

Hi,


just to clarify: are you using the marvin applets package in the server? Sorry but i'm in doubt and like to be sure.


If you are using the applet package, any of the configuration files has to be on a location on the server, where the applet can load that, this location is relative to the codebase of the applet, and has to be inside the document root of the web server, to be reachable by the applet thru an http get request. Some of the configuration files have a certain and defined location, where you have to put them inside the applet codebase, all of these restricted locations are relative to the codebase of applet.


To the question about the template button background:


You can choose several Look and Feel classes in java, our applet should have use the platform default Look and Feel, but you can override it with this paramter. Currently we are not planning to add this feature, unfortunately for you, but as far as i know you are the first one who mention this feature.


Regards,
Istvan