2,2c2,2 < * @(#)CommandMenu.java 5.2 --- > * @(#)CommandMenu.java 3a4,9 > * Project: JHotdraw - a GUI framework for technical drawings > * http://www.jhotdraw.org > * http://jhotdraw.sourceforge.net > * Copyright: © by the original author(s) and all contributors > * License: Lesser GNU Public License (LGPL) > * http://www.opensource.org/licenses/lgpl-license.html 16a23,24 > * > * @version <$CURRENT_VERSION$> 54a63,74 > /** > * Adds a command with the given short cut to the menu. The item's label is > * the command's name. > */ > public synchronized void addCheckItem(Command command) { > JCheckBoxMenuItem m = new JCheckBoxMenuItem(command.name()); > m.setName(command.name()); > m.addActionListener(this); > add(m); > fCommands.addElement(command); > } > 81,81c101,101 < if (getMenuComponent(i) instanceof JSeparator) --- > if (getMenuComponent(i) instanceof JSeparator) { 82a103,103 > } 99,99c120,120 < if (getMenuComponent(i) instanceof JSeparator) --- > if (getMenuComponent(i) instanceof JSeparator) { 100a122,122 > }