2 * Sudokuki - essential sudoku game
\r
3 * Copyright (C) 2007-2012 Sylvain Vedrenne
\r
5 * This program is free software: you can redistribute it and/or modify
\r
6 * it under the terms of the GNU General Public License as published by
\r
7 * the Free Software Foundation, either version 3 of the License, or
\r
8 * (at your option) any later version.
\r
10 * This program is distributed in the hope that it will be useful,
\r
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
\r
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
\r
13 * GNU General Public License for more details.
\r
15 * You should have received a copy of the GNU General Public License
\r
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
\r
18 package net.jankenpoi.sudokuki.ui.swing;
\r
20 import javax.swing.JFrame;
\r
21 import javax.swing.JMenuBar;
\r
23 @SuppressWarnings("serial")
\r
24 public class MenuBar extends JMenuBar {
\r
26 private final ActionsRepository actions = new ActionsRepository();
\r
28 private final EditMenu editMenu;
\r
30 public EditMenu getEditMenu() {
\r
34 MenuBar(JFrame parent, SwingGrid grid, SwingView view) {
\r
35 add(new FileMenu(parent, actions, grid, view));
\r
36 editMenu = new EditMenu(actions, parent, view);
\r
38 add(new HelpMenu(actions, parent));
\r
41 final CheatMenu getCheatMenu() {
\r
42 return editMenu.getCheatMenu();
\r
45 final ActionsRepository getActions() {
\r
49 public LevelMenu getLevelMenu() {
\r
50 return editMenu.getLevelMenu();
\r