From: Konstantin T. <an...@ya...> - 2009-12-16 13:46:36
|
> > 1. I've created JCPGUI_openoffice.properties. But I've introduced new menu > > actions, and they need to be translated. But JCPMenuTextMaker has private > > constructor, so it can't be extended. Addition of entries for my specific > > guistring is bad solution. How to do it properly? > Probably best is to change the constructor. I did not think about extending it > when doing it, but clearly see the point. Protected should make extension > possible while keeping the singleton pattern, I think? I've changed it to protected and extended with my strings. Problem is that I use slightly extended version of JChemPaintPanel, and it uses JCPMenuTextMaker everywhere. I don't think that to copy sources and replace JCPMenuTextMaker with my class is good solution (it could simply be broken in case of changes inside JCP). Maybe it's possible to add ability to store in JChemPaintPanel (or AbstractJChemPaintPanel), what derivative of JCPMenuTextMaker to use? -- Regards, Konstantin |