G'day,

I noticed that the ThreeDVisualizerModule uses a kind of singleton
pattern, see
http://mzmine.svn.sourceforge.net/viewvc/mzmine/trunk/src/net/sf/mzmine/modules/visualization/threed/ThreeDVisualizerModule.java?revision=2559&view=markup

I understand that this makes it possible to have the static methods
setupNew3DVisualizer(...), which are called from pop-up menus for
showing 3D plots.

What I don't understand is why?

Instead of calling ThreeDVisualizerModule.setupNew3DVisualizer(...) why
not use the standard pattern of other modules and create a new instance
each time, i.e. new ThreeDVisualizerModule().setupNew3DVisualizer(...)?

The code for the latter is much simpler and cleaner, so why not use it?

The singleton pattern seems to be used for several other modules (I
guess those ones that are called from pop-up menus too) but I'm not sure
why a single instance is needed.

Am I missing something?

Thanks,
Chris.




Syngenta Limited, Registered in England No 2710846
Registered Office : Syngenta Limited, European Regional Centre, Priestley Road, 
Surrey Research Park, Guildford, Surrey, GU2 7YH, United Kingdom



This message may contain confidential information. If you are not the 
designated recipient, please notify the sender immediately, and delete the 
original and any copies. Any use of the message by you is prohibited. 


------------------------------------------------------------------------------
The demand for IT networking professionals continues to grow, and the
demand for specialized networking skills is growing even more rapidly.
Take a complimentary Learning@Cisco Self-Assessment and learn 
about Cisco certifications, training, and career opportunities. 
http://p.sf.net/sfu/cisco-dev2dev
_______________________________________________
Mzmine-devel mailing list
Mzmine-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mzmine-devel

Reply via email to