[Picross-commit] SF.net SVN: picross:[131] trunk
Status: Pre-Alpha
Brought to you by:
yvan_norsa
From: <yva...@us...> - 2013-01-23 08:21:31
|
Revision: 131 http://sourceforge.net/p/picross/code/131 Author: yvan_norsa Date: 2013-01-23 08:21:27 +0000 (Wed, 23 Jan 2013) Log Message: ----------- reintegration branche separation moteur/etc Modified Paths: -------------- trunk/applet/picross.jnlp trunk/build.xml trunk/log4j.properties trunk/src/picross/app/PicrossApp.java trunk/src/picross/app/PicrossAppUI.java trunk/src/picross/applet/MainMenuAppletUI.java trunk/src/picross/applet/PicrossApplet.java Added Paths: ----------- trunk/android/ trunk/common/ trunk/engine/ trunk/images/empty_button.png trunk/images/en/button_back.png trunk/images/en/button_exit.png trunk/images/en/button_play.png trunk/images/en/button_random.png trunk/images/en/button_select.png trunk/images/en/label_wait.png trunk/images/fr/button_back.png trunk/images/fr/button_exit.png trunk/images/fr/button_play.png trunk/images/fr/button_random.png trunk/images/fr/button_select.png trunk/images/fr/label_wait.png trunk/properties/ trunk/services/picross.engine.game.GameMode trunk/src/picross/app/MainMenuAppUI.java trunk/swing/ Removed Paths: ------------- trunk/images/empty-button.png trunk/images/en/button-back.png trunk/images/en/button-exit.png trunk/images/en/button-play.png trunk/images/en/button-random.png trunk/images/en/button-select.png trunk/images/en/label-wait.png trunk/images/fr/button-back.png trunk/images/fr/button-exit.png trunk/images/fr/button-play.png trunk/images/fr/button-random.png trunk/images/fr/button-select.png trunk/images/fr/label-wait.png trunk/services/picross.game.GameMode trunk/src/picross/Picross.java trunk/src/picross/PicrossException.java trunk/src/picross/app/MainMenuAppUI.java trunk/src/picross/game/ trunk/src/picross/grid/ trunk/src/picross/properties/ trunk/src/picross/ui/ trunk/test/ Property Changed: ---------------- trunk/ Index: trunk =================================================================== --- trunk 2013-01-18 07:47:31 UTC (rev 130) +++ trunk 2013-01-23 08:21:27 UTC (rev 131) Property changes on: trunk ___________________________________________________________________ Added: svn:mergeinfo ## -0,0 +1 ## +/branches/engine_split:101-130 \ No newline at end of property Modified: trunk/applet/picross.jnlp =================================================================== --- trunk/applet/picross.jnlp 2013-01-18 07:47:31 UTC (rev 130) +++ trunk/applet/picross.jnlp 2013-01-23 08:21:27 UTC (rev 131) @@ -13,6 +13,7 @@ <resources> <j2se version="1.6+" /> + <jar href="picross-engine.jar" /> <jar href="picross.jar" /> <jar href="bundleHelper.jar" /> <jar href="log4j.jar" /> @@ -24,4 +25,4 @@ name="Picross" width="900" height="900" /> -</jnlp> \ No newline at end of file +</jnlp> Modified: trunk/build.xml =================================================================== --- trunk/build.xml 2013-01-18 07:47:31 UTC (rev 130) +++ trunk/build.xml 2013-01-23 08:21:27 UTC (rev 131) @@ -3,28 +3,50 @@ <project name="picross" default="dist"> - <property name="build.dir" - value="build" /> + <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" + value="build/game" /> <property name="dist.dir" value="dist" /> <property name="doc.dir" value="doc" /> <property name="lib.dir" value="lib" /> - <property name="src.dir" + <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" value="src" /> - <property name="test.dir" - value="test" /> + <property name="engine.test.dir" + value="engine/test" /> + <property name="common.test.dir" + value="common/test" /> + <property name="swing.test.dir" + value="swing/test" /> - <property name="jar.name" + <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" value="${dist.dir}/${ant.project.name}.jar" /> <property name="bundleHelper.jar" value="${lib.dir}/bundleHelper.jar" /> <property name="debug.jar" value="${lib.dir}/debug.jar" /> - <property name="easymock.jar" - value="${lib.dir}/easymock.jar" /> + <property name="easymock.jar" + value="${lib.dir}/easymock.jar" /> <property name="junit.jar" value="${lib.dir}/junit.jar" /> <property name="log4j.jar" @@ -36,7 +58,10 @@ <target name="-init" depends="-setmode"> - <mkdir dir="${build.dir}" /> + <mkdir dir="${swing.build.dir}" /> + <mkdir dir="${common.build.dir}" /> + <mkdir dir="${engine.build.dir}" /> + <mkdir dir="${game.build.dir}" /> <mkdir dir="${dist.dir}" /> <mkdir dir="${doc.dir}" /> </target> @@ -62,20 +87,36 @@ </target> <path id="classpath"> - <pathelement location="${build.dir}" /> + <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}" /> + <pathelement location="${easymock.jar}" /> <pathelement location="${junit.jar}" /> <pathelement location="${log4j.jar}" /> <pathelement location="${mmvcs.jar}" /> <pathelement location="${simpleButton.jar}" /> </path> - <target name="compile" + <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="${src.dir}" - destdir="${build.dir}" + <javac srcdir="${swing.src.dir}" + destdir="${swing.build.dir}" deprecation="on" debug="${javac.debug}" optimize="${javac.optimize}"> @@ -85,11 +126,48 @@ </javac> </target> - <target name="compile-test" - depends="compile"> - <javac srcdir="${test.dir}" - destdir="${build.dir}" + <target name="common-compile" + depends="-init,engine-dist"> + <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}" + destdir="${engine.build.dir}" + deprecation="on" + debug="${javac.debug}" + optimize="${javac.optimize}"> + <compilerarg value="-Xlint:all" /> + </javac> + </target> + + <target name="game-compile" + depends="swing-dist,-init"> + <javac srcdir="${game.src.dir}" + destdir="${game.build.dir}" + deprecation="on" + debug="${javac.debug}" + optimize="${javac.optimize}"> + <compilerarg value="-Xlint:all" /> + + <classpath refid="game-classpath" /> + </javac> + </target> + + <target name="engine-compile-test" + depends="engine-compile"> + <javac srcdir="${engine.test.dir}" + destdir="${engine.build.dir}" + deprecation="on" debug="on" optimize="off"> <compilerarg value="-Xlint:all" /> @@ -98,27 +176,76 @@ </javac> </target> + <target name="common-compile-test" + depends="common-compile"> + <javac srcdir="${common.test.dir}" + destdir="${common.build.dir}" + deprecation="on" + debug="on" + optimize="off"> + <compilerarg value="-Xlint:all" /> + + <classpath refid="classpath" /> + </javac> + </target> + + <target name="swing-compile-test" + depends="swing-compile"> + <javac srcdir="${swing.test.dir}" + destdir="${swing.build.dir}" + deprecation="on" + debug="on" + optimize="off"> + <compilerarg value="-Xlint:all" /> + + <classpath refid="classpath" /> + </javac> + </target> + + <target name="engine-dist" + depends="engine-compile"> + <jar destfile="${engine.jar.name}" + basedir="${engine.build.dir}" /> + </target> + + <target name="swing-dist" + depends="engine-dist,common-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="compile"> - <copy todir="${build.dir}/picross/properties" + depends="engine-dist,common-dist,game-compile"> + <copy todir="${game.build.dir}/picross/properties" failonerror="false"> - <fileset dir="${src.dir}/picross/properties" /> + <fileset dir="${game.src.dir}/picross/properties" /> </copy> - <copy todir="${build.dir}/picross/images"> + <copy todir="${game.build.dir}/picross/images"> <fileset dir="images" /> </copy> - <copy todir="${build.dir}/picross/data"> + <copy todir="${game.build.dir}/picross/data"> <fileset dir="data" /> </copy> - <copy todir="${build.dir}/META-INF/services"> + <copy todir="${game.build.dir}/picross/properties"> + <fileset dir="properties" /> + </copy> + + <copy todir="${game.build.dir}/META-INF/services"> <fileset dir="services" /> </copy> - <jar destfile="${jar.name}" - basedir="${build.dir}" /> + <jar destfile="${game.jar.name}" + basedir="${game.build.dir}" /> </target> <target name="run" @@ -128,7 +255,10 @@ fork="true" dir="."> <classpath> - <pathelement location="${jar.name}" /> + <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}" /> <pathelement location="${mmvcs.jar}" /> @@ -144,18 +274,24 @@ fork="true" dir="."> <classpath> - <pathelement location="${jar.name}" /> + <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}" /> <pathelement location="${mmvcs.jar}" /> <pathelement location="${debug.jar}" /> - <pathelement location="${simpleButton.jar}" /> + <pathelement location="${simpleButton.jar}" /> </classpath> </java> </target> <target name="test" - depends="dist,compile-test"> + depends="engine-test,common-test,swing-test" /> + + <target name="engine-test" + depends="dist,engine-compile-test"> <junit filtertrace="off" showoutput="on" printsummary="withOutAndErr"> @@ -164,7 +300,7 @@ <batchtest fork="yes" filtertrace="on"> - <fileset dir="${test.dir}"> + <fileset dir="${engine.test.dir}"> <include name="**/*Test.java" /> <exclude name="**/Abstract*Test.java" /> </fileset> @@ -174,26 +310,93 @@ </junit> </target> + <target name="common-test" + depends="dist,common-compile-test"> + <junit filtertrace="off" + showoutput="on" + printsummary="withOutAndErr"> + <formatter type="plain" + usefile="false" /> + + <batchtest fork="yes" + filtertrace="on"> + <fileset dir="${common.test.dir}"> + <include name="**/*Test.java" /> + <exclude name="**/Abstract*Test.java" /> + </fileset> + </batchtest> + + <classpath refid="classpath" /> + </junit> + </target> + + <target name="swing-test" + depends="dist,swing-compile-test"> + <junit filtertrace="off" + showoutput="on" + printsummary="withOutAndErr"> + <formatter type="plain" + usefile="false" /> + + <batchtest fork="yes" + filtertrace="on"> + <fileset dir="${swing.test.dir}"> + <include name="**/*Test.java" /> + <exclude name="**/Abstract*Test.java" /> + </fileset> + </batchtest> + + <classpath refid="classpath" /> + </junit> + </target> + <target name="clean"> - <delete dir="${build.dir}" /> + <delete dir="${swing.build.dir}" /> + <delete dir="${common.build.dir}" /> + <delete dir="${engine.build.dir}" /> + <delete dir="${game.build.dir}" /> <delete dir="${dist.dir}" /> <delete dir="${doc.dir}" /> + <delete dir="${android.dir}/src/picross/data" /> + <delete dir="${android.dir}/src/picross/properties" /> <delete> + <fileset dir="${android.dir}/res/drawable/" + defaultexcludes="no" + includes="*.png" /> + </delete> + + <delete> + <fileset dir="${android.dir}/libs/" + defaultexcludes="no" + includes="*.png" /> + </delete> + + <delete> + <fileset dir="${android.dir}/extraData/gameModes/" + defaultexcludes="no" + includes="*" /> + </delete> + + <delete> <fileset dir="." defaultexcludes="no" includes="**/*~" /> </delete> + + <ant antfile="build.xml" + dir="${android.dir}" + target="clean" /> </target> <target name="rebuild" depends="clean, dist" /> <target name="doc" - depends="compile"> + depends="game-compile"> <javadoc destdir="${doc.dir}" - link="http://download.oracle.com/javase/6/docs/api/"> - <packageset dir="${src.dir}" + link="http://download.oracle.com/javase/6/docs/api/"> + <packageset dir="${game.src.dir}" defaultexcludes="yes" /> <classpath refid="classpath" /> @@ -220,7 +423,7 @@ <formatter type="xml" tofile="checkstyle.xml" /> - <fileset dir="${src.dir}" + <fileset dir="${game.src.dir}" includes="**/*.java" /> </checkstyle> @@ -261,11 +464,52 @@ projectName="${ant.project.name}" output="html" outputFile="findbugs.html"> - <class location="${build.dir}" /> + <class location="${game.build.dir}" /> <auxclasspath refid="classpath" /> - <sourcePath path="${src.dir}" /> + <sourcePath path="${game.src.dir}" /> </findbugs> </target> -</project> \ No newline at end of file + + <!-- Android stuff --> + + <property name="android.dir" + value="android" /> + + <target name="android-dist" + depends="common-dist"> + <copy todir="${android.dir}/extraData/gameModes/META-INF/services"> + <fileset dir="services" /> + </copy> + + <copy todir="${android.dir}/src/picross/properties"> + <fileset dir="properties" /> + </copy> + + <copy todir="${android.dir}/libs" + file="${common.jar.name}" /> + <copy todir="${android.dir}/libs" + file="${engine.jar.name}" /> + <copy todir="${android.dir}/libs" + file="${bundleHelper.jar}" /> + <copy todir="${android.dir}/libs" + file="${mmvcs.jar}" /> + + <copy todir="${android.dir}/res/drawable"> + <fileset dir="images" + includes="*.png" + excludes="*rollover*.png" /> + <fileset dir="images/en/" + includes="*.png" /> + </copy> + + <copy todir="${android.dir}/src/picross/data"> + <fileset dir="data" /> + </copy> + + <ant antfile="build.xml" + dir="${android.dir}" + target="debug" /> + </target> +</project> Deleted: trunk/images/empty-button.png =================================================================== (Binary files differ) Copied: trunk/images/empty_button.png (from rev 130, branches/engine_split/images/empty_button.png) =================================================================== (Binary files differ) Deleted: trunk/images/en/button-back.png =================================================================== (Binary files differ) Deleted: trunk/images/en/button-exit.png =================================================================== (Binary files differ) Deleted: trunk/images/en/button-play.png =================================================================== (Binary files differ) Deleted: trunk/images/en/button-random.png =================================================================== (Binary files differ) Deleted: trunk/images/en/button-select.png =================================================================== (Binary files differ) Copied: trunk/images/en/button_back.png (from rev 130, branches/engine_split/images/en/button_back.png) =================================================================== (Binary files differ) Copied: trunk/images/en/button_exit.png (from rev 130, branches/engine_split/images/en/button_exit.png) =================================================================== (Binary files differ) Copied: trunk/images/en/button_play.png (from rev 130, branches/engine_split/images/en/button_play.png) =================================================================== (Binary files differ) Copied: trunk/images/en/button_random.png (from rev 130, branches/engine_split/images/en/button_random.png) =================================================================== (Binary files differ) Copied: trunk/images/en/button_select.png (from rev 130, branches/engine_split/images/en/button_select.png) =================================================================== (Binary files differ) Deleted: trunk/images/en/label-wait.png =================================================================== (Binary files differ) Copied: trunk/images/en/label_wait.png (from rev 130, branches/engine_split/images/en/label_wait.png) =================================================================== (Binary files differ) Deleted: trunk/images/fr/button-back.png =================================================================== (Binary files differ) Deleted: trunk/images/fr/button-exit.png =================================================================== (Binary files differ) Deleted: trunk/images/fr/button-play.png =================================================================== (Binary files differ) Deleted: trunk/images/fr/button-random.png =================================================================== (Binary files differ) Deleted: trunk/images/fr/button-select.png =================================================================== (Binary files differ) Copied: trunk/images/fr/button_back.png (from rev 130, branches/engine_split/images/fr/button_back.png) =================================================================== (Binary files differ) Copied: trunk/images/fr/button_exit.png (from rev 130, branches/engine_split/images/fr/button_exit.png) =================================================================== (Binary files differ) Copied: trunk/images/fr/button_play.png (from rev 130, branches/engine_split/images/fr/button_play.png) =================================================================== (Binary files differ) Copied: trunk/images/fr/button_random.png (from rev 130, branches/engine_split/images/fr/button_random.png) =================================================================== (Binary files differ) Copied: trunk/images/fr/button_select.png (from rev 130, branches/engine_split/images/fr/button_select.png) =================================================================== (Binary files differ) Deleted: trunk/images/fr/label-wait.png =================================================================== (Binary files differ) Copied: trunk/images/fr/label_wait.png (from rev 130, branches/engine_split/images/fr/label_wait.png) =================================================================== (Binary files differ) Modified: trunk/log4j.properties =================================================================== --- trunk/log4j.properties 2013-01-18 07:47:31 UTC (rev 130) +++ trunk/log4j.properties 2013-01-23 08:21:27 UTC (rev 131) @@ -1,4 +1,4 @@ log4j.rootCategory=debug, stdout, log4j.appender.stdout=org.apache.log4j.ConsoleAppender log4j.appender.stdout.layout=org.apache.log4j.PatternLayout -log4j.appender.stdout.layout.ConversionPattern=%5p (%F:%L) - %m%n +log4j.appender.stdout.layout.ConversionPattern=%5p - %m%n Copied: trunk/services/picross.engine.game.GameMode (from rev 130, branches/engine_split/services/picross.engine.game.GameMode) =================================================================== --- trunk/services/picross.engine.game.GameMode (rev 0) +++ trunk/services/picross.engine.game.GameMode 2013-01-23 08:21:27 UTC (rev 131) @@ -0,0 +1,2 @@ +picross.specific.game.random.ui.RandomGameModeUI +picross.specific.game.simple.ui.SimpleGameModeUI Deleted: trunk/services/picross.game.GameMode =================================================================== --- trunk/services/picross.game.GameMode 2013-01-18 07:47:31 UTC (rev 130) +++ trunk/services/picross.game.GameMode 2013-01-23 08:21:27 UTC (rev 131) @@ -1,2 +0,0 @@ -picross.game.random.ui.RandomGameModeUI -picross.game.simple.ui.SimpleGameModeUI Deleted: trunk/src/picross/Picross.java =================================================================== --- trunk/src/picross/Picross.java 2013-01-18 07:47:31 UTC (rev 130) +++ trunk/src/picross/Picross.java 2013-01-23 08:21:27 UTC (rev 131) @@ -1,104 +0,0 @@ -/* - * $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; - -import java.io.FileNotFoundException; -import java.io.IOException; -import java.io.InputStream; - -import java.net.URL; - -import java.util.Locale; - -//import org.apache.log4j.Logger; - -/** - * Helper class. - * - * @author Y. Norsa - */ -public final class Picross { - /*** Constant ***/ - - /** Data directory. */ - private static final String DATA_DIR = "/picross/data/"; - - /*** Static field ***/ - - /** The class' logger. */ - //private static Logger log = Logger.getLogger(Picross.class); - - /*** 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(); - } -} - Deleted: trunk/src/picross/PicrossException.java =================================================================== --- trunk/src/picross/PicrossException.java 2013-01-18 07:47:31 UTC (rev 130) +++ trunk/src/picross/PicrossException.java 2013-01-23 08:21:27 UTC (rev 131) @@ -1,67 +0,0 @@ -/* - * $Id$ - * - * Copyright (c) 2007 - * - * 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; - -/** - * General exception. - * - * @author Y. Norsa - */ -public class PicrossException extends Exception { - /*** Constant ***/ - - /** Serialisation ID. */ - private static final long serialVersionUID = 1716838910721477345L; - - /*** Constructors ***/ - - /** - * Constructor. - * - * @param cause parent exception - */ - public PicrossException(Throwable cause) { - super(cause); - } - - /** - * Constructor. - * - * @param msg message describing the exception - */ - public PicrossException(String msg) { - super(msg); - } -} - Deleted: trunk/src/picross/app/MainMenuAppUI.java =================================================================== --- trunk/src/picross/app/MainMenuAppUI.java 2013-01-18 07:47:31 UTC (rev 130) +++ trunk/src/picross/app/MainMenuAppUI.java 2013-01-23 08:21:27 UTC (rev 131) @@ -1,94 +0,0 @@ -/* - * $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.app; - -import java.awt.event.ActionListener; - -import picross.ui.MainMenuUI; -import picross.ui.PicrossController; - -/** - * Main menu for the application version. - * - * @author Y. Norsa - */ -public final class MainMenuAppUI extends MainMenuUI { - /*** Constants ***/ - - /** Serialisation ID. */ - private static final long serialVersionUID = 8153436550520127667L; - - /** "Play" button X coordinate. */ - private static final int PLAY_BUTTON_X = 50; - - /** "Play" button Y coordinate. */ - private static final int PLAY_BUTTON_Y = 225; - - /** Image for the "exit" button. */ - private static final String EXIT_BUTTON_IMAGE = "button-exit.png"; - - /** "Exit" button X coordinate. */ - private static final int EXIT_BUTTON_X = 250; - - /** "Exit" button Y coordinate. */ - private static final int EXIT_BUTTON_Y = 225; - - /*** Methods overloaded from the class MainMenuUI ***/ - - /** {@inheritDoc} */ - @Override - protected void init(ActionListener controller) { - super.init(controller); - - this.addButton(MainMenuAppUI.EXIT_BUTTON_IMAGE, - PicrossController.EXIT_CMD, - controller, - MainMenuAppUI.EXIT_BUTTON_X, - MainMenuAppUI.EXIT_BUTTON_Y); - } - - /** {@inheritDoc} */ - @Override - protected int getPlayButtonX() { - return MainMenuAppUI.PLAY_BUTTON_X; - } - - /** {@inheritDoc} */ - @Override - protected int getPlayButtonY() { - return MainMenuAppUI.PLAY_BUTTON_Y; - } -} - - Copied: trunk/src/picross/app/MainMenuAppUI.java (from rev 130, branches/engine_split/src/picross/app/MainMenuAppUI.java) =================================================================== --- trunk/src/picross/app/MainMenuAppUI.java (rev 0) +++ trunk/src/picross/app/MainMenuAppUI.java 2013-01-23 08:21:27 UTC (rev 131) @@ -0,0 +1,96 @@ +/* + * $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.app; + +import java.awt.event.ActionListener; + +import picross.common.ui.MainMenuUI; +import picross.common.ui.PicrossController; + +import picross.specific.ui.MenuController; + +/** + * Main menu for the application version. + * + * @author Y. Norsa + */ +public final class MainMenuAppUI extends MainMenuUI { + /*** Constants ***/ + + /** Serialisation ID. */ + private static final long serialVersionUID = 8153436550520127667L; + + /** "Play" button X coordinate. */ + private static final int PLAY_BUTTON_X = 50; + + /** "Play" button Y coordinate. */ + private static final int PLAY_BUTTON_Y = 225; + + /** Image for the "exit" button. */ + private static final String EXIT_BUTTON_IMAGE = "button_exit.png"; + + /** "Exit" button X coordinate. */ + private static final int EXIT_BUTTON_X = 250; + + /** "Exit" button Y coordinate. */ + private static final int EXIT_BUTTON_Y = 225; + + /*** Methods overloaded from the class MainMenuUI ***/ + + /** {@inheritDoc} */ + @Override + public void init(/*ActionListener*/MenuController controller) { + super.init(controller); + + this.addButton(MainMenuAppUI.EXIT_BUTTON_IMAGE, + PicrossController.EXIT_CMD, + controller, + MainMenuAppUI.EXIT_BUTTON_X, + MainMenuAppUI.EXIT_BUTTON_Y); + } + + /** {@inheritDoc} */ + @Override + protected int getPlayButtonX() { + return MainMenuAppUI.PLAY_BUTTON_X; + } + + /** {@inheritDoc} */ + @Override + protected int getPlayButtonY() { + return MainMenuAppUI.PLAY_BUTTON_Y; + } +} + + Modified: trunk/src/picross/app/PicrossApp.java =================================================================== --- trunk/src/picross/app/PicrossApp.java 2013-01-18 07:47:31 UTC (rev 130) +++ trunk/src/picross/app/PicrossApp.java 2013-01-23 08:21:27 UTC (rev 131) @@ -37,7 +37,7 @@ import org.apache.log4j.PropertyConfigurator; -import picross.ui.PicrossMediator; +import picross.specific.ui.PicrossMediator; /** * Main class of the application version. Modified: trunk/src/picross/app/PicrossAppUI.java =================================================================== --- trunk/src/picross/app/PicrossAppUI.java 2013-01-18 07:47:31 UTC (rev 130) +++ trunk/src/picross/app/PicrossAppUI.java 2013-01-23 08:21:27 UTC (rev 131) @@ -38,8 +38,8 @@ import javax.swing.JFrame; import javax.swing.JOptionPane; -import picross.ui.PicrossUI; -import picross.ui.PicrossView; +import picross.common.ui.PicrossUI; +import picross.common.ui.PicrossView; /** * Main window of the application version. Modified: trunk/src/picross/applet/MainMenuAppletUI.java =================================================================== --- trunk/src/picross/applet/MainMenuAppletUI.java 2013-01-18 07:47:31 UTC (rev 130) +++ trunk/src/picross/applet/MainMenuAppletUI.java 2013-01-23 08:21:27 UTC (rev 131) @@ -37,8 +37,10 @@ import java.awt.event.ActionListener; -import picross.ui.MainMenuUI; +import picross.common.ui.MainMenuUI; +import picross.specific.ui.MenuController; + /** * Main menu for the applet version. * @@ -60,7 +62,7 @@ /** {@inheritDoc} */ @Override - protected void init(ActionListener controller) { + public void init(/*ActionListener*/MenuController controller) { super.init(controller); this.setBackground(Color.WHITE); Modified: trunk/src/picross/applet/PicrossApplet.java =================================================================== --- trunk/src/picross/applet/PicrossApplet.java 2013-01-18 07:47:31 UTC (rev 130) +++ trunk/src/picross/applet/PicrossApplet.java 2013-01-23 08:21:27 UTC (rev 131) @@ -39,9 +39,9 @@ import javax.swing.JOptionPane; import javax.swing.SwingUtilities; -import picross.ui.PicrossMediator; -import picross.ui.PicrossUI; -import picross.ui.PicrossView; +import picross.specific.ui.PicrossMediator; +import picross.common.ui.PicrossUI; +import picross.common.ui.PicrossView; /** * Main class of the applet version. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |