diff options
author | Noel Grandin <noel@peralex.com> | 2012-08-21 08:47:59 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2012-08-28 16:15:43 +0200 |
commit | 67a5b7a8c1a1b1d9a8e458c26be3dc706ab3fabc (patch) | |
tree | 65c21899cce1a08d30fa964fa83640cb6c0def85 /toolkit/test/accessibility/ov | |
parent | ff77676612d8ca7874ba0616ff1841f556f4ddb2 (diff) |
Java5 update - convert to using generics for collections
Change-Id: I384cb006beee280922564c9277025843a1bda74a
Diffstat (limited to 'toolkit/test/accessibility/ov')
5 files changed, 13 insertions, 13 deletions
diff --git a/toolkit/test/accessibility/ov/FocusView.java b/toolkit/test/accessibility/ov/FocusView.java index da47eb293fcc..fa87ef5a7d92 100644 --- a/toolkit/test/accessibility/ov/FocusView.java +++ b/toolkit/test/accessibility/ov/FocusView.java @@ -45,7 +45,7 @@ public class FocusView ObjectViewContainer aContainer, XAccessibleContext xContext) { - XAccessibleComponent xComponent = (XAccessibleComponent)UnoRuntime.queryInterface( + XAccessibleComponent xComponent = UnoRuntime.queryInterface( XAccessibleComponent.class, xContext); if (xComponent != null) return new FocusView (aContainer); @@ -80,7 +80,7 @@ public class FocusView */ public void SetObject (XAccessibleContext xObject) { - mxComponent = (XAccessibleComponent)UnoRuntime.queryInterface( + mxComponent = UnoRuntime.queryInterface( XAccessibleComponent.class, xObject); super.SetObject (xObject); } diff --git a/toolkit/test/accessibility/ov/ListeningObjectView.java b/toolkit/test/accessibility/ov/ListeningObjectView.java index 9b6e59a6dd2f..1b17ef973d3e 100644 --- a/toolkit/test/accessibility/ov/ListeningObjectView.java +++ b/toolkit/test/accessibility/ov/ListeningObjectView.java @@ -44,8 +44,8 @@ abstract class ListeningObjectView { super.SetObject (xContext); XAccessibleEventBroadcaster xBroadcaster = - (XAccessibleEventBroadcaster)UnoRuntime.queryInterface( - XAccessibleEventBroadcaster.class, xContext); + UnoRuntime.queryInterface( + XAccessibleEventBroadcaster.class, xContext); if (xBroadcaster != null) xBroadcaster.addEventListener (this); } @@ -58,8 +58,8 @@ abstract class ListeningObjectView { super.Destroy (); XAccessibleEventBroadcaster xBroadcaster = - (XAccessibleEventBroadcaster)UnoRuntime.queryInterface( - XAccessibleEventBroadcaster.class, mxContext); + UnoRuntime.queryInterface( + XAccessibleEventBroadcaster.class, mxContext); if (xBroadcaster != null) xBroadcaster.removeEventListener (this); } diff --git a/toolkit/test/accessibility/ov/ObjectViewContainer.java b/toolkit/test/accessibility/ov/ObjectViewContainer.java index 49916d6cc1f8..d9a9e816be1f 100644 --- a/toolkit/test/accessibility/ov/ObjectViewContainer.java +++ b/toolkit/test/accessibility/ov/ObjectViewContainer.java @@ -44,7 +44,7 @@ public class ObjectViewContainer { public ObjectViewContainer () { - maViewTemplates = new Vector (); + maViewTemplates = new Vector<Class> (); maViewBorder = BorderFactory.createBevelBorder (BevelBorder.RAISED); setLayout (new GridBagLayout ()); @@ -75,7 +75,7 @@ public class ObjectViewContainer { try { - Class aViewClass = (Class)maViewTemplates.elementAt (i); + Class aViewClass = maViewTemplates.elementAt (i); Method aCreateMethod = aViewClass.getDeclaredMethod ( "Create", new Class[] { ObjectViewContainer.class, @@ -176,5 +176,5 @@ public class ObjectViewContainer private JTree maTree; private Border maViewBorder; /// List of view templates which are instantiated when new object is set. - private Vector maViewTemplates; + private Vector<Class> maViewTemplates; } diff --git a/toolkit/test/accessibility/ov/SelectionView.java b/toolkit/test/accessibility/ov/SelectionView.java index ba5b2df8eec3..e6a06d7593c6 100644 --- a/toolkit/test/accessibility/ov/SelectionView.java +++ b/toolkit/test/accessibility/ov/SelectionView.java @@ -56,7 +56,7 @@ class SelectionView ObjectViewContainer aContainer, XAccessibleContext xContext) { - XAccessibleSelection xSelection = (XAccessibleSelection)UnoRuntime.queryInterface( + XAccessibleSelection xSelection = UnoRuntime.queryInterface( XAccessibleSelection.class, xContext); if (xSelection != null) return new SelectionView(aContainer); @@ -129,7 +129,7 @@ class SelectionView public void SetObject (XAccessibleContext xContext) { - mxSelection = (XAccessibleSelection)UnoRuntime.queryInterface( + mxSelection = UnoRuntime.queryInterface( XAccessibleSelection.class, xContext); super.SetObject (xContext); } diff --git a/toolkit/test/accessibility/ov/TextView.java b/toolkit/test/accessibility/ov/TextView.java index d5a551ef4f30..c93e6086e2f4 100644 --- a/toolkit/test/accessibility/ov/TextView.java +++ b/toolkit/test/accessibility/ov/TextView.java @@ -38,7 +38,7 @@ public class TextView ObjectViewContainer aContainer, XAccessibleContext xContext) { - XAccessibleText xText = (XAccessibleText)UnoRuntime.queryInterface( + XAccessibleText xText = UnoRuntime.queryInterface( XAccessibleText.class, xContext); if (xText != null) return new TextView (aContainer); @@ -86,7 +86,7 @@ public class TextView */ public void SetObject (XAccessibleContext xObject) { - mxText = (XAccessibleText)UnoRuntime.queryInterface( + mxText = UnoRuntime.queryInterface( XAccessibleText.class, xObject); super.SetObject (xObject); } |