src/share/classes/javax/swing/MenuSelectionManager.java

Print this page

        

*** 1,7 **** /* ! * Copyright (c) 1997, 2008, 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, 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
*** 244,254 **** tmp = (Vector<MenuElement>)selection.clone(); selectionSize = tmp.size(); boolean success = false; for (i=selectionSize - 1;i >= 0 && success == false; i--) { ! menuElement = (MenuElement) tmp.elementAt(i); subElements = menuElement.getSubElements(); path = null; for (j = 0, d = subElements.length;j < d && success == false; j++) { if (subElements[j] == null) --- 244,254 ---- 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(); path = null; for (j = 0, d = subElements.length;j < d && success == false; j++) { if (subElements[j] == null)
*** 275,285 **** (p.x >= 0 && p.x < cWidth && p.y >= 0 && p.y < cHeight)) { int k; if(path == null) { path = new MenuElement[i+2]; for(k=0;k<=i;k++) ! path[k] = (MenuElement)tmp.elementAt(k); } path[i+1] = subElements[j]; MenuElement currentSelection[] = getSelectedPath(); // Enter/exit detection -- needs tuning... --- 275,285 ---- (p.x >= 0 && p.x < cWidth && p.y >= 0 && p.y < cHeight)) { int k; if(path == null) { path = new MenuElement[i+2]; for(k=0;k<=i;k++) ! path[k] = tmp.elementAt(k); } path[i+1] = subElements[j]; MenuElement currentSelection[] = getSelectedPath(); // Enter/exit detection -- needs tuning...
*** 386,396 **** screenY = p.y; tmp = (Vector<MenuElement>)selection.clone(); selectionSize = tmp.size(); for(i=selectionSize - 1 ; i >= 0 ; i--) { ! menuElement = (MenuElement) tmp.elementAt(i); subElements = menuElement.getSubElements(); for(j = 0, d = subElements.length ; j < d ; j++) { if (subElements[j] == null) continue; --- 386,396 ---- screenY = p.y; tmp = (Vector<MenuElement>)selection.clone(); selectionSize = tmp.size(); for(i=selectionSize - 1 ; i >= 0 ; i--) { ! menuElement = tmp.elementAt(i); subElements = menuElement.getSubElements(); for(j = 0, d = subElements.length ; j < d ; j++) { if (subElements[j] == null) continue;