diff options
author | Noel Grandin <noel@peralex.com> | 2012-09-07 10:23:54 +0200 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2012-09-10 23:43:38 +0200 |
commit | 0f1dba83596b5e8e19203892cb1334b6bbe8f147 (patch) | |
tree | 325c31fa8dae055097e2352b8de07e78643d26e0 /odk/examples/DevelopersGuide/Accessibility/EventListenerProxy.java | |
parent | b89ae706c2b959dd41e821abc2efe1d4ba79de81 (diff) |
Java5 cleanup, cleanup Vector and ArrayList to use generics
Change-Id: I7c2a3346f5c089424377302e1029b6f6aa971d76
Diffstat (limited to 'odk/examples/DevelopersGuide/Accessibility/EventListenerProxy.java')
-rw-r--r-- | odk/examples/DevelopersGuide/Accessibility/EventListenerProxy.java | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/odk/examples/DevelopersGuide/Accessibility/EventListenerProxy.java b/odk/examples/DevelopersGuide/Accessibility/EventListenerProxy.java index 273f6146a6cc..77d85b9a79ec 100644 --- a/odk/examples/DevelopersGuide/Accessibility/EventListenerProxy.java +++ b/odk/examples/DevelopersGuide/Accessibility/EventListenerProxy.java @@ -66,7 +66,7 @@ class EventListenerProxy mbAsynchron = true; if (mbAsynchron) { - maEventQueue = new LinkedList(); + maEventQueue = new LinkedList<Runnable>(); new Thread (this, "EventListenerProxy").start(); } } @@ -105,7 +105,7 @@ class EventListenerProxy synchronized (maEventQueue) { if (maEventQueue.size() > 0) - aEvent = (Runnable)maEventQueue.removeFirst(); + aEvent = maEventQueue.removeFirst(); else aEvent = null; } @@ -174,7 +174,7 @@ class EventListenerProxy public void run() { maListener.windowOpened ( - (XAccessible) UnoRuntime.queryInterface( + UnoRuntime.queryInterface( XAccessible.class, aEvent.Source)); } @@ -192,7 +192,7 @@ class EventListenerProxy public void run() { maListener.windowClosed ( - (XAccessible) UnoRuntime.queryInterface( + UnoRuntime.queryInterface( XAccessible.class, aEvent.Source)); } @@ -219,7 +219,7 @@ class EventListenerProxy The queue object will also serve as lock for the consumer/producer type syncronization. */ - private LinkedList maEventQueue; + private LinkedList<Runnable> maEventQueue; /** This is the actual listener that the events will eventually forwarded to. */ |