src/share/classes/java/awt/Menu.java
Print this page
rev 9717 : 8039642: Fix raw and unchecked warnings in sun.awt.*
Reviewed-by:
*** 64,74 ****
initIDs();
}
AWTAccessor.setMenuAccessor(
new AWTAccessor.MenuAccessor() {
! public Vector<MenuComponent> getItems(Menu menu) {
return menu.items;
}
});
}
--- 64,74 ----
initIDs();
}
AWTAccessor.setMenuAccessor(
new AWTAccessor.MenuAccessor() {
! public Vector<MenuItem> getItems(Menu menu) {
return menu.items;
}
});
}
*** 76,86 ****
* A vector of the items that will be part of the Menu.
*
* @serial
* @see #countItems()
*/
! Vector<MenuComponent> items = new Vector<>();
/**
* This field indicates whether the menu has the
* tear of property or not. It will be set to
* <code>true</code> if the menu has the tear off
--- 76,86 ----
* A vector of the items that will be part of the Menu.
*
* @serial
* @see #countItems()
*/
! Vector<MenuItem> items = new Vector<>();
/**
* This field indicates whether the menu has the
* tear of property or not. It will be set to
* <code>true</code> if the menu has the tear off
*** 250,260 ****
/*
* This is called by the native code, so client code can't
* be called on the toolkit thread.
*/
final MenuItem getItemImpl(int index) {
! return (MenuItem)items.elementAt(index);
}
/**
* Adds the specified menu item to this menu. If the
* menu item has been part of another menu, removes it
--- 250,260 ----
/*
* This is called by the native code, so client code can't
* be called on the toolkit thread.
*/
final MenuItem getItemImpl(int index) {
! return items.elementAt(index);
}
/**
* Adds the specified menu item to this menu. If the
* menu item has been part of another menu, removes it
*** 542,552 ****
throws IOException, ClassNotFoundException, HeadlessException
{
// HeadlessException will be thrown from MenuComponent's readObject
s.defaultReadObject();
for(int i = 0; i < items.size(); i++) {
! MenuItem item = (MenuItem)items.elementAt(i);
item.parent = this;
}
}
/**
--- 542,552 ----
throws IOException, ClassNotFoundException, HeadlessException
{
// HeadlessException will be thrown from MenuComponent's readObject
s.defaultReadObject();
for(int i = 0; i < items.size(); i++) {
! MenuItem item = items.elementAt(i);
item.parent = this;
}
}
/**