[Picross-commit] SF.net SVN: picross:[112] branches/engine_split
Status: Pre-Alpha
Brought to you by:
yvan_norsa
From: <yva...@us...> - 2013-01-11 14:36:56
|
Revision: 112 http://sourceforge.net/p/picross/code/112 Author: yvan_norsa Date: 2013-01-11 14:36:50 +0000 (Fri, 11 Jan 2013) Log Message: ----------- android stuff Modified Paths: -------------- branches/engine_split/android/libs/picross-common.jar branches/engine_split/android/libs/picross-engine.jar branches/engine_split/android/src/picross/specific/activities/MainMenuActivityUI.java branches/engine_split/android/src/picross/specific/ui/MainMenuUI.java branches/engine_split/android/src/picross/specific/ui/MenuController.java branches/engine_split/android/src/picross/specific/ui/MenuUI.java branches/engine_split/android/src/picross/specific/ui/PicrossAndroidLogger.java branches/engine_split/common/src/picross/common/ui/AbstractPicrossMediator.java branches/engine_split/common/src/picross/common/ui/GameMenuModel.java branches/engine_split/engine/src/picross/engine/PicrossLogHelper.java branches/engine_split/engine/src/picross/engine/PicrossLogger.java branches/engine_split/swing/src/picross/specific/ui/PicrossLog4jLogger.java Added Paths: ----------- branches/engine_split/android/custom_rules.xml branches/engine_split/android/res/drawable/button_play.png branches/engine_split/android/res/drawable/button_random.png branches/engine_split/android/res/drawable/button_select.png branches/engine_split/android/servicesData/ branches/engine_split/android/servicesData/META-INF/ branches/engine_split/android/servicesData/META-INF/services/ branches/engine_split/android/servicesData/META-INF/services/picross.engine.game.GameMode branches/engine_split/android/src/picross/specific/game/random/ branches/engine_split/android/src/picross/specific/game/random/ui/ branches/engine_split/android/src/picross/specific/game/random/ui/RandomGameMediator.java branches/engine_split/android/src/picross/specific/game/random/ui/RandomGameModeUI.java branches/engine_split/android/src/picross/specific/game/random/ui/RandomGameUI.java branches/engine_split/android/src/picross/specific/game/simple/ branches/engine_split/android/src/picross/specific/game/simple/ui/ branches/engine_split/android/src/picross/specific/game/simple/ui/SimpleGameModeUI.java branches/engine_split/android/src/picross/specific/game/ui/GameUI.java branches/engine_split/android/src/picross/specific/game/ui/UIGameMode.java branches/engine_split/android/src/picross/specific/ui/GameMenuMediator.java branches/engine_split/android/src/picross/specific/ui/GameMenuUI.java branches/engine_split/android/src/picross/specific/ui/PicrossButton.java branches/engine_split/common/src/picross/specific/ui/GameMenuMediator.java branches/engine_split/engine/src/picross/engine/AbstractPicrossLogger.java branches/engine_split/swing/src/picross/specific/ui/GameMenuMediator.java Removed Paths: ------------- branches/engine_split/common/src/picross/common/ui/GameMenuMediator.java Added: branches/engine_split/android/custom_rules.xml =================================================================== --- branches/engine_split/android/custom_rules.xml (rev 0) +++ branches/engine_split/android/custom_rules.xml 2013-01-11 14:36:50 UTC (rev 112) @@ -0,0 +1,10 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<project name="PicrossDroid-custom"> + <target name="-post-package"> + + <jar destfile="${out.packaged.file}" update="true"> + <fileset dir="servicesData"/> + </jar> + </target> +</project> Modified: branches/engine_split/android/libs/picross-common.jar =================================================================== (Binary files differ) Modified: branches/engine_split/android/libs/picross-engine.jar =================================================================== (Binary files differ) Added: branches/engine_split/android/res/drawable/button_play.png =================================================================== (Binary files differ) Index: branches/engine_split/android/res/drawable/button_play.png =================================================================== --- branches/engine_split/android/res/drawable/button_play.png 2013-01-11 09:43:57 UTC (rev 111) +++ branches/engine_split/android/res/drawable/button_play.png 2013-01-11 14:36:50 UTC (rev 112) Property changes on: branches/engine_split/android/res/drawable/button_play.png ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property Added: branches/engine_split/android/res/drawable/button_random.png =================================================================== (Binary files differ) Index: branches/engine_split/android/res/drawable/button_random.png =================================================================== --- branches/engine_split/android/res/drawable/button_random.png 2013-01-11 09:43:57 UTC (rev 111) +++ branches/engine_split/android/res/drawable/button_random.png 2013-01-11 14:36:50 UTC (rev 112) Property changes on: branches/engine_split/android/res/drawable/button_random.png ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property Added: branches/engine_split/android/res/drawable/button_select.png =================================================================== (Binary files differ) Index: branches/engine_split/android/res/drawable/button_select.png =================================================================== --- branches/engine_split/android/res/drawable/button_select.png 2013-01-11 09:43:57 UTC (rev 111) +++ branches/engine_split/android/res/drawable/button_select.png 2013-01-11 14:36:50 UTC (rev 112) Property changes on: branches/engine_split/android/res/drawable/button_select.png ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property Added: branches/engine_split/android/servicesData/META-INF/services/picross.engine.game.GameMode =================================================================== --- branches/engine_split/android/servicesData/META-INF/services/picross.engine.game.GameMode (rev 0) +++ branches/engine_split/android/servicesData/META-INF/services/picross.engine.game.GameMode 2013-01-11 14:36:50 UTC (rev 112) @@ -0,0 +1,2 @@ +picross.specific.game.random.ui.RandomGameModeUI +picross.specific.game.simple.ui.SimpleGameModeUI Modified: branches/engine_split/android/src/picross/specific/activities/MainMenuActivityUI.java =================================================================== --- branches/engine_split/android/src/picross/specific/activities/MainMenuActivityUI.java 2013-01-11 09:43:57 UTC (rev 111) +++ branches/engine_split/android/src/picross/specific/activities/MainMenuActivityUI.java 2013-01-11 14:36:50 UTC (rev 112) @@ -49,10 +49,10 @@ private static final long serialVersionUID = -505088917693050187L; /** "Play" button X coordinate. */ - private static final int PLAY_BUTTON_X = 50; + private static final int PLAY_BUTTON_X = 0;//50; /** "Play" button Y coordinate. */ - private static final int PLAY_BUTTON_Y = 225; + private static final int PLAY_BUTTON_Y = 0;//225; public MainMenuActivityUI(Context androidContext) { super(androidContext); Added: branches/engine_split/android/src/picross/specific/game/random/ui/RandomGameMediator.java =================================================================== --- branches/engine_split/android/src/picross/specific/game/random/ui/RandomGameMediator.java (rev 0) +++ branches/engine_split/android/src/picross/specific/game/random/ui/RandomGameMediator.java 2013-01-11 14:36:50 UTC (rev 112) @@ -0,0 +1,99 @@ +/* + * $Id$ + * + * Copyright (c) 2007-2011 + * + * This software is governed by the CeCILL license under French law and + * abiding by the rules of distribution of free software. You can use, + * modify and/ or redistribute the software under the terms of the CeCILL + * license as circulated by CEA, CNRS and INRIA at the following URL + * "http://www.cecill.info". + * + * As a counterpart to the access to the source code and rights to copy, + * modify and redistribute granted by the license, users are provided only + * with a limited warranty and the software's author, the holder of the + * economic rights, and the successive licensors have only limited + * liability. + * + * In this respect, the user's attention is drawn to the risks associated + * with loading, using, modifying and/or developing or reproducing the + * software by the user in light of its specific status of free software, + * that may mean that it is complicated to manipulate, and that also + * therefore means that it is reserved for developers and experienced + * professionals having in-depth computer knowledge. Users are therefore + * encouraged to load and test the software's suitability as regards their + * requirements in conditions enabling the security of their systems and/or + * data to be ensured and, more generally, to use and operate it in the + * same conditions as regards security. + * + * The fact that you are presently reading this means that you have had + * knowledge of the CeCILL license and that you accept its terms. + */ + + +package picross.specific.game.random.ui; + +import fr.cle.mmvcs.SimpleEvent; + +import picross.engine.game.random.RandomPicrossModel; + +//import picross.specific.game.ui.GameController; +import picross.specific.game.ui.GameMediator; +import picross.specific.game.ui.GameUI; + +import picross.engine.grid.PicrossGrid; + +import picross.common.grid.ui.GridView; + +import picross.specific.ui.MenuController; + +/** + * This object handles a random grid game. + * + * @author Y. Norsa + */ +public final class RandomGameMediator extends GameMediator { + /*** Methods overloaded from the class GameMediator ***/ + + /** {@inheritDoc} */ + /* + @Override + protected GameUI initView(int width, int height, GridView gridView, + MenuController controller) { + return new RandomGameUI(width, height, gridView, + controller); + } + */ + /** {@inheritDoc} */ + // FIXME + /* + @Override + protected GameController initController() { + return new RandomGameController(); + } + */ + /** {@inheritDoc} */ + + @Override + protected PicrossGrid initModel() { + // FIXME + //return new RandomPicrossModel(); + return null; + } + + /** {@inheritDoc} */ + @Override + public void eventPerformed(SimpleEvent e) { + String cmd = e.getCommandName(); + // FIXME + /* + if (cmd.equals(RandomGameController.NEXT_CMD)) { + this.fireEventPerformed(RandomGameModeUI.getRandomGameCommand()); + + return; + } + */ + // We want to relay other events, such as GRID_FILLED_CMD + super.eventPerformed(e); + } +} Property changes on: branches/engine_split/android/src/picross/specific/game/random/ui/RandomGameMediator.java ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Added: branches/engine_split/android/src/picross/specific/game/random/ui/RandomGameModeUI.java =================================================================== --- branches/engine_split/android/src/picross/specific/game/random/ui/RandomGameModeUI.java (rev 0) +++ branches/engine_split/android/src/picross/specific/game/random/ui/RandomGameModeUI.java 2013-01-11 14:36:50 UTC (rev 112) @@ -0,0 +1,98 @@ +/* + * $Id$ + * + * Copyright (c) 2008 + * + * This software is governed by the CeCILL license under French law and + * abiding by the rules of distribution of free software. You can use, + * modify and/ or redistribute the software under the terms of the CeCILL + * license as circulated by CEA, CNRS and INRIA at the following URL + * "http://www.cecill.info". + * + * As a counterpart to the access to the source code and rights to copy, + * modify and redistribute granted by the license, users are provided only + * with a limited warranty and the software's author, the holder of the + * economic rights, and the successive licensors have only limited + * liability. + * + * In this respect, the user's attention is drawn to the risks associated + * with loading, using, modifying and/or developing or reproducing the + * software by the user in light of its specific status of free software, + * that may mean that it is complicated to manipulate, and that also + * therefore means that it is reserved for developers and experienced + * professionals having in-depth computer knowledge. Users are therefore + * encouraged to load and test the software's suitability as regards their + * requirements in conditions enabling the security of their systems and/or + * data to be ensured and, more generally, to use and operate it in the + * same conditions as regards security. + * + * The fact that you are presently reading this means that you have had + * knowledge of the CeCILL license and that you accept its terms. + */ + + +package picross.specific.game.random.ui; + +import fr.cle.core.gui.SimpleButton; + +import fr.cle.mmvcs.SimpleEvent; + +import picross.engine.game.random.RandomGameMode; + +import picross.common.game.ui.GameCommand; +import picross.specific.game.ui.UIGameMode; + +import picross.specific.ui.PicrossButton; +import picross.specific.ui.PicrossUIHelper; + +import picross.specific.activities.R; + +/** + * Random game mode. + * + * @author Y. Norsa + */ +public final class RandomGameModeUI extends RandomGameMode + implements UIGameMode { + + /*** Constants ***/ + + /** Image for the "random" button. */ + private static final String RANDOM_BUTTON_IMAGE = "button-random.png"; + + /** "Random" button X coordinate. */ + private static final int RANDOM_BUTTON_X = 150; + + /** "Random" button Y coordinate. */ + private static final int RANDOM_BUTTON_Y = 175; + + /*** Static method ***/ + + /** + * Returns the command corresponding to a new random grid. + * + * @return a game command for a new random grid + */ + public static GameCommand getRandomGameCommand() { + return new GameCommand(new RandomGameMediator()); + } + + /*** Method implanted from the interface GameMode ***/ + + /** {@inheritDoc} */ + @Override + //public SimpleButton<JButton> getButton() { + public PicrossButton getButton() { + SimpleEvent event = + new SimpleEvent(RandomGameModeUI.getRandomGameCommand()); + // FIXME + /* + ImageIcon icon = + PicrossUIHelper.getLocalizedImage(RandomGameModeUI.RANDOM_BUTTON_IMAGE); + + return new PicrossButton(icon, event); + */ + return new PicrossButton(R.drawable.button_random, event); + } +} + Property changes on: branches/engine_split/android/src/picross/specific/game/random/ui/RandomGameModeUI.java ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Added: branches/engine_split/android/src/picross/specific/game/random/ui/RandomGameUI.java =================================================================== --- branches/engine_split/android/src/picross/specific/game/random/ui/RandomGameUI.java (rev 0) +++ branches/engine_split/android/src/picross/specific/game/random/ui/RandomGameUI.java 2013-01-11 14:36:50 UTC (rev 112) @@ -0,0 +1,79 @@ +/* + * $Id$ + * + * Copyright (c) 2007-2011 + * + * This software is governed by the CeCILL license under French law and + * abiding by the rules of distribution of free software. You can use, + * modify and/ or redistribute the software under the terms of the CeCILL + * license as circulated by CEA, CNRS and INRIA at the following URL + * "http://www.cecill.info". + * + * As a counterpart to the access to the source code and rights to copy, + * modify and redistribute granted by the license, users are provided only + * with a limited warranty and the software's author, the holder of the + * economic rights, and the successive licensors have only limited + * liability. + * + * In this respect, the user's attention is drawn to the risks associated + * with loading, using, modifying and/or developing or reproducing the + * software by the user in light of its specific status of free software, + * that may mean that it is complicated to manipulate, and that also + * therefore means that it is reserved for developers and experienced + * professionals having in-depth computer knowledge. Users are therefore + * encouraged to load and test the software's suitability as regards their + * requirements in conditions enabling the security of their systems and/or + * data to be ensured and, more generally, to use and operate it in the + * same conditions as regards security. + * + * The fact that you are presently reading this means that you have had + * knowledge of the CeCILL license and that you accept its terms. + */ + + +package picross.specific.game.random.ui; + +import bundleHelper.BundleHelper; + +import picross.specific.game.ui.GameUI; + +import picross.common.grid.ui.GridView; + +import picross.specific.ui.MenuController; + +/** + * Custom UI for a random game. + * + * @author Y. Norsa + */ +final class RandomGameUI extends GameUI { + /*** Constant ***/ + + /** Serialisation ID. */ + private static final long serialVersionUID = -5378941563835370491L; + + /*** Constructor ***/ + + /** + * Constructor. + * + * @param width the grid width + * @param height the grid height + * @param grid the grid + * @param controller the UI controller + */ + RandomGameUI(int width, int height, GridView grid, + MenuController controller) { + super(width, height, grid, controller); + + // FIXME + /* + JButton nextButton = + new JButton(BundleHelper.getString(this, "anotherGrid")); + nextButton.addActionListener(controller); + nextButton.setActionCommand(RandomGameController.NEXT_CMD); + + this.addButton(nextButton); + */ + } +} Property changes on: branches/engine_split/android/src/picross/specific/game/random/ui/RandomGameUI.java ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Added: branches/engine_split/android/src/picross/specific/game/simple/ui/SimpleGameModeUI.java =================================================================== --- branches/engine_split/android/src/picross/specific/game/simple/ui/SimpleGameModeUI.java (rev 0) +++ branches/engine_split/android/src/picross/specific/game/simple/ui/SimpleGameModeUI.java 2013-01-11 14:36:50 UTC (rev 112) @@ -0,0 +1,86 @@ +/* + * $Id$ + * + * Copyright (c) 2008 + * + * This software is governed by the CeCILL license under French law and + * abiding by the rules of distribution of free software. You can use, + * modify and/ or redistribute the software under the terms of the CeCILL + * license as circulated by CEA, CNRS and INRIA at the following URL + * "http://www.cecill.info". + * + * As a counterpart to the access to the source code and rights to copy, + * modify and redistribute granted by the license, users are provided only + * with a limited warranty and the software's author, the holder of the + * economic rights, and the successive licensors have only limited + * liability. + * + * In this respect, the user's attention is drawn to the risks associated + * with loading, using, modifying and/or developing or reproducing the + * software by the user in light of its specific status of free software, + * that may mean that it is complicated to manipulate, and that also + * therefore means that it is reserved for developers and experienced + * professionals having in-depth computer knowledge. Users are therefore + * encouraged to load and test the software's suitability as regards their + * requirements in conditions enabling the security of their systems and/or + * data to be ensured and, more generally, to use and operate it in the + * same conditions as regards security. + * + * The fact that you are presently reading this means that you have had + * knowledge of the CeCILL license and that you accept its terms. + */ + + +package picross.specific.game.simple.ui; + +import fr.cle.core.gui.SimpleButton; + +import fr.cle.mmvcs.SimpleEvent; + +import picross.engine.game.GameMode; + +import picross.engine.game.simple.SimpleGameMode; + +import picross.specific.game.ui.UIGameMode; +import picross.common.game.simple.ui.LevelMenuMediator; + +import picross.common.ui.MenuCommand; +import picross.specific.ui.PicrossButton; +import picross.specific.ui.PicrossUIHelper; + +import picross.specific.activities.R; + +/** + * Simple game mode. + * + * @author Y. Norsa + */ +public final class SimpleGameModeUI extends SimpleGameMode + implements UIGameMode { + + /*** Constant ***/ + + /** Image for the "select" button. */ + private static final String SELECT_BUTTON_IMAGE = "button-select.png"; + + /** "Select" button X coordinate. */ + private static final int SELECT_BUTTON_X = 150; + + /** "Select" button Y coordinate. */ + private static final int SELECT_BUTTON_Y = 250; + + /*** Method implanted from the interface GameMode ***/ + + /** {@inheritDoc} */ + @Override + //public SimpleButton<JButton> getButton() { + public PicrossButton getButton() { + //ImageIcon icon = + //PicrossUIHelper.getLocalizedImage(SimpleGameModeUI.SELECT_BUTTON_IMAGE); + SimpleEvent event = + new SimpleEvent(new MenuCommand(LevelMenuMediator.class)); + + return new PicrossButton(R.drawable.button_select, event); + } +} + Property changes on: branches/engine_split/android/src/picross/specific/game/simple/ui/SimpleGameModeUI.java ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Added: branches/engine_split/android/src/picross/specific/game/ui/GameUI.java =================================================================== --- branches/engine_split/android/src/picross/specific/game/ui/GameUI.java (rev 0) +++ branches/engine_split/android/src/picross/specific/game/ui/GameUI.java 2013-01-11 14:36:50 UTC (rev 112) @@ -0,0 +1,133 @@ +/* + * $Id$ + * + * Copyright (c) 2007-2011 + * + * This software is governed by the CeCILL license under French law and + * abiding by the rules of distribution of free software. You can use, + * modify and/ or redistribute the software under the terms of the CeCILL + * license as circulated by CEA, CNRS and INRIA at the following URL + * "http://www.cecill.info". + * + * As a counterpart to the access to the source code and rights to copy, + * modify and redistribute granted by the license, users are provided only + * with a limited warranty and the software's author, the holder of the + * economic rights, and the successive licensors have only limited + * liability. + * + * In this respect, the user's attention is drawn to the risks associated + * with loading, using, modifying and/or developing or reproducing the + * software by the user in light of its specific status of free software, + * that may mean that it is complicated to manipulate, and that also + * therefore means that it is reserved for developers and experienced + * professionals having in-depth computer knowledge. Users are therefore + * encouraged to load and test the software's suitability as regards their + * requirements in conditions enabling the security of their systems and/or + * data to be ensured and, more generally, to use and operate it in the + * same conditions as regards security. + * + * The fact that you are presently reading this means that you have had + * knowledge of the CeCILL license and that you accept its terms. + */ + + +package picross.specific.game.ui; + +import bundleHelper.BundleHelper; + +import picross.common.ui.PicrossController; + +import picross.common.grid.ui.GridView; + +import picross.common.game.ui.GameView; + + +import picross.specific.ui.MenuController; +import picross.specific.ui.PicrossButton; + +/** + * The game UI. + * + * @author Y. Norsa + */ +// FIXME +public class GameUI /*extends JPanel*/ implements GameView { + /*** Constant ***/ + + /** Serialisation ID. */ + private static final long serialVersionUID = 5888877041010228476L; + + /*** Field ***/ + + /** Panel holding the buttons. */ + //private JPanel buttonsPanel; + + /*** Constructor ***/ + + /** + * Constructor. + * + * @param width the grid width + * @param height the grid height + * @param grid the grid + * @param listener listener for the buttons + */ + //public GameUI(int width, int height, JPanel grid, + public GameUI(int width, int height, GridView grid, + MenuController listener) { + super(); + // FIXME + /* + this.setLayout(new BorderLayout()); + + JPanel topPanel = new JPanel(new BorderLayout()); + topPanel.setLayout(new BoxLayout(topPanel, BoxLayout.Y_AXIS)); + + JPanel contentPanel = new JPanel(); + contentPanel.setLayout(new BoxLayout(contentPanel, + BoxLayout.Y_AXIS)); + + JPanel infosPanel = new JPanel(new FlowLayout(FlowLayout.LEFT)); + infosPanel.setBackground(Color.WHITE); + + JLabel infos = new JLabel(BundleHelper.getString(this, + "gridSize") + + " : " + width + "*" + height); + + infosPanel.add(infos); + + topPanel.add(infosPanel); + topPanel.add(new JSeparator()); + + this.buttonsPanel = new JPanel(new FlowLayout(FlowLayout.LEFT)); + this.buttonsPanel.setBackground(Color.WHITE); + + JButton menuButton = new JButton(BundleHelper.getString(this, + "menuButton")); + menuButton.addActionListener(listener); + menuButton.setActionCommand(PicrossController.QUIT_CMD); + this.buttonsPanel.add(menuButton); + + topPanel.add(this.buttonsPanel); + topPanel.add(new JSeparator()); + + topPanel.add(contentPanel, BorderLayout.LINE_START); + + this.add(topPanel, BorderLayout.PAGE_START); + this.add((Component) grid, BorderLayout.CENTER); + */ + } + + /*** Method ***/ + + /** + * Helper method to add a button. + * + * @param button the button to add + */ + //protected void addButton(JButton button) { + protected void addButton(PicrossButton button) { + // FIXME + //this.buttonsPanel.add(button); + } +} Property changes on: branches/engine_split/android/src/picross/specific/game/ui/GameUI.java ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Added: branches/engine_split/android/src/picross/specific/game/ui/UIGameMode.java =================================================================== --- branches/engine_split/android/src/picross/specific/game/ui/UIGameMode.java (rev 0) +++ branches/engine_split/android/src/picross/specific/game/ui/UIGameMode.java 2013-01-11 14:36:50 UTC (rev 112) @@ -0,0 +1,58 @@ +/* + * $Id$ + * + * Copyright (c) 2008 + * + * This software is governed by the CeCILL license under French law and + * abiding by the rules of distribution of free software. You can use, + * modify and/ or redistribute the software under the terms of the CeCILL + * license as circulated by CEA, CNRS and INRIA at the following URL + * "http://www.cecill.info". + * + * As a counterpart to the access to the source code and rights to copy, + * modify and redistribute granted by the license, users are provided only + * with a limited warranty and the software's author, the holder of the + * economic rights, and the successive licensors have only limited + * liability. + * + * In this respect, the user's attention is drawn to the risks associated + * with loading, using, modifying and/or developing or reproducing the + * software by the user in light of its specific status of free software, + * that may mean that it is complicated to manipulate, and that also + * therefore means that it is reserved for developers and experienced + * professionals having in-depth computer knowledge. Users are therefore + * encouraged to load and test the software's suitability as regards their + * requirements in conditions enabling the security of their systems and/or + * data to be ensured and, more generally, to use and operate it in the + * same conditions as regards security. + * + * The fact that you are presently reading this means that you have had + * knowledge of the CeCILL license and that you accept its terms. + */ + + +package picross.specific.game.ui; + +import fr.cle.core.gui.SimpleButton; + +//import javax.swing.JButton; + +import picross.engine.game.GameMode; + +import picross.specific.ui.PicrossButton; + +/** + * Service describing a game mode. + * + * @author Y. Norsa + */ +public interface UIGameMode extends GameMode { + /** + * Button used to access this game mode. + * + * @return a button that can be added to a menu + */ + //SimpleButton<JButton> getButton(); + PicrossButton getButton(); +} + Property changes on: branches/engine_split/android/src/picross/specific/game/ui/UIGameMode.java ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Added: branches/engine_split/android/src/picross/specific/ui/GameMenuMediator.java =================================================================== --- branches/engine_split/android/src/picross/specific/ui/GameMenuMediator.java (rev 0) +++ branches/engine_split/android/src/picross/specific/ui/GameMenuMediator.java 2013-01-11 14:36:50 UTC (rev 112) @@ -0,0 +1,71 @@ +/* + * $Id$ + * + * Copyright (c) 2008 + * + * This software is governed by the CeCILL license under French law and + * abiding by the rules of distribution of free software. You can use, + * modify and/ or redistribute the software under the terms of the CeCILL + * license as circulated by CEA, CNRS and INRIA at the following URL + * "http://www.cecill.info". + * + * As a counterpart to the access to the source code and rights to copy, + * modify and redistribute granted by the license, users are provided only + * with a limited warranty and the software's author, the holder of the + * economic rights, and the successive licensors have only limited + * liability. + * + * In this respect, the user's attention is drawn to the risks associated + * with loading, using, modifying and/or developing or reproducing the + * software by the user in light of its specific status of free software, + * that may mean that it is complicated to manipulate, and that also + * therefore means that it is reserved for developers and experienced + * professionals having in-depth computer knowledge. Users are therefore + * encouraged to load and test the software's suitability as regards their + * requirements in conditions enabling the security of their systems and/or + * data to be ensured and, more generally, to use and operate it in the + * same conditions as regards security. + * + * The fact that you are presently reading this means that you have had + * knowledge of the CeCILL license and that you accept its terms. + */ + + +package picross.specific.ui; + +import picross.engine.PicrossException; + +import picross.common.ui.MenuMediator; +import picross.common.ui.PicrossUI; +import picross.common.ui.GameMenuModel; + +import android.content.Context; + +/** + * Mediator for the game menu. + * + * @author Y. Norsa + */ +public final class GameMenuMediator extends MenuMediator { + private Context context; + + public GameMenuMediator(Context androidContext) { + picross.engine.PicrossLogHelper.getLogger().debug("GameMenuMediator(" + androidContext + ")"); + + if (androidContext == null) { + throw new IllegalArgumentException("\"androidContext\" cannot be null"); + } + + this.context = androidContext; + } + + /*** Method overloaded from the class MenuMediator ***/ + + /** {@inheritDoc} */ + @Override + protected MenuUI initView(PicrossUI ui, MenuController controller) + throws PicrossException { + + return new GameMenuUI(this.context, controller, new GameMenuModel().getGameModes()); + } +} Property changes on: branches/engine_split/android/src/picross/specific/ui/GameMenuMediator.java ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Added: branches/engine_split/android/src/picross/specific/ui/GameMenuUI.java =================================================================== --- branches/engine_split/android/src/picross/specific/ui/GameMenuUI.java (rev 0) +++ branches/engine_split/android/src/picross/specific/ui/GameMenuUI.java 2013-01-11 14:36:50 UTC (rev 112) @@ -0,0 +1,92 @@ +/* + * $Id$ + * + * Copyright (c) 2008 + * + * This software is governed by the CeCILL license under French law and + * abiding by the rules of distribution of free software. You can use, + * modify and/ or redistribute the software under the terms of the CeCILL + * license as circulated by CEA, CNRS and INRIA at the following URL + * "http://www.cecill.info". + * + * As a counterpart to the access to the source code and rights to copy, + * modify and redistribute granted by the license, users are provided only + * with a limited warranty and the software's author, the holder of the + * economic rights, and the successive licensors have only limited + * liability. + * + * In this respect, the user's attention is drawn to the risks associated + * with loading, using, modifying and/or developing or reproducing the + * software by the user in light of its specific status of free software, + * that may mean that it is complicated to manipulate, and that also + * therefore means that it is reserved for developers and experienced + * professionals having in-depth computer knowledge. Users are therefore + * encouraged to load and test the software's suitability as regards their + * requirements in conditions enabling the security of their systems and/or + * data to be ensured and, more generally, to use and operate it in the + * same conditions as regards security. + * + * The fact that you are presently reading this means that you have had + * knowledge of the CeCILL license and that you accept its terms. + */ + + +package picross.specific.ui; + +import java.util.ServiceLoader; + +import picross.engine.PicrossLogger; +import picross.engine.PicrossLogHelper; + +import picross.engine.game.GameMode; + +import picross.specific.game.ui.UIGameMode; + +import android.content.Context; + +/** + * UI for the game menu. + * + * @author Y. Norsa + */ +public final class GameMenuUI extends MenuUI { + /*** Constant ***/ + + /** Serialisation ID. */ + private static final long serialVersionUID = 4472277675596865332L; + + /*** Static field ***/ + + /** The class' logger. */ + private static PicrossLogger log = PicrossLogHelper.getLogger(); + + /*** Constructor ***/ + + /** + * Constructor. + * + * @param listener listener for the buttons + * @param modes available game modes + */ + public GameMenuUI(Context context, MenuController listener, ServiceLoader<GameMode> modes) { + super(context); + + int x = 0;//150; + int y = 0;//150; + + GameMenuUI.log.debug("listing des modes..."); + + for (GameMode mode : modes) { + GameMenuUI.log.debug("mode : " + mode); + + if (mode instanceof UIGameMode) { + this.addButton(((UIGameMode) mode).getButton(), listener, x, y); + } else { + // TODO add dynamic button + } + + y += 75; + } + } +} + Property changes on: branches/engine_split/android/src/picross/specific/ui/GameMenuUI.java ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Modified: branches/engine_split/android/src/picross/specific/ui/MainMenuUI.java =================================================================== --- branches/engine_split/android/src/picross/specific/ui/MainMenuUI.java 2013-01-11 09:43:57 UTC (rev 111) +++ branches/engine_split/android/src/picross/specific/ui/MainMenuUI.java 2013-01-11 14:36:50 UTC (rev 112) @@ -40,6 +40,8 @@ import android.content.Context; +import picross.specific.activities.R; + /** * UI for the main menu. * @@ -82,7 +84,9 @@ * @param controller controller for the menu's buttons */ public void init(MenuController controller) { - this.addButton(MainMenuUI.PLAY_BUTTON_IMAGE, + // FIXME + this.addButton(//MainMenuUI.PLAY_BUTTON_IMAGE, + R.drawable.button_play, PicrossController.PLAY_CMD, controller, this.getPlayButtonX(), this.getPlayButtonY()); } Modified: branches/engine_split/android/src/picross/specific/ui/MenuController.java =================================================================== --- branches/engine_split/android/src/picross/specific/ui/MenuController.java 2013-01-11 09:43:57 UTC (rev 111) +++ branches/engine_split/android/src/picross/specific/ui/MenuController.java 2013-01-11 14:36:50 UTC (rev 112) @@ -41,22 +41,29 @@ import picross.common.ui.AbstractMenuController; +import android.view.View; +import android.view.MotionEvent; + /** * Generic controller for the menus. * * @author Y. Norsa */ -public class MenuController extends AbstractMenuController /*implements ActionListener*/ { +public class MenuController extends AbstractMenuController {//implements View.OnTouchListener { /*** Method implanted from the interface ActionListener ***/ /** {@inheritDoc} */ - // FIXME /* @Override - public void actionPerformed(ActionEvent e) { - String cmd = e.getActionCommand(); - this.fireEventPerformed(cmd); + public boolean onTouch(View view, MotionEvent e) { + //String cmd = e.getActionCommand(); + //this.fireEventPerformed(cmd); + return false; }*/ + + public void onPicrossEvent(MenuUI.PicrossEvent e) { + this.fireEventPerformed(e.getActionCommand()); + } } Modified: branches/engine_split/android/src/picross/specific/ui/MenuUI.java =================================================================== --- branches/engine_split/android/src/picross/specific/ui/MenuUI.java 2013-01-11 09:43:57 UTC (rev 111) +++ branches/engine_split/android/src/picross/specific/ui/MenuUI.java 2013-01-11 14:36:50 UTC (rev 112) @@ -57,6 +57,11 @@ import android.graphics.Canvas; import android.view.SurfaceHolder; +import java.util.ArrayList; +import java.util.List; + +import android.view.MotionEvent; + /** * Base class for menus. * @@ -90,6 +95,8 @@ protected Context context; private SurfaceHolder surface; + private List<PicrossButton> buttons; + /*** Constructor ***/ /** Constructor. */ @@ -126,6 +133,8 @@ this.surface = this.getHolder(); this.surface.addCallback(this); + + this.buttons = new ArrayList<PicrossButton>(); } @@ -183,13 +192,17 @@ } public void onDraw(Canvas canvas) { - MenuUI.log.debug("onDraw(" + canvas + ")"); + //MenuUI.log.debug("onDraw(" + canvas + ")"); if (canvas == null) { return; } canvas.drawBitmap(this.image, 0, 0, null); + + for (PicrossButton button : this.buttons) { + canvas.drawBitmap(button.getIcon(), button.getX(), button.getY(), null); + } } /*** Methods ***/ @@ -205,8 +218,9 @@ * @throws MissingImageException if a button image can't be found */ - protected final void addButton(String image, String command, + protected final void addButton(/*String image*/int resID, String command, MenuController controller, int x, int y) { + MenuUI.log.debug("addButton(" + image + ", " + command + ", controller, " + x + ", " + y + ")"); /* ImageIcon buttonIcon = PicrossUIHelper.getLocalizedImage(image); JButton button = new JButton(buttonIcon); @@ -217,9 +231,12 @@ this.putButton(button, x, y, buttonIcon.getIconWidth(), buttonIcon.getIconHeight()); */ + // FIXME + Bitmap buttonIcon = PicrossUIHelper.getImage( context.getResources(), resID); + this.putButton(new PicrossButton(buttonIcon, controller, command), x, y, + buttonIcon.getWidth(), buttonIcon.getHeight()); } - /** * Helper method to add a button to the menu. * @@ -232,6 +249,7 @@ protected final void addSimpleButton(String label, SimpleEvent event, SimpleListener listener, int x, int y) { + MenuUI.log.debug("addSimpleButton(" + label + ", " + event + ", listener, " + x + ", " + y + ")"); // FIXME /* PicrossButton button = @@ -303,6 +321,27 @@ } */ + protected final void addButton(PicrossButton button, + SimpleListener listener, + int x, int y) { + + // FIXME + /* + button.addSimpleListener(listener); + + JButton realButton = button.getButton(); + Icon icon = realButton.getIcon(); + + realButton.setBorder(null); + */ + if (button.getIcon() == null) { + button.setIcon(PicrossUIHelper.getImage(this.context.getResources(), button.getResID())); + } + + this.putButton(button, x, y, + button.getIcon().getWidth(), button.getIcon().getHeight()); + } + /** * Finalizes the button's setup. * @@ -320,4 +359,73 @@ this.add(button); } */ + + private void putButton(PicrossButton button, int x, int y, + int width, int height) { + MenuUI.log.debug("putButton(" + button + ", " + x + ", " + y + ", " + width + ", " + height + ")"); + //button.setBounds(x, y, width, height); + + button.setX(x); + button.setY(y); + button.setWidth(width); + button.setHeight(height); + + //button.controller + + this.add(button); + } + + //X=50, Y=225, W=150, H=50 + // X >= 50 && X <= 200 + // Y >= 225 && Y <= 275 + + + //228,226 + + //312 267 + + private void add(PicrossButton button) { + this.buttons.add(button); + } + + @Override + public boolean onTouchEvent (MotionEvent event) { + float x = event.getX(); + float y = event.getY(); + + MenuUI.log.debug("x = " + x + ", y = " + y); + + for (PicrossButton button : buttons) { + MenuUI.log.debug("Testing with X between " + button.getX() + " and " + (button.getX() + button.getWidth()) + + ", and Y between " + button.getY() + " and " + (button.getY() + button.getHeight())); + /* + MenuUI.log.debug(x >= button.x); + MenuUI.log.debug(x <= (button.x + button.width)); + MenuUI.log.debug(y >= button.y); + MenuUI.log.debug(y <= (button.y + button.height)); + */ + + if ((x >= button.getX() && x <= (button.getX() + button.getWidth())) + && (y >= button.getY() && y <= (button.getY() + button.getHeight()))) { + + MenuUI.log.debug("found"); + button.getController().onPicrossEvent(new PicrossEvent(button.getCommand())); + return true; + } + } + + return false; + } + + public static class PicrossEvent { + private String actionCommand; + + private PicrossEvent(String command) { + this.actionCommand = command; + } + + public String getActionCommand() { + return this.actionCommand; + } + } } Modified: branches/engine_split/android/src/picross/specific/ui/PicrossAndroidLogger.java =================================================================== --- branches/engine_split/android/src/picross/specific/ui/PicrossAndroidLogger.java 2013-01-11 09:43:57 UTC (rev 111) +++ branches/engine_split/android/src/picross/specific/ui/PicrossAndroidLogger.java 2013-01-11 14:36:50 UTC (rev 112) @@ -35,9 +35,9 @@ import android.util.Log; -import picross.engine.PicrossLogger; +import picross.engine.AbstractPicrossLogger; -public final class PicrossAndroidLogger implements PicrossLogger { +public final class PicrossAndroidLogger extends AbstractPicrossLogger { private static final String TAG = "PicrossAndroid"; public void debug(String msg) { Added: branches/engine_split/android/src/picross/specific/ui/PicrossButton.java =================================================================== --- branches/engine_split/android/src/picross/specific/ui/PicrossButton.java (rev 0) +++ branches/engine_split/android/src/picross/specific/ui/PicrossButton.java 2013-01-11 14:36:50 UTC (rev 112) @@ -0,0 +1,115 @@ +/* + * $Id$ + * + * Copyright (c) 2008 + * + * This software is governed by the CeCILL license under French law and + * abiding by the rules of distribution of free software. You can use, + * modify and/ or redistribute the software under the terms of the CeCILL + * license as circulated by CEA, CNRS and INRIA at the following URL + * "http://www.cecill.info". + * + * As a counterpart to the access to the source code and rights to copy, + * modify and redistribute granted by the license, users are provided only + * with a limited warranty and the software's author, the holder of the + * economic rights, and the successive licensors have only limited + * liability. + * + * In this respect, the user's attention is drawn to the risks associated + * with loading, using, modifying and/or developing or reproducing the + * software by the user in light of its specific status of free software, + * that may mean that it is complicated to manipulate, and that also + * therefore means that it is reserved for developers and experienced + * professionals having in-depth computer knowledge. Users are therefore + * encouraged to load and test the software's suitability as regards their + * requirements in conditions enabling the security of their systems and/or + * data to be ensured and, more generally, to use and operate it in the + * same conditions as regards security. + * + * The fact that you are presently reading this means that you have had + * knowledge of the CeCILL license and that you accept its terms. + */ + + +package picross.specific.ui; + +import fr.cle.mmvcs.SimpleEvent; + +import android.graphics.Bitmap; + +public class PicrossButton { + private Bitmap icon; + private MenuController controller; + private String command; + private int x; + private int y; + private int width; + private int height; + + PicrossButton(Bitmap buttonIcon, MenuController buttonController, String cmd) { + this.icon = buttonIcon; + this.controller = buttonController; + this.command = cmd; + } + + public PicrossButton(int resID, SimpleEvent event) { + // FIXME + this.resID = resID; + this.event = event; + } + + private int resID; + private SimpleEvent event; + + public int getResID() { + return this.resID; + } + + public Bitmap getIcon() { + return this.icon; + } + + public void setIcon(Bitmap buttonIcon) { + this.icon = buttonIcon; + } + + public MenuController getController() { + return this.controller; + } + + public String getCommand() { + return this.command; + } + + public int getX() { + return this.x; + } + + public void setX(int xValue) { + this.x = xValue; + } + + public int getY() { + return this.y; + } + + public void setY(int yValue) { + this.y = yValue; + } + + public int getWidth() { + return this.width; + } + + public void setWidth(int w) { + this.width = w; + } + + public int getHeight() { + return this.height; + } + + public void setHeight(int h) { + this.height = h; + } +} Property changes on: branches/engine_split/android/src/picross/specific/ui/PicrossButton.java ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Modified: branches/engine_split/common/src/picross/common/ui/AbstractPicrossMediator.java =================================================================== --- branches/engine_split/common/src/picross/common/ui/AbstractPicrossMediator.java 2013-01-11 09:43:57 UTC (rev 111) +++ branches/engine_split/common/src/picross/common/ui/AbstractPicrossMediator.java 2013-01-11 14:36:50 UTC (rev 112) @@ -55,7 +55,7 @@ import picross.common.grid.ui.GridCommands; import picross.common.ui.PicrossController; import picross.common.ui.WaitMenuMediator; -import picross.common.ui.GameMenuMediator; +import picross.specific.ui.GameMenuMediator; import picross.common.ui.MenuCommand; import picross.specific.ui.MainMenuMediator; Deleted: branches/engine_split/common/src/picross/common/ui/GameMenuMediator.java =================================================================== --- branches/engine_split/common/src/picross/common/ui/GameMenuMediator.java 2013-01-11 09:43:57 UTC (rev 111) +++ branches/engine_split/common/src/picross/common/ui/GameMenuMediator.java 2013-01-11 14:36:50 UTC (rev 112) @@ -1,57 +0,0 @@ -/* - * $Id$ - * - * Copyright (c) 2008 - * - * This software is governed by the CeCILL license under French law and - * abiding by the rules of distribution of free software. You can use, - * modify and/ or redistribute the software under the terms of the CeCILL - * license as circulated by CEA, CNRS and INRIA at the following URL - * "http://www.cecill.info". - * - * As a counterpart to the access to the source code and rights to copy, - * modify and redistribute granted by the license, users are provided only - * with a limited warranty and the software's author, the holder of the - * economic rights, and the successive licensors have only limited - * liability. - * - * In this respect, the user's attention is drawn to the risks associated - * with loading, using, modifying and/or developing or reproducing the - * software by the user in light of its specific status of free software, - * that may mean that it is complicated to manipulate, and that also - * therefore means that it is reserved for developers and experienced - * professionals having in-depth computer knowledge. Users are therefore - * encouraged to load and test the software's suitability as regards their - * requirements in conditions enabling the security of their systems and/or - * data to be ensured and, more generally, to use and operate it in the - * same conditions as regards security. - * - * The fact that you are presently reading this means that you have had - * knowledge of the CeCILL license and that you accept its terms. - */ - - -package picross.common.ui; - -import picross.engine.PicrossException; - -import picross.specific.ui.GameMenuUI; -import picross.specific.ui.MenuController; -import picross.specific.ui.MenuUI; - -/** - * Mediator for the game menu. - * - * @author Y. Norsa - */ -public final class GameMenuMediator extends MenuMediator { - /*** Method overloaded from the class MenuMediator ***/ - - /** {@inheritDoc} */ - @Override - protected MenuUI initView(PicrossUI ui, MenuController controller) - throws PicrossException { - - return new GameMenuUI(controller, new GameMenuModel().getGameModes()); - } -} Modified: branches/engine_split/common/src/picross/common/ui/GameMenuModel.java =================================================================== --- branches/engine_split/common/src/picross/common/ui/GameMenuModel.java 2013-01-11 09:43:57 UTC (rev 111) +++ branches/engine_split/common/src/picross/common/ui/GameMenuModel.java 2013-01-11 14:36:50 UTC (rev 112) @@ -42,7 +42,7 @@ * * @author Y. Norsa */ -final class GameMenuModel { +public final class GameMenuModel { /*** Method ***/ /** @@ -50,7 +50,7 @@ * * @return list of <code>GameMode</code> instances */ - ServiceLoader<GameMode> getGameModes() { + public ServiceLoader<GameMode> getGameModes() { return ServiceLoader.load(GameMode.class); } } Added: branches/engine_split/common/src/picross/specific/ui/GameMenuMediator.java =================================================================== --- branches/engine_split/common/src/picross/specific/ui/GameMenuMediator.java (rev 0) +++ branches/engine_split/common/src/picross/specific/ui/GameMenuMediator.java 2013-01-11 14:36:50 UTC (rev 112) @@ -0,0 +1,47 @@ +/* + * $Id$ + * + * Copyright (c) 2007-2008 + * + * This software is governed by the CeCILL license under French law and + * abiding by the rules of distribution of free software. You can use, + * modify and/ or redistribute the software under the terms of the CeCILL + * license as circulated by CEA, CNRS and INRIA at the following URL + * "http://www.cecill.info". + * + * As a counterpart to the access to the source code and rights to copy, + * modify and redistribute granted by the license, users are provided only + * with a limited warranty and the software's author, the holder of the + * economic rights, and the successive licensors have only limited + * liability. + * + * In this respect, the user's attention is drawn to the risks associated + * with loading, using, modifying and/or developing or reproducing the + * software by the user in light of its specific status of free software, + * that may mean that it is complicated to manipulate, and that also + * therefore means that it is reserved for developers and experienced + * professionals having in-depth computer knowledge. Users are therefore + * encouraged to load and test the software's suitability as regards their + * requirements in conditions enabling the security of their systems and/or + * data to be ensured and, more generally, to use and operate it in the + * same conditions as regards security. + * + * The fact that you are presently reading this means that you have had + * knowledge of the CeCILL license and that you accept its terms. + */ + + +package picross.specific.ui; + +import picross.common.ui.MenuMediator; +import picross.common.ui.PicrossUI; + +import picross.engine.PicrossException; + +public class GameMenuMediator extends MenuMediator { + protected MenuUI initView(PicrossUI ui, MenuController controller) + throws PicrossException { + + return null; + } +} Property changes on: branches/engine_split/common/src/picross/specific/ui/GameMenuMediator.java ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Added: branches/engine_split/engine/src/picross/engine/AbstractPicrossLogger.java =================================================================== --- branches/engine_split/engine/src/picross/engine/AbstractPicrossLogger.java (rev 0) +++ branches/engine_split/engine/src/picross/engine/AbstractPicrossLogger.java 2013-01-11 14:36:50 UTC (rev 112) @@ -0,0 +1,13 @@ +/* + * $Id$ + */ + + +package picross.engine; + +public abstract class AbstractPicrossLogger implements PicrossLogger { + @Override + public final void debug(Object msg) { + this.debug(msg.toString()); + } +} Property changes on: branches/engine_split/engine/src/picross/engine/AbstractPicrossLogger.java ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Modified: branches/engine_split/engine/src/picross/engine/PicrossLogHelper.java =================================================================== --- branches/engine_split/engine/src/picross/engine/PicrossLogHelper.java 2013-01-11 09:43:57 UTC (rev 111) +++ branches/engine_split/engine/src/picross/engine/PicrossLogHelper.java 2013-01-11 14:36:50 UTC (rev 112) @@ -46,7 +46,7 @@ private PicrossLogHelper() { } - private static final class DefaultPicrossLogger implements PicrossLogger { + private static final class DefaultPicrossLogger extends AbstractPicrossLogger { @Override public void debug(String msg) { System.out.println("DEBUG " + msg); Modified: branches/engine_split/engine/src/picross/engine/PicrossLogger.java =================================================================== --- branches/engine_split/engine/src/picross/engine/PicrossLogger.java 2013-01-11 09:43:57 UTC (rev 111) +++ branches/engine_split/engine/src/picross/engine/PicrossLogger.java 2013-01-11 14:36:50 UTC (rev 112) @@ -35,6 +35,7 @@ public interface PicrossLogger { void debug(String msg); + void debug(Object msg); void info(String msg); void error(String msg); } Copied: branches/engine_split/swing/src/picross/specific/ui/GameMenuMediator.java (from rev 109, branches/engine_split/common/src/picross/common/ui/GameMenuMediator.java) =================================================================== --- branches/engine_split/swing/src/picross/specific/ui/GameMenuMediator.java (rev 0) +++ branches/engine_split/swing/src/picross/specific/ui/GameMenuMediator.java 2013-01-11 14:36:50 UTC (rev 112) @@ -0,0 +1,57 @@ +/* + * $Id$ + * + * Copyright (c) 2008 + * + * This software is governed by the CeCILL license under French law and + * abiding by the rules of distribution of free software. You can use, + * modify and/ or redistribute the software under the terms of the CeCILL + * license as circulated by CEA, CNRS and INRIA at the following URL + * "http://www.cecill.info". + * + * As a counterpart to the access to the source code and rights to copy, + * modify and redistribute granted by the license, users are provided only + * with a limited warranty and the software's author, the holder of the + * economic rights, and the successive licensors have only limited + * liability. + * + * In this respect, the user's attention is drawn to the risks associated + * with loading, using, modifying and/or developing or reproducing the + * software by the user in light of its specific status of free software, + * that may mean that it is complicated to manipulate, and that also + * therefore means that it is reserved for developers and experienced + * professionals having in-depth computer knowledge. Users are therefore + * encouraged to load and test the software's suitability as regards their + * requirements in conditions enabling the security of their systems and/or + * data to be ensured and, more generally, to use and operate it in the + * same conditions as regards security. + * + * The fact that you are presently reading this means that you have had + * knowledge of the CeCILL license and that you accept its terms. + */ + + +package picross.specific.ui; + +import picross.engine.PicrossException; + +import picross.common.ui.MenuMediator; +import picross.common.ui.PicrossUI; +import picross.common.ui.GameMenuModel; + +/** + * Mediator for the game menu. + * + * @author Y. Norsa + */ +public final class GameMenuMediator extends MenuMediator { + /*** Method overloaded from the class MenuMediator ***/ + + /** {@inheritDoc} */ + @Override + protected MenuUI initView(PicrossUI ui, MenuController control... [truncated message content] |