Hi, > I guess he wants to change the string during run time, like e.g. 'Plugin X > on' -> 'Plugin X running / switch off' or so ... Oh, sorry, thank to make it clearer. > Probably the way to go is getting the menu entry out of the OJ internals. > Check how featureinstaller installs it and check the main menu for a method > to get the object. In FeatureInstaller, there is the following static method : public static JMenuItem childMenuItem(String childName, MenuElement menu) probably not very good for a menu item which may be localized, changed...
There is also 3 addMainMenuItems methods returning a JMenuItem, so that you can keep a reference. Hope one of them can do the trick Michaël > ..ede > > On 16.11.2010 19:36, Matthias Scholz wrote: >> Hi, >> >> in a OJ plugin I need to change the displayed name of a menuitem. My >> first approach was the AbstractPlugIn.getName() method. But the >> getName() was not everytime called, if an item should be displayed. >> My second idea was the featureInstaller.addMainMenuItem(...) method to >> get the menuitem. The problem is that this method returns a void :-( >> Can anybody give me a hint how can I do this? >> >> Regards >> >> Matthias >> >> ------------------------------------------------------------------------------ >> Beautiful is writing same markup. Internet Explorer 9 supports >> standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2& L3. >> Spend less time writing and rewriting code and more time creating great >> experiences on the web. Be a part of the beta today >> http://p.sf.net/sfu/msIE9-sfdev2dev >> _______________________________________________ >> Jump-pilot-devel mailing list >> Jump-pilot-devel@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel > > ------------------------------------------------------------------------------ > Beautiful is writing same markup. Internet Explorer 9 supports > standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2& L3. > Spend less time writing and rewriting code and more time creating great > experiences on the web. Be a part of the beta today > http://p.sf.net/sfu/msIE9-sfdev2dev > _______________________________________________ > Jump-pilot-devel mailing list > Jump-pilot-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel > > ------------------------------------------------------------------------------ Beautiful is writing same markup. Internet Explorer 9 supports standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2 & L3. Spend less time writing and rewriting code and more time creating great experiences on the web. Be a part of the beta today http://p.sf.net/sfu/msIE9-sfdev2dev _______________________________________________ Jump-pilot-devel mailing list Jump-pilot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel