protected void insertCommandMenuItems() { for (int i = 0; i < commandManager.getNumCommands(); i++) { insertCommandMenuItem(commandManager.getCommandAt(i)); } }
protected final void configureCommandsByResourceBundle() { ResourceBundle resourceBundle = getResourceBundle(); if (resourceBundle == null) { return; } for (int i = 0; i < commandManager.getNumCommands(); i++) { commandManager.getCommandAt(i).configure(resourceBundle); } }
protected final void insertCommandToolBarButtons(JToolBar toolbar) { String[] toolBarGroups = getToolBarGroups(); if (toolBarGroups == null) { return; } boolean toolAdded = false; for (String toolBarGroup : toolBarGroups) { if (toolAdded) { toolbar.addSeparator(); toolAdded = false; } for (int j = 0; j < commandManager.getNumCommands(); j++) { Command command = commandManager.getCommandAt(j); // @todo 2 nf/nf - ask whether location=toolbar or not if (command instanceof ExecCommand && command.getLargeIcon() != null) { String rootParent = findRootParent(command); if ((rootParent == null && toolBarGroup == null) || (rootParent != null && rootParent.equalsIgnoreCase(toolBarGroup))) { AbstractButton button = command.createToolBarButton(); if (button != null) { toolbar.add(button); } toolAdded = true; } } } } }
final int numCommands = _commandManager.getNumCommands(); for (int i = 0; i < numCommands; i++) { final Command command = _commandManager.getCommandAt(i);