1 import com
.sun
.star
.accessibility
.*;
2 import com
.sun
.star
.lang
.EventObject
;
3 import com
.sun
.star
.uno
.*;
4 import com
.sun
.star
.accessibility
.*;
6 import java
.util
.LinkedList
;
9 implements XAccessibleEventListener
11 public QueuedListener (EventListener aListener
)
13 maListener
= aListener
;
17 public void disposing( final EventObject aEvent
)
19 XAccessibleContext xContext
= (XAccessibleContext
)UnoRuntime
.queryInterface(
20 XAccessibleContext
.class, aEvent
.Source
);
23 XAccessible xAccessible
= (XAccessible
)UnoRuntime
.queryInterface(
24 XAccessible
.class, aEvent
.Source
);
25 if (xAccessible
!= null)
26 xContext
= xAccessible
.getAccessibleContext();
28 final XAccessibleContext xSource
= xContext
;
29 EventQueue
.Instance().addDisposingEvent (new Runnable()
33 if (QueuedListener
.this.maListener
!= null)
34 QueuedListener
.this.maListener
.disposing (xSource
);
40 public void notifyEvent( final AccessibleEventObject aEvent
)
42 EventQueue
.Instance().addEvent (new Runnable()
46 QueuedListener
.this.maListener
.notifyEvent( aEvent
);
52 private EventListener maListener
;