1 import com
.sun
.star
.awt
.XTopWindowListener
;
2 import com
.sun
.star
.lang
.EventObject
;
4 class QueuedTopWindowListener
5 implements XTopWindowListener
7 public QueuedTopWindowListener (TopWindowListener aListener
)
9 maListener
= aListener
;
12 public void windowOpened (final com
.sun
.star
.lang
.EventObject aEvent
) throws RuntimeException
14 EventQueue
.Instance().addEvent (new Runnable()
18 QueuedTopWindowListener
.this.maListener
.windowOpened (aEvent
);
27 public void windowClosing (final com
.sun
.star
.lang
.EventObject aEvent
) throws RuntimeException
35 public void windowClosed (final com
.sun
.star
.lang
.EventObject aEvent
) throws RuntimeException
37 EventQueue
.Instance().addEvent (new Runnable()
41 QueuedTopWindowListener
.this.maListener
.windowClosed (aEvent
);
50 public void windowMinimized (final com
.sun
.star
.lang
.EventObject aEvent
)
51 throws RuntimeException
53 System
.out
.println ("QueuedTopWindowListener: Top window minimized: " + aEvent
);
56 public void windowNormalized (final com
.sun
.star
.lang
.EventObject aEvent
)
57 throws RuntimeException
59 System
.out
.println ("QueuedTopWindowListener: Top window normalized: " + aEvent
);
62 public void windowActivated (final com
.sun
.star
.lang
.EventObject aEvent
)
63 throws RuntimeException
65 System
.out
.println ("QueuedTopWindowListener: Top window actived: " + aEvent
);
68 public void windowDeactivated (final com
.sun
.star
.lang
.EventObject aEvent
)
69 throws RuntimeException
71 System
.out
.println ("QueuedTopWindowListener: Top window deactived: " + aEvent
);
74 public void disposing( final EventObject aEvent
)
76 EventQueue
.Instance().addDisposingEvent (new Runnable()
80 if (QueuedTopWindowListener
.this.maListener
!= null)
81 QueuedTopWindowListener
.this.maListener
.disposing (aEvent
);
87 private TopWindowListener maListener
;