From: <aki...@us...> - 2008-10-12 17:09:16
|
Revision: 5504 http://gridarta.svn.sourceforge.net/gridarta/?rev=5504&view=rev Author: akirschbaum Date: 2008-10-12 17:09:05 +0000 (Sun, 12 Oct 2008) Log Message: ----------- Remove FaceObjects.getFaceTreeFile(). Modified Paths: -------------- trunk/crossfire/src/cfeditor/gameobject/face/FaceObjects.java trunk/daimonin/src/daieditor/gameobject/face/FaceObjects.java trunk/src/app/net/sf/gridarta/gameobject/face/AbstractFaceObjects.java Modified: trunk/crossfire/src/cfeditor/gameobject/face/FaceObjects.java =================================================================== --- trunk/crossfire/src/cfeditor/gameobject/face/FaceObjects.java 2008-10-12 17:06:10 UTC (rev 5503) +++ trunk/crossfire/src/cfeditor/gameobject/face/FaceObjects.java 2008-10-12 17:09:05 UTC (rev 5504) @@ -36,17 +36,11 @@ * Creates a new instance. */ public FaceObjects() { - super(IGUIConstants.PNG_FILE); + super(IGUIConstants.PNG_FILE, IGUIConstants.FACETREE_FILE); } /** {@inheritDoc} */ @Override - protected String getFaceTreeFile() { - return IGUIConstants.FACETREE_FILE; - } - - /** {@inheritDoc} */ - @Override protected void writeTreeFileLine(@NotNull final BufferedWriter treeFile, final int faceNo, @NotNull final String faceName) throws IOException { treeFile.append(String.format("\\%05d\t.%s\n", faceNo, faceName)); } Modified: trunk/daimonin/src/daieditor/gameobject/face/FaceObjects.java =================================================================== --- trunk/daimonin/src/daieditor/gameobject/face/FaceObjects.java 2008-10-12 17:06:10 UTC (rev 5503) +++ trunk/daimonin/src/daieditor/gameobject/face/FaceObjects.java 2008-10-12 17:09:05 UTC (rev 5504) @@ -36,17 +36,11 @@ * Creates a new instance. */ public FaceObjects() { - super(IGUIConstants.PNG_FILE); + super(IGUIConstants.PNG_FILE, IGUIConstants.FACETREE_FILE); } /** {@inheritDoc} */ @Override - protected String getFaceTreeFile() { - return IGUIConstants.FACETREE_FILE; - } - - /** {@inheritDoc} */ - @Override protected void writeTreeFileLine(@NotNull final BufferedWriter treeFile, final int faceNo, @NotNull final String faceName) throws IOException { treeFile.append(faceName).append('\n'); } Modified: trunk/src/app/net/sf/gridarta/gameobject/face/AbstractFaceObjects.java =================================================================== --- trunk/src/app/net/sf/gridarta/gameobject/face/AbstractFaceObjects.java 2008-10-12 17:06:10 UTC (rev 5503) +++ trunk/src/app/net/sf/gridarta/gameobject/face/AbstractFaceObjects.java 2008-10-12 17:09:05 UTC (rev 5504) @@ -82,12 +82,20 @@ private final String pngFile; /** + * The filename of the face tree file. + */ + @NotNull + private final String faceTreeFile; + + /** * Creates a new instance. - * @param pngFile the filename of the collected image file. + * @param pngFile the filename of the collected image file + * @param faceTreeFile the filename of the face tree file */ - protected AbstractFaceObjects(@NotNull final String pngFile) { + protected AbstractFaceObjects(@NotNull final String pngFile, @NotNull final String faceTreeFile) { super(ACTION_FACTORY.getString("nameOfFaceObject")); this.pngFile = pngFile; + this.faceTreeFile = faceTreeFile; } /** @@ -167,7 +175,7 @@ */ private void collectTreeFile(@NotNull final Progress progress, @NotNull final File dir, @NotNull final File baseDir) throws IOException { final int stripPath = baseDir.getAbsolutePath().length(); - final BufferedWriter treeFile = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(new File(dir, getFaceTreeFile())), "us-ascii")); + final BufferedWriter treeFile = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(new File(dir, faceTreeFile)), "us-ascii")); try { final int numOfFaceObjects = size(); progress.setLabel(ACTION_FACTORY.getString("archCollectTree"), numOfFaceObjects); @@ -225,12 +233,6 @@ } /** - * Returns the filename of the face tree file.. - * @return the filename - */ - protected abstract String getFaceTreeFile(); - - /** * Writes one line to the face tree file. * @param treeFile the face tree file to write * @param faceNo the face number This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |