Hi Giancarlo, If I may suggest, if you want one JFrame for each OO document, you may want to implement a set of ref to OO document for which you already created a JFrame. This should go in your singleton class as it is shared within the OO calls to dispatch. I can't provide you a code snippet as I do not have any IDE on my laptop but look at http://java.sun.com/j2se/1.5.0/docs/api/java/util/Set.html
Regards, Christophe ----- Message d'origine ---- De : Tobias Krais <[email protected]> À : [email protected] Envoyé le : Mercredi, 11 Mars 2009, 12h31mn 10s Objet : Re: [api-dev] running extension once Hi Giancarlo, > I've created the extension through the NetBeans plugin for OOo wizard, > so I've only added my methods and I call them from the "dispatch( )", I > wouldn't like to modify the java code created by the wizard... you don't have to change much. Add an additional (singleton) class (see below) to your extension with the static member and just check this member. Thats it. -----%<----- public class Checker { private static volatile Checker INSTANCE; public static volatile boolean isActive = false; public static Checker getInstance() { if(INSTANCE == null) synchronized (Checker.class) { if (INSTANCE == null) { INSTANCE = new Checker(); } } return INSTANCE; } -----%<---- Greetings, Tobias --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
