[Picross-commit] SF.net SVN: picross:[104] branches/engine_split
Status: Pre-Alpha
Brought to you by:
yvan_norsa
From: <yva...@us...> - 2013-01-10 09:09:45
|
Revision: 104 http://picross.svn.sourceforge.net/picross/?rev=104&view=rev Author: yvan_norsa Date: 2013-01-10 09:09:32 +0000 (Thu, 10 Jan 2013) Log Message: ----------- split swing UI Modified Paths: -------------- branches/engine_split/build.xml branches/engine_split/src/picross/app/MainMenuAppUI.java branches/engine_split/src/picross/app/PicrossApp.java branches/engine_split/src/picross/app/PicrossAppUI.java branches/engine_split/src/picross/applet/MainMenuAppletUI.java branches/engine_split/src/picross/applet/PicrossApplet.java branches/engine_split/src/picross/game/random/ui/RandomGameController.java branches/engine_split/src/picross/game/random/ui/RandomGameMediator.java branches/engine_split/src/picross/game/random/ui/RandomGameModeUI.java branches/engine_split/src/picross/game/random/ui/RandomGameUI.java branches/engine_split/src/picross/game/simple/ui/SimpleGameModeUI.java Added Paths: ----------- branches/engine_split/common/ branches/engine_split/common/src/ branches/engine_split/common/src/picross/ branches/engine_split/common/src/picross/common/ branches/engine_split/common/src/picross/common/Picross.java branches/engine_split/common/src/picross/common/game/ branches/engine_split/common/src/picross/common/game/simple/ branches/engine_split/common/src/picross/common/game/simple/ui/ branches/engine_split/common/src/picross/common/game/simple/ui/LevelMenuController.java branches/engine_split/common/src/picross/common/game/simple/ui/LevelMenuMediator.java branches/engine_split/common/src/picross/common/game/simple/ui/LevelMenuModel.java branches/engine_split/common/src/picross/common/game/simple/ui/LevelsListCommand.java branches/engine_split/common/src/picross/common/game/simple/ui/SelectSizeCommand.java branches/engine_split/common/src/picross/common/game/simple/ui/SimpleGameMediator.java branches/engine_split/common/src/picross/common/game/simple/ui/SizesListCommand.java branches/engine_split/common/src/picross/common/game/ui/ branches/engine_split/common/src/picross/common/game/ui/GameCommand.java branches/engine_split/common/src/picross/common/game/ui/GameView.java branches/engine_split/common/src/picross/common/grid/ branches/engine_split/common/src/picross/common/grid/ui/ branches/engine_split/common/src/picross/common/grid/ui/FillCommand.java branches/engine_split/common/src/picross/common/grid/ui/GridCommands.java branches/engine_split/common/src/picross/common/grid/ui/GridView.java branches/engine_split/common/src/picross/common/grid/ui/IGridMediator.java branches/engine_split/common/src/picross/common/grid/ui/PaintCommand.java branches/engine_split/common/src/picross/common/grid/ui/RepaintLeftHintsCommand.java branches/engine_split/common/src/picross/common/grid/ui/RepaintTopHintsCommand.java branches/engine_split/common/src/picross/common/ui/ branches/engine_split/common/src/picross/common/ui/GameMenuMediator.java branches/engine_split/common/src/picross/common/ui/GameMenuModel.java branches/engine_split/common/src/picross/common/ui/MainMenuMediator.java branches/engine_split/common/src/picross/common/ui/MenuCommand.java branches/engine_split/common/src/picross/common/ui/MenuMediator.java branches/engine_split/common/src/picross/common/ui/MissingImageException.java branches/engine_split/common/src/picross/common/ui/PicrossController.java branches/engine_split/common/src/picross/common/ui/PicrossUI.java branches/engine_split/common/src/picross/common/ui/PicrossView.java branches/engine_split/common/src/picross/common/ui/WaitMenuMediator.java branches/engine_split/common/src/picross/specific/ branches/engine_split/common/src/picross/specific/game/ branches/engine_split/common/src/picross/specific/game/simple/ branches/engine_split/common/src/picross/specific/game/simple/ui/ branches/engine_split/common/src/picross/specific/game/simple/ui/LevelMenuUI.java branches/engine_split/common/src/picross/specific/game/ui/ branches/engine_split/common/src/picross/specific/game/ui/GameMediator.java branches/engine_split/common/src/picross/specific/grid/ branches/engine_split/common/src/picross/specific/grid/ui/ branches/engine_split/common/src/picross/specific/grid/ui/GridController.java branches/engine_split/common/src/picross/specific/ui/ branches/engine_split/common/src/picross/specific/ui/GameMenuUI.java branches/engine_split/common/src/picross/specific/ui/MainMenuUI.java branches/engine_split/common/src/picross/specific/ui/MenuController.java branches/engine_split/common/src/picross/specific/ui/MenuUI.java branches/engine_split/common/src/picross/specific/ui/WaitMenuUI.java branches/engine_split/swing/ branches/engine_split/swing/src/ branches/engine_split/swing/src/picross/ branches/engine_split/swing/src/picross/specific/ branches/engine_split/swing/src/picross/specific/game/ branches/engine_split/swing/src/picross/specific/game/simple/ branches/engine_split/swing/src/picross/specific/game/simple/ui/ branches/engine_split/swing/src/picross/specific/game/simple/ui/LevelMenuUI.java branches/engine_split/swing/src/picross/specific/game/ui/ branches/engine_split/swing/src/picross/specific/game/ui/GameController.java branches/engine_split/swing/src/picross/specific/game/ui/GameMediator.java branches/engine_split/swing/src/picross/specific/game/ui/GameUI.java branches/engine_split/swing/src/picross/specific/game/ui/UIGameMode.java branches/engine_split/swing/src/picross/specific/grid/ branches/engine_split/swing/src/picross/specific/grid/ui/ branches/engine_split/swing/src/picross/specific/grid/ui/GridController.java branches/engine_split/swing/src/picross/specific/grid/ui/GridMediator.java branches/engine_split/swing/src/picross/specific/grid/ui/GridUI.java branches/engine_split/swing/src/picross/specific/grid/ui/HintBoxInfos.java branches/engine_split/swing/src/picross/specific/grid/ui/UIBox.java branches/engine_split/swing/src/picross/specific/ui/ branches/engine_split/swing/src/picross/specific/ui/GameMenuUI.java branches/engine_split/swing/src/picross/specific/ui/MainMenuUI.java branches/engine_split/swing/src/picross/specific/ui/MenuController.java branches/engine_split/swing/src/picross/specific/ui/MenuUI.java branches/engine_split/swing/src/picross/specific/ui/PicrossButton.java branches/engine_split/swing/src/picross/specific/ui/PicrossLog4jLogger.java branches/engine_split/swing/src/picross/specific/ui/PicrossMediator.java branches/engine_split/swing/src/picross/specific/ui/PicrossUIHelper.java branches/engine_split/swing/src/picross/specific/ui/WaitMenuUI.java Removed Paths: ------------- branches/engine_split/src/picross/Picross.java branches/engine_split/src/picross/game/simple/ui/LevelMenuController.java branches/engine_split/src/picross/game/simple/ui/LevelMenuMediator.java branches/engine_split/src/picross/game/simple/ui/LevelMenuModel.java branches/engine_split/src/picross/game/simple/ui/LevelMenuUI.java branches/engine_split/src/picross/game/simple/ui/LevelsListCommand.java branches/engine_split/src/picross/game/simple/ui/SelectSizeCommand.java branches/engine_split/src/picross/game/simple/ui/SimpleGameMediator.java branches/engine_split/src/picross/game/simple/ui/SizesListCommand.java branches/engine_split/src/picross/game/ui/GameCommand.java branches/engine_split/src/picross/game/ui/GameController.java branches/engine_split/src/picross/game/ui/GameMediator.java branches/engine_split/src/picross/game/ui/GameUI.java branches/engine_split/src/picross/game/ui/GameView.java branches/engine_split/src/picross/game/ui/UIGameMode.java branches/engine_split/src/picross/grid/ui/FillCommand.java branches/engine_split/src/picross/grid/ui/GridController.java branches/engine_split/src/picross/grid/ui/GridMediator.java branches/engine_split/src/picross/grid/ui/GridUI.java branches/engine_split/src/picross/grid/ui/GridView.java branches/engine_split/src/picross/grid/ui/HintBoxInfos.java branches/engine_split/src/picross/grid/ui/IGridMediator.java branches/engine_split/src/picross/grid/ui/PaintCommand.java branches/engine_split/src/picross/grid/ui/RepaintLeftHintsCommand.java branches/engine_split/src/picross/grid/ui/RepaintTopHintsCommand.java branches/engine_split/src/picross/grid/ui/UIBox.java branches/engine_split/src/picross/ui/GameMenuMediator.java branches/engine_split/src/picross/ui/GameMenuModel.java branches/engine_split/src/picross/ui/GameMenuUI.java branches/engine_split/src/picross/ui/MainMenuMediator.java branches/engine_split/src/picross/ui/MainMenuUI.java branches/engine_split/src/picross/ui/MenuCommand.java branches/engine_split/src/picross/ui/MenuController.java branches/engine_split/src/picross/ui/MenuMediator.java branches/engine_split/src/picross/ui/MenuUI.java branches/engine_split/src/picross/ui/MissingImageException.java branches/engine_split/src/picross/ui/PicrossButton.java branches/engine_split/src/picross/ui/PicrossController.java branches/engine_split/src/picross/ui/PicrossLog4jLogger.java branches/engine_split/src/picross/ui/PicrossMediator.java branches/engine_split/src/picross/ui/PicrossUI.java branches/engine_split/src/picross/ui/PicrossUIHelper.java branches/engine_split/src/picross/ui/PicrossView.java branches/engine_split/src/picross/ui/WaitMenuMediator.java branches/engine_split/src/picross/ui/WaitMenuUI.java Modified: branches/engine_split/build.xml =================================================================== --- branches/engine_split/build.xml 2013-01-09 13:32:12 UTC (rev 103) +++ branches/engine_split/build.xml 2013-01-10 09:09:32 UTC (rev 104) @@ -3,6 +3,10 @@ <project name="picross" default="dist"> + <property name="swing.build.dir" + value="swing/build" /> + <property name="common.build.dir" + value="common/build" /> <property name="engine.build.dir" value="engine/build" /> <property name="game.build.dir" @@ -13,6 +17,10 @@ value="doc" /> <property name="lib.dir" value="lib" /> + <property name="swing.src.dir" + value="swing/src" /> + <property name="common.src.dir" + value="common/src" /> <property name="engine.src.dir" value="engine/src" /> <property name="game.src.dir" @@ -22,6 +30,10 @@ <property name="game.test.dir" value="test" /> + <property name="swing.jar.name" + value="${dist.dir}/${ant.project.name}-swing.jar" /> + <property name="common.jar.name" + value="${dist.dir}/${ant.project.name}-common.jar" /> <property name="engine.jar.name" value="${dist.dir}/${ant.project.name}-engine.jar" /> <property name="game.jar.name" @@ -44,6 +56,8 @@ <target name="-init" depends="-setmode"> + <mkdir dir="${swing.build.dir}" /> + <mkdir dir="${common.build.dir}" /> <mkdir dir="${engine.build.dir}" /> <mkdir dir="${game.build.dir}" /> <mkdir dir="${dist.dir}" /> @@ -73,6 +87,8 @@ <path id="classpath"> <pathelement location="${game.build.dir}" /> <pathelement location="${engine.build.dir}" /> + <pathelement location="${common.build.dir}" /> + <pathelement location="${swing.build.dir}" /> <pathelement location="${bundleHelper.jar}" /> <pathelement location="${easymock.jar}" /> @@ -82,6 +98,45 @@ <pathelement location="${simpleButton.jar}" /> </path> + <path id="game-classpath"> + <pathelement location="${game.build.dir}" /> + <pathelement location="${swing.jar.name}" /> + <pathelement location="${common.jar.name}" /> + <pathelement location="${engine.jar.name}" /> + <pathelement location="${bundleHelper.jar}" /> + <pathelement location="${easymock.jar}" /> + <pathelement location="${junit.jar}" /> + <pathelement location="${log4j.jar}" /> + <pathelement location="${mmvcs.jar}" /> + <pathelement location="${simpleButton.jar}" /> + </path> + + <target name="swing-compile" + depends="-init"> + <javac srcdir="${swing.src.dir}" + destdir="${swing.build.dir}" + deprecation="on" + debug="${javac.debug}" + optimize="${javac.optimize}"> + <compilerarg value="-Xlint:all" /> + + <classpath refid="classpath" /> + </javac> + </target> + + <target name="common-compile" + depends="-init"> + <javac srcdir="${common.src.dir}" + destdir="${common.build.dir}" + deprecation="on" + debug="${javac.debug}" + optimize="${javac.optimize}"> + <compilerarg value="-Xlint:all" /> + + <classpath refid="classpath" /> + </javac> + </target> + <target name="engine-compile" depends="-init"> <javac srcdir="${engine.src.dir}" @@ -94,7 +149,7 @@ </target> <target name="game-compile" - depends="-init"> + depends="swing-dist,-init"> <javac srcdir="${game.src.dir}" destdir="${game.build.dir}" deprecation="on" @@ -102,7 +157,7 @@ optimize="${javac.optimize}"> <compilerarg value="-Xlint:all" /> - <classpath refid="classpath" /> + <classpath refid="game-classpath" /> </javac> </target> @@ -138,8 +193,21 @@ basedir="${engine.build.dir}" /> </target> + <target name="swing-dist" + depends="engine-dist,swing-compile"> + <jar destfile="${swing.jar.name}" + basedir="${swing.build.dir}" /> + </target> + + <target name="common-dist" + depends="engine-dist,common-compile"> + <jar destfile="${common.jar.name}" + basedir="${common.build.dir}" + excludes="picross/specific/**" /> + </target> + <target name="dist" - depends="engine-dist,game-compile"> + depends="engine-dist,common-dist,game-compile"> <copy todir="${game.build.dir}/picross/properties" failonerror="false"> <fileset dir="${game.src.dir}/picross/properties" /> @@ -168,6 +236,8 @@ fork="true" dir="."> <classpath> + <pathelement location="${swing.jar.name}" /> + <pathelement location="${common.jar.name}" /> <pathelement location="${engine.jar.name}" /> <pathelement location="${game.jar.name}" /> <pathelement location="${bundleHelper.jar}" /> @@ -185,6 +255,9 @@ fork="true" dir="."> <classpath> + <pathelement location="${swing.jar.name}" /> + <pathelement location="${common.jar.name}" /> + <pathelement location="${engine.jar.name}" /> <pathelement location="${game.jar.name}" /> <pathelement location="${bundleHelper.jar}" /> <pathelement location="${log4j.jar}" /> @@ -239,6 +312,8 @@ </target> <target name="clean"> + <delete dir="${swing.build.dir}" /> + <delete dir="${common.build.dir}" /> <delete dir="${engine.build.dir}" /> <delete dir="${game.build.dir}" /> <delete dir="${dist.dir}" /> Copied: branches/engine_split/common/src/picross/common/Picross.java (from rev 102, branches/engine_split/src/picross/Picross.java) =================================================================== --- branches/engine_split/common/src/picross/common/Picross.java (rev 0) +++ branches/engine_split/common/src/picross/common/Picross.java 2013-01-10 09:09:32 UTC (rev 104) @@ -0,0 +1,95 @@ +/* + * $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.common; + +import java.io.FileNotFoundException; +import java.io.IOException; +import java.io.InputStream; + +import java.net.URL; + +/** + * Helper class. + * + * @author Y. Norsa + */ +public final class Picross { + /*** Constant ***/ + + /** Data directory. */ + private static final String DATA_DIR = "/picross/data/"; + + /*** Constructor ***/ + + /** Fake constructor. */ + private Picross() { } + + /*** Static methods ***/ + + /** + * Loads a file. + * + * @param path file path + * @return URL of the file + * @throws FileNotFoundException if the file can't be found + */ + public static URL getFile(String path) throws FileNotFoundException { + URL fileUrl = Picross.class.getResource(path); + + if (fileUrl == null) { + throw new FileNotFoundException("\"" + path + "\" can't be found"); + } + + return fileUrl; + } + + /** + * Loads a data file. + * + * @param name filename + * @return a stream containing the loaded file + * @throws IllegalArgumentException if <code>name</code> + * is <code>null</code> or empty + * @throws IOException if there is a problem while opening the file + */ + public static InputStream loadDataFile(String name) throws IOException { + + if (name == null || name.equals("")) { + throw new IllegalArgumentException("name can't be null or empty"); + } + + return Picross.getFile(Picross.DATA_DIR + name).openStream(); + } +} + Copied: branches/engine_split/common/src/picross/common/game/simple/ui/LevelMenuController.java (from rev 102, branches/engine_split/src/picross/game/simple/ui/LevelMenuController.java) =================================================================== --- branches/engine_split/common/src/picross/common/game/simple/ui/LevelMenuController.java (rev 0) +++ branches/engine_split/common/src/picross/common/game/simple/ui/LevelMenuController.java 2013-01-10 09:09:32 UTC (rev 104) @@ -0,0 +1,107 @@ +/* + * $Id$ + * + * Copyright (c) 2008-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.common.game.simple.ui; + +import fr.cle.mmvcs.SimpleEvent; + +import picross.engine.PicrossLogger; +import picross.engine.PicrossLogHelper; + +import picross.common.game.ui.GameCommand; + +import picross.common.ui.PicrossController; + +import picross.specific.game.simple.ui.LevelMenuUI; + +import picross.specific.ui.MenuController; + +/** + * Controller for the level selection menu. + * + * @author Y. Norsa + */ +public final class LevelMenuController extends MenuController { + /*** Constants ***/ + + /** Command used when selecting a grid size. */ + public static final String SIZE_CMD = "SIZE_CMD"; + + /** Command used to display a levels list. */ + public static final String LEVELS_LIST_CMD = "LEVELS_LIST_CMD"; + + /** Select level command. */ + public static final String LEVEL_CMD = "LEVEL_CMD"; + + /*** Static field ***/ + + /** The class' logger. */ + private static PicrossLogger log = PicrossLogHelper.getLogger(); + + /*** Method overloaded from the class LevelMenuController ***/ + + /** {@inheritDoc} */ + @Override + public void eventPerformed(SimpleEvent e) { + LevelMenuController.log.debug("eventPerformed(" + e + ")"); + + String cmd = e.getCommandName(); + + if (cmd.equals(GameCommand.GAME_CMD)) { + return; + } + + if (cmd.equals(PicrossController.PLAY_CMD)) { + return; + } + + if (cmd.equals(LevelMenuController.LEVELS_LIST_CMD)) { + LevelsListCommand command = (LevelsListCommand) e.getCommand(); + ((LevelMenuUI) this.getView()).displayLevels(this, + command.getList()); + + return; + } + + if (cmd.equals(SizesListCommand.SIZES_CMD)) { + SizesListCommand command = (SizesListCommand) e.getCommand(); + ((LevelMenuUI) this.getView()).displaySizes(this, + command.getSizes()); + + return; + } + + super.eventPerformed(e); + } +} + Copied: branches/engine_split/common/src/picross/common/game/simple/ui/LevelMenuMediator.java (from rev 102, branches/engine_split/src/picross/game/simple/ui/LevelMenuMediator.java) =================================================================== --- branches/engine_split/common/src/picross/common/game/simple/ui/LevelMenuMediator.java (rev 0) +++ branches/engine_split/common/src/picross/common/game/simple/ui/LevelMenuMediator.java 2013-01-10 09:09:32 UTC (rev 104) @@ -0,0 +1,140 @@ +/* + * $Id$ + * + * Copyright (c) 2008-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.common.game.simple.ui; + +import fr.cle.mmvcs.SimpleEvent; + +import java.util.List; + +import picross.engine.PicrossLogger; +import picross.engine.PicrossLogHelper; +import picross.engine.PicrossException; + +import picross.common.game.ui.GameCommand; + +import picross.specific.ui.MenuController; +import picross.common.ui.MenuMediator; +import picross.common.ui.PicrossUI; + +import picross.specific.ui.MenuUI; + +import picross.specific.game.simple.ui.LevelMenuUI; + +/** + * Level selection menu. + * + * @author Y. Norsa + */ +public final class LevelMenuMediator extends MenuMediator { + /*** Static field ***/ + + /** The class' logger. */ + private static PicrossLogger log = PicrossLogHelper.getLogger(); + + /*** Field ***/ + + /** Model containing the levels list. */ + private LevelMenuModel model = null; + + /*** Methods overloaded from the class MenuMediator ***/ + + /** {@inheritDoc} */ + @Override + protected MenuController initController() { + MenuController controller = new LevelMenuController(); + this.addSimpleListener(controller); + + return controller; + } + + /** {@inheritDoc} */ + @Override + protected MenuUI initView(PicrossUI ui, MenuController controller) + throws PicrossException { + + LevelMenuMediator.log.debug("initView()"); + + this.model = new LevelMenuModel(); + + LevelMenuMediator.log.debug("this : " + this); + LevelMenuMediator.log.debug("this.model : " + this.model); + + return new LevelMenuUI(controller, this.model.getSizesList()); + } + + /** {@inheritDoc} */ + @Override + public void eventPerformed(SimpleEvent e) { + LevelMenuMediator.log.debug("eventPerformed(" + e + ")"); + LevelMenuMediator.log.debug("this : " + this); + LevelMenuMediator.log.debug("this.model : " + this.model); + + String cmd = e.getCommandName(); + + if (cmd.equals(LevelMenuController.SIZE_CMD)) { + SelectSizeCommand command = (SelectSizeCommand) e.getCommand(); + this.displayLevels(this.model.getLevels(command.getSize())); + + return; + } + + if (cmd.equals(LevelMenuController.LEVEL_CMD)) { + String level = e.getComment(); + this.fireEventPerformed(new + GameCommand(new + SimpleGameMediator(level))); + return; + } + + if (cmd.equals(MenuController.BACK_CMD)) { + this.fireEventPerformed(new SizesListCommand(this.model + .getSizesList())); + return; + } + + super.eventPerformed(e); + } + + /*** Method ***/ + + /** + * Sends a message asking to display the levels list. + * + * @param levels the levels list + */ + private void displayLevels(List<String> levels) { + this.fireEventPerformed(new LevelsListCommand(levels)); + } +} + Copied: branches/engine_split/common/src/picross/common/game/simple/ui/LevelMenuModel.java (from rev 102, branches/engine_split/src/picross/game/simple/ui/LevelMenuModel.java) =================================================================== --- branches/engine_split/common/src/picross/common/game/simple/ui/LevelMenuModel.java (rev 0) +++ branches/engine_split/common/src/picross/common/game/simple/ui/LevelMenuModel.java 2013-01-10 09:09:32 UTC (rev 104) @@ -0,0 +1,154 @@ +/* + * $Id$ + * + * Copyright (c) 2008-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.common.game.simple.ui; + +import java.io.BufferedReader; +import java.io.IOException; +import java.io.InputStreamReader; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import picross.common.Picross; +import picross.engine.PicrossException; + +import picross.engine.game.simple.Dimensions; +import picross.engine.game.simple.FileInfos; +import picross.engine.game.simple.LevelInfos; + +/** + * Model for the level selection menu. + * + * @author Y. Norsa + */ +final class LevelMenuModel { + /*** Constant ***/ + + /** File containing the data files list. */ + private static final String DATA_LIST = "contents.txt"; + + /*** Field ***/ + + /** Levels list. */ + private Map<Dimensions, List<String>> levels; + + /*** Constructor ***/ + + /** + * Constructor. + * + * @throws PicrossException if an error arises during the levels listing + */ + LevelMenuModel() throws PicrossException { + this.levels = new HashMap<Dimensions, List<String>>(); + + List<LevelInfos> infos = null; + + try { + infos = LevelMenuModel.listDataFiles(); + } catch (IOException ioEx) { + throw new PicrossException(ioEx); + } + + for (LevelInfos info : infos) { + Dimensions levelSize = info.getDimensions(); + List<String> levelsList = this.levels.get(levelSize); + + if (levelsList == null) { + levelsList = new ArrayList<String>(); + this.levels.put(levelSize, levelsList); + } + + levelsList.add(info.getName()); + } + } + + /*** Static method ***/ + + /** + * Reads the data files list and returns informations about the levels. + * + * @return informations about the available levels + * @throws IOException if a problem occurs during the operation + */ + private static List<LevelInfos> listDataFiles() throws IOException { + List<LevelInfos> list = new ArrayList<LevelInfos>(); + + BufferedReader in = null; + + try { + in = new + BufferedReader(new + InputStreamReader(Picross + .loadDataFile(LevelMenuModel + .DATA_LIST))); + + String line = null; + + while ((line = in.readLine()) != null) { + list.add(FileInfos.readFileInfos(line)); + } + } catch (IOException ioEx) { + throw ioEx; + } finally { + in.close(); + } + + return list; + } + + /*** Methods ***/ + + /** + * Returns the available sizes list. + * + * @return list of all the grid sizes + */ + List<Dimensions> getSizesList() { + return new ArrayList<Dimensions>(this.levels.keySet()); + } + + /** + * Returns the list of levels for this size. + * + * @param size desired grid size + * @return list of the corresponding level files + */ + List<String> getLevels(Dimensions size) { + return this.levels.get(size); + } +} + Copied: branches/engine_split/common/src/picross/common/game/simple/ui/LevelsListCommand.java (from rev 101, branches/engine_split/src/picross/game/simple/ui/LevelsListCommand.java) =================================================================== --- branches/engine_split/common/src/picross/common/game/simple/ui/LevelsListCommand.java (rev 0) +++ branches/engine_split/common/src/picross/common/game/simple/ui/LevelsListCommand.java 2013-01-10 09:09:32 UTC (rev 104) @@ -0,0 +1,75 @@ +/* + * $Id$ + * + * Copyright (c) 2008-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.common.game.simple.ui; + +import fr.cle.mmvcs.NamedCommand; + +import java.util.List; + +/** + * Command containing a levels list. + * + * @author Y. Norsa + */ +final class LevelsListCommand extends NamedCommand { + /*** Field ***/ + + /** List of levels' names. */ + private List<String> list; + + /*** Constructor ***/ + + /** + * Constructor. + * + * @param levels levels' names + */ + LevelsListCommand(List<String> levels) { + super(LevelMenuController.LEVELS_LIST_CMD); + + this.list = levels; + } + + /*** Accessor ***/ + + /** + * Return the levels list. + * + * @return list of the levels + */ + List<String> getList() { + return this.list; + } +} + Copied: branches/engine_split/common/src/picross/common/game/simple/ui/SelectSizeCommand.java (from rev 102, branches/engine_split/src/picross/game/simple/ui/SelectSizeCommand.java) =================================================================== --- branches/engine_split/common/src/picross/common/game/simple/ui/SelectSizeCommand.java (rev 0) +++ branches/engine_split/common/src/picross/common/game/simple/ui/SelectSizeCommand.java 2013-01-10 09:09:32 UTC (rev 104) @@ -0,0 +1,75 @@ +/* + * $Id$ + * + * Copyright (c) 2008-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.common.game.simple.ui; + +import fr.cle.mmvcs.NamedCommand; + +import picross.engine.game.simple.Dimensions; + +/** + * Command used when a grid size has been selected. + * + * @author Y. Norsa + */ +public final class SelectSizeCommand extends NamedCommand { + /*** Field ***/ + + /** The selected grid size. */ + private Dimensions size; + + /*** Constructor ***/ + + /** + * Constructor. + * + * @param dim grid size + */ + public SelectSizeCommand(Dimensions dim) { + super(LevelMenuController.SIZE_CMD); + + this.size = dim; + } + + /*** Accessor ***/ + + /** + * Returns the grid size. + * + * @return selected grid size + */ + public Dimensions getSize() { + return this.size; + } +} + Copied: branches/engine_split/common/src/picross/common/game/simple/ui/SimpleGameMediator.java (from rev 102, branches/engine_split/src/picross/game/simple/ui/SimpleGameMediator.java) =================================================================== --- branches/engine_split/common/src/picross/common/game/simple/ui/SimpleGameMediator.java (rev 0) +++ branches/engine_split/common/src/picross/common/game/simple/ui/SimpleGameMediator.java 2013-01-10 09:09:32 UTC (rev 104) @@ -0,0 +1,83 @@ +/* + * $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.common.game.simple.ui; + +import java.io.IOException; + +import picross.common.Picross; +import picross.engine.PicrossException; + +import picross.engine.game.simple.XBMModel; + +import picross.specific.game.ui.GameMediator; + +import picross.engine.grid.PicrossGrid; + +/** + * Mediator for a classic game. + * + * @author Y. Norsa + */ +public final class SimpleGameMediator extends GameMediator { + /*** Field ***/ + + /** Level to load. */ + private String level; + + /*** Constructor ***/ + + /** + * Constructor. + * + * @param levelName name of the level + */ + public SimpleGameMediator(String levelName) { + super(); + + this.level = levelName; + } + + /*** Method overloaded from the class GameMediator ***/ + + /** {@inheritDoc} */ + @Override + protected PicrossGrid initModel() throws PicrossException { + try { + return new XBMModel(Picross.loadDataFile(this.level)); + } catch (IOException ioEx) { + throw new PicrossException(ioEx); + } + } +} + Copied: branches/engine_split/common/src/picross/common/game/simple/ui/SizesListCommand.java (from rev 102, branches/engine_split/src/picross/game/simple/ui/SizesListCommand.java) =================================================================== --- branches/engine_split/common/src/picross/common/game/simple/ui/SizesListCommand.java (rev 0) +++ branches/engine_split/common/src/picross/common/game/simple/ui/SizesListCommand.java 2013-01-10 09:09:32 UTC (rev 104) @@ -0,0 +1,82 @@ +/* + * $Id$ + * + * Copyright (c) 2008-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.common.game.simple.ui; + +import fr.cle.mmvcs.NamedCommand; + +import java.util.List; + +import picross.engine.game.simple.Dimensions; + +/** + * Command used to display the available grid sizes. + * + * @author Y. Norsa + */ +final class SizesListCommand extends NamedCommand { + /*** Constant ***/ + + /** Command used to display the grid sizes. */ + static final String SIZES_CMD = "SIZES_CMD"; + + /*** Field ***/ + + /** The sizes list. */ + private List<Dimensions> sizes; + + /*** Constructor ***/ + + /** + * Constructor. + * + * @param sizesList the sizes list + */ + SizesListCommand(List<Dimensions> sizesList) { + super(SizesListCommand.SIZES_CMD); + + this.sizes = sizesList; + } + + /*** Accessor ***/ + + /** + * Return the sizes list. + * + * @return available grid sizes + */ + List<Dimensions> getSizes() { + return this.sizes; + } +} + Copied: branches/engine_split/common/src/picross/common/game/ui/GameCommand.java (from rev 101, branches/engine_split/src/picross/game/ui/GameCommand.java) =================================================================== --- branches/engine_split/common/src/picross/common/game/ui/GameCommand.java (rev 0) +++ branches/engine_split/common/src/picross/common/game/ui/GameCommand.java 2013-01-10 09:09:32 UTC (rev 104) @@ -0,0 +1,80 @@ +/* + * $Id$ + * + * Copyright (c) 2008-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.common.game.ui; + +import fr.cle.mmvcs.NamedCommand; + +import picross.specific.game.ui.GameMediator; + +/** + * Command used to launch a game. + * + * @author Y. Norsa + */ +public final class GameCommand extends NamedCommand { + /*** Constant ***/ + + /** Command requiring the game launch. */ + public static final String GAME_CMD = "GAME_CMD"; + + /*** Field ***/ + + /** The game to launch. */ + private GameMediator game; + + /*** Constructor ***/ + + /** + * Constructor. + * + * @param gameMediator the game to launch + */ + public GameCommand(GameMediator gameMediator) { + super(GameCommand.GAME_CMD); + + this.game = gameMediator; + } + + /*** Accessor ***/ + + /** + * Returns the game. + * + * @return the game to launch + */ + public GameMediator getGame() { + return this.game; + } +} + Copied: branches/engine_split/common/src/picross/common/game/ui/GameView.java (from rev 102, branches/engine_split/src/picross/game/ui/GameView.java) =================================================================== --- branches/engine_split/common/src/picross/common/game/ui/GameView.java (rev 0) +++ branches/engine_split/common/src/picross/common/game/ui/GameView.java 2013-01-10 09:09:32 UTC (rev 104) @@ -0,0 +1,42 @@ +/* + * $Id$ + * + * Copyright (c) 2008-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.common.game.ui; + +import picross.common.ui.PicrossView; + +/** + * @author Y. Norsa + */ +public interface GameView extends PicrossView { } + Copied: branches/engine_split/common/src/picross/common/grid/ui/FillCommand.java (from rev 102, branches/engine_split/src/picross/grid/ui/FillCommand.java) =================================================================== --- branches/engine_split/common/src/picross/common/grid/ui/FillCommand.java (rev 0) +++ branches/engine_split/common/src/picross/common/grid/ui/FillCommand.java 2013-01-10 09:09:32 UTC (rev 104) @@ -0,0 +1,129 @@ +/* + * $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.common.grid.ui; + +import fr.cle.mmvcs.Command; + +import picross.engine.grid.GridAction; + +/** + * Command containing informations about the box to fill. + * + * @author Y. Norsa + */ +public final class FillCommand extends Command { + /*** Fields ***/ + + /** Row of the box to fill. */ + private int row; + + /** Column of the box to fill. */ + private int column; + + /** Type of the action. */ + //private int type; + private GridAction type; + + /*** Constructor ***/ + + /** + * Constructor. + * + * @param row row of the box to fill + * @param column column of the box to fill + * @param type type of the action + * @throws IllegalArgumentException if <code>row</code> + * or <code>column</code> is less than 0, or <code>type</code> + * is <code>GridAction.UNKNOWN</code> + */ + //FillCommand(int row, int column, int type) { + public FillCommand(int row, int column, GridAction type) + throws IllegalArgumentException { + + if (row < 0) { + throw new IllegalArgumentException("row can't be less than 0"); + } + + if (column < 0) { + throw new IllegalArgumentException("column can't be less than 0"); + } + + if (type == GridAction.UNKNOWN) { + throw new IllegalArgumentException("type can't be UNKNOWN"); + } + + this.row = row; + this.column = column; + this.type = type; + } + + /*** Method overloaded from the class Command ***/ + + /** {@inheritDoc} */ + @Override + public String toString() { + return this.row + "," + this.column; + } + + /*** Accessors ***/ + + /** + * Returns the row. + * + * @return row of the box to fill + */ + public int getRow() { + return this.row; + } + + /** + * Returns the column. + * + * @return column of the box to fill + */ + public int getColumn() { + return this.column; + } + + /** + * Return the type. + * + * @return type of the action + */ + //int getType() { + public GridAction getType() { + return this.type; + } +} + Added: branches/engine_split/common/src/picross/common/grid/ui/GridCommands.java =================================================================== --- branches/engine_split/common/src/picross/common/grid/ui/GridCommands.java (rev 0) +++ branches/engine_split/common/src/picross/common/grid/ui/GridCommands.java 2013-01-10 09:09:32 UTC (rev 104) @@ -0,0 +1,36 @@ +/* + * $Id$ + */ + + +package picross.common.grid.ui; + +public final class GridCommands { + /*** Constants ***/ + + /** Fill command. */ + public static final String FILL_CMD = "FILL_CMD"; + + /** Command indicating the grid is filled. */ + public static final String GRID_FILLED_CMD = "GRID_FILLED_CMD"; + + /** Command indicating the action has reached its end. */ + public static final String END_ACTION_CMD = "END_ACTION_CMD"; + + /** Command asking to repaint part of the grid. */ + public static final String PAINT_CMD = "PAINT_CMD"; + + /** Command indicating that a hint has been completed. */ + public static final String COMPLETED_CMD = "COMPLETED_CMD"; + + /** Command asking to repaint the top hints. */ + public static final String REPAINT_TOP_HINTS_CMD = "REPAINT_TOP_HINTS_CMD"; + + /** Command asking to repaint the left hints. */ + public static final String REPAINT_LEFT_HINTS_CMD = "REPAINT_LEFT_HINTS_CMD"; + + /** Command asking to enable the Erase mode. */ + public static final String ERASE_MODE_CMD = "ERASE_MODE_CMD"; + + private GridCommands() { } +} Property changes on: branches/engine_split/common/src/picross/common/grid/ui/GridCommands.java ___________________________________________________________________ Added: svn:keywords + Id Copied: branches/engine_split/common/src/picross/common/grid/ui/GridView.java (from rev 101, branches/engine_split/src/picross/grid/ui/GridView.java) =================================================================== --- branches/engine_split/common/src/picross/common/grid/ui/GridView.java (rev 0) +++ branches/engine_split/common/src/picross/common/grid/ui/GridView.java 2013-01-10 09:09:32 UTC (rev 104) @@ -0,0 +1,41 @@ +/* + * $Id$ + * + * Copyright (c) 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.common.grid.ui; + +/** + * @author Y. Norsa + */ +public interface GridView { } + + Copied: branches/engine_split/common/src/picross/common/grid/ui/IGridMediator.java (from rev 101, branches/engine_split/src/picross/grid/ui/IGridMediator.java) =================================================================== --- branches/engine_split/common/src/picross/common/grid/ui/IGridMediator.java (rev 0) +++ branches/engine_split/common/src/picross/common/grid/ui/IGridMediator.java 2013-01-10 09:09:32 UTC (rev 104) @@ -0,0 +1,71 @@ +/* + * $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.common.grid.ui; + +import fr.cle.mmvcs.IMediateur; + +/** + * Mediator for the grid. + * + * @author Y. Norsa + */ +public interface IGridMediator extends IMediateur { + /** + * Asks to repaint a box. + * + * @param row row number of the box + * @param column column number of the box + */ + ... [truncated message content] |