src/java.desktop/unix/classes/sun/awt/X11/XBaseMenuWindow.java
Print this page
*** 1,7 ****
/*
! * Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
--- 1,7 ----
/*
! * Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
*** 324,336 ****
* Adds item to end of items vector.
* Note that this function does not perform
* check for adding duplicate items
* @param item item to add
*/
- @SuppressWarnings("deprecation")
public void addItem(MenuItem item) {
! XMenuItemPeer mp = (XMenuItemPeer)item.getPeer();
if (mp != null) {
mp.setContainer(this);
synchronized(getMenuTreeLock()) {
items.add(mp);
}
--- 324,335 ----
* Adds item to end of items vector.
* Note that this function does not perform
* check for adding duplicate items
* @param item item to add
*/
public void addItem(MenuItem item) {
! XMenuItemPeer mp = AWTAccessor.getMenuComponentAccessor().getPeer(item);
if (mp != null) {
mp.setContainer(this);
synchronized(getMenuTreeLock()) {
items.add(mp);
}