/[classpath]/classpath/javax/swing/plaf/basic/BasicMenuUI.java
ViewVC logotype

Diff of /classpath/javax/swing/plaf/basic/BasicMenuUI.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.4 by mark, Thu Jul 22 19:45:39 2004 UTC revision 1.5 by mark, Sat Jul 31 22:56:54 2004 UTC
# Line 309  public class BasicMenuUI extends BasicMe Line 309  public class BasicMenuUI extends BasicMe
309         if (i) if this menu is a submenu in some other menu         if (i) if this menu is a submenu in some other menu
310            (ii) or if this menu is in a menu bar and some other menu in a menu bar was just            (ii) or if this menu is in a menu bar and some other menu in a menu bar was just
311                 selected. (If nothing was selected, menu should be pressed before                 selected. (If nothing was selected, menu should be pressed before
312                 it will be selected)                       it will be selected)
313        */        */
314        JMenu menu = (JMenu) menuItem;        JMenu menu = (JMenu) menuItem;
315        if (! menu.isTopLevelMenu()        if (! menu.isTopLevelMenu()
# Line 338  public class BasicMenuUI extends BasicMe Line 338  public class BasicMenuUI extends BasicMe
338        MenuSelectionManager manager = MenuSelectionManager.defaultManager();        MenuSelectionManager manager = MenuSelectionManager.defaultManager();
339        JMenu menu = (JMenu) menuItem;        JMenu menu = (JMenu) menuItem;
340        manager.processMouseEvent(e);        manager.processMouseEvent(e);
341          
342        // Menu should be displayed when the menu is pressed only if        // Menu should be displayed when the menu is pressed only if
343        // it is top-level menu        // it is top-level menu
344        if (menu.isTopLevelMenu())        if (menu.isTopLevelMenu())
345          {          {
346            if (menu.getPopupMenu().isVisible())            if (menu.getPopupMenu().isVisible())
347                // If menu is visible and menu button was pressed..              // If menu is visible and menu button was pressed..
348                // then need to cancel the menu              // then need to cancel the menu
349                manager.clearSelectedPath();              manager.clearSelectedPath();
350            else            else
351              {              {
352                // Display the menu                // Display the menu

Legend:
Removed from v.1.4  
changed lines
  Added in v.1.5

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26