< prev index next >

src/java.desktop/share/classes/javax/swing/JPopupMenu.java

Print this page

        

*** 1,7 **** /* ! * Copyright (c) 1997, 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 --- 1,7 ---- /* ! * Copyright (c) 1997, 2018, 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
*** 772,782 **** } else { // This is a popup menu with MenuElement children, // set selection path before popping up! if (isPopupMenu()) { ! MenuElement me[] = new MenuElement[1]; me[0] = this; MenuSelectionManager.defaultManager().setSelectedPath(me); } } --- 772,782 ---- } else { // This is a popup menu with MenuElement children, // set selection path before popping up! if (isPopupMenu()) { ! MenuElement[] me = new MenuElement[1]; me[0] = this; MenuSelectionManager.defaultManager().setSelectedPath(me); } }
*** 1369,1379 **** /** * This method is required to conform to the * <code>MenuElement</code> interface, but it not implemented. * @see MenuElement#processMouseEvent(MouseEvent, MenuElement[], MenuSelectionManager) */ ! public void processMouseEvent(MouseEvent event,MenuElement path[],MenuSelectionManager manager) {} /** * Processes a key event forwarded from the * <code>MenuSelectionManager</code> and changes the menu selection, * if necessary, by using <code>MenuSelectionManager</code>'s API. --- 1369,1379 ---- /** * This method is required to conform to the * <code>MenuElement</code> interface, but it not implemented. * @see MenuElement#processMouseEvent(MouseEvent, MenuElement[], MenuSelectionManager) */ ! public void processMouseEvent(MouseEvent event,MenuElement[] path,MenuSelectionManager manager) {} /** * Processes a key event forwarded from the * <code>MenuSelectionManager</code> and changes the menu selection, * if necessary, by using <code>MenuSelectionManager</code>'s API.
*** 1384,1394 **** * @param e a <code>KeyEvent</code> * @param path the <code>MenuElement</code> path array * @param manager the <code>MenuSelectionManager</code> */ @SuppressWarnings("deprecation") ! public void processKeyEvent(KeyEvent e, MenuElement path[], MenuSelectionManager manager) { MenuKeyEvent mke = new MenuKeyEvent(e.getComponent(), e.getID(), e.getWhen(), e.getModifiers(), e.getKeyCode(), e.getKeyChar(), path, manager); --- 1384,1394 ---- * @param e a <code>KeyEvent</code> * @param path the <code>MenuElement</code> path array * @param manager the <code>MenuSelectionManager</code> */ @SuppressWarnings("deprecation") ! public void processKeyEvent(KeyEvent e, MenuElement[] path, MenuSelectionManager manager) { MenuKeyEvent mke = new MenuKeyEvent(e.getComponent(), e.getID(), e.getWhen(), e.getModifiers(), e.getKeyCode(), e.getKeyChar(), path, manager);
*** 1502,1512 **** * @return an array of <code>MenuElement</code> objects * @see MenuElement#getSubElements */ @BeanProperty(bound = false) public MenuElement[] getSubElements() { ! MenuElement result[]; Vector<MenuElement> tmp = new Vector<MenuElement>(); int c = getComponentCount(); int i; Component m; --- 1502,1512 ---- * @return an array of <code>MenuElement</code> objects * @see MenuElement#getSubElements */ @BeanProperty(bound = false) public MenuElement[] getSubElements() { ! MenuElement[] result; Vector<MenuElement> tmp = new Vector<MenuElement>(); int c = getComponentCount(); int i; Component m;
< prev index next >