API for getting the menu for save image

User 771250cdd7

11-02-2008 20:22:50

In Marvin version 4.1.14 and early, The MViewPane object contains a method
Code:
makeSaveImageMenu(java.awt.Container menu)
which creates a list of menu items with different image export types.





However in Marvin version 5.0.0, the method is removed from the API. I would like to know if there is an equivalent method in 5.0 replace the
Code:
makeSaveImageMenu(java.awt.Container menu)
, or if there are some equivalent codes that can produce the same menu.

ChemAxon 909aee4527

13-02-2008 10:25:52

Dear Eric,





my colleague who can help you in this matter is currectly not available.


He will respond you in a couple of days.





Kind regards,


Judit

ChemAxon 7c2d26e5cf

16-02-2008 10:52:03

Since Marvin 5.0, Save Image sub menu is replaced by a single menu item: "Save Image(s)...". It displays a file chooser dialog where you can select the desired output format.


Instead of MViewPane.makeSaveImageMenu(Container), you can insert the Save image option into your menu with the help of the save image action.


Code:
MViewPane viewPane = ...


viewPane.getCommonActions().getSaveImageAction().addTo(menu);