toolbar customization

User 870ab5b546

11-09-2009 13:50:36

Hi,


I'm finally looking into upgrading to Marvin 5.  I have some questions about toolbar optimization.


(1) Is it possible to have large buttons for some of the toolbars and not others?  The select toolbar is plenty big enough the way it is, but the bond, atom, and structure templates are too small.


(2) Must there always be those thick gray borders between buttons?  Can we have larger buttons that do not have such large spaces between them?


(3) Must the toolbar background be gray?


(4) One cyclopentane is enough for me, so I wanted to get rid of the house cyclopentane.  But I couldn't figure out how to modify the generic structures toolbar.  Is there a way to do it? I replaced the generic structures toolbar with a similar toolbar, as in the screen shot, but again, the buttons are way too small -- it's really hard to see naphthalene, for example. 


(5) I figured out how to add the individual conformers buttons to the generic structures toolbar.  I also figured out how to add to my substitute structures toolbar a Conformers button that brings up a popup with a choice of conformers.  Can I add individual conformers buttons to my substitute structures toolbar?  


-- Bob

ChemAxon 909aee4527

14-09-2009 10:50:58

Hi Bob,


I'm finally looking into upgrading to Marvin 5.

Glad to hear it


(1) Is it possible to have large buttons for
some of the toolbars and not others?  The select toolbar is plenty big
enough the way it is, but the bond, atom, and structure templates are
too small.



No, the size of the buttons is global for all toolbars. Do you think the tooltip text of the buttons is good enough to substitute the text actually displayed on them? (See marvin_toolbar1.png)


(2) Must there always be those thick gray
borders between buttons?  Can we have larger buttons that do not have
such large spaces between them?



I'm afraid the borders and spaces are defined by the Look&Feel, but we'll check if we can do anything. I suppose this is Aqua Look&Feel that is used on your screenshot, right?


(3) Must the toolbar background be gray?


The background color of the toolbar is also defined by the Look&Feel. For example in the image marvin_toolbar2.png the Nimbus L&F defines a blueish color.



(4) One cyclopentane is enough for me, so I
wanted to get rid of the house cyclopentane.  But I couldn't figure out
how to modify the generic structures toolbar.  Is there a way to do
it?

Do you mean to get rid of that template on the so-called "Advanced Templates Toolbar"? If so, yes, it is possible. You can simply delete the unwanted structure from the chemaxon/marvin/templates/generic.csmol file.


(5) I figured out how to add the individual
conformers buttons to the generic structures toolbar.  I also figured
out how to add to my substitute structures toolbar a Conformers button
that brings up a popup with a choice of conformers.  Can I
add individual conformers buttons to my substitute structures toolbar?



Unfortunately I'm not sure what you mean exactly. Basically you can add any button to any toolbar except the Advanced Templates Toolbar.


Please give me more information if I misunderstood anything.


Kind regards,
Judit


ChemAxon 909aee4527

14-09-2009 11:53:42

Do you mean to get rid of that template on the so-called "Advanced Templates Toolbar"?
If so, yes, it is possible. You can simply delete the unwanted
structure from the chemaxon/marvin/templates/generic.csmol file.



Correcting myself: you should remove the unwanted structure from the attached file and use the ttmpls1 parameter, giving the location of the edited file as described here:


Beans example: http://www.chemaxon.com/marvin/examples/beans/sketch-templates/index.html />Applet example: http://www.chemaxon.com/marvin/examples/applets/sketch/templates.html

User 870ab5b546

14-09-2009 15:24:23

Thanks, you helped me figure out how to customize the advanced templates toolbar.


The tool tips do make the select, etc. buttons clearer, but I would still rather have the text as well, but with small icons so the buttons don't get too big.  I think it would be nice to be able to specify small buttons for some of the toolbars and large ones for others, just like it is now possible to specify icons for some and both icons and text for others.


Regarding the tmpls, ttmpls, and xtmpls applet parameters: It's quite confusing that the format of the file's location is different for each one:


msketch_param("tmpls11", ":Conformers:chemaxon/marvin/templates/conformers.t");

msketch_param("ttmpls1", "*Conformers*chemaxon/marvin/templates/conformers.t");

msketch_param("xtmpls", "chemaxon/marvin/templates/conformers.t");
 


I have no idea how to set the look & feel of an applet.  Can you explain?  Can I use the configuration file to set it?

ChemAxon 909aee4527

15-09-2009 13:31:25

Bob,


thanks, we registered the request of setting the icon sizes for toolbars individually.


You can use the same format with tmpls and ttmpls parameters, the separator character is arbitrary. The xtmpls parameter is different because it doesn't require an index and a name to be set. It is just an easier usage if you have only 1 template set to define.


The Look&Feel can be set with the skin parameter.


On a Mac, you can use the following code to set the default Java L&F:


msketch_param("skin", "javax.swing.plaf.metal.MetalLookAndFeel");

On windows, this is also possible:


msketch_param("skin", "com.sun.java.swing.plaf.windows.WindowsLookAndFeel");

Please see Edit > Preferences > Display > Look&Feel for the list of the available Look&Feels.


Kind regards,
Judit

User 870ab5b546

21-09-2009 22:03:01

 












Judit wrote:

On a Mac, you can use the following code to set the default Java L&F:


msketch_param("skin", "javax.swing.plaf.metal.MetalLookAndFeel");

On windows, this is also possible:


msketch_param("skin", "com.sun.java.swing.plaf.windows.WindowsLookAndFeel");

Please see Edit > Preferences > Display > Look&Feel for the list of the available Look&Feels.


Kind regards,
Judit



We are working in a Web application.  Will the Mac command work on a Windows or Linux browser as well?  



 

ChemAxon 909aee4527

22-09-2009 06:27:53

We are working in a Web application.  Will the Mac command work on a Windows or Linux browser as well?  

Sorry for the confusion. The MetalLookAndFeel is the general Java Look&Feel that works on all platforms. I only meant that there are platform specific Look&Feels (like the Windows L&F), so using a L&F might not have effect on certain platforms.