Ariel : On Fri, Apr 4, 2008 at 5:18 PM, Ariel Constenla-Haile wrote: > > > > > Currently i do this within a swing timer thread that does all these > > checks perioidically on the document and changes the state of the > > toolbar approriately. However this is quite expensive as I have to do > > all the checks everytime in the timer thread. > > > > Is there a standard way I can make openoffice send notifications to my > > application about such changes ? I have been looking at attaching an > > XEventLister to the document's XComponent object and notifiying the > > application from within the XEventListener class .... but is this the > > correct way to do it ? or is there a better way to do this ? > > > > first you should try to avoid the use of swing (or other Java gui) within > OOo, as I read it somewhere > (http://tools.openoffice.org/policies/java_usage.html): "OOo Java > implementations must not use swing, either because no free swing > implemetation is available or because it makes the user interface > inconsistent" >
Actually Swing provides certain kinds of controls (treetable, table, datetime widget) which are not available within the UNO control set...and so I had to resort to swing. I have not had any major swing threading issues, though the UI does look a bit strange. There is a free swing implementation now ... OpenJDK :-) > I think this is true: we should try that our extensions look consistent > with the general OOo look & feel. > Second, if you were using OOo API instead of a Java GUI with a toolbar, you > could achieve what you're trying to do using the so called "Complex Toolbar > Controls" functionaly, as explainer in > http://wiki.services.openoffice.org/wiki/Framework/Article/Generic_UNO_Interfaces_for_complex_toolbar_controls > and illustrated in the SDK example > $SDK_HOME/examples/cpp/complextoolbarcontrols > Too far down to use this route now ! ashok --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
