src/share/classes/javax/swing/MenuSelectionManager.java
Print this page
@@ -219,11 +219,10 @@
Rectangle r2;
int cWidth,cHeight;
MenuElement menuElement;
MenuElement subElements[];
MenuElement path[];
- Vector<MenuElement> tmp;
int selectionSize;
p = event.getPoint();
Component source = event.getComponent();
@@ -248,11 +247,12 @@
}
screenX = p.x;
screenY = p.y;
- tmp = (Vector<MenuElement>)selection.clone();
+ @SuppressWarnings("unchecked")
+ Vector<MenuElement> tmp = (Vector<MenuElement>)selection.clone();
selectionSize = tmp.size();
boolean success = false;
for (i=selectionSize - 1;i >= 0 && success == false; i--) {
menuElement = tmp.elementAt(i);
subElements = menuElement.getSubElements();
@@ -383,19 +383,19 @@
Component mc;
Rectangle r2;
int cWidth,cHeight;
MenuElement menuElement;
MenuElement subElements[];
- Vector<MenuElement> tmp;
int selectionSize;
SwingUtilities.convertPointToScreen(p,source);
screenX = p.x;
screenY = p.y;
- tmp = (Vector<MenuElement>)selection.clone();
+ @SuppressWarnings("unchecked")
+ Vector<MenuElement> tmp = (Vector<MenuElement>)selection.clone();
selectionSize = tmp.size();
for(i=selectionSize - 1 ; i >= 0 ; i--) {
menuElement = tmp.elementAt(i);
subElements = menuElement.getSubElements();