You can subscribe to this list here.
2006 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(103) |
Jun
(121) |
Jul
(16) |
Aug
(67) |
Sep
(126) |
Oct
(161) |
Nov
(164) |
Dec
(588) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2007 |
Jan
(394) |
Feb
(181) |
Mar
(131) |
Apr
(180) |
May
(255) |
Jun
(11) |
Jul
(79) |
Aug
(70) |
Sep
(274) |
Oct
(138) |
Nov
(195) |
Dec
(8) |
2008 |
Jan
(3) |
Feb
(142) |
Mar
(162) |
Apr
(124) |
May
(148) |
Jun
(157) |
Jul
(425) |
Aug
(373) |
Sep
(264) |
Oct
(315) |
Nov
(225) |
Dec
(6) |
2009 |
Jan
(67) |
Feb
(78) |
Mar
(279) |
Apr
(294) |
May
(92) |
Jun
(65) |
Jul
(134) |
Aug
(41) |
Sep
(138) |
Oct
(125) |
Nov
(126) |
Dec
(122) |
2010 |
Jan
(15) |
Feb
(48) |
Mar
(9) |
Apr
(195) |
May
(373) |
Jun
(507) |
Jul
(42) |
Aug
(16) |
Sep
(38) |
Oct
(81) |
Nov
(64) |
Dec
(18) |
2011 |
Jan
(13) |
Feb
(12) |
Mar
(39) |
Apr
(1) |
May
(2) |
Jun
(27) |
Jul
(27) |
Aug
(31) |
Sep
(14) |
Oct
(102) |
Nov
(20) |
Dec
(37) |
2012 |
Jan
(22) |
Feb
(1) |
Mar
(1) |
Apr
(2) |
May
(2) |
Jun
(18) |
Jul
(6) |
Aug
(1) |
Sep
(1) |
Oct
|
Nov
|
Dec
|
2013 |
Jan
(1) |
Feb
(2) |
Mar
(1) |
Apr
(1) |
May
(47) |
Jun
(7) |
Jul
(107) |
Aug
|
Sep
|
Oct
(112) |
Nov
(31) |
Dec
(17) |
2014 |
Jan
(29) |
Feb
(111) |
Mar
(34) |
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(2) |
Nov
(18) |
Dec
(10) |
From: <aki...@us...> - 2006-12-05 21:53:14
|
Revision: 909 http://svn.sourceforge.net/gridarta/?rev=909&view=rev Author: akirschbaum Date: 2006-12-05 13:53:12 -0800 (Tue, 05 Dec 2006) Log Message: ----------- Add explicit field initialization. Modified Paths: -------------- trunk/daimonin/src/daieditor/CMainView.java Modified: trunk/daimonin/src/daieditor/CMainView.java =================================================================== --- trunk/daimonin/src/daieditor/CMainView.java 2006-12-05 21:50:13 UTC (rev 908) +++ trunk/daimonin/src/daieditor/CMainView.java 2006-12-05 21:53:12 UTC (rev 909) @@ -150,7 +150,7 @@ /** <code>true</code> when pickmap is active, <code>false</code> when * archlist is active. */ - private boolean pickmapActive; + private boolean pickmapActive = false; /** <code>true</code> when archpanel is merged into the bottom panel. */ private boolean mapTileListBottom = true; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2006-12-05 21:50:13
|
Revision: 908 http://svn.sourceforge.net/gridarta/?rev=908&view=rev Author: christianhujer Date: 2006-12-05 13:50:13 -0800 (Tue, 05 Dec 2006) Log Message: ----------- Fixed Javadoc bugs. Modified Paths: -------------- trunk/crossfire/src/cfeditor/filter/AttributeFilter.java trunk/crossfire/src/cfeditor/filter/BasicFilterConfig.java trunk/crossfire/src/cfeditor/filter/ConfigEvent.java trunk/crossfire/src/cfeditor/filter/ConfigEventType.java trunk/crossfire/src/cfeditor/filter/ConfigListener.java trunk/crossfire/src/cfeditor/filter/Filter.java trunk/crossfire/src/cfeditor/filter/FilterConfig.java trunk/crossfire/src/cfeditor/filter/NamedFilterConfig.java trunk/crossfire/src/cfeditor/filter/NamedFilterEvent.java trunk/crossfire/src/cfeditor/filter/NamedFilterEventType.java trunk/crossfire/src/cfeditor/filter/NamedFilterList.java trunk/crossfire/src/cfeditor/filter/NamedFilterListener.java trunk/crossfire/src/cfeditor/filter/SimpleFilterConfig.java Modified: trunk/crossfire/src/cfeditor/filter/AttributeFilter.java =================================================================== --- trunk/crossfire/src/cfeditor/filter/AttributeFilter.java 2006-12-05 21:47:28 UTC (rev 907) +++ trunk/crossfire/src/cfeditor/filter/AttributeFilter.java 2006-12-05 21:50:13 UTC (rev 908) @@ -18,13 +18,14 @@ import org.jdom.Element; /** + * Filter for attributes. + * <p/> + * Checks a list of 'Attribute = value' to have a match. We have a match when + * all Attribute = Value are met on the same Arch. If you want to check on + * various Arch at same time (for example, an arch has no_pass 1 and the same + * or another has no_fly 1 which mean the square is unpassable), better take a + * look at LazyAttributeFilter * @author tchize - * <p/> - * Checks a list of 'Attribute = value' to have a match. We have a match when - * all Attribute = Value are met on the same Arch. If you want to check on - * various Arch at same time (for example, an arch has no_pass 1 and the same - * or another has no_fly 1 which mean the square is unpassable), better take a - * look at LazyAttributeFilter */ public class AttributeFilter implements Filter { @@ -34,7 +35,7 @@ private int matchType = -1; - /** Creates an AttributeFilter */ + /** Creates an AttributeFilter. */ public AttributeFilter() { attrList = new HashMap<String, String>(); } Modified: trunk/crossfire/src/cfeditor/filter/BasicFilterConfig.java =================================================================== --- trunk/crossfire/src/cfeditor/filter/BasicFilterConfig.java 2006-12-05 21:47:28 UTC (rev 907) +++ trunk/crossfire/src/cfeditor/filter/BasicFilterConfig.java 2006-12-05 21:50:13 UTC (rev 908) @@ -11,10 +11,8 @@ import org.apache.log4j.Logger; /** + * Abstract base class for filter configurations. * @author tchize - * <p/> - * To change the template for this generated type comment go to - * Window>Preferences>Java>Code Generation>Code and Comments */ @SuppressWarnings({"AbstractClassWithoutAbstractMethods"}) public abstract class BasicFilterConfig implements FilterConfig { Modified: trunk/crossfire/src/cfeditor/filter/ConfigEvent.java =================================================================== --- trunk/crossfire/src/cfeditor/filter/ConfigEvent.java 2006-12-05 21:47:28 UTC (rev 907) +++ trunk/crossfire/src/cfeditor/filter/ConfigEvent.java 2006-12-05 21:50:13 UTC (rev 908) @@ -10,10 +10,8 @@ import java.util.EventObject; /** + * Event that's fired in case of changes to the configuration. * @author tchize - * <p/> - * To change the template for this generated type comment go to - * Window>Preferences>Java>Code Generation>Code and Comments */ public class ConfigEvent extends EventObject { Modified: trunk/crossfire/src/cfeditor/filter/ConfigEventType.java =================================================================== --- trunk/crossfire/src/cfeditor/filter/ConfigEventType.java 2006-12-05 21:47:28 UTC (rev 907) +++ trunk/crossfire/src/cfeditor/filter/ConfigEventType.java 2006-12-05 21:50:13 UTC (rev 908) @@ -1,7 +1,7 @@ package cfeditor.filter; /** - * TODO + * Enumeration of Configuration event types. * * @author <a href="mailto:ch...@ri...">Christian Hujer</a> */ Modified: trunk/crossfire/src/cfeditor/filter/ConfigListener.java =================================================================== --- trunk/crossfire/src/cfeditor/filter/ConfigListener.java 2006-12-05 21:47:28 UTC (rev 907) +++ trunk/crossfire/src/cfeditor/filter/ConfigListener.java 2006-12-05 21:50:13 UTC (rev 908) @@ -10,10 +10,8 @@ import java.util.EventListener; /** + * Listener for ConfigEvents. * @author tchize - * <p/> - * To change the template for this generated type comment go to - * Window>Preferences>Java>Code Generation>Code and Comments */ public interface ConfigListener extends EventListener { Modified: trunk/crossfire/src/cfeditor/filter/Filter.java =================================================================== --- trunk/crossfire/src/cfeditor/filter/Filter.java 2006-12-05 21:47:28 UTC (rev 907) +++ trunk/crossfire/src/cfeditor/filter/Filter.java 2006-12-05 21:50:13 UTC (rev 908) @@ -12,13 +12,14 @@ import org.jdom.Element; /** + * Interface for Filters. + * <p/> + * Interface used to filter and analyse map. + * Basically a filter gets an GameObject and + * tells if it gots a match. + * It also get reset when map square is changed, + * So more complex behaviour can be achieved. * @author tchize - * <p/> - * Interface used to filter and analyse map. - * Basically a filter gets an GameObject and - * tells if it gots a match. - * It also get reset when map square is changed, - * So more complex behaviour can be achieved */ public interface Filter { @@ -29,6 +30,7 @@ * Unless hasGlobalMatch() returns true, when a match occured, match() is * not called with the remaining ArchObjects on the map square and a reset * is issued. + * @param config Filterconfiguration to use * @param object The Object being analysed on the map * @return true if it match the criterion, false otherwise. This value is * ignored if hasGlobalMatch() returns true. @@ -39,6 +41,7 @@ * This tells the filter we have finished with current map square and, * perhaps, we are jumping on next one. If hasGlobalMatch() returns true, * the returning value of reset() is used to know if we had a match. + * @param config Filterconfiguration to use * @return true if we had a global match on map square. False if we had * a global mismatch or the filter does not use global match. */ @@ -50,6 +53,7 @@ * match, the return value of match() is ignored and the returning value of * reset() is used as replacement. This should mainly used by complex * analyse filters. + * @param config Filterconfiguration to use * @return true if match can be decided only when all Arches on a map * square are analyzed. False otherwise. */ Modified: trunk/crossfire/src/cfeditor/filter/FilterConfig.java =================================================================== --- trunk/crossfire/src/cfeditor/filter/FilterConfig.java 2006-12-05 21:47:28 UTC (rev 907) +++ trunk/crossfire/src/cfeditor/filter/FilterConfig.java 2006-12-05 21:50:13 UTC (rev 908) @@ -8,10 +8,8 @@ package cfeditor.filter; /** + * Interface for filter configurations. * @author tchize - * <p/> - * To change the template for this generated type comment go to - * Window>Preferences>Java>Code Generation>Code and Comments */ public interface FilterConfig { Modified: trunk/crossfire/src/cfeditor/filter/NamedFilterConfig.java =================================================================== --- trunk/crossfire/src/cfeditor/filter/NamedFilterConfig.java 2006-12-05 21:47:28 UTC (rev 907) +++ trunk/crossfire/src/cfeditor/filter/NamedFilterConfig.java 2006-12-05 21:50:13 UTC (rev 908) @@ -12,10 +12,8 @@ import org.apache.log4j.Logger; /** + * Filter configuration that has a name. * @author tchize - * <p/> - * To change the template for this generated type comment go to - * Window>Preferences>Java>Code Generation>Code and Comments */ public class NamedFilterConfig extends BasicFilterConfig implements NamedFilterListener, ConfigListener { Modified: trunk/crossfire/src/cfeditor/filter/NamedFilterEvent.java =================================================================== --- trunk/crossfire/src/cfeditor/filter/NamedFilterEvent.java 2006-12-05 21:47:28 UTC (rev 907) +++ trunk/crossfire/src/cfeditor/filter/NamedFilterEvent.java 2006-12-05 21:50:13 UTC (rev 908) @@ -10,10 +10,8 @@ import java.util.EventObject; /** + * Event object that's fired on named filters. * @author tchize - * <p/> - * To change the template for this generated type comment go to - * Window>Preferences>Java>Code Generation>Code and Comments */ public class NamedFilterEvent extends EventObject { Modified: trunk/crossfire/src/cfeditor/filter/NamedFilterEventType.java =================================================================== --- trunk/crossfire/src/cfeditor/filter/NamedFilterEventType.java 2006-12-05 21:47:28 UTC (rev 907) +++ trunk/crossfire/src/cfeditor/filter/NamedFilterEventType.java 2006-12-05 21:50:13 UTC (rev 908) @@ -1,8 +1,7 @@ package cfeditor.filter; /** - * TODO - * + * Enumeration of event types of {@link NamedFilterEvent}s. * @author <a href="mailto:ch...@ri...">Christian Hujer</a> */ public enum NamedFilterEventType { Modified: trunk/crossfire/src/cfeditor/filter/NamedFilterList.java =================================================================== --- trunk/crossfire/src/cfeditor/filter/NamedFilterList.java 2006-12-05 21:47:28 UTC (rev 907) +++ trunk/crossfire/src/cfeditor/filter/NamedFilterList.java 2006-12-05 21:50:13 UTC (rev 908) @@ -29,12 +29,13 @@ import org.jdom.Element; /** + * Filter that aggregates named filters. + * <p/> + * This filter agregate a list of named filters. + * Each subFilter can be (dis)enabled. + * The names of filters are harcoded for now. + * They may need to be loaded from, eg, an xml file later. * @author tchize - * <p/> - * This filter agregate a list of named filters. - * Each subFilter can be (dis)enabled. - * The names of filters are harcoded for now. - * They may need to be loaded from, eg, an xml file later. */ public class NamedFilterList implements Filter { @@ -52,7 +53,7 @@ return DEFAULT_LIST; } - /** create a new NameFilterList */ + /** Create a new NameFilterList. */ public NamedFilterList() { inverted = false; subFilters = new LinkedHashMap<String, Filter>(); Modified: trunk/crossfire/src/cfeditor/filter/NamedFilterListener.java =================================================================== --- trunk/crossfire/src/cfeditor/filter/NamedFilterListener.java 2006-12-05 21:47:28 UTC (rev 907) +++ trunk/crossfire/src/cfeditor/filter/NamedFilterListener.java 2006-12-05 21:50:13 UTC (rev 908) @@ -10,10 +10,8 @@ import java.util.EventListener; /** + * Listener for events on named filters. * @author tchize - * <p/> - * To change the template for this generated type comment go to - * Window>Preferences>Java>Code Generation>Code and Comments */ public interface NamedFilterListener extends EventListener { Modified: trunk/crossfire/src/cfeditor/filter/SimpleFilterConfig.java =================================================================== --- trunk/crossfire/src/cfeditor/filter/SimpleFilterConfig.java 2006-12-05 21:47:28 UTC (rev 907) +++ trunk/crossfire/src/cfeditor/filter/SimpleFilterConfig.java 2006-12-05 21:50:13 UTC (rev 908) @@ -11,10 +11,8 @@ import java.util.Map; /** + * Simple filter configuration. * @author tchize - * <p/> - * To change the template for this generated type comment go to - * Window>Preferences>Java>Code Generation>Code and Comments */ public class SimpleFilterConfig extends BasicFilterConfig { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2006-12-05 21:47:32
|
Revision: 907 http://svn.sourceforge.net/gridarta/?rev=907&view=rev Author: akirschbaum Date: 2006-12-05 13:47:28 -0800 (Tue, 05 Dec 2006) Log Message: ----------- Unify annotations. Modified Paths: -------------- trunk/crossfire/src/cfeditor/gameobject/ArchetypeParser.java trunk/crossfire/src/cfeditor/gui/map/DefaultLevelRenderer.java trunk/crossfire/src/cfeditor/map/MapArchObject.java trunk/daimonin/src/daieditor/CMainControl.java Modified: trunk/crossfire/src/cfeditor/gameobject/ArchetypeParser.java =================================================================== --- trunk/crossfire/src/cfeditor/gameobject/ArchetypeParser.java 2006-12-05 21:26:36 UTC (rev 906) +++ trunk/crossfire/src/cfeditor/gameobject/ArchetypeParser.java 2006-12-05 21:47:28 UTC (rev 907) @@ -168,7 +168,7 @@ /** {@inheritDoc} */ @Nullable - public GameObject parseArchetypeFromStream(final BufferedReader in, @Nullable final GameObject prototype, final String line, final String archName, int index, final String fname) throws IOException { + public GameObject parseArchetypeFromStream(final BufferedReader in, @Nullable final GameObject prototype, @Nullable final String line, @Nullable final String archName, int index, final String fname) throws IOException { // start with new clean GameObject instance GameObject archetype; GameObject archlast = null; Modified: trunk/crossfire/src/cfeditor/gui/map/DefaultLevelRenderer.java =================================================================== --- trunk/crossfire/src/cfeditor/gui/map/DefaultLevelRenderer.java 2006-12-05 21:26:36 UTC (rev 906) +++ trunk/crossfire/src/cfeditor/gui/map/DefaultLevelRenderer.java 2006-12-05 21:47:28 UTC (rev 907) @@ -50,6 +50,8 @@ import javax.swing.JComponent; import net.sf.gridarta.Size2D; import org.apache.log4j.Logger; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; /** * The component that does the actual rendering of tiles in the palette. @@ -469,7 +471,7 @@ // i'll change it to a fixed point... i want use this for mouse tracking // and don't want have millions of mallocs here // this should be reworked more intelligent later - public Point getTileLocationAt(final Point point) { + @Nullable public Point getTileLocationAt(@NotNull final Point point) { try { renderTransform.inverseTransform(point, point); } catch (final NoninvertibleTransformException e) { Modified: trunk/crossfire/src/cfeditor/map/MapArchObject.java =================================================================== --- trunk/crossfire/src/cfeditor/map/MapArchObject.java 2006-12-05 21:26:36 UTC (rev 906) +++ trunk/crossfire/src/cfeditor/map/MapArchObject.java 2006-12-05 21:47:28 UTC (rev 907) @@ -29,6 +29,8 @@ import java.io.IOException; import net.sf.gridarta.Size2D; import net.sf.gridarta.map.AbstractMapArchObject; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; /** * MapArchObject contains the specific meta data about a map that is stored in @@ -182,7 +184,7 @@ return tilePaths[n]; } - public void setTilePath(final int n, final String tilePath) { + public void setTilePath(final int n, @Nullable final String tilePath) { tilePaths[n] = tilePath; } @@ -286,7 +288,7 @@ * Append 'text' to the map text. * @param text string to add */ - public void addText(final String text) { + public void addText(@NotNull final String text) { msgText.append(text); } @@ -305,7 +307,7 @@ } /** @return the maptext */ - public String getText() { + @NotNull public String getText() { return msgText.toString(); } @@ -333,7 +335,7 @@ * otherwise false * @throws IOException in case of I/O problems */ - public boolean parseMapArch(final BufferedReader reader, final String fname) throws IOException { + public boolean parseMapArch(@NotNull final BufferedReader reader, @NotNull final String fname) throws IOException { setFileName(fname); String line2; // input line, includes leading and trailing white space boolean loreflag = false; // flag for lore-text @@ -470,7 +472,7 @@ * @param s the attribute line to be parsed * @return attribute value, zero if value not readable */ - private static int getLineValue(final String s) { + private static int getLineValue(@NotNull final String s) { try { if (s.lastIndexOf(" ") > 0) { return Integer.valueOf(s.substring(s.lastIndexOf(" ") + 1)); @@ -498,7 +500,7 @@ * @throws java.io.FileNotFoundException the mapfile could not be found * @throws IOException an I/O error occured during writing to the file */ - public void writeMapArch(final Appendable appendable) throws IOException { + public void writeMapArch(@NotNull final Appendable appendable) throws IOException { int i; appendable.append("arch map\n"); Modified: trunk/daimonin/src/daieditor/CMainControl.java =================================================================== --- trunk/daimonin/src/daieditor/CMainControl.java 2006-12-05 21:26:36 UTC (rev 906) +++ trunk/daimonin/src/daieditor/CMainControl.java 2006-12-05 21:47:28 UTC (rev 907) @@ -1176,7 +1176,7 @@ * @param view only create a view if this is true * @return MapControl of loaded file or <code>null</code> if the file couldn't be opened */ - public MapControl openFile(final File file, final boolean view) { + @Nullable public MapControl openFile(final File file, final boolean view) { // First look whether the file isn't already open. // If so, return the previously loaded map. try { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2006-12-05 21:26:36
|
Revision: 906 http://svn.sourceforge.net/gridarta/?rev=906&view=rev Author: akirschbaum Date: 2006-12-05 13:26:36 -0800 (Tue, 05 Dec 2006) Log Message: ----------- Unify isMultiArchFittingToMap() implementation. Modified Paths: -------------- trunk/crossfire/src/cfeditor/map/DefaultMapModel.java trunk/daimonin/src/daieditor/map/DefaultMapModel.java Modified: trunk/crossfire/src/cfeditor/map/DefaultMapModel.java =================================================================== --- trunk/crossfire/src/cfeditor/map/DefaultMapModel.java 2006-12-05 21:13:06 UTC (rev 905) +++ trunk/crossfire/src/cfeditor/map/DefaultMapModel.java 2006-12-05 21:26:36 UTC (rev 906) @@ -35,6 +35,7 @@ import java.awt.Point; import java.util.List; import net.sf.gridarta.Size2D; +import net.sf.gridarta.gameobject.Archetype; import net.sf.gridarta.map.AbstractMapModel; import org.apache.log4j.Logger; import org.jetbrains.annotations.NotNull; @@ -193,18 +194,23 @@ /** {@inheritDoc} */ public boolean isMultiArchFittingToMap(final String archName, final Point pos, final boolean allowDouble) { - for (GameObject part = getArchetype(archName); part != null; part = part.getMultiNext()) { - final int mapx = pos.x + part.getMultiX(); - final int mapy = pos.y + part.getMultiY(); - if (!isPointValid(new Point(mapx, mapy))) { - // outside map + final Archetype<GameObject> head = getArchetype(archName); + final Point mapH = new Point(head.getMultiX(), head.getMultiY()); + mapH.translate(pos.x, pos.y); + if (!isPointValid(mapH)) { + return false; + } + for (GameObject tail = head.getMultiNext(); tail != null; tail = tail.getMultiNext()) { + final Point mapT = new Point(tail.getMultiX(), tail.getMultiY()); + mapT.translate(pos.x, pos.y); + // outside map + if (!isPointValid(mapT)) { return false; } if (!allowDouble) { - final String temp = part.getArchetypeName(); - - for (final GameObject node : getMapSquare(new Point(mapx, mapy))) { + final String temp = tail.getArchetypeName(); + for (final GameObject node : mapGrid[mapT.x][mapT.y]) { if (node.getArchetypeName().equals(temp)) { return false; } Modified: trunk/daimonin/src/daieditor/map/DefaultMapModel.java =================================================================== --- trunk/daimonin/src/daieditor/map/DefaultMapModel.java 2006-12-05 21:13:06 UTC (rev 905) +++ trunk/daimonin/src/daieditor/map/DefaultMapModel.java 2006-12-05 21:26:36 UTC (rev 906) @@ -115,8 +115,9 @@ } if (!allowDouble) { + final String temp = tail.getArchetypeName(); for (final GameObject node : mapGrid[mapT.x][mapT.y]) { - if (node.getArchetypeName().equals(tail.getArchetypeName())) { + if (node.getArchetypeName().equals(temp)) { return false; } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2006-12-05 21:13:12
|
Revision: 905 http://svn.sourceforge.net/gridarta/?rev=905&view=rev Author: akirschbaum Date: 2006-12-05 13:13:06 -0800 (Tue, 05 Dec 2006) Log Message: ----------- Unify addArchToMap() implementation. Modified Paths: -------------- trunk/crossfire/src/cfeditor/map/DefaultMapModel.java trunk/daimonin/src/daieditor/map/DefaultMapModel.java Modified: trunk/crossfire/src/cfeditor/map/DefaultMapModel.java =================================================================== --- trunk/crossfire/src/cfeditor/map/DefaultMapModel.java 2006-12-05 20:59:16 UTC (rev 904) +++ trunk/crossfire/src/cfeditor/map/DefaultMapModel.java 2006-12-05 21:13:06 UTC (rev 905) @@ -251,32 +251,32 @@ archetype = getArchetype(archName); } - GameObject newHead = null; - for (GameObject oldPart = archetype; oldPart != null; oldPart = oldPart.getMultiNext()) { - final GameObject newPart = oldPart.createArch(); - if (oldPart == archetype) { - newHead = newPart; + GameObject head = null; + for (GameObject archetypePart = archetype; archetypePart != null; archetypePart = archetypePart.getMultiNext()) { + final GameObject part = archetypePart.createArch(); + if (archetypePart == archetype) { + head = part; } else { - newHead.addTailPart(newPart); + head.addTailPart(part); } - final int mapx = pos.x + newPart.getMultiX(); - final int mapy = pos.y + newPart.getMultiY(); + final int mapx = pos.x + part.getMultiX(); + final int mapy = pos.y + part.getMultiY(); - newPart.setMapX(mapx); - newPart.setMapY(mapy); + part.setMapX(mapx); + part.setMapY(mapy); if (insertBelow && !mapGrid[mapx][mapy].isEmpty()) { - newPart.propagateElevation(mapGrid[mapx][mapy].getFirst()); + part.propagateElevation(mapGrid[mapx][mapy].getFirst()); } if (insertBelow) { - mapGrid[mapx][mapy].addFirst(newPart); + mapGrid[mapx][mapy].addFirst(part); } else { - mapGrid[mapx][mapy].addLast(newPart); + mapGrid[mapx][mapy].addLast(part); } - mainControl.getArchetypeParser().postParseGameObject(newPart, mapControl.getActiveEditType()); + mainControl.getArchetypeParser().postParseGameObject(part, mapControl.getActiveEditType()); } // Level data has changed Modified: trunk/daimonin/src/daieditor/map/DefaultMapModel.java =================================================================== --- trunk/daimonin/src/daieditor/map/DefaultMapModel.java 2006-12-05 20:59:16 UTC (rev 904) +++ trunk/daimonin/src/daieditor/map/DefaultMapModel.java 2006-12-05 21:13:06 UTC (rev 905) @@ -143,34 +143,32 @@ Toolkit.getDefaultToolkit().beep(); return false; } - final GameObject head = archetype.createArch(); - head.setMapX(pos.x); - head.setMapY(pos.y); - if (insertBelow) { - mapGrid[pos.x][pos.y].addFirst(head); - } else { - mapGrid[pos.x][pos.y].addLast(head); - } - head.setDirection(archetype.getDirection()); - mainControl.getArchetypeParser().postParseGameObject(head, mapControl.getActiveEditType()); - head.setObjectFace(); - for (GameObject tailArch = archetype.getMultiNext(); tailArch != null; tailArch = tailArch.getMultiNext()) { - final Point posT = new Point(tailArch.getMultiX(), tailArch.getMultiY()); - posT.translate(pos.x, pos.y); - final GameObject tail = tailArch.createArch(); - head.addTailPart(tail); - tail.setMapX(posT.x); - tail.setMapY(posT.y); + GameObject head = null; + for (GameObject archetypePart = archetype; archetypePart != null; archetypePart = archetypePart.getMultiNext()) { + final GameObject part = archetypePart.createArch(); + if (archetypePart == archetype) { + head = part; + } else { + head.addTailPart(part); + } + + final int mapx = pos.x + part.getMultiX(); + final int mapy = pos.y + part.getMultiY(); + + part.setMapX(mapx); + part.setMapY(mapy); if (insertBelow) { - mapGrid[posT.x][posT.y].addFirst(tail); + mapGrid[mapx][mapy].addFirst(part); } else { - mapGrid[posT.x][posT.y].addLast(tail); + mapGrid[mapx][mapy].addLast(part); } - tail.setDirection(tailArch.getDirection()); - mainControl.getArchetypeParser().postParseGameObject(tail, mapControl.getActiveEditType()); - tail.setObjectFace(); + + part.setDirection(archetypePart.getDirection()); + mainControl.getArchetypeParser().postParseGameObject(part, mapControl.getActiveEditType()); + part.setObjectFace(); } + return true; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2006-12-05 20:59:16
|
Revision: 904 http://svn.sourceforge.net/gridarta/?rev=904&view=rev Author: akirschbaum Date: 2006-12-05 12:59:16 -0800 (Tue, 05 Dec 2006) Log Message: ----------- Rename variable name. Modified Paths: -------------- trunk/crossfire/src/cfeditor/map/DefaultMapModel.java Modified: trunk/crossfire/src/cfeditor/map/DefaultMapModel.java =================================================================== --- trunk/crossfire/src/cfeditor/map/DefaultMapModel.java 2006-12-05 20:54:02 UTC (rev 903) +++ trunk/crossfire/src/cfeditor/map/DefaultMapModel.java 2006-12-05 20:59:16 UTC (rev 904) @@ -229,8 +229,6 @@ * @return true if insertion successful, false if not */ public boolean addArchToMap(String archName, final Point pos, final boolean allowDouble, final boolean join, final boolean insertBelow) { - GameObject newarch; // our new suckers (copys, not ref ptrs) - if (archName == null || !isPointValid(pos)) { return false; } @@ -238,25 +236,25 @@ return false; } - newarch = getArchetype(archName); // temp. store this arch - if (newarch == null) { + GameObject archetype = getArchetype(archName); + if (archetype == null) { return false; } if (mainControl.getAutojoin() && join == JOIN_ENABLE && mainControl.getJoinlist() != null - && newarch.getJoinList() != null && !newarch.isMulti()) { + && archetype.getJoinList() != null && !archetype.isMulti()) { // do autojoining if enabled - archName = newarch.getJoinList().joinInsert(this, pos); + archName = archetype.getJoinList().joinInsert(this, pos); if (archName == null) { return false; // only one autojoin type per square allowed } - newarch = getArchetype(archName); + archetype = getArchetype(archName); } GameObject newHead = null; - for (GameObject oldPart = newarch; oldPart != null; oldPart = oldPart.getMultiNext()) { + for (GameObject oldPart = archetype; oldPart != null; oldPart = oldPart.getMultiNext()) { final GameObject newPart = oldPart.createArch(); - if (oldPart == newarch) { + if (oldPart == archetype) { newHead = newPart; } else { newHead.addTailPart(newPart); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2006-12-05 20:54:04
|
Revision: 903 http://svn.sourceforge.net/gridarta/?rev=903&view=rev Author: akirschbaum Date: 2006-12-05 12:54:02 -0800 (Tue, 05 Dec 2006) Log Message: ----------- Simplify expression. Modified Paths: -------------- trunk/daimonin/src/daieditor/map/DefaultMapModel.java Modified: trunk/daimonin/src/daieditor/map/DefaultMapModel.java =================================================================== --- trunk/daimonin/src/daieditor/map/DefaultMapModel.java 2006-12-05 20:46:25 UTC (rev 902) +++ trunk/daimonin/src/daieditor/map/DefaultMapModel.java 2006-12-05 20:54:02 UTC (rev 903) @@ -128,7 +128,7 @@ /** {@inheritDoc} */ public boolean addArchToMap(final String archName, final Point pos, final boolean allowDouble, final boolean insertBelow) { - if (archName == null || archName.length() == 0 || pos.x == -1 || pos.y == -1 || pos.x >= mapSize.getWidth() || pos.y >= mapSize.getHeight()) { + if (archName == null || archName.length() == 0 || !isPointValid(pos)) { return false; } if (!isMultiArchFittingToMap(archName, pos, allowDouble)) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2006-12-05 20:46:32
|
Revision: 902 http://svn.sourceforge.net/gridarta/?rev=902&view=rev Author: akirschbaum Date: 2006-12-05 12:46:25 -0800 (Tue, 05 Dec 2006) Log Message: ----------- Fix typo i method name. Modified Paths: -------------- trunk/daimonin/src/daieditor/map/MapControl.java Modified: trunk/daimonin/src/daieditor/map/MapControl.java =================================================================== --- trunk/daimonin/src/daieditor/map/MapControl.java 2006-12-05 20:43:21 UTC (rev 901) +++ trunk/daimonin/src/daieditor/map/MapControl.java 2006-12-05 20:46:25 UTC (rev 902) @@ -195,7 +195,7 @@ final Size2D mapSize = mapModel.getMapSize(); final Point pos = new Point(); for (pos.x = 0; pos.x < mapSize.getWidth(); pos.x++) { - for (pos.y = 0; pos.y < mapSize.getWidth(); pos.y++) { + for (pos.y = 0; pos.y < mapSize.getHeight(); pos.y++) { for (final GameObject arch : mapModel.getMapSquare(pos)) { // calculate the new edit type if (arch.isTail()) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2006-12-05 20:43:21
|
Revision: 901 http://svn.sourceforge.net/gridarta/?rev=901&view=rev Author: akirschbaum Date: 2006-12-05 12:43:21 -0800 (Tue, 05 Dec 2006) Log Message: ----------- Unify whitespace. Modified Paths: -------------- trunk/crossfire/src/cfeditor/CFArchTypeList.java trunk/daimonin/src/daieditor/CFJavaEditor.java trunk/daimonin/src/daieditor/gameobject/GameObject.java trunk/daimonin/src/daieditor/messages_de.properties Modified: trunk/crossfire/src/cfeditor/CFArchTypeList.java =================================================================== --- trunk/crossfire/src/cfeditor/CFArchTypeList.java 2006-12-05 20:37:53 UTC (rev 900) +++ trunk/crossfire/src/cfeditor/CFArchTypeList.java 2006-12-05 20:43:21 UTC (rev 901) @@ -584,7 +584,6 @@ return type; } - /** * Returns whether this typelist contains no data. * @return <code>true</code> if this typelist contains no data, otherwise <code>false</code>. Modified: trunk/daimonin/src/daieditor/CFJavaEditor.java =================================================================== --- trunk/daimonin/src/daieditor/CFJavaEditor.java 2006-12-05 20:37:53 UTC (rev 900) +++ trunk/daimonin/src/daieditor/CFJavaEditor.java 2006-12-05 20:43:21 UTC (rev 901) @@ -114,6 +114,7 @@ } mainControl.createImageWanted(outfile); // create map image } + mainControl.refreshMenusAndToolbars(); mainControl.getMainView().setVisible(true); splashScreen.hide(); Modified: trunk/daimonin/src/daieditor/gameobject/GameObject.java =================================================================== --- trunk/daimonin/src/daieditor/gameobject/GameObject.java 2006-12-05 20:37:53 UTC (rev 900) +++ trunk/daimonin/src/daieditor/gameobject/GameObject.java 2006-12-05 20:43:21 UTC (rev 901) @@ -781,6 +781,7 @@ */ } } + // return errors, or null if empty final String retErrors = errors.toString(); if (retErrors.trim().length() == 0) { Modified: trunk/daimonin/src/daieditor/messages_de.properties =================================================================== --- trunk/daimonin/src/daieditor/messages_de.properties 2006-12-05 20:37:53 UTC (rev 900) +++ trunk/daimonin/src/daieditor/messages_de.properties 2006-12-05 20:43:21 UTC (rev 901) @@ -27,8 +27,10 @@ zoomOutOfMem.title=Out of Memory zoomSaveOutOfMem.message=Not enough memory to save preview, sorry.\nTry restarting with -Xmx128m or -Xmx256m. zoomSaveOutOfMem.title=Out of Memory + ########## # Dialogs + warning=Warnung! overwriteOtherFile.title=Datei \xFCberschreiben? overwriteOtherFile.message=Eine Datei mit Namen "{0}" existiert bereits.\n\nWirklich \xFCberschreiben? This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2006-12-05 20:37:58
|
Revision: 900 http://svn.sourceforge.net/gridarta/?rev=900&view=rev Author: akirschbaum Date: 2006-12-05 12:37:53 -0800 (Tue, 05 Dec 2006) Log Message: ----------- Add German translation. Modified Paths: -------------- trunk/crossfire/src/cfeditor/messages_de.properties Modified: trunk/crossfire/src/cfeditor/messages_de.properties =================================================================== --- trunk/crossfire/src/cfeditor/messages_de.properties 2006-12-05 20:35:12 UTC (rev 899) +++ trunk/crossfire/src/cfeditor/messages_de.properties 2006-12-05 20:37:53 UTC (rev 900) @@ -1,6 +1,98 @@ # Warning: This file MUST be ISO-8859-1 # See http://java.sun.com/j2se/1.5.0/docs/api/java/util/Properties.html#encoding +# Dialogs + +collectArchesNotReady.title=Archetypen noch nicht geladen +collectArchesNotReady.message=Sie m\xFCssen warten bis die Archetypen geladen\nsind, bevor Sie sie neu sammeln k\xF6nnen. + +closePickmapNotLoaded.title=Kann Pickmap nicht schlie\xDFen +closePickmapNotLoaded.message=Es sind keine Pickmaps geladen.\nEntweder existieren keine Pickmaps oder\nsie sind noch nicht vollst\xE4ndig geladen. +closePickmapHidden.title=Kann Pickmap nicht schlie\xDFen +closePickmapHidden.message=Pickmaps werden nicht angezeigt\nSie m\xFCssen eine Pickmap ausw\xE4hlen, um dieses Kommando zu verwenden. +closePickmapNoPickmaps.title=Kann Pickmap nicht schlie\xDFen +closePickmapNoPickmaps.message=Es existieren keine Pickmaps. + +closeLevelNullLevel.title=Kann Karte nicht schlie\xDFen +closeLevelNullLevel.message=Die Karte {1} existiert nicht; Anzahl existierender Karten: {0}. + +openPickmapMapNotLoaded.title=Kann Pickmap nicht \xF6ffnen +openPickmapMapNotLoaded.message=Es sind keine Pickmaps geladen.\nEntweder existieren keine Pickmaps oder\nsie sind noch nicht vollst\xE4ndig geladen. +openPickmapMapHidden.title=Kann Pickmap nicht \xF6ggnen +openPickmapMapHidden.message=Pickmaps werden nicht angezeigt.\nSie m\xFCssen eine Pickmap ausw\xE4hlen, um dieses Kommando zu verwenden. +openPickmapNoPickmaps.title=Kann Pickmap nicht \xF6ffnen +openPickmapNoPickmaps.message=Es existieren keine Pickmaps. +openFileWantedNoArches.title=Kann Karte nicht \xF6ffnen +openFileWantedNoArches.message=Es sind keine Archetypen verf\xFCgbar.\nDiese werden ben\xF6tigt, um eine Karte zu \xF6ffnen. +openFileWantedNotReady.title=Kann Karte nicht \xF6ffnen +openFileWantedNotReady.message=Zum \xD6ffnen einer Karte m\xFCssen die Archetypen geladen\nsein. Bitte warten Sie bis das Laden abgeschlossen ist. +openFileWantedIOException.title=Kann Karte nicht \xF6ffnen +openFileWantedIOException.message=Beim \xD6ffnen der Datei {0} ist ein Ein-/Ausgabefehler aufgetreten:\n{1} +openFileWantedOutOfMemory.title=Kann Karte nicht \xF6ffnen +openFileWantedOutOfMemory.message=Es ist nicht gen\xFCgend freier Speicher vorhanden, um die\nKarte {0} zu laden. + +openAttrDialogNoTypes.title=Datei fehlt +openAttrDialogNoTypes.message=Die Konfigurationsdatei \"types.txt\" fehlt. Der Dialog zum \xC4ndern von Object-Attributen funktioniert nicht ohne diese Datei. +openAttrDialogNoDefaultArch.title=Attribute \xE4ndern +openAttrDialogNoDefaultArch.message=Attribute von Objekten ohne Archetype k\xF6nnen nicht ge\xE4ndert werden. +encodeMapFile.title=Fehler beim Sichern +encodeMapFile.message=Beim Sichern von {0}\nist ein Fehler aufgetreten:\n{1} + +savePickmapNotLoaded.title=Kann Pickmap nicht sichern +savePickmapNotLoaded.message=Es sind keine Pickmaps geladen.\nEntweder existieren keine Pickmaps oder\nsie sind noch nicht vollst\xE4ndig geladen. +savePickmapHidden.title=Kann Pickmap nicht sichern +savePickmapHidden.message=Pickmaps werden nicht angezeigt.\nSie m\xFCssen eine Pickmap ausw\xE4hlen, um dieses Kommando zu verwenden. +savePickmapNoPickmaps.title=Kann Pickmap nicht sichern +savePickmapNoPickmaps.message=Es existieren keine Pickmaps. + +createImgNoMap.title=Kann Bild nicht erzeugen +createImgNoMap.message=Um ein Bild einer Karte erstellen zu k\xF6nnen muss eine Karte ge\xF6ffnet sein. +createImgIOException.title=Kann Bild nicht erzeugen +createImgIOException.message=Das Bild kann nicht erzeugt werden, da ein Ein-/Ausgabefehler\nbeim Schreiben von {0} aufgetreten ist:\n{1} + +enterExitNoExit.title=Ausgang nicht gefunden +enterExitNoExit.message=Die Auswahl enth\xE4lt keinen Ausgang. +enterExitNowhere.title=Ziel ung\xFCltig +enterExitNowhere.message=Der Ausgang besitzt keine Zielkoordinaten. +enterExitOutside.title=Ziel ung\xFCltig +enterExitOutside.message=Der Ausgang besitzt Zielkoordinaten au\xDFerhalb der Karte. +enterExitInvalidPath.title=Ung\xFCltiger Pfad +enterExitInvalidPath.message=Der Ausgang zeigt auf einen ung\xFCltigen Dateinamen. +enterExitRandomDestination.title=Ziel ung\xFCltig +enterExitRandomDestination.message=Der Ausgang zeigt auf eine zuf\xE4llig generierte Karte. +enterExitNotSaved.title=Karte nicht gesichert +enterExitNotSaved.message=Der Ausgang verwendet einen relativen Dateinamen. Um ihm zu folgen m\xFCssen Sie die Karte vorher sichern. + +enterTileNoTile.title=Ziel ung\xFCltig +enterTileNoTile.message=In die angegebene Richtung existiert kein Verbindungspfad. + +revertPickmapNotLoaded.title=Kann \xC4nderungen nicht zur\xFCcknehmen +revertPickmapNotLoaded.message=Es sind keine Pickmaps geladen.\nEntweder existieren keine Pickmaps oder\nsie sind noch nicht vollst\xE4ndig geladen. +revertPickmapHidden.title=Kann \xC4nderungen nicht zur\xFCcknehmen +revertPickmapHidden.message=Pickmaps werden nicht angezeigt.\nSie m\xFCssen eine Pickmap ausw\xE4hlen, um dieses Kommando zu verwenden. +revertPickmapNoPickmaps.title=Kann \xC4nderungen nicht zur\xFCcknehmen +revertPickmapNoPickmaps.message=Es existieren keine Pickmaps. +revertPickmapGone.title=Kann \xC4nderungen nicht zur\xFCcknehmen +revertPickmapGone.message=F\xFCr die Pickmap ''{0}'' existiert keine Datei. + +confirmClosePickmap.title=Pickmap schlie\xDFen? +confirmClosePickmap.message=Die letzten \xC4nderungen gehen verloren,\nwenn Sie die Pickmap ''{0}'' schlie\xDFen.\nSind Sie sicher, dass Sie das wollen? + +confirmDeletePickmap.title=Pickmap l\xF6schen? +confirmDeletePickmap.message=Die Pickmap ''{0}'' wurde geschlossen.\nWollen Sie auch die Datei ''{1}'' l\xF6schen?\nDies wird die Pickmap endg\xFCltig l\xF6schen. + +confirmSaveChanges.title=\xC4nderungen sichern? +confirmSaveChanges.message=Wollen Sie die \xC4nderungen der Karte {0} sichern? + +confirmCreatePickmap.title=Kann pickmap nicht \xF6ffnen +confirmCreatePickmap.message=F\xFCr die Pickmap ''{0}'' existiert noch keine Datei.\nWollen Sie diese Datei durch Speichern der Pickmap erstellen? + +confirmRevertMap.title=\xC4nderungen in Karte zur\xFCcknehmen +confirmRevertMap.message=Die letzten \xC4nderungen der Karte ''{0}''\ngehen verloren, wenn Sie die Datei neu laden.\nSind Sie sicher, dass die das wollen? + +confirmRevertPickmap.title=\xC4nderungen in Pickmap zur\xFCcknehmen? +confirmRevertPickmap.message=Die letzten \xC4nderungen in der Pickmap ''{0}''\ngehen verlosen, wenn Sie die Datei neu laden.\nSind Sie sicher, dass die das wollen? + # New Map newMap.title=Neue Karte erstellen newPickmap.title=Neue Pickmap erstellen @@ -65,7 +157,7 @@ mapWindSpeed=Windgeschwindigkeit mapShrink.title=Karte verkleinern -mapShrink.message=Du hast eine neue Kartengr\xF6\xDFe von {0,number,integer} \xD7 {1,number,integer} gew\xE4hlt. Wenn die Karte\nso verkleinert wird, werden einige Objekte gel\xF6scht.\nBist Du sicher, dass Du das willst? +mapShrink.message=Sie haben eine neue Kartengr\xF6\xDFe von {0,number,integer} \xD7 {1,number,integer} gew\xE4hlt. Wenn die Karte\nso verkleinert wird, werden einige Objekte gel\xF6scht.\nSind Sie sicher, dass Sie das wollen? mapErrorMissingMapName.title=Kartenname fehlt mapErrorMissingMapName.message=Dar Kartenname muss angegeben werden. mapErrorIllegalSize.title=Ung\xFCltiger Wert @@ -78,7 +170,7 @@ nameOfAnimationObject=Animation nameOfFaceObject=Bild pickmapExists.title=Kann Pickmap nicht erstellen -pickmapExists.message=Die Pickmap '{0}' existiert bereits.\nSie m\xFCssen die existierende Pickmap erst l\xF6schen oder einen anderen Namen w\xE4hlen. +pickmapExists.message=Die Pickmap ''{0}'' existiert bereits.\nSie m\xFCssen die existierende Pickmap erst l\xF6schen oder einen anderen Namen w\xE4hlen. #replace replaceOk.text=OK This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2006-12-05 20:35:14
|
Revision: 899 http://svn.sourceforge.net/gridarta/?rev=899&view=rev Author: akirschbaum Date: 2006-12-05 12:35:12 -0800 (Tue, 05 Dec 2006) Log Message: ----------- Use action factory for text messages; improve some messages. Modified Paths: -------------- trunk/crossfire/src/cfeditor/CMainControl.java trunk/crossfire/src/cfeditor/CNewMapDialog.java trunk/crossfire/src/cfeditor/messages.properties trunk/daimonin/src/daieditor/CMainControl.java trunk/daimonin/src/daieditor/messages.properties trunk/daimonin/src/daieditor/messages_sv.properties trunk/src/app/net/sf/gridarta/messages.properties Modified: trunk/crossfire/src/cfeditor/CMainControl.java =================================================================== --- trunk/crossfire/src/cfeditor/CMainControl.java 2006-12-05 19:59:34 UTC (rev 898) +++ trunk/crossfire/src/cfeditor/CMainControl.java 2006-12-05 20:35:12 UTC (rev 899) @@ -274,7 +274,7 @@ public void collectArches() { if (archetypeSet.getLoadStatus() != ArchetypeSet.LoadStatus.COMPLETE) { // must not collect arches while arch stack not complete - showMessage("Arches still Loading", "You have to wait for all arches to be loaded\nbefore you can collect them."); + ACTION_FACTORY.showMessageDialog(mainView, "collectArchesNotReady"); return; } @@ -689,25 +689,23 @@ /** Invoked when the user wants to close the active pickmap. */ public void closePickmap() { if (!CPickmapPanel.getInstance().isLoadComplete()) { - showMessage("Cannot close Pickmap", "Pickmaps aren't loaded.\n" + - "Either there are no pickmaps or the loading process is not complete."); + ACTION_FACTORY.showMessageDialog(mainView, "closePickmapNotLoaded"); } else { - if (!getMainView().isPickmapActive()) { - showMessage("Cannot close Pickmap", "Pickmaps are currently hidden.\n" + - "Please select a pickmap before activating this command."); + if (!mainView.isPickmapActive()) { + ACTION_FACTORY.showMessageDialog(mainView, "closePickmapHidden"); } else { final MapControl activePickmap = CPickmapPanel.getInstance().getCurrentPickmap(); if (activePickmap == null) { - showMessage("Cannot close Pickmap", "There are no pickmaps."); + ACTION_FACTORY.showMessageDialog(mainView, "closePickmapNoPickmaps"); } else { // if pickmap was modified, ask for confirmation: - if (!activePickmap.isLevelChanged() || askConfirm("Close Pickmap " + activePickmap.getMapFileName() + "?", "If you close the pickmap '" + activePickmap.getMapFileName() + "', all recent\nchanges will be lost. Do you really want to close it?")) { + if (!activePickmap.isLevelChanged() || ACTION_FACTORY.showQuestionDialog(mainView, "confirmClosePickmap", activePickmap.getMapFileName())) { final File pickmapFile = activePickmap.getMapFile(); // close pickmap closeLevel(activePickmap, true); // also delete pickmap file? - if (askConfirm("Delete File " + activePickmap.getMapFileName() + "?", "The pickmap '" + activePickmap.getMapFileName() + "' has been closed.\nDo you also want to remove the pickmap file '" + activePickmap.getMapFileName() + "' from your harddisk?\n(Doing so will permanently delete the pickmap.)")) { + if (ACTION_FACTORY.showQuestionDialog(mainView, "confirmDeletePickmap", activePickmap.getMapFileName(), activePickmap.getMapFileName())) { pickmapFile.delete(); } } @@ -725,12 +723,13 @@ public boolean closeLevel(final MapControl level, final boolean forced) { if (level == null) { - showMessage("CLOSE LEVEL", "FIND NULL LEVEL : " + levels.size() + " our map: " + currentMap); + ACTION_FACTORY.showMessageDialog(mainView, "closeLevelNullLevel", levels.size(), currentMap); + return false; } if (level != null && !forced && level.isLevelChanged()) { - if (askConfirm("Do You Want To Save Changes?", "Do you want to save changes to map " + level.getMapName() + "?")) { - + final int result = ACTION_FACTORY.showConfirmDialog(mainView, JOptionPane.YES_NO_CANCEL_OPTION, JOptionPane.WARNING_MESSAGE, "confirmSaveChanges", level.getMapArch().getMapDisplayName()); + if (result == JOptionPane.YES_OPTION) { if (level.isPlainSaveEnabled()) { level.save(); } else { @@ -763,22 +762,19 @@ /** Open active pickmap as normal map for extensive editing. */ public void openPickmapMap() { if (!CPickmapPanel.getInstance().isLoadComplete()) { - showMessage("Cannot open Pickmap", "Pickmaps aren't loaded.\n" + - "Either there are no pickmaps or the loading process is not complete."); + ACTION_FACTORY.showMessageDialog(mainView, "openPickmapMapNotLoaded"); } else { - if (!getMainView().isPickmapActive()) { - showMessage("Cannot open Pickmap", "Pickmaps are currently hidden.\n" + - "Please select a pickmap before activating this command."); + if (!mainView.isPickmapActive()) { + ACTION_FACTORY.showMessageDialog(mainView, "openPickmapMapHidden"); } else { final MapControl activePickmap = CPickmapPanel.getInstance().getCurrentPickmap(); if (activePickmap == null) { - showMessage("Cannot open Pickmap", "There are no pickmaps."); + ACTION_FACTORY.showMessageDialog(mainView, "openPickmapNoPickmaps"); } else { // open pickmap as map final File pickmapFile = activePickmap.getMapFile(); if (!pickmapFile.exists()) { - if (askConfirm("Cannot open Pickmap", "The map file for '" + activePickmap.getMapFileName() + "' does not exist.\n" + - "Do you want to create the file by saving this pickmap?")) { + if (ACTION_FACTORY.showQuestionDialog(mainView, "confirmCreatePickmap", activePickmap.getMapFileName())) { savePickmap(); openFile(pickmapFile); } @@ -808,17 +804,13 @@ if (returnVal == JFileChooser.APPROVE_OPTION) { if (archetypeSet.getLoadStatus() == ArchetypeSet.LoadStatus.LOADING) { // ArchStack still loading -> abort! - showMessage("Cannot open Map", "Are you nuts?! :-)\n" + - "All arches have to be loaded before you can open a map.\n" + - "Just be patient and wait a few seconds..."); + ACTION_FACTORY.showMessageDialog(mainView, "openFileWantedNotReady"); return; } if (archetypeSet.getLoadStatus() == ArchetypeSet.LoadStatus.EMPTY) { // ArchStack is empty -> abort! - showMessage("Cannot open Map", "There are currently no arches avaliable!\n" + - "You need to have arches loaded before opening a map.\n" + - "Look into the online help on how to get Crossfire archfiles."); + ACTION_FACTORY.showMessageDialog(mainView, "openFileWantedNoArches"); return; } @@ -877,13 +869,11 @@ maparch = decoder.getMapArch(); // get map arch } catch (final IOException e) { // popup display - showMessage("Couldn't load Map", e.getMessage()); + ACTION_FACTORY.showMessageDialog(mainView, "openFileWantedIOException", file, e.getMessage()); return null; } catch (final OutOfMemoryError e) { // out of memory!! - display error - showMessage("Out of Memory", "Not enough memory available to open more maps!\n" + - "You can increase the memory limit by using the '-mx' runtime flag.\n" + - "For example: 'java -mx128m -jar " + IGUIConstants.APP_NAME + ".jar'", JOptionPane.WARNING_MESSAGE); + ACTION_FACTORY.showMessageDialog(mainView, "openFileWantedOutOfMemory", file, e.getMessage()); return null; } @@ -916,9 +906,11 @@ public void openAttrDialog(final GameObject gameObject) { if (typeList.isEmpty()) { // types.txt is missing! - showMessage("File Missing", "The definitions-file \"types.txt\" is missing! The\nattribute interface doesn't work without that file."); + ACTION_FACTORY.showMessageDialog(mainView, "openAttrDialogNoTypes"); } else if (gameObject != null && gameObject.hasArchetype()) { CAttribDialog.showAttribDialog(typeList, gameObject, this); + } else { + ACTION_FACTORY.showMessageDialog(mainView, "openAttrDialogNoDefaultArch"); } } @@ -937,9 +929,9 @@ mapFileEncoder.close(); } } catch (final FileNotFoundException e) { - showMessage("Error Save Map", "Error writing file " + fname + "\n"); + ACTION_FACTORY.showMessageDialog(mainView, "encodeMapFile", file, e.getMessage()); } catch (final IOException e) { - showMessage("Error Save Map", "Error writing file " + fname + "\n"); + ACTION_FACTORY.showMessageDialog(mainView, "encodeMapFile", file, e.getMessage()); } } @@ -1004,21 +996,19 @@ /** Save current active pickmap. */ public void savePickmap() { - if (!CPickmapPanel.getInstance().isLoadComplete()) { - showMessage("Cannot save Pickmap", "Pickmaps aren't loaded.\n" + - "Either there are no pickmaps or the loading process is not complete."); - } else { - if (!getMainView().isPickmapActive()) { - showMessage("Cannot save Pickmap", "Pickmaps are currently hidden.\n" + - "Please select a pickmap before activating this command."); + if (CPickmapPanel.getInstance().isLoadComplete()) { + if (!mainView.isPickmapActive()) { + ACTION_FACTORY.showMessageDialog(mainView, "savePickmapHidden"); } else { final MapControl activePickmap = CPickmapPanel.getInstance().getCurrentPickmap(); if (activePickmap == null) { - showMessage("Cannot save Pickmap", "There are no pickmaps."); + ACTION_FACTORY.showMessageDialog(mainView, "savePickmapNoPickmaps"); } else { activePickmap.save(); } } + } else { + ACTION_FACTORY.showMessageDialog(mainView, "savePickmapNotLoaded"); } } @@ -1033,6 +1023,7 @@ */ public void saveLevelAsWanted(final MapControl level) { if (level == null) { + log.warn(ACTION_FACTORY.getString("saveLevelAsWithNull")); return; } @@ -1080,7 +1071,7 @@ if (mc == null) { // there is no map open (should not happen due to disabled menus) - showMessage("No Map Open", "You cannot create an image when there is no map open."); + ACTION_FACTORY.showMessageDialog(mainView, "createImgNoMap"); } else { String filename = null; try { @@ -1116,8 +1107,7 @@ mc.getMapViewFrame().printFullImage(filename); } } catch (final IOException e) { - showMessage("Couln't create Image", "The image could not be created because the" + - "file " + filename + " cannot be written."); + ACTION_FACTORY.showMessageDialog(mainView, "createImgIOException", filename, e.getMessage()); } } } @@ -1143,7 +1133,7 @@ if (mapc == null) { // there is no map open (should not happen due to disabled menus) - showMessage("No Map Open", "You cannot create an image when there is no map open."); + ACTION_FACTORY.showMessageDialog(mainView, "createImgNoMap"); } else { try { if (!filename.endsWith(".png")) { @@ -1151,11 +1141,10 @@ } mapc.getMapViewFrame().printFullImage(filename); if (log.isInfoEnabled()) { - log.info("Created image \"" + filename + "\" of map " + mapc.getMapFileName() + "."); + log.info(ACTION_FACTORY.format("imageCreated", filename, mapc.getMapFileName())); } } catch (final IOException e) { - showMessage("Couln't create Image", "The image could not be created because the" + - "file " + filename + " cannot be written."); + ACTION_FACTORY.showMessageDialog(mainView, "createImgIOException", filename); } } } @@ -1232,7 +1221,7 @@ final GameObject exit = currentMap.getMapModel().getExit(); if (exit == null) { // no exit found - showMessage("No Exit Found", "There is no valid exit at the selected spot."); + ACTION_FACTORY.showMessageDialog(mainView, "enterExitNoExit"); return; } @@ -1245,11 +1234,11 @@ path.equals(currentMap.getMapFile().getName()))) { // path points to the same map if (exitPos.x == 0 && exitPos.y == 0) { - showMessage("Destination Invalid", "This exit points nowhere."); + ACTION_FACTORY.showMessageDialog(mainView, "enterExitNowhere"); } else if (currentMap.isPointValid(exitPos)) { currentMap.getMapViewFrame().setHotspot(exitPos); } else { - showMessage("Destination Invalid", "The destination of this exit is outside the map."); + ACTION_FACTORY.showMessageDialog(mainView, "enterExitOutside"); } } else { // path points to a different map @@ -1258,7 +1247,7 @@ // destination is a random map; extract the final non-random map final String destinationMap = getRandomMapParameter(exit, "final_map"); if (destinationMap == null) { - showMessage("Destination Invalid", "The destination of this exit is a random map."); + ACTION_FACTORY.showMessageDialog(mainView, "enterExitRandomDestination"); return; } newfile = new File(mapDir.getAbsolutePath(), destinationMap); @@ -1268,7 +1257,7 @@ } else { // we have a relative path: if (currentMap.getMapFile() == null) { - showMessage("Map not Saved", "Please save this map first.", JOptionPane.ERROR_MESSAGE); + ACTION_FACTORY.showMessageDialog(mainView, "enterExitNotSaved"); return; } newfile = new File(currentMap.getMapFile().getParent(), path); @@ -1276,7 +1265,7 @@ if (!newfile.exists() || newfile.isDirectory()) { // The path is wrong - showMessage("Invalid Path", "The specified path is invalid:\n" + newfile.getAbsolutePath()); + ACTION_FACTORY.showMessageDialog(mainView, "enterExitInvalidPath"); return; } @@ -1309,7 +1298,7 @@ final String path = currentMap.getMapTilePath(direction); if (path == null || path.length() == 0) { // tile direction not set (due to disabled menus this should normally not happen) - showMessage("Destination Invalid", "There is no tile map in that direction."); + ACTION_FACTORY.showMessageDialog(mainView, "enterTileNoTile"); } else { // path points to a different map final File newfile; // new mapfile to open @@ -1323,7 +1312,7 @@ if (!newfile.exists() || newfile.isDirectory()) { // The path is wrong - showMessage("Invalid Path", "The specified path is invalid:\n" + newfile.getAbsolutePath()); + ACTION_FACTORY.showMessageDialog(mainView, "enterExitInvalidPath"); return; } @@ -1394,7 +1383,7 @@ /** Invoked when user wants to revert the current map to previously saved state. */ public void revert() { final MapControl modmap = currentMap; // "modified map" to be reverted - if (askConfirm("Revert " + modmap.getMapFileName() + "?", "If you revert the map '" + modmap.getMapFileName() + "' to it's last saved state, all\nrecent changes will be lost. Do you really want to revert this map?")) { + if (ACTION_FACTORY.showQuestionDialog(mainView, "confirmRevertMap", modmap.getMapFileName())) { final File mfile = modmap.getMapFile(); // store file final Point initial = modmap.getViewPosition(); closeLevel(modmap, true); // close the old map @@ -1408,23 +1397,19 @@ /** Invoked when user wants to revert the current pickmap to previously saved state. */ public void revertPickmap() { if (!CPickmapPanel.getInstance().isLoadComplete()) { - showMessage("Cannot revert Pickmap", "Pickmaps aren't loaded.\n" + - "Either there are no pickmaps or the loading process is not complete."); + ACTION_FACTORY.showMessageDialog(mainView, "revertPickmapNotLoaded"); } else { - if (!getMainView().isPickmapActive()) { - showMessage("Cannot revert Pickmap", "Pickmaps are currently hidden.\nPlease select a pickmap before activating this command."); + if (!mainView.isPickmapActive()) { + ACTION_FACTORY.showMessageDialog(mainView, "revertPickmapHidden"); } else { final MapControl activePickmap = CPickmapPanel.getInstance().getCurrentPickmap(); if (activePickmap == null) { - showMessage("Cannot revert Pickmap", "There are no pickmaps."); + ACTION_FACTORY.showMessageDialog(mainView, "revertPickmapNoPickmaps"); } else { - // ask for confirmation - if (!activePickmap.isLevelChanged() || askConfirm("Revert Pickmap " + activePickmap.getMapFileName() + "?", "If you revert the pickmap '" + activePickmap.getMapFileName() + "' to it's last saved state, all\nrecent changes will be lost. Do you really want to revert this pickmap?")) { - // okay, then do it: - + if (!activePickmap.isLevelChanged() || ACTION_FACTORY.showQuestionDialog(mainView, "confirmRevertPickmap", activePickmap.getMapFileName())) { final File mfile = activePickmap.getMapFile(); // store file if (!mfile.exists()) { - showMessage("Cannot revert pickmap", "The file for pickmap '" + activePickmap.getMapFileName() + "' doesn't exist.", JOptionPane.ERROR_MESSAGE); + ACTION_FACTORY.showMessageDialog(mainView, "revertPickmapGone", activePickmap.getMapFileName()); return; } Modified: trunk/crossfire/src/cfeditor/CNewMapDialog.java =================================================================== --- trunk/crossfire/src/cfeditor/CNewMapDialog.java 2006-12-05 19:59:34 UTC (rev 898) +++ trunk/crossfire/src/cfeditor/CNewMapDialog.java 2006-12-05 20:35:12 UTC (rev 899) @@ -229,7 +229,7 @@ // arches must be loaded to create a new map if (mainControl.getArchetypeSet().getLoadStatus() != ArchetypeSet.LoadStatus.COMPLETE) { - mainControl.showMessage("Cannot Create Map", "All arches have to be loaded before you can open a map.\nJust be patient and wait a few seconds..."); + ACTION_FACTORY.showMessageDialog(this, "openFileWantedNotReady"); return false; } Modified: trunk/crossfire/src/cfeditor/messages.properties =================================================================== --- trunk/crossfire/src/cfeditor/messages.properties 2006-12-05 19:59:34 UTC (rev 898) +++ trunk/crossfire/src/cfeditor/messages.properties 2006-12-05 20:35:12 UTC (rev 899) @@ -3,13 +3,30 @@ # Dialogs +collectArchesNotReady.title=Arches still loading +collectArchesNotReady.message=You have to wait for all arches to be loaded\nbefore you can collect them. + +openFileWantedNoArches.title=Cannot open map +openFileWantedNoArches.message=There are currently no arches avaliable!\nYou need to have arches loaded before opening a map. +openFileWantedNotReady.title=Cannot open map +openFileWantedNotReady.message=All arches have to be loaded before you can open a map.\nJust be patient and wait a few seconds... +openFileWantedIOException.title=Cannot open map +openFileWantedIOException.message=An I/O error occurred while loading {0}:\n{1} +openFileWantedOutOfMemory.title=Cannot open map +openFileWantedOutOfMemory.message=Out of memory while loading {0}. + +enterExitRandomDestination.title=Destination invalid +enterExitRandomDestination.message=The destination of this exit is a random map. +enterExitNotSaved.title=Map not saved +enterExitNotSaved.message=You must save the map first to follow a relative path. + # Map Properties mapParametersTabTitle=Parameters mapShopTabTitle=Shop mapWeatherTabTitle=Weather mapTextTabTitle=Description mapLoreTabTitle=Lore -mapErrorInvalidDarkness.title=Invalid Value +mapErrorInvalidDarkness.title=Invalid value mapErrorInvalidDarkness.message=Darkness level must be in range 0-5. mapRegion=Region Modified: trunk/daimonin/src/daieditor/CMainControl.java =================================================================== --- trunk/daimonin/src/daieditor/CMainControl.java 2006-12-05 19:59:34 UTC (rev 898) +++ trunk/daimonin/src/daieditor/CMainControl.java 2006-12-05 20:35:12 UTC (rev 899) @@ -1257,9 +1257,9 @@ mapFileEncoder.close(); } } catch (final FileNotFoundException e) { - ACTION_FACTORY.showMessageDialog(mainView, "encodeMapFile", file); + ACTION_FACTORY.showMessageDialog(mainView, "encodeMapFile", file, e.getMessage()); } catch (final IOException e) { - ACTION_FACTORY.showMessageDialog(mainView, "encodeMapFile", file); + ACTION_FACTORY.showMessageDialog(mainView, "encodeMapFile", file, e.getMessage()); } } @@ -1425,7 +1425,7 @@ } } } catch (final IOException e) { - ACTION_FACTORY.showMessageDialog(mainView, "createImgIOException", filename); + ACTION_FACTORY.showMessageDialog(mainView, "createImgIOException", filename, e.getMessage()); } } } @@ -1732,7 +1732,7 @@ if (!activePickmap.isLevelChanged() || ACTION_FACTORY.showQuestionDialog(mainView, "confirmRevertPickmap", activePickmap.getMapFileName())) { final File mfile = activePickmap.getMapFile(); // store file if (!mfile.exists()) { - ACTION_FACTORY.showMessageDialog(mainView, "pickmapRevertGone", activePickmap.getMapFileName()); + ACTION_FACTORY.showMessageDialog(mainView, "revertPickmapGone", activePickmap.getMapFileName()); return; } Modified: trunk/daimonin/src/daieditor/messages.properties =================================================================== --- trunk/daimonin/src/daieditor/messages.properties 2006-12-05 19:59:34 UTC (rev 898) +++ trunk/daimonin/src/daieditor/messages.properties 2006-12-05 20:35:12 UTC (rev 899) @@ -57,109 +57,46 @@ mapUnsaved.title=Map Not Saved mapUnsaved.message=Please save this map first. -pickmapRevertGone.title=Cannot revert pickmap -pickmapRevertGone.message=The file for pickmap "{0}" doesn''t exist. - mapDirDoesntExist.title=Invalid Map Directory mapDirDoesntExist.message=The map directory "{0}" doesn''t exist.\nPlease select menu ''File->Options...'' and correct that. -closePickmapNotLoaded.title=Cannot close Pickmap -closePickmapNotLoaded.message=Pickmaps aren''t loaded.\nEither there are no pickmaps or the loading process is not complete. -closePickmapHidden.title=Cannot close Pickmap -closePickmapHidden.message=Pickmaps are currently hidden.\nPlease select a pickmap before activating this command. -closePickmapNoPickmaps.title=Cannot close Pickmap -closePickmapNoPickmaps.message=There are no pickmaps. -closeLevelNullLevel.title=Close Level -closeLevelNullLevel.message=FIND NULL LEVEL : {0} our map: {1}. -openPickmapMapNotLoaded.title=Cannot open Pickmap -openPickmapMapNotLoaded.message=Pickmaps aren''t loaded.\nEither there are no pickmaps or the loading process is not complete. -openPickmapMapHidden.title=Cannot open Pickmap -openPickmapMapHidden.message=Pickmaps are currently hidden.\nPlease select a pickmap before activating this command. -openPickmapNoPickmaps.title=Cannot open Pickmap -openPickmapNoPickmaps.message=There are no pickmaps. -openFileWantedNoArches.title=Cannot open Map +openFileWantedNoArches.title=Cannot open map openFileWantedNoArches.message=There are currently no arches avaliable!\nYou need to have arches loaded before opening a map.\nLook into the online help on how to get Daimonin archfiles. -openFileLoadMap.title=Couldn''t load Map +openFileLoadMap.title=Couldn''t load map openFileLoadMap.message={0} -openAttrDialogNoTypes.title=File Missing -openAttrDialogNoTypes.message=The definitions-file \"types.txt\" is missing! The\nattribute interface doesn''t work without that file. -openAttrDialogNoDefaultArch.title=No default arch -openAttrDialogNoDefaultArch.message=Changing attributes of arches without default arches is not supported. -encodeMapFile.title=Error Save Map -encodeMapFile.message=Error writing file {0}. -collectTemplistAutodelete.title=Loading Mapfile {0} + +collectTemplistAutodelete.title=Loading mapfile {0} collectTemplistAutodelete.message=Found {1} unknown arch.\nAutodelete illegal arch:\n{2} -savePickmapNotLoaded.title=Cannot save Pickmap -savePickmapNotLoaded.message=Either there are no pickmaps or the loading process is not complete. -savePickmapHidden.title=Cannot save Pickmap -savePickmapHidden.message=Pickmaps are currently hidden.\nPlease select a pickmap before activating this command. -savePickmapNoPickmaps.title=Cannot save Pickmap -savePickmapNoPickmaps.message=There are no pickmaps. -createImgNoMap.title=Couldn''t create Image -createImgNoMap.message=You cannot create an image when there is no map open. -createImgIOException.title=Couldn''t create Image -createImgIOException.message= The image could not be created because the file {0} cannot be written. -enterExitNoExit.title=No Exit Found -enterExitNoExit.message=There is no valid exit at the selected spot. -enterExitNowhere.title=Destination Invalid -enterExitNowhere.message=This exit points nowhere. -enterExitOutside.title=Destination Invalid -enterExitOutside.message=The destination of this exit is outside the map. -enterExitInvalidPath.title=Invalid Path -enterExitInvalidPath.message=The specified path is invalid. enterExitClose.title=Close previous map? enterExitClose.message=You''ve opened a new map.\nShould I close the previous one? -enterTileNoTile.title=Destination Invalid -enterTileNoTile.message=There is no tile map in that direction. -enterTileIOException.title=Invalid Path + +enterTileIOException.title=Invalid path enterTileIOException.message=Failed to load file for tiled map.\n{0} -revertPickmapNotLoaded.title=Cannot revert Pickmap -revertPickmapNotLoaded.message=Pickmaps aren''t loaded.\nEither there are no pickmaps or the loading process is not complete. -revertPickmapHidden.title=Cannot revert Pickmap -revertPickmapHidden.message=Pickmaps are currently hidden.\nPlease select a pickmap before activating this command. -revertPickmapNoPickmaps.title=Cannot revert Pickmap -revertPickmapNoPickmaps.message=There are no pickmaps. -importSpellsSuccess.title=Collect Spells + +importSpellsSuccess.title=Collect spells importSpellsSuccess.message=Successfully collected {0} spells. -importSpellsFailed.title=Collect Spells +importSpellsFailed.title=Collect spells importSpellsFailed.message=Collecting spells failed!\nMaybe the specified file is of wrong format. -loadArchesNoArchfiles.title=No Archfiles +loadArchesNoArchfiles.title=No archfiles loadArchesNoArchfiles.message=No archfiles could be found. If you have no archfiles\nyet, you need to download them. If you do, make sure\nthe path is correct under menu ''File->Options''. createNewEventException.title=Can''t create script path createNewEventException.message=Can''t create script path from map. Perhaps you should save your map first. openScriptNotFound.title=Script file not found openScriptNotFound.message=The file ''{0}'' does not exist.\nPlease correct the path. -newMapDifficultyNotANumber.title=Illegal Value +newMapDifficultyNotANumber.title=Illegal value newMapDifficultyNotANumber.message=Map difficulty must be a numerical integer value. -newMapDifficultyOutOfRange.title=Illegal Value +newMapDifficultyOutOfRange.title=Illegal value newMapDifficultyOutOfRange.message=Map difficulty must be greater or equal 1 and less or equal 110 -errCantLoadFaceTree.title=Cannot Load Face Tree +errCantLoadFaceTree.title=Cannot load face tree errCantLoadFaceTree.message=<html>Can''t load face tree.<br>You won''t be able to easily choose faces from a tree.<br>To change this, you need either a version of <code>arch/</code> that contains <code>arch/dev/editor/conf/facetree</code>,<br>or you have to collect arches yourself.</html> -confirmClosePickmap.title=Close Pickmap? -confirmClosePickmap.message=If you close the pickmap ''{0}'', all recent\nchanges will be lost. Do you really want to close it? - -confirmDeletePickmap.title=Delete Pickmap file? -confirmDeletePickmap.message=The pickmap ''{0}'' has been closed.\nDo you also want to remove the pickmap file ''{1}''?\nDoing so will permanently delete the pickmap. - -confirmSaveChanges.title=Save Changes? -confirmSaveChanges.message=Do you want to save changes to map {0}? - -confirmCreatePickmap.title=Cannot Open Pickmap -confirmCreatePickmap.message=The map file for ''{0}'' does not exist.\nDo you want to create the file by saving this pickmap? - -confirmRevertMap.title=Revert Map? -confirmRevertMap.message=If you revert the map ''{0}''\nto its last saved state, all recent changes will be lost.\nDo you really want to revert this map? - -confirmRevertPickmap.title=Revert Pickmap? -confirmRevertPickmap.message=If you revert the pickmap ''{0}''\n to its last saved state, all recent changes will be lost.\nDo you really want to revert this pickmap? - loadDuplicateFace.title=Error: Duplicate face loadDuplicateFace.message=Warning!\n\nDuplicate face: ''{0}''\nFile: ''{1}''\nI will ignore this duplicate. loadDuplicateArch.title=Error: Duplicate arch loadDuplicateArch.message=Warning!\n\nDuplicate arch: ''{0}''\nFile: ''{1}''\nI will ignore this duplicate. +# Map Properties mapMap=Map mapSound=Background sound mapOutdoor=Outdoor @@ -186,19 +123,19 @@ mapTilesClear.text=Clear Paths mapTilesClear.shortdescription=Clear all path names mapSizeDefault.text=default map size (24 \xD7 24) -mapErrorUnsaved.title=Missing File Path +mapErrorUnsaved.title=Missing file path mapErrorUnsaved.message=Can''t attach unsaved map.\nMap must be saved to the map folder first! -mapErrorPath.title=Error creating Map Path +mapErrorPath.title=Error creating map path mapErrorPath.message=Please check if the map path exists and is correct: "{0}". mapQueryLoaded.title=Map is loaded mapQueryLoaded.message=The map {0} is opened in the editor.\nShould I autosave & update the map? -mapErrorPath2.title=Can''t find Map +mapErrorPath2.title=Can''t find map mapErrorPath2.message=Please check your map file path: "{0}". -mapErrorInvalid.title=Invalid Tile Link +mapErrorInvalid.title=Invalid tile link mapErrorInvalid.message=In {0}: {1}\nthe link to {2} is invalid.\nLink to {3} is {4}\ngenerated link:{5}\nShould we stop attaching? -mapErrorFatalPath.title=Can''t Get Path +mapErrorFatalPath.title=Can''t get path mapErrorFatalPath.message=Can''t get path\nFatal Error:\n{0} -mapErrorFatalWrite.title=Can''t Write Map +mapErrorFatalWrite.title=Can''t write map mapErrorFatalWrite.message=Can''t write map\nFatal Error:\n{0} mapErrorArchOutOfGrid.title=Arch out of map mapErrorArchOutOfGrid.message=Removing arch out of map bounds @@ -258,15 +195,15 @@ archCollectImages=Collecting Images... archCollectDone=Collect Arches: done -#archCollectWarningMultipartTailInPanel.title=Collect Warning +#archCollectWarningMultipartTailInPanel.title=Collect warning #archCollectWarningMultipartTailInPanel.message=Collect Warning: Found Multipart tail in Panel! -archCollectWarningMultipartTooShort.title=Collect Warning +archCollectWarningMultipartTooShort.title=Collect warning archCollectWarningMultipartTooShort.message=Collect Warning: Multipart object too short! -archCollectWarningMissed.title=Collect Warning +archCollectWarningMissed.title=Collect warning archCollectWarningMissed.message=Collect Warning: {0} arches have been missed during collect! -archCollectErrorFileNotFound.title=Collect Error +archCollectErrorFileNotFound.title=Collect error archCollectErrorFileNotFound.message=Collect Error: Cannot open input file\n{0} -archCollectErrorFileUnexpectedEOF.title=Collect Error +archCollectErrorFileUnexpectedEOF.title=Collect error archCollectErrorFileUnexpectedEOF.message=Collect Error: Unexpected EOF in\n{0} ################## @@ -284,7 +221,7 @@ file.text=File file.mnemonic=F -fileDialog.title=Open Map Or Script Files +fileDialog.title=Open map or script files fileDialog.filter.maps=Map Files fileDialog.filter.lua=Lua Scripts fileDialog.filter.png=PNG Images @@ -425,7 +362,7 @@ enterExit.text=Enter Exit enterExit.mnemonic=E enterExit.accel=ctrl pressed NUMPAD5 -enterExitIOException.title=Invalid Path +enterExitIOException.title=Invalid path enterExitIOException.message=Failed to load file for path.\n{0} enterNorthMap.text=Enter North Map @@ -579,12 +516,12 @@ controlServer.text=Control Server controlServer.mnemonic=S controlServer.name=Server -controlServer.title=Daimonin Server Console +controlServer.title=Daimonin server console controlClient.text=Control Client controlClient.mnemonic=C controlClient.name=Client -controlClient.title=Daimonin Client Console -controlError.title=Control Error +controlClient.title=Daimonin client console +controlError.title=Control error controlError.message=Error while starting subprocess:\n{0} controlStart.text=Start controlStop.text=Stop @@ -747,9 +684,9 @@ updateUnavailable.message=<html><style type="text/css">.cell'{border-width:1px;border-style:solid;border-color:#000000;background-color:#FFFFFF;color:#000000;}'</style><table><tr><td></td><th class="cell">Installed</th><th class="cell">Available</th></tr><tr><th class="cell">Version</th><td class="cell">{0}</td><td class="cell">{1}</td></tr><tr><th class="cell">Developer</th><td class="cell">{2}</td><td class="cell">{3}</td></tr><tr><th class="cell">Timestamp</th><td class="cell">{4}</td><td class="cell">{5}</td></tr></table><p align="center">No newer version available.</p><p>Source: {6}<br>Download: {7}</p></html> updateAvailable.title=Update available! updateAvailable.message=<html><style type="text/css">.cell'{border-width:1px;border-style:solid;border-color:#000000;background-color:#FFFFFF;color:#000000;}'</style><table><tr><td></td><th class="cell">Installed</th><th class="cell">Available</th></tr><tr><th class="cell">Version</th><td class="cell">{0}</td><td class="cell">{1}</td></tr><tr><th class="cell">Developer</th><td class="cell">{2}</td><td class="cell">{3}</td></tr><tr><th class="cell">Timestamp</th><td class="cell">{4}</td><td class="cell">{5}</td></tr></table><p align="center">A newer version is available. Install update?</p><p>Note: This will only update DaimoninEditor.jar. Your arches will not be updated.</p><p>(The editor will not be useable while the update is in progress)</p><p>Source: {6}<br>Download: {7}</p></html> -updateFailedNoBackup.title=Update Failed +updateFailedNoBackup.title=Update failed updateFailedNoBackup.message=<html>Could not create backup, update failed.<br>Please do the following steps manually after exiting the editor:<ol><li>rename DaimoninEditor.jar to DaimoninEditor.jar.bak<li>rename DaimoninEditor.jar.tmp to DaimoninEditor.jar</ol></html> -updateFailedNoDownload.title=Update Failed +updateFailedNoDownload.title=Update failed updateFailedNoDownload.message=Could not use download, update failed. updateRestart.title=Update successful updateRestart.message=Update successful.\nI have stored a backup of the previous version under "DaimoninEditor.jar.bak".\n\nThe editor automatically exits after updating.\nYou have to restart it yourself in case you want to use it now. @@ -803,13 +740,13 @@ ##################### # Preference Modules -prefsApp.title=External Applications +prefsApp.title=External applications prefsDev.title=Developers -prefsRes.title=Paths & Resources +prefsRes.title=Paths & resources prefsMisc.title=Miscellaneous prefsGUI.title=Appearance prefsUpdate.title=Update -prefsMapValidator.title=Map Validation +prefsMapValidator.title=Map validation autoUpdate.text=Automatically check for updates on startup? prefsUpdateAuto0.text=Every startup @@ -826,7 +763,7 @@ Validator.BlockedMobOrSpawnPoint.title=Blocked mob or blocked spawn point Validator.BlockedMobOrSpawnPoint.msg=<html><h3>{0}</h3><p>On this square is a mob or a spawn point,<br>but also this square is blocked by an object that cannot be passed.</p><p>You could:</p><ul><li>Remove the mob or spawn point</li><li>Change the <code>no_pass</code> flag of the blocking object to <code>0</code></li><li>Remove the blocking object</li></ul> -Validator.BlockedSquare.title=Completely Blocked Square +Validator.BlockedSquare.title=Completely blocked square Validator.BlockedSquare.msg=<html><h3>{0}</h3><p>This square is completely blocked. This and all its surrounding squares are <code>no_pass 1</code> and <code>blocksview 1</code>.</p><p>Usually such squares do not make sense and their contents can be safely deleted.</p> Validator.ConnectedInsideContainer.title=Connected object inside container @@ -872,8 +809,6 @@ ####################### # Various Log Messages canonIOE=IOException while canonizing path: {0} -saveLevelAsWithNull=DEBUG: CMainControl.saveLevelAsWanted(CMapControl level) invoked with null argument. -imageCreated=Created image "{0}" of map "{1}". exitWithExit=Exiting with System.exit(). exitWithoutExit=Trying to exit without System.exit(). unexpectedException=Unexpected exception: {0} Modified: trunk/daimonin/src/daieditor/messages_sv.properties =================================================================== --- trunk/daimonin/src/daieditor/messages_sv.properties 2006-12-05 19:59:34 UTC (rev 898) +++ trunk/daimonin/src/daieditor/messages_sv.properties 2006-12-05 20:35:12 UTC (rev 899) @@ -56,9 +56,6 @@ mapUnsaved.title=Kartan har inte sparats. mapUnsaved.message=Var v\xE4nlig och spara den h\xE4r kartan f\xF6rst. -pickmapRevertGone.title=Kan inte \xE5terst\xE4lla plockkartan. -pickmapRevertGone.message=Filen f\xF6r plockkartan "{0}" existerar inte. - mapDirDoesntExist.title=Ogiltig katalog f\xF6r kartor. mapDirDoesntExist.message=Katalogen f\xF6r kartor, "{0}", finns inte.\nVar v\xE4nlig och v\xE4lj menyn ''Arkiv->Inst\xE4llningar...'' f\xF6r att byta katalog. @@ -116,6 +113,8 @@ revertPickmapHidden.message=Plockkartor \xE4r dolda f\xF6r tillf\xE4llet.\nVar v\xE4nlig och v\xE4lj en plockkarta innan du aktiverar detta kommando. revertPickmapNoPickmaps.title=Kan inte \xE5terst\xE4lla plockkarta revertPickmapNoPickmaps.message=Det finns inga plockkartor. +revertPickmapGone.title=Kan inte \xE5terst\xE4lla plockkartan. +revertPickmapGone.message=Filen f\xF6r plockkartan "{0}" existerar inte. importSpellsSuccess.title=Sammanst\xE4ll trollformler importSpellsSuccess.message=Lyckades sammanst\xE4lla {0} trollformler. importSpellsFailed.title=Sammanst\xE4ll trollformler Modified: trunk/src/app/net/sf/gridarta/messages.properties =================================================================== --- trunk/src/app/net/sf/gridarta/messages.properties 2006-12-05 19:59:34 UTC (rev 898) +++ trunk/src/app/net/sf/gridarta/messages.properties 2006-12-05 20:35:12 UTC (rev 899) @@ -31,6 +31,82 @@ newPickmapNoName.title=Pickmap name is missing newPickmapNoName.message=You must enter a pickmap name! +closePickmapNotLoaded.title=Cannot close pickmap +closePickmapNotLoaded.message=Pickmaps aren''t loaded.\nEither there are no pickmaps or the loading process is not complete. +closePickmapHidden.title=Cannot close pickmap +closePickmapHidden.message=Pickmaps are currently hidden.\nPlease select a pickmap before activating this command. +closePickmapNoPickmaps.title=Cannot close pickmap +closePickmapNoPickmaps.message=There are no pickmaps. + +closeLevelNullLevel.title=Close map +closeLevelNullLevel.message=Map does not exist: {1}; number of existing maps: {0}. + +openPickmapMapNotLoaded.title=Cannot open pickmap +openPickmapMapNotLoaded.message=Pickmaps aren''t loaded.\nEither there are no pickmaps or the loading process is not complete. +openPickmapMapHidden.title=Cannot open pickmap +openPickmapMapHidden.message=Pickmaps are currently hidden.\nPlease select a pickmap before activating this command. +openPickmapNoPickmaps.title=Cannot open pickmap +openPickmapNoPickmaps.message=There are no pickmaps. + +openAttrDialogNoTypes.title=File missing +openAttrDialogNoTypes.message=The definitions-file \"types.txt\" is missing! The\nattribute interface doesn''t work without that file. +openAttrDialogNoDefaultArch.title=No default arch +openAttrDialogNoDefaultArch.message=Changing attributes of arches without archetype is not supported. + +encodeMapFile.title=Error saving map +encodeMapFile.message=Error writing file {0}:\n{1} + +savePickmapNotLoaded.title=Cannot save pickmap +savePickmapNotLoaded.message=Either there are no pickmaps or the loading process is not complete. +savePickmapHidden.title=Cannot save pickmap +savePickmapHidden.message=Pickmaps are currently hidden.\nPlease select a pickmap before activating this command. +savePickmapNoPickmaps.title=Cannot save pickmap +savePickmapNoPickmaps.message=There are no pickmaps. + +createImgNoMap.title=Couldn''t create image +createImgNoMap.message=You cannot create an image when there is no map open. +createImgIOException.title=Couldn''t create image +createImgIOException.message=The image could not be created because the file {0} cannot be written:\n{1} + +enterExitNoExit.title=No exit found +enterExitNoExit.message=There is no valid exit at the selected spot. +enterExitNowhere.title=Destination invalid +enterExitNowhere.message=This exit points nowhere. +enterExitOutside.title=Destination invalid +enterExitOutside.message=The destination of this exit is outside the map. +enterExitInvalidPath.title=Invalid path +enterExitInvalidPath.message=The specified path is invalid. + +enterTileNoTile.title=Destination invalid +enterTileNoTile.message=There is no tile map in that direction. + +revertPickmapNotLoaded.title=Cannot revert pickmap +revertPickmapNotLoaded.message=Pickmaps aren''t loaded.\nEither there are no pickmaps or the loading process is not complete. +revertPickmapHidden.title=Cannot revert pickmap +revertPickmapHidden.message=Pickmaps are currently hidden.\nPlease select a pickmap before activating this command. +revertPickmapNoPickmaps.title=Cannot revert pickmap +revertPickmapNoPickmaps.message=There are no pickmaps. +revertPickmapGone.title=Cannot revert pickmap +revertPickmapGone.message=The file for pickmap "{0}" doesn''t exist. + +confirmClosePickmap.title=Close pickmap? +confirmClosePickmap.message=If you close the pickmap ''{0}'', all recent\nchanges will be lost. Do you really want to close it? + +confirmDeletePickmap.title=Delete pickmap file? +confirmDeletePickmap.message=The pickmap ''{0}'' has been closed.\nDo you also want to remove the pickmap file ''{1}''?\nDoing so will permanently delete the pickmap. + +confirmSaveChanges.title=Save changes? +confirmSaveChanges.message=Do you want to save changes to map {0}? + +confirmCreatePickmap.title=Cannot open pickmap +confirmCreatePickmap.message=The map file for ''{0}'' does not exist.\nDo you want to create the file by saving this pickmap? + +confirmRevertMap.title=Revert map? +confirmRevertMap.message=If you revert the map ''{0}''\nto its last saved state, all recent changes will be lost.\nDo you really want to revert this map? + +confirmRevertPickmap.title=Revert pickmap? +confirmRevertPickmap.message=If you revert the pickmap ''{0}''\n to its last saved state, all recent changes will be lost.\nDo you really want to revert this pickmap? + # Map Properties mapTitle={0} ({1}) - Map Properties mapHelp.text=Help @@ -99,3 +175,8 @@ attribCancel.text=Cancel fileDialog.filter.python=Python Scripts + +####################### +# Various Log Messages +saveLevelAsWithNull=DEBUG: CMainControl.saveLevelAsWanted(CMapControl level) invoked with null argument. +imageCreated=Created image "{0}" of map "{1}". This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2006-12-05 19:59:37
|
Revision: 898 http://svn.sourceforge.net/gridarta/?rev=898&view=rev Author: akirschbaum Date: 2006-12-05 11:59:34 -0800 (Tue, 05 Dec 2006) Log Message: ----------- Remove temporary variable. Modified Paths: -------------- trunk/crossfire/src/cfeditor/CNewMapDialog.java trunk/daimonin/src/daieditor/CNewMapDialog.java Modified: trunk/crossfire/src/cfeditor/CNewMapDialog.java =================================================================== --- trunk/crossfire/src/cfeditor/CNewMapDialog.java 2006-12-05 19:20:17 UTC (rev 897) +++ trunk/crossfire/src/cfeditor/CNewMapDialog.java 2006-12-05 19:59:34 UTC (rev 898) @@ -193,8 +193,7 @@ try { width = (Integer) mapWidthField.getValue(); } catch (final IllegalArgumentException e) { - final String key = e instanceof NumberFormatException ? "newMapDimensionNotANumber" : "newMapDimensionOutOfRange"; - ACTION_FACTORY.showMessageDialog(this, key); + ACTION_FACTORY.showMessageDialog(this, e instanceof NumberFormatException ? "newMapDimensionNotANumber" : "newMapDimensionOutOfRange"); mapWidthField.requestFocus(); return false; } @@ -208,8 +207,7 @@ try { height = (Integer) mapHeightField.getValue(); } catch (final IllegalArgumentException e) { - final String key = e instanceof NumberFormatException ? "newMapDimensionNotANumber" : "newMapDimensionOutOfRange"; - ACTION_FACTORY.showMessageDialog(this, key); + ACTION_FACTORY.showMessageDialog(this, e instanceof NumberFormatException ? "newMapDimensionNotANumber" : "newMapDimensionOutOfRange"); mapHeightField.requestFocus(); return false; } Modified: trunk/daimonin/src/daieditor/CNewMapDialog.java =================================================================== --- trunk/daimonin/src/daieditor/CNewMapDialog.java 2006-12-05 19:20:17 UTC (rev 897) +++ trunk/daimonin/src/daieditor/CNewMapDialog.java 2006-12-05 19:59:34 UTC (rev 898) @@ -231,8 +231,7 @@ try { width = (Integer) mapWidthField.getValue(); } catch (final IllegalArgumentException e) { - final String key = e instanceof NumberFormatException ? "newMapDimensionNotANumber" : "newMapDimensionOutOfRange"; - ACTION_FACTORY.showMessageDialog(this, key); + ACTION_FACTORY.showMessageDialog(this, e instanceof NumberFormatException ? "newMapDimensionNotANumber" : "newMapDimensionOutOfRange"); mapWidthField.requestFocus(); return false; } @@ -246,8 +245,7 @@ try { height = (Integer) mapHeightField.getValue(); } catch (final IllegalArgumentException e) { - final String key = e instanceof NumberFormatException ? "newMapDimensionNotANumber" : "newMapDimensionOutOfRange"; - ACTION_FACTORY.showMessageDialog(this, key); + ACTION_FACTORY.showMessageDialog(this, e instanceof NumberFormatException ? "newMapDimensionNotANumber" : "newMapDimensionOutOfRange"); mapHeightField.requestFocus(); return false; } @@ -283,8 +281,7 @@ try { maparch.setDifficulty((Integer) mapDifficultyField.getValue()); } catch (final IllegalArgumentException e) { - final String key = e instanceof NumberFormatException ? "newMapDifficultyNotANumber" : "newMapDifficultyOutOfRange"; - ACTION_FACTORY.showMessageDialog(this, key); + ACTION_FACTORY.showMessageDialog(this, e instanceof NumberFormatException ? "newMapDifficultyNotANumber" : "newMapDifficultyOutOfRange"); mapDifficultyField.requestFocus(); return false; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2006-12-05 19:20:22
|
Revision: 897 http://svn.sourceforge.net/gridarta/?rev=897&view=rev Author: christianhujer Date: 2006-12-05 11:20:17 -0800 (Tue, 05 Dec 2006) Log Message: ----------- Fixed Javadoc bugs. Modified Paths: -------------- trunk/crossfire/src/cfeditor/CPickmapPanel.java trunk/crossfire/src/cfeditor/CResourceLoader.java trunk/crossfire/src/cfeditor/CScriptController.java trunk/crossfire/src/cfeditor/CScriptModel.java trunk/crossfire/src/cfeditor/CSettings.java trunk/crossfire/src/cfeditor/CStartupScreen.java trunk/crossfire/src/cfeditor/ExitTypes.java trunk/crossfire/src/cfeditor/IGUIConstants.java trunk/crossfire/src/cfeditor/JarResources.java trunk/crossfire/src/cfeditor/MapViewIFrame.java trunk/crossfire/src/cfeditor/MultiPositionData.java trunk/crossfire/src/cfeditor/PluginParameter.java trunk/crossfire/src/cfeditor/PluginParameterFactory.java trunk/crossfire/src/cfeditor/PluginParameterView.java trunk/crossfire/src/cfeditor/ReplaceDialog.java trunk/crossfire/src/cfeditor/ScriptArchData.java Modified: trunk/crossfire/src/cfeditor/CPickmapPanel.java =================================================================== --- trunk/crossfire/src/cfeditor/CPickmapPanel.java 2006-12-05 19:05:52 UTC (rev 896) +++ trunk/crossfire/src/cfeditor/CPickmapPanel.java 2006-12-05 19:20:17 UTC (rev 897) @@ -36,7 +36,6 @@ import java.util.Iterator; import java.util.List; import java.util.Map; -import javax.swing.JOptionPane; import javax.swing.JTabbedPane; import javax.swing.event.ChangeEvent; import javax.swing.event.ChangeListener; @@ -216,6 +215,7 @@ * Add a new pickmap. * @param objects list of objects or <code>null</code> for empty * @param maparch the maparch of the pickmap + * @param mapFile The map file that's stored in the MapControl. * @return basic mapview */ private CMapViewBasic newPickmap(final List<GameObject> objects, final MapArchObject maparch, final File mapFile) { @@ -259,7 +259,7 @@ } /** - * Set pickmap with given name to be the active one (ontop) + * Set pickmap with given name to be the active one (ontop). * @param name map name (which is also the tab title) */ public void setActivePickmap(final String name) { @@ -269,7 +269,7 @@ } } - /** update info which pickmap is currently on top */ + /** Update info which pickmap is currently on top. */ private void updateActivePickmap() { if (tabpane == null) { @@ -301,7 +301,7 @@ } /** - * Add the PickmapSelectionListener to the pickmap tabbed panel + * Add the PickmapSelectionListener to the pickmap tabbed panel. * @param pickpane the panel with pickmaps * @todo this method's name is a Bad Thing */ @@ -321,7 +321,7 @@ // ------------------------ nested and inner classes ------------------------ - /** listener class to keep track of the currently active pickmap */ + /** Listener class to keep track of the currently active pickmap. */ private final class PickmapSelectionListener implements ChangeListener { private final String activePickmap; // file-name of active pickmap @@ -355,7 +355,7 @@ private int selectedIndex; // current state of selection /** - * Constructor + * Create a new ArchNPickChangeListener. * @param mainView the main view * @param pane the JTabbedPane containing both archlist and pickmaps */ Modified: trunk/crossfire/src/cfeditor/CResourceLoader.java =================================================================== --- trunk/crossfire/src/cfeditor/CResourceLoader.java 2006-12-05 19:05:52 UTC (rev 896) +++ trunk/crossfire/src/cfeditor/CResourceLoader.java 2006-12-05 19:20:17 UTC (rev 897) @@ -18,34 +18,34 @@ import org.jdom.input.SAXBuilder; /** + * Loader for loading resources from various locations. + * Used to load resources from various locations. + * Given a relative filename, this looks for the given + * file in the following order: + * - current directory + * - home directory + * - JAR ressource + * It is also able to write the ressource. If ressource was loaded + * from current directory or home directory, it is written at same + * place (if not read only). If the ressource was loaded from JAR, it + * is written to the home directory. You can also explicitly choose + * where to load/save using the LOCATION_xxx constants * @author tchize - * <p/> - * Used to load resources from various locations. - * Given a relative filename, this looks for the given - * file in the following order: - * - current directory - * - home directory - * - JAR ressource - * It is also able to write the ressource. If ressource was loaded - * from current directory or home directory, it is written at same - * place (if not read only). If the ressource was loaded from JAR, it - * is written to the home directory. You can also explicitly choose - * where to load/save using the LOCATION_xxx constants */ public final class CResourceLoader { private static final Logger log = Logger.getLogger(CResourceLoader.class); - /** The current working directory location */ + /** The current working directory location. */ public static final int LOCATION_CURRENT = 1; - /** The user's home directory location */ + /** The user's home directory location. */ public static final int LOCATION_HOME = 2; - /** The JAR ressources */ + /** The JAR ressources. */ public static final int LOCATION_JAR = 3; - /** The Unknown */ + /** The Unknown. */ public static final int LOCATION_UNKNOWN = 0; private int type; @@ -191,6 +191,7 @@ } /** + * Returns an aggregated XML document from the supplied parameters. * @param filename The ressource name to load * @param readCurrent read from current directory * @param readHome read from home/cfeditor directory Modified: trunk/crossfire/src/cfeditor/CScriptController.java =================================================================== --- trunk/crossfire/src/cfeditor/CScriptController.java 2006-12-05 19:05:52 UTC (rev 896) +++ trunk/crossfire/src/cfeditor/CScriptController.java 2006-12-05 19:20:17 UTC (rev 897) @@ -37,10 +37,9 @@ import org.jetbrains.annotations.Nullable; /** + * Controller for Scripts. + * @todo documentation * @author tchize - * <p/> - * To change the template for this generated type comment go to - * Window>Preferences>Java>Code Generation>Code and Comments */ public final class CScriptController { Modified: trunk/crossfire/src/cfeditor/CScriptModel.java =================================================================== --- trunk/crossfire/src/cfeditor/CScriptModel.java 2006-12-05 19:05:52 UTC (rev 896) +++ trunk/crossfire/src/cfeditor/CScriptModel.java 2006-12-05 19:20:17 UTC (rev 897) @@ -20,10 +20,9 @@ import org.jetbrains.annotations.Nullable; /** + * Model for Scripts. + * @todo documentation * @author tchize - * <p/> - * To change the template for this generated type comment go to - * Window>Preferences>Java>Code Generation>Code and Comments */ public final class CScriptModel { @@ -99,23 +98,37 @@ } } - /** @return Returns the name. */ + /** + * Returns the name of this ScriptModel. + * @return The name of this ScriptModel. + */ public String getName() { return name; } - /** @param name The name to set. */ + /** + * Sets the name of this ScriptModel. + * @param name The name of this ScriptModel. + * @todo Maybe this should be moved to the constructor and the underlying field made final. + */ public void setName(final String name) { this.name = name; notifyListeners(); } - /** @return Returns the code. */ + /** + * Returns the code of this ScriptModel. + * @return The code of this ScriptModel. + * @todo Improve name - what code is it? Source code? A special coded String? + */ public String getCode() { return code; } - /** @param code The code to set. */ + /** + * Sets the code of this ScriptModel. + * @param code The code of this ScriptModel. + */ public void setCode(final String code) { this.code = code; notifyListeners(); @@ -148,8 +161,9 @@ } /** + * Returns the parameter description for the parameter with the specified index. * @param index the parameter index to get - * @return Returns the description of a parameter. + * @return The description of the specified parameter. */ @Nullable public String getParamDescription(final int index) { try { @@ -160,14 +174,16 @@ } /** + * Returns the parameter description for the parameter with the specified name. * @param name the parameter name to get - * @return Returns the description of a parameter. + * @return The description of the specified parameter. */ public String getParamDescription(final String name) { return getParamDescription(locateParam(name)); } /** + * Sets the parameter description for the parameter with the specified index. * @param index the parameter index to set * @param description the new description of parameter */ @@ -180,6 +196,7 @@ } /** + * Sets the parameter description for the parameter with the specified name. * @param name the parameter name to set * @param description the new description of parameter */ @@ -188,6 +205,7 @@ } /** + * Returns the parameter value for the parameter with the specified index. * @param index the parameter index to get * @return Returns the parameter default value. */ @@ -202,6 +220,7 @@ } /** + * Returns the parameter value for the parameter with the specified name. * @param name the parameter name to get * @return Returns the parameter value. */ @@ -210,6 +229,7 @@ } /** + * Sets the parameter value for the parameter with the specified index. * @param index the parameter index to set * @param value the default value to set */ @@ -222,6 +242,7 @@ } /** + * Sets the parameter value for the parameter with the specified name. * @param name the argument name to set * @param value the value to set */ Modified: trunk/crossfire/src/cfeditor/CSettings.java =================================================================== --- trunk/crossfire/src/cfeditor/CSettings.java 2006-12-05 19:05:52 UTC (rev 896) +++ trunk/crossfire/src/cfeditor/CSettings.java 2006-12-05 19:20:17 UTC (rev 897) @@ -79,7 +79,7 @@ * load settings. Default the location to the users home directory * (user.home) and a subdirectory called .cfeditor to follow the unix * standard configuration for resource files. - * @param strFile + * @param strFile file name to read the configuration from. */ private CSettings(final String strFile) { this.strFile = CResourceLoader.getHomeFileName(strFile); @@ -117,6 +117,7 @@ * Searches for the property with the specified key in this * property * list. The method returns <code>null</code> if the * property is not found. * @param strKey The key that identifies the property. + * @return Property value for the named key. */ public synchronized String getProperty(final String strKey) { return properties.getProperty(strKey); @@ -128,6 +129,7 @@ * found and adds the default value with the key to properties. * @param strKey the key that identifies the property * @param strDefaultValue the default value to use + * @return Property value for the named key or <var>strDefaultValue</var> if the property is not set. */ public synchronized String getProperty(final String strKey, final String strDefaultValue) { final String strValue = properties.getProperty(strKey); Modified: trunk/crossfire/src/cfeditor/CStartupScreen.java =================================================================== --- trunk/crossfire/src/cfeditor/CStartupScreen.java 2006-12-05 19:05:52 UTC (rev 896) +++ trunk/crossfire/src/cfeditor/CStartupScreen.java 2006-12-05 19:20:17 UTC (rev 897) @@ -56,7 +56,9 @@ private static final long serialVersionUID = 1L; - /** Constructs and shows a startup screen. */ + /** Constructs and shows a startup screen. + * @param parentFrame parent frame to display the screen on. + */ public CStartupScreen(final Frame parentFrame) { super(parentFrame); Modified: trunk/crossfire/src/cfeditor/ExitTypes.java =================================================================== --- trunk/crossfire/src/cfeditor/ExitTypes.java 2006-12-05 19:05:52 UTC (rev 896) +++ trunk/crossfire/src/cfeditor/ExitTypes.java 2006-12-05 19:20:17 UTC (rev 897) @@ -27,7 +27,11 @@ private ExitTypes() { } - /** Determine whether a given GameObject is an "exit". */ + /** + * Determine whether a given GameObject is an "exit". + * @param exit Object to check for being an exit. + * @return <code>true</code> if <var>exit</var> is an exit, otherwise <code>false</code>. + */ public static boolean contains(final GameObject exit) { if (exit == null) { throw new IllegalArgumentException(); Modified: trunk/crossfire/src/cfeditor/IGUIConstants.java =================================================================== --- trunk/crossfire/src/cfeditor/IGUIConstants.java 2006-12-05 19:05:52 UTC (rev 896) +++ trunk/crossfire/src/cfeditor/IGUIConstants.java 2006-12-05 19:20:17 UTC (rev 897) @@ -39,15 +39,15 @@ public interface IGUIConstants { /** - * Version number of the CFJavaEditor <br> - * should be increased when a certain amount of changes happened + * Version number of the CFJavaEditor. + * Should be increased when a certain amount of changes happened. */ String VERSION = "0.986"; /** - * Internal version number of the included online-documentation <br> - * increasing the number causes an automated popup of the docu - * when users upgrade their editor and run for the first time + * Internal version number of the included online-documentation. + * Increasing the number causes an automated popup of the docu + * when users upgrade their editor and run for the first time. */ int DOCU_VERSION = 2; Modified: trunk/crossfire/src/cfeditor/JarResources.java =================================================================== --- trunk/crossfire/src/cfeditor/JarResources.java 2006-12-05 19:05:52 UTC (rev 896) +++ trunk/crossfire/src/cfeditor/JarResources.java 2006-12-05 19:20:17 UTC (rev 897) @@ -164,6 +164,7 @@ /** * Dumps a zip entry into a string. * @param ze a ZipEntry + * @return String with information on the supplied ZipEntry. */ private String dumpZipEntry(final ZipEntry ze) { final StringBuffer sb = new StringBuffer(); @@ -202,6 +203,8 @@ * JR.getResources("logo.gif")); * ... * </pre> + * @param args Command line parameters + * @throws IOException In case of I/O problems. */ public static void main(final String[] args) throws IOException { if (args.length != 2) { Modified: trunk/crossfire/src/cfeditor/MapViewIFrame.java =================================================================== --- trunk/crossfire/src/cfeditor/MapViewIFrame.java 2006-12-05 19:05:52 UTC (rev 896) +++ trunk/crossfire/src/cfeditor/MapViewIFrame.java 2006-12-05 19:20:17 UTC (rev 897) @@ -93,7 +93,7 @@ return view; } - /** Update the Map-Window Title (according to name and changeFlag) */ + /** Update the Map-Window Title (according to name and changeFlag). */ public void updateTitle() { String strTitle = "Map [" + mapControl.getMapFileName() + "]"; Modified: trunk/crossfire/src/cfeditor/MultiPositionData.java =================================================================== --- trunk/crossfire/src/cfeditor/MultiPositionData.java 2006-12-05 19:05:52 UTC (rev 896) +++ trunk/crossfire/src/cfeditor/MultiPositionData.java 2006-12-05 19:20:17 UTC (rev 897) @@ -42,17 +42,18 @@ private static final Logger log = Logger.getLogger(MultiPositionData.class); - /** number of rows and columns in the array */ + /** Number of rows and columns in the array. */ public static final int X_DIM = 34; + /** Number of rows and columns in the array. */ public static final int Y_DIM = 16; private static MultiPositionData instance = null; - /** array with position data */ + /** Array with position data. */ private final int[][] data; - /** private constructor: initialize array */ + /** Private constructor: initialize array. */ private MultiPositionData() { data = new int[Y_DIM][X_DIM]; } Modified: trunk/crossfire/src/cfeditor/PluginParameter.java =================================================================== --- trunk/crossfire/src/cfeditor/PluginParameter.java 2006-12-05 19:05:52 UTC (rev 896) +++ trunk/crossfire/src/cfeditor/PluginParameter.java 2006-12-05 19:20:17 UTC (rev 897) @@ -14,10 +14,8 @@ import org.jdom.Element; /** + * Parameter for a Plugin. * @author tchize - * <p/> - * To change the template for this generated type comment go to - * Window>Preferences>Java>Code Generation>Code and Comments */ public abstract class PluginParameter { Modified: trunk/crossfire/src/cfeditor/PluginParameterFactory.java =================================================================== --- trunk/crossfire/src/cfeditor/PluginParameterFactory.java 2006-12-05 19:05:52 UTC (rev 896) +++ trunk/crossfire/src/cfeditor/PluginParameterFactory.java 2006-12-05 19:20:17 UTC (rev 897) @@ -20,10 +20,8 @@ import org.jetbrains.annotations.Nullable; /** + * Factory for Plugin Parameters. * @author tchize - * <p/> - * To change the template for this generated type comment go to - * Window>Preferences>Java>Code Generation>Code and Comments */ public final class PluginParameterFactory { Modified: trunk/crossfire/src/cfeditor/PluginParameterView.java =================================================================== --- trunk/crossfire/src/cfeditor/PluginParameterView.java 2006-12-05 19:05:52 UTC (rev 896) +++ trunk/crossfire/src/cfeditor/PluginParameterView.java 2006-12-05 19:20:17 UTC (rev 897) @@ -10,10 +10,8 @@ import javax.swing.JComponent; /** + * Interface for Views that display plugin parameters. * @author tchize - * <p/> - * To change the template for this generated type comment go to - * Window>Preferences>Java>Code Generation>Code and Comments */ public interface PluginParameterView { Modified: trunk/crossfire/src/cfeditor/ReplaceDialog.java =================================================================== --- trunk/crossfire/src/cfeditor/ReplaceDialog.java 2006-12-05 19:05:52 UTC (rev 896) +++ trunk/crossfire/src/cfeditor/ReplaceDialog.java 2006-12-05 19:20:17 UTC (rev 897) @@ -107,7 +107,10 @@ this.mainControl = mainControl; } - /** @return true when this frame has been fully built */ + /** + * Returns whether this frame has been fully built. + * @return <code>true</code> when if this frame has been fully built, otherwise <code>false</code>. + */ public static boolean isBuilt() { return instance != null && instance.isBuilt; } Modified: trunk/crossfire/src/cfeditor/ScriptArchData.java =================================================================== --- trunk/crossfire/src/cfeditor/ScriptArchData.java 2006-12-05 19:05:52 UTC (rev 896) +++ trunk/crossfire/src/cfeditor/ScriptArchData.java 2006-12-05 19:20:17 UTC (rev 897) @@ -103,7 +103,7 @@ private final List<ScriptedEvent> eventList; // contains list of ScriptedEvents - /** Constructor */ + /** Create a ScriptArchData. */ public ScriptArchData() { eventList = new ArrayList<ScriptedEvent>(); if (eventTypeBox == null) { @@ -300,7 +300,7 @@ } /** - * Try to create a reasonable default script name for lazy users :-) + * Try to create a reasonable default script name for lazy users. * @param archName the best suitable name for the arch (see GameObject.getBestName()) * @return a nice default script name without whitespaces */ @@ -370,6 +370,7 @@ * A popup is opened and the user can create a new scripting event * which gets attached to this arch. * @param panelList JList from the MapArchPanel (script tab) which displays the events + * @param arch GameObject that's name should be used for creating a reasonable default script name. */ public void addEventScript(final JList panelList, final GameObject arch) { final String archName = arch.getBestName(); @@ -595,8 +596,9 @@ } /** + * Returns whether this ScriptArchData is empty (contains no events). * (Note that empty ScriptArchData objects always are removed ASAP) - * @return true when this ScriptArchData contains no events + * @return <code>true</code> if this ScriptArchData contains no events, otherwise <code>false</code>. */ public boolean isEmpty() { return eventList == null || eventList.size() == 0; @@ -614,8 +616,8 @@ private String filePath; // path to scriptfile (can be a relative or absolute path) /** - * Construct a ScriptedEvent of given type (This is used for map-loading) - * @param eventType + * Construct a ScriptedEvent of given type (This is used for map-loading). + * @param eventType Type of the event. */ ScriptedEvent(final String eventType) { this.eventType = eventType; @@ -623,7 +625,13 @@ filePath = null; } - /** Construct a fully initialized ScriptedEvent. */ + /** + * Creates a fully initialized ScriptedEvent. + * @param eventType Type of the event. + * @param pluginName Name of the plugin. + * @param filePath Path the the script. + * @param eventOptions Options for the Event. + */ ScriptedEvent(final String eventType, final String pluginName, final String filePath, final String eventOptions) { this.eventType = eventType; this.pluginName = pluginName; @@ -653,7 +661,10 @@ return true; } - /** @return text for this events, how it is written in a mapfile */ + /** + * Returns the text that has to be written to a map file for this ScriptedEvent. + * @return Event text for the map file. + */ public String getMapArchText() { final StringBuilder buff = new StringBuilder(""); buff.append("event_").append(eventType).append("_plugin ").append(pluginName).append("\n"); @@ -664,7 +675,11 @@ return buff.toString(); } - /** @return a cloned instance of this object */ + /** + * Creates a clone of this object. + * @return Clone of this object. + * @todo instead override {@link Object#clone()}. + */ public ScriptedEvent getClone() { final ScriptedEvent clone = new ScriptedEvent(eventType); clone.pluginName = pluginName; @@ -840,7 +855,7 @@ private ScriptArchData scriptArchData; /** - * Constructor + * Create a PathButtonListener. * @param isOkButton true for ok-buttons * @param frame frame this listener belongs to * @param scriptArchData this is only set for the ok-button of "create new" frame, otherwise null This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2006-12-05 19:05:52
|
Revision: 896 http://svn.sourceforge.net/gridarta/?rev=896&view=rev Author: christianhujer Date: 2006-12-05 11:05:52 -0800 (Tue, 05 Dec 2006) Log Message: ----------- Removed unused menu field. Modified Paths: -------------- trunk/crossfire/src/cfeditor/CMainMenu.java Modified: trunk/crossfire/src/cfeditor/CMainMenu.java =================================================================== --- trunk/crossfire/src/cfeditor/CMainMenu.java 2006-12-05 19:00:15 UTC (rev 895) +++ trunk/crossfire/src/cfeditor/CMainMenu.java 2006-12-05 19:05:52 UTC (rev 896) @@ -1142,7 +1142,6 @@ } private void buildBshMenu() { - mainControl.getScriptController().getView().setMainMenu(this); add(mainControl.getScriptController().getView().getMenu()); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2006-12-05 19:00:23
|
Revision: 895 http://svn.sourceforge.net/gridarta/?rev=895&view=rev Author: christianhujer Date: 2006-12-05 11:00:15 -0800 (Tue, 05 Dec 2006) Log Message: ----------- Removed unused menu field. Modified Paths: -------------- trunk/crossfire/src/cfeditor/CScriptView.java Modified: trunk/crossfire/src/cfeditor/CScriptView.java =================================================================== --- trunk/crossfire/src/cfeditor/CScriptView.java 2006-12-04 23:08:08 UTC (rev 894) +++ trunk/crossfire/src/cfeditor/CScriptView.java 2006-12-05 19:00:15 UTC (rev 895) @@ -36,10 +36,8 @@ import org.apache.log4j.Logger; /** + * View for Scripts. * @author tchize - * <p/> - * To change the template for this generated type comment go to - * Window>Preferences>Java>Code Generation>Code and Comments */ public final class CScriptView implements ChangeListener, ActionListener { @@ -47,8 +45,6 @@ private final CScriptController ctrl; - private CMainMenu menu; - private JMenu menuScripts = null; private JMenuItem[] entryScript = null; @@ -59,7 +55,11 @@ private JFrame scriptManager = null; - /** @param controller controller of this ScriptView */ + /** + * Creates a ScriptView. + * @param controller controller of this ScriptView + * @warning Creating a view from a controller instead of a model is error prone. + */ public CScriptView(final CScriptController controller) { super(); this.ctrl = controller; @@ -84,10 +84,6 @@ public void hideEditor() { } - public void setMainMenu(final CMainMenu menu) { - this.menu = menu; - } - public JMenu getMenu() { if (menuScripts == null) { updateMenu(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2006-12-04 23:08:08
|
Revision: 894 http://svn.sourceforge.net/gridarta/?rev=894&view=rev Author: akirschbaum Date: 2006-12-04 15:08:08 -0800 (Mon, 04 Dec 2006) Log Message: ----------- Fix typo. Modified Paths: -------------- trunk/daimonin/src/daieditor/messages.properties Modified: trunk/daimonin/src/daieditor/messages.properties =================================================================== --- trunk/daimonin/src/daieditor/messages.properties 2006-12-04 22:48:16 UTC (rev 893) +++ trunk/daimonin/src/daieditor/messages.properties 2006-12-04 23:08:08 UTC (rev 894) @@ -95,9 +95,9 @@ savePickmapHidden.message=Pickmaps are currently hidden.\nPlease select a pickmap before activating this command. savePickmapNoPickmaps.title=Cannot save Pickmap savePickmapNoPickmaps.message=There are no pickmaps. -createImgNoMap.title=Couln''t create Image +createImgNoMap.title=Couldn''t create Image createImgNoMap.message=You cannot create an image when there is no map open. -createImgIOException.title=Couln''t create Image +createImgIOException.title=Couldn''t create Image createImgIOException.message= The image could not be created because the file {0} cannot be written. enterExitNoExit.title=No Exit Found enterExitNoExit.message=There is no valid exit at the selected spot. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2006-12-04 22:48:16
|
Revision: 893 http://svn.sourceforge.net/gridarta/?rev=893&view=rev Author: akirschbaum Date: 2006-12-04 14:48:16 -0800 (Mon, 04 Dec 2006) Log Message: ----------- Various unifications. Modified Paths: -------------- trunk/crossfire/src/cfeditor/CMainControl.java trunk/crossfire/src/cfeditor/CMainMenu.java trunk/crossfire/src/cfeditor/CMapTileList.java trunk/crossfire/src/cfeditor/CMapViewBasic.java trunk/daimonin/src/daieditor/CMainControl.java Modified: trunk/crossfire/src/cfeditor/CMainControl.java =================================================================== --- trunk/crossfire/src/cfeditor/CMainControl.java 2006-12-04 22:12:58 UTC (rev 892) +++ trunk/crossfire/src/cfeditor/CMainControl.java 2006-12-04 22:48:16 UTC (rev 893) @@ -142,8 +142,6 @@ /** The current main directory. */ private File currentDir; - private String strCurrentDir; - // resource directories private File mapDir; @@ -184,16 +182,13 @@ /** Pickmaps cannot be edited while lockedPickmaps is true. */ private boolean pickmapsLocked = false; - private FaceObjects faceObjects = new FaceObjects(); + private FaceObjects faceObjects; /** Constructs the main controller and its model and view. */ public CMainControl() { + instance = this; archetypeSet = new ArchetypeSet(this); mainView = new CMainView(this); - - instance = this; - - tileEdit = 0; scriptControl = new CScriptController(this); } @@ -211,8 +206,7 @@ */ void init(final boolean doShow) { // Get the current directory - strCurrentDir = System.getProperty("user.dir"); - currentDir = new File(strCurrentDir); + currentDir = new File(System.getProperty("user.dir")); readGlobalSettings(); @@ -220,7 +214,7 @@ new CPickmapPanel(); // initialize the script-editor pad - ScriptEditControl.init(getMapDefaultFolder(), this); + ScriptEditControl.init(strMapDir, this); // Initialise the main view mainView.init(doShow); @@ -229,13 +223,14 @@ if (autoPopupDocu) { // do an automated help popup because the docu version has increased // (people won't notice the docu otherwise - nobody expects a docu in opensource) - this.openHelpWindow(); + openHelpWindow(); autoPopupDocu = false; } // our global object parser archetypeParser = new ArchetypeParser(this); animationObjects = new AnimationObjects(); + faceObjects = new FaceObjects(); // read in the type & type field definitions archetypeParser.loadTypeNumbers(); @@ -246,8 +241,6 @@ GameObject.setTypeList(typeList); // set reference in GameObject - // now collect all arch you can find in the arch path!! - System.gc(); mainView.updateFocus(false); } @@ -278,7 +271,7 @@ } /** Collect crossfire archetypes. */ - public void collectCFArches() { + public void collectArches() { if (archetypeSet.getLoadStatus() != ArchetypeSet.LoadStatus.COMPLETE) { // must not collect arches while arch stack not complete showMessage("Arches still Loading", "You have to wait for all arches to be loaded\nbefore you can collect them."); @@ -319,16 +312,14 @@ } /** - * Returns the information on the current state of tileEdit for <var>v</var>. - * Answers the question whether tiles of type 'v' are displayed. + * Get information on the current state of tileEdit: + * Are tiles of type 'v' displayed? * @param v are tiles of this type displayed? - * @return <code>true</code> if these tiles are currently displayed, otherwise <code>false</code>. + * @return <code>true</code> if these tiles are currently displayed */ public boolean isTileEdit(final int v) { - if (v == 0) { - return (tileEdit & IGUIConstants.TILE_EDIT_NONE) != 0; - } - return (tileEdit & v) != 0; + final int mask = v != 0 ? v : IGUIConstants.TILE_EDIT_NONE; + return (tileEdit & mask) != 0; } /** @@ -354,7 +345,6 @@ setTileEdit(newType); // activate the new type for all views } - // get/set autojoin state public void setAutojoin(final boolean state) { autojoin = state; @@ -413,7 +403,7 @@ loadFromArchive = new Boolean(CSettings.getInstance(IGUIConstants.APP_NAME).getProperty(LOAD_ARCH_COLL, "true")).booleanValue(); - this.getMainView().setMapTileListBottom(new Boolean(CSettings.getInstance(IGUIConstants.APP_NAME).getProperty(CMainView.MAPTILE_BOTTOM_KEY, "false")).booleanValue()); + getMainView().setMapTileListBottom(new Boolean(CSettings.getInstance(IGUIConstants.APP_NAME).getProperty(CMainView.MAPTILE_BOTTOM_KEY, "false")).booleanValue()); setLockAllPickmaps(new Boolean(CSettings.getInstance(IGUIConstants.APP_NAME).getProperty(PICKMAPS_LOCKED, "false")).booleanValue()); @@ -522,6 +512,10 @@ return currentMap.getMapArch(index, pos); } + /** + * Returns the main view. + * @return the main view + */ public CMainView getMainView() { return mainView; } @@ -545,8 +539,11 @@ mainView.addArchPanelArch(archname, index); } - // selected arch in arch panel - public String getPanelArch() { + /** + * Return name of the selected arch in arch panel. + * @return name of selected arch in arch panel + */ + public String getPanelArchName() { return mainView.getPanelArch(); } @@ -601,6 +598,12 @@ return currentMap.getMapViewFrame().isGridVisible(); } + /** + * Sets whether the grid of the current map should be visible. + * Grid visibility defaults to false + * @param gridVisible new visibility of grid in current map, <code>true</code> if the grid should be visible, <code>false</code> if invisible + * @see #isGridVisible() + */ public void setGridVisible(final boolean gridVisible) { if (currentMap != null) { currentMap.getMapViewFrame().setGridVisible(gridVisible); @@ -644,25 +647,22 @@ * Begins the editing of a new Map. * @param objects the list of map objects, or <code>null</code> for new empty maps * @param maparch map arch - * @param show if true, map is added to main view. Set to false to load silently + * @param view Only create a view if this is true * @param initial the view position to show initially; null=show top left corner * @return map control of new map */ - public MapControl newLevel(final List<GameObject> objects, final MapArchObject maparch, final boolean show, final Point initial) { + public MapControl newLevel(final List<GameObject> objects, final MapArchObject maparch, final boolean view, final Point initial) { // Create a new level control and set the level view from that CMainStatusbar.getInstance().setText(" Creating new map " + maparch.getMapDisplayName()); final MapControl map = new MapControl(this, objects, maparch, false, initial); - if (show) { + if (view) { mainView.addLevelView(map.getMapViewFrame()); // one view... map.getMapViewFrame().setAutoscrolls(true); levels.add(map); setCurrentLevel(map); refreshMenusAndToolbars(); } - // The garbage collector might be nice here, but it consumes - // so much time that it's unbearable. - //System.gc(); return map; } @@ -717,10 +717,10 @@ } /** - * Closes the given level. - * @param level the level to close. + * Closes the given level, eventually asking the user whether to save changes. + * @param level the level to close * @param forced when true, user does not get asked and changes do not get saved - * @return <code>true</code> if closing successful + * @return <code>true</code> if the level was successfully closed, otherwise <code>false</code> */ public boolean closeLevel(final MapControl level, final boolean forced) { @@ -757,7 +757,6 @@ } } refreshMenusAndToolbars(); - System.gc(); return true; } @@ -826,7 +825,6 @@ hasChangedDir = true; // user has chosen an active dir final File file = fileChooser.getSelectedFile(); if ((file.getName().endsWith(".py") || file.getName().endsWith(".PY")) && !file.isDirectory()) { - // user selected a python script - well, why not... currentDir = fileChooser.getCurrentDirectory(); if (file.exists()) { ScriptEditControl.getInstance().openScriptFile(file.getAbsolutePath()); @@ -834,13 +832,10 @@ ScriptEditControl.getInstance().openScriptNew(); } } else { - // it's a map file, most likely if (file.exists() && !file.isDirectory()) { - // everything okay do far, now open up that mapfile currentDir = fileChooser.getCurrentDirectory(); openFile(file); } else { - // user entered a filename which doesn't yet exist -> create new map newLevelWanted(file.getName()); } } @@ -1007,7 +1002,7 @@ currentMap.save(); } - /** Save currently active pickmap. */ + /** Save current active pickmap. */ public void savePickmap() { if (!CPickmapPanel.getInstance().isLoadComplete()) { showMessage("Cannot save Pickmap", "Pickmaps aren't loaded.\n" + @@ -1241,11 +1236,11 @@ return; } - final String path = exit.getAttributeString("slaying"); final Point exitPos = new Point(); exitPos.x = exit.getAttributeInt("hp"); exitPos.y = exit.getAttributeInt("sp"); + final String path = exit.getAttributeString("slaying"); if (path.length() == 0 || (currentMap.getMapFile() != null && path.equals(currentMap.getMapFile().getName()))) { // path points to the same map @@ -1398,12 +1393,8 @@ /** Invoked when user wants to revert the current map to previously saved state. */ public void revert() { - final MapControl modmap = this.currentMap; // "modified map" to be reverted - - // ask for confirmation + final MapControl modmap = currentMap; // "modified map" to be reverted if (askConfirm("Revert " + modmap.getMapFileName() + "?", "If you revert the map '" + modmap.getMapFileName() + "' to it's last saved state, all\nrecent changes will be lost. Do you really want to revert this map?")) { - // okay, then do it: - final File mfile = modmap.getMapFile(); // store file final Point initial = modmap.getViewPosition(); closeLevel(modmap, true); // close the old map @@ -1713,10 +1704,18 @@ return levels.toArray(new MapControl[levels.size()]); } + /** + * Returns the current top map we are working with. + * @return the current top map we are working with + */ public MapControl getCurrentMap() { return currentMap; } + /** + * Get the ArchetypeParser. + * @return ArchetypeParser + */ public ArchetypeParser getArchetypeParser() { return archetypeParser; } Modified: trunk/crossfire/src/cfeditor/CMainMenu.java =================================================================== --- trunk/crossfire/src/cfeditor/CMainMenu.java 2006-12-04 22:12:58 UTC (rev 892) +++ trunk/crossfire/src/cfeditor/CMainMenu.java 2006-12-04 22:48:16 UTC (rev 893) @@ -907,7 +907,7 @@ //TODO fix this //menu_collect.setPopupMenuVisible(false); mainControl.getMainView().update(mainControl.getMainView().getGraphics()); - mainControl.collectCFArches(); + mainControl.collectArches(); } }); menuManager.addMenuEntry("main.resources", m_collectArch); Modified: trunk/crossfire/src/cfeditor/CMapTileList.java =================================================================== --- trunk/crossfire/src/cfeditor/CMapTileList.java 2006-12-04 22:12:58 UTC (rev 892) +++ trunk/crossfire/src/cfeditor/CMapTileList.java 2006-12-04 22:48:16 UTC (rev 893) @@ -193,11 +193,11 @@ if (currentSquare != null && mainControl.getArchPanelHighlight() != null) { final int listIndex = getListIndex(e); if (listIndex >= list.getModel().getSize()) { - mainControl.insertArchToMap(mainControl.getArchPanelHighlight(), mainControl.getPanelArch(), null, currentSquare, MapModel.JOIN_ENABLE); + mainControl.insertArchToMap(mainControl.getArchPanelHighlight(), mainControl.getPanelArchName(), null, currentSquare, MapModel.JOIN_ENABLE); } else { final String entry = model.getElementAt(listIndex).toString(); final int num = Integer.parseInt(entry.substring(0, 10)); - mainControl.insertArchToMap(mainControl.getArchPanelHighlight(), mainControl.getPanelArch(), mainControl.getMapArch(num, currentSquare), currentSquare, MapModel.JOIN_ENABLE); + mainControl.insertArchToMap(mainControl.getArchPanelHighlight(), mainControl.getPanelArchName(), mainControl.getMapArch(num, currentSquare), currentSquare, MapModel.JOIN_ENABLE); } // refresh Modified: trunk/crossfire/src/cfeditor/CMapViewBasic.java =================================================================== --- trunk/crossfire/src/cfeditor/CMapViewBasic.java 2006-12-04 22:12:58 UTC (rev 892) +++ trunk/crossfire/src/cfeditor/CMapViewBasic.java 2006-12-04 22:48:16 UTC (rev 893) @@ -841,7 +841,7 @@ if (!mainControl.getMainView().isPickmapActive() || mapControl.isPickmap() || (newarch != null && newarch.isArchetype())) { // insert default arch from archlist: - if (!mapControl.addArchToMap(mainControl.getPanelArch(), pos, allowMany, MapModel.JOIN_ENABLE)) { + if (!mapControl.addArchToMap(mainControl.getPanelArchName(), pos, allowMany, MapModel.JOIN_ENABLE)) { // mainControl.getMainView().mapPanel.setMapArchList(null); // Toolkit.getDefaultToolkit().beep(); } else { Modified: trunk/daimonin/src/daieditor/CMainControl.java =================================================================== --- trunk/daimonin/src/daieditor/CMainControl.java 2006-12-04 22:12:58 UTC (rev 892) +++ trunk/daimonin/src/daieditor/CMainControl.java 2006-12-04 22:48:16 UTC (rev 893) @@ -601,10 +601,11 @@ * Get information on the current state of tileEdit: * Are tiles of type 'v' displayed? * @param v are tiles of this type displayed? - * @return true if these tiles are currently displayed + * @return <code>true</code> if these tiles are currently displayed */ public boolean isTileEdit(final int v) { - return v == 0 ? (tileEdit & TILE_EDIT_NONE) != 0 : (tileEdit & v) != 0; + final int mask = v != 0 ? v : IGUIConstants.TILE_EDIT_NONE; + return (tileEdit & mask) != 0; } /** @@ -631,7 +632,7 @@ * each map where this type has not yet been used. * @param newType new selected edit type (should not be more than one) */ - void selectEdittype(final int newType) { + void selectEditType(final int newType) { // calculate the new type for all opened maps: for (final MapControl level : levels) { level.addEditType(newType); // calculate new type @@ -763,7 +764,7 @@ return pickmapsLocked; } - /** refresh the active map view, if there is one */ + /** Refresh the active map view, if there is one. */ public void refreshCurrentMap() { mainView.refreshMapTileList(); // update tile window if (currentMap != null) { @@ -877,7 +878,7 @@ * Begins the editing of a new Map. * @param objects the list of map objects, or <code>null</code> for new empty maps * @param maparch map arch - * @param view Only create a view if this is true; + * @param view Only create a view if this is true * @return map control of new map */ public MapControl newLevel(final List<GameObject> objects, final MapArchObject maparch, final boolean view) { @@ -940,7 +941,7 @@ return true; } - /** Invoked when the user wants to close the active pickmap */ + /** Invoked when the user wants to close the active pickmap. */ public void closePickmap() { if (!CPickmapPanel.getInstance().isLoadComplete()) { ACTION_FACTORY.showMessageDialog(mainView, "closePickmapNotLoaded"); @@ -1029,7 +1030,7 @@ return true; } - /** Open active pickmap as normal map for extensive editing */ + /** Open active pickmap as normal map for extensive editing. */ public void openPickmapMap() { if (!CPickmapPanel.getInstance().isLoadComplete()) { ACTION_FACTORY.showMessageDialog(mainView, "openPickmapMapNotLoaded"); @@ -1228,7 +1229,7 @@ } /** - * Open an attribute dialog window for the specified arch + * Open an attribute dialog window for the specified gameObject. * @param gameObject GameObject to open attribute dialog window for. */ public void openAttrDialog(final GameObject gameObject) { @@ -1310,7 +1311,7 @@ currentMap.save(); } - /** Save current active pickmap */ + /** Save current active pickmap. */ public void savePickmap() { if (CPickmapPanel.getInstance().isLoadComplete()) { if (!mainView.isPickmapActive()) { @@ -1552,17 +1553,18 @@ ACTION_FACTORY.showMessageDialog(mainView, "enterExitNoExit"); return; } - final Point d = new Point(); - d.x = exit.getAttributeInt("hp"); // exit destination coords. - d.y = exit.getAttributeInt("sp"); - final String path = exit.getAttributeString("slaying"); // exit path + final Point exitPos = new Point(); + exitPos.x = exit.getAttributeInt("hp"); + exitPos.y = exit.getAttributeInt("sp"); + + final String path = exit.getAttributeString("slaying"); if (path == null || path.length() == 0) { ACTION_FACTORY.showMessageDialog(mainView, "enterExitNoExit"); return; } - enterMapWanted(d, path); + enterMapWanted(exitPos, path); } /** Action method for entering the north map. */ @@ -1701,7 +1703,7 @@ //CMainStatusbar.getInstance().setLevelInfo(level); } - /** Invoked when user wants to revert the current map to previously saved state */ + /** Invoked when user wants to revert the current map to previously saved state. */ public void revert() { final MapControl modmap = currentMap; // "modified map" to be reverted if (ACTION_FACTORY.showQuestionDialog(mainView, "confirmRevertMap", modmap.getMapFileName())) { @@ -1714,7 +1716,7 @@ } } - /** Invoked when user wants to revert the current map to previously saved state */ + /** Invoked when user wants to revert the current pickmap to previously saved state. */ public void revertPickmap() { if (!CPickmapPanel.getInstance().isLoadComplete()) { ACTION_FACTORY.showMessageDialog(mainView, "revertPickmapNotLoaded"); @@ -1803,6 +1805,7 @@ if (currentMap == null || currentMap.getMapViewFrame() == null) { return; // this should never be possible, but I just wanna make sure... } + copybuffer.fill(currentMap, fillBelow, null, -1); } @@ -1878,8 +1881,8 @@ } /** - * Is the CopyBuffer empty? - * @return true if the buffer is empty + * Returns whether the CopyBuffer is empty. + * @return <code>true</code> if the CopyBuffer is empty, otherwise <code>false</code>. */ public boolean isCopyBufferEmpty() { return copybuffer.isEmpty(); @@ -1933,8 +1936,8 @@ } /** - * load all system tile icons into temporare variables - * for more convenient access + * Load all system tile icons into temporare variables for more convenient + * access. */ private static void loadDefTiles() { mapGridIcon = CGUIUtils.getSysIcon(IGUIConstants.TILE_IGRID_TILE); @@ -2026,7 +2029,7 @@ } /** - * Returns the current top map we are working with + * Returns the current top map we are working with. * @return the current top map we are working with */ public MapControl getCurrentMap() { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2006-12-04 22:12:58
|
Revision: 892 http://svn.sourceforge.net/gridarta/?rev=892&view=rev Author: akirschbaum Date: 2006-12-04 14:12:58 -0800 (Mon, 04 Dec 2006) Log Message: ----------- Unify comment. Modified Paths: -------------- trunk/daimonin/src/daieditor/CMainControl.java Modified: trunk/daimonin/src/daieditor/CMainControl.java =================================================================== --- trunk/daimonin/src/daieditor/CMainControl.java 2006-12-04 22:11:29 UTC (rev 891) +++ trunk/daimonin/src/daieditor/CMainControl.java 2006-12-04 22:12:58 UTC (rev 892) @@ -207,7 +207,7 @@ /** The Face Objects. */ private FaceObjects faceObjects; - // icons for the map and arch pictures . x= rectangle, normal = iso + // icons for the map and arch pictures . public static ImageIcon mapSelIcon; public static ImageIcon mapPreSelIcon; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2006-12-04 22:11:30
|
Revision: 891 http://svn.sourceforge.net/gridarta/?rev=891&view=rev Author: akirschbaum Date: 2006-12-04 14:11:29 -0800 (Mon, 04 Dec 2006) Log Message: ----------- Unify initialization statements. Modified Paths: -------------- trunk/crossfire/src/cfeditor/CMainControl.java trunk/daimonin/src/daieditor/CMainControl.java Modified: trunk/crossfire/src/cfeditor/CMainControl.java =================================================================== --- trunk/crossfire/src/cfeditor/CMainControl.java 2006-12-04 22:07:19 UTC (rev 890) +++ trunk/crossfire/src/cfeditor/CMainControl.java 2006-12-04 22:11:29 UTC (rev 891) @@ -107,7 +107,7 @@ private final CMainView mainView; /** Bit field of edit types to show only. */ - private int tileEdit; + private int tileEdit = 0; private ArchetypeParser archetypeParser; Modified: trunk/daimonin/src/daieditor/CMainControl.java =================================================================== --- trunk/daimonin/src/daieditor/CMainControl.java 2006-12-04 22:07:19 UTC (rev 890) +++ trunk/daimonin/src/daieditor/CMainControl.java 2006-12-04 22:11:29 UTC (rev 891) @@ -194,7 +194,7 @@ private final CMainView mainView; /** Bit field of edit types to show only. */ - private int tileEdit; + private int tileEdit = 0; /** Bit field of edit types to show transparent. */ private int alphaType; @@ -253,13 +253,13 @@ // this flag indicates weither the user has ever changed the // active dir since the program started - boolean hasChangedDir; + private boolean hasChangedDir = false; /** Do we load arches from the collected archives? */ private boolean loadFromArchive = true; /** Time for an automated docu popup? */ - private boolean autoPopupDocu; + private boolean autoPopupDocu = false; /** Whether to display double arches like stacked walls in stacked version. */ private boolean drawDouble; @@ -268,10 +268,10 @@ private final CopyBuffer copybuffer = new CopyBuffer(this); /** The list of archtype-data (loaded from "types.txt"). */ - private CFArchTypeList typeList; + private CFArchTypeList typeList = null; /** Pickmaps cannot be edited while lockedPickmaps is true. */ - private boolean pickmapsLocked; + private boolean pickmapsLocked = false; /** Client Control Component. */ private ProcessRunner controlClient; @@ -311,7 +311,6 @@ mapCursorControl = new MapCursorControl(this); mainView = new CMainView(); Updater.startup(mainView); - tileEdit = 0; init(); refreshMenusAndToolbars(); archetypeSet.loadArchetypes(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2006-12-04 22:07:22
|
Revision: 890 http://svn.sourceforge.net/gridarta/?rev=890&view=rev Author: akirschbaum Date: 2006-12-04 14:07:19 -0800 (Mon, 04 Dec 2006) Log Message: ----------- Unify comments. Modified Paths: -------------- trunk/crossfire/src/cfeditor/CMainControl.java trunk/daimonin/src/daieditor/CMainControl.java Modified: trunk/crossfire/src/cfeditor/CMainControl.java =================================================================== --- trunk/crossfire/src/cfeditor/CMainControl.java 2006-12-04 21:59:42 UTC (rev 889) +++ trunk/crossfire/src/cfeditor/CMainControl.java 2006-12-04 22:07:19 UTC (rev 890) @@ -114,7 +114,7 @@ /** The Animation Objects. */ private AnimationObjects animationObjects; - // icons for the map and arch pictures . X= rectangle, normal = iso + // icons for the map and arch pictures. private static ImageIcon mapSelIcon; private static ImageIcon mapGridIcon; @@ -125,7 +125,10 @@ private static ImageIcon noarchTileIcon; - private final ArchetypeSet archetypeSet; // the one and only arch list + /** + * The ArchetypeSet, which is a registry of all Archetypes. + */ + private final ArchetypeSet archetypeSet; /** All open maps. */ private final List<MapControl> levels = new ArrayList<MapControl>(); @@ -150,31 +153,35 @@ private String strScriptDir; - private String strImageDir; // directory for saving map images + /** Directory for saving map images. */ + private String strImageDir; // this flag indicates weither the user has ever changed the // active dir since the program started private boolean hasChangedDir = false; - private boolean autojoin = false; // indicates weither autojoining is on/off + /** Indicates whether autojoining is on/off. */ + private boolean autojoin = false; - //private boolean isoMapViewDefault; - private String imageSet; // Name of used Image Set (null = none) + /** Name of used Image Set (null = none). */ + private String imageSet; - private boolean loadFromArchive = true; // do we load arches from the collected archives? + /** Do we load arches from the collected archives? */ + private boolean loadFromArchive = true; - private boolean autoPopupDocu = false; // time for an automated docu popup? + /** Time for an automated docu popup? */ + private boolean autoPopupDocu = false; - // buffer managing copy data + /** Buffer managing copy data. */ private final CopyBuffer copybuffer = new CopyBuffer(this); - // head of linked list, containing the autojoin data + /** Head of linked list, containing the autojoin data. */ private AutojoinList joinList = null; - // the list of archtype-data (loaded from "types.txt") + /** The list of archtype-data (loaded from "types.txt"). */ private CFArchTypeList typeList = null; - // pickmaps cannot be edited while lockedPickmaps is true + /** Pickmaps cannot be edited while lockedPickmaps is true. */ private boolean pickmapsLocked = false; private FaceObjects faceObjects = new FaceObjects(); Modified: trunk/daimonin/src/daieditor/CMainControl.java =================================================================== --- trunk/daimonin/src/daieditor/CMainControl.java 2006-12-04 21:59:42 UTC (rev 889) +++ trunk/daimonin/src/daieditor/CMainControl.java 2006-12-04 22:07:19 UTC (rev 890) @@ -232,7 +232,7 @@ /** All open maps. */ private final List<MapControl> levels = new ArrayList<MapControl>(); - /** The current top map we are working with */ + /** The current top map we are working with. */ private MapControl currentMap; /** The current main directory. */ @@ -255,20 +255,22 @@ // active dir since the program started boolean hasChangedDir; - //private boolean isoMapViewDefault; - private boolean loadFromArchive = true; // do we load arches from the collected archives? + /** Do we load arches from the collected archives? */ + private boolean loadFromArchive = true; - private boolean autoPopupDocu; // time for an automated docu popup? + /** Time for an automated docu popup? */ + private boolean autoPopupDocu; - private boolean drawDouble; // whether to display double arches like stacked walls in stacked version + /** Whether to display double arches like stacked walls in stacked version. */ + private boolean drawDouble; - // buffer managing copy data + /** Buffer managing copy data. */ private final CopyBuffer copybuffer = new CopyBuffer(this); - // the list of archtype-data (loaded from "types.txt") + /** The list of archtype-data (loaded from "types.txt"). */ private CFArchTypeList typeList; - // pickmaps cannot be edited while lockedPickmaps is true + /** Pickmaps cannot be edited while lockedPickmaps is true. */ private boolean pickmapsLocked; /** Client Control Component. */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2006-12-04 21:59:42
|
Revision: 889 http://svn.sourceforge.net/gridarta/?rev=889&view=rev Author: akirschbaum Date: 2006-12-04 13:59:42 -0800 (Mon, 04 Dec 2006) Log Message: ----------- Make fields private. Modified Paths: -------------- trunk/daimonin/src/daieditor/CMainControl.java Modified: trunk/daimonin/src/daieditor/CMainControl.java =================================================================== --- trunk/daimonin/src/daieditor/CMainControl.java 2006-12-04 21:54:21 UTC (rev 888) +++ trunk/daimonin/src/daieditor/CMainControl.java 2006-12-04 21:59:42 UTC (rev 889) @@ -151,11 +151,11 @@ /** Singleton instance reference. */ private static CMainControl instance; - public static final String DOCU_VERSION_KEY = "docuVersion"; + private static final String DOCU_VERSION_KEY = "docuVersion"; public static final String LOAD_ARCH_COLL = "loadArchFromCollection"; - public static final String PICKMAPS_LOCKED = "pickmapsLocked"; + private static final String PICKMAPS_LOCKED = "pickmapsLocked"; /** Preferences key for username. */ public static final String PREFS_USERNAME = "username"; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2006-12-04 21:54:21
|
Revision: 888 http://svn.sourceforge.net/gridarta/?rev=888&view=rev Author: akirschbaum Date: 2006-12-04 13:54:21 -0800 (Mon, 04 Dec 2006) Log Message: ----------- Unify main exception handler. Modified Paths: -------------- trunk/crossfire/src/cfeditor/CMainControl.java trunk/crossfire/src/cfeditor/CMainView.java Modified: trunk/crossfire/src/cfeditor/CMainControl.java =================================================================== --- trunk/crossfire/src/cfeditor/CMainControl.java 2006-12-04 21:43:43 UTC (rev 887) +++ trunk/crossfire/src/cfeditor/CMainControl.java 2006-12-04 21:54:21 UTC (rev 888) @@ -37,7 +37,6 @@ import cfeditor.map.MapModel; import java.awt.Point; import java.awt.Rectangle; -import java.awt.Toolkit; import java.io.File; import java.io.FileNotFoundException; import java.io.IOException; @@ -60,6 +59,7 @@ import net.sf.gridarta.map.MapType; import net.sf.gridarta.textedit.scripteditor.ScriptEditControl; import net.sf.japi.swing.ActionFactory; +import net.sf.japi.util.ThrowableHandler; import net.sf.japi.util.filter.file.EndingFileFilter; import org.apache.log4j.Logger; import org.jetbrains.annotations.NotNull; @@ -70,7 +70,7 @@ * @author <a href="mailto:mic...@no...">Michael Toennies</a> * @author <a href="mailto:and...@gm...">Andreas Vogl</a> */ -public final class CMainControl implements MainControl { +public final class CMainControl implements ThrowableHandler, MainControl { /** Action Factory. */ private static final ActionFactory ACTION_FACTORY = ActionFactory.getFactory("cfeditor"); @@ -1655,9 +1655,9 @@ noarchTileIcon = CGUIUtils.getSysIcon(IGUIConstants.TILE_NOARCH); } - public void handleErrors(final GridderException error) { - Toolkit.getDefaultToolkit().beep(); - mainView.showError(error); + /** {@inheritDoc} */ + public void handleThrowable(final Throwable t) { + mainView.handleThrowable(t); } /** Modified: trunk/crossfire/src/cfeditor/CMainView.java =================================================================== --- trunk/crossfire/src/cfeditor/CMainView.java 2006-12-04 21:43:43 UTC (rev 887) +++ trunk/crossfire/src/cfeditor/CMainView.java 2006-12-04 21:54:21 UTC (rev 888) @@ -546,12 +546,14 @@ return null; } - /** - * Shows the given error in the UI. - * @param error The error to be shown. + + /* + * {@inheritDoc} + * This implementation displays the exception in a modal message dialog. */ - void showError(final GridderException error) { - JOptionPane.showConfirmDialog(this, error.getMessage(), IGUIConstants.APP_NAME, JOptionPane.OK_OPTION, JOptionPane.WARNING_MESSAGE); + public void handleThrowable(final Throwable t) { + Toolkit.getDefaultToolkit().beep(); + JOptionPane.showMessageDialog(this, t.getMessage(), "Error", JOptionPane.WARNING_MESSAGE); } /** This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2006-12-04 21:43:44
|
Revision: 887 http://svn.sourceforge.net/gridarta/?rev=887&view=rev Author: akirschbaum Date: 2006-12-04 13:43:43 -0800 (Mon, 04 Dec 2006) Log Message: ----------- Remove unused code. Modified Paths: -------------- trunk/crossfire/src/cfeditor/CMainControl.java Removed Paths: ------------- trunk/crossfire/src/cfeditor/JFontChooser.java Modified: trunk/crossfire/src/cfeditor/CMainControl.java =================================================================== --- trunk/crossfire/src/cfeditor/CMainControl.java 2006-12-04 21:36:45 UTC (rev 886) +++ trunk/crossfire/src/cfeditor/CMainControl.java 2006-12-04 21:43:43 UTC (rev 887) @@ -499,10 +499,6 @@ return ".py"; } - public String msgToHtml(final String msg) { - return JFontChooser.msgToHtml(msg, null); - } - boolean addArchToMap(final String archname, final Point pos, final boolean allowDouble, final boolean join) { return currentMap.addArchToMap(archname, pos, allowDouble, join); } Deleted: trunk/crossfire/src/cfeditor/JFontChooser.java =================================================================== --- trunk/crossfire/src/cfeditor/JFontChooser.java 2006-12-04 21:36:45 UTC (rev 886) +++ trunk/crossfire/src/cfeditor/JFontChooser.java 2006-12-04 21:43:43 UTC (rev 887) @@ -1,387 +0,0 @@ -/* JFontChooser.java - * - * Copyright (C) 1998-2001, The University of Sheffield. - * Copyright (C) 2002, Andreas Vogl - * - * This file is based on a part of GATE (see http://gate.ac.uk/), which is - * free software, licenced under the GNU Library General Public License, - * Version 2, June 1991 (in the distribution as file licence.html, - * and also available at http://gate.ac.uk/gate/licence.html). - * - * Valentin Tablan 06/04/2001 - * - * $Id: JFontChooser.java,v 1.23 2006/03/26 00:48:56 akirschbaum Exp $ - * - */ - -package cfeditor; - -import java.awt.Component; -import java.awt.Dialog; -import java.awt.Dimension; -import java.awt.Font; -import java.awt.Frame; -import java.awt.GraphicsEnvironment; -import java.awt.GridLayout; -import java.awt.Window; -import java.awt.event.ActionEvent; -import java.awt.event.ActionListener; -import java.awt.event.ComponentAdapter; -import java.awt.event.ComponentEvent; -import java.awt.font.TextAttribute; -import java.util.Enumeration; -import java.util.HashMap; -import java.util.Map; -import javax.swing.BorderFactory; -import javax.swing.Box; -import javax.swing.BoxLayout; -import javax.swing.JButton; -import javax.swing.JCheckBox; -import javax.swing.JComboBox; -import javax.swing.JDialog; -import javax.swing.JFrame; -import javax.swing.JPanel; -import javax.swing.JTextArea; -import javax.swing.SwingUtilities; -import javax.swing.UIManager; -import javax.swing.plaf.FontUIResource; -import org.apache.log4j.Logger; - -/** - * Class for choosing Fonts - * @author University of Sheffield - * @author <a href="mailto:and...@gm...">Andreas Vogl</a> - */ -public final class JFontChooser extends JPanel { - - private static final Logger log = Logger.getLogger(JFontChooser.class); - - private static final Font defaultFont = new Font("Default", Font.PLAIN, 12); - - // GUI components: - private JComboBox familyCombo; - - private JCheckBox italicChk; - - private JCheckBox boldChk; - - private JComboBox sizeCombo; - - private JTextArea sampleTextArea; - - private Font fontValue; - - private static final long serialVersionUID = 1L; - - public JFontChooser() { - this(UIManager.getFont("Button.font")); - } - - public JFontChooser(final Font initialFont) { - initLocalData(); - initGuiComponents(initialFont); - initListeners(); - setFontValue(initialFont); - }// public JFontChooser(Font initialFont) - - /** - * Show Fontdialog, let user choose a font, then close and return chosen font.<br> - * This is a static method. Use it like:<br><br> - * <code> - * Font f = JFontChooser.showDialog(parent, "title", defaultFont); - * </code> - * @param parent parent Component - * @param title frame title - * @param initialfont initial/default font - * @return new font that the user has chosen - */ - public static Font showDialog(final Component parent, final String title, final Font initialfont) { - final Window windowParent; - if (parent instanceof Window) { - windowParent = (Window) parent; - } else { - windowParent = SwingUtilities.getWindowAncestor(parent); - } - if (windowParent == null) { - throw new IllegalArgumentException("The supplied parent component has no window ancestor"); - } - - final JDialog dialog; - if (windowParent instanceof Frame) { - dialog = new JDialog((Frame) windowParent, title, true); - } else { - dialog = new JDialog((Dialog) windowParent, title, true); - } - - dialog.getContentPane().setLayout(new BoxLayout(dialog.getContentPane(), - BoxLayout.Y_AXIS)); - - final JFontChooser fontChooser = new JFontChooser(initialfont); - dialog.getContentPane().add(fontChooser); - - // buttons - final JButton okBtn = new JButton("OK"); - final JButton defaultBtn = new JButton("Default"); - final JPanel buttonsBox = new JPanel(); - buttonsBox.setLayout(new BoxLayout(buttonsBox, BoxLayout.X_AXIS)); - buttonsBox.add(Box.createHorizontalGlue()); - buttonsBox.add(defaultBtn); - buttonsBox.add(Box.createHorizontalStrut(30)); - buttonsBox.add(okBtn); - buttonsBox.add(Box.createHorizontalGlue()); - buttonsBox.setBorder(BorderFactory.createEmptyBorder(0, 0, 10, 0)); - dialog.getContentPane().add(buttonsBox); - - dialog.pack(); - dialog.setLocationRelativeTo(parent); - - // actionlistener for the font choose-box - fontChooser.addComponentListener(new ComponentAdapter() { - @Override public void componentResized(final ComponentEvent e) { - dialog.pack(); - } - }); - - // actionlistener for the ok-button - okBtn.addActionListener(new ActionListener() { - public void actionPerformed(final ActionEvent e) { - dialog.setVisible(false); // dialog remains hidden till next time needed - } - }); - - // actionlistener for the cancel-button - defaultBtn.addActionListener(new ActionListener() { - public void actionPerformed(final ActionEvent e) { - dialog.setVisible(false); - fontChooser.setFontValue(null); - } - }); - - dialog.setVisible(true); - - return fontChooser.getFontValue(); - } // showDialog - - protected void initLocalData() { - } - - /** initialize the GUI components */ - protected void initGuiComponents(final Font initfont) { - // container panel, containing the whole GUI - final JPanel panel = new JPanel(); - panel.setLayout(new BoxLayout(panel, BoxLayout.Y_AXIS)); - - familyCombo = new JComboBox( - GraphicsEnvironment.getLocalGraphicsEnvironment(). - getAvailableFontFamilyNames()); - familyCombo.setSelectedItem(UIManager.getFont("Label.font").getFamily()); - - sizeCombo = new JComboBox(new String[]{"6", "8", "10", "12", "14", "16", - "18", "20", "22", "24", "26"}); - sizeCombo.setSelectedItem(new Integer( - UIManager.getFont("Label.font").getSize()).toString()); - - italicChk = new JCheckBox("<html><i>Italic</i></html>", false); - boldChk = new JCheckBox("<html><b>Bold</b></html>", false); - - // font-box panel - final JPanel fontBox = new JPanel(); - fontBox.setLayout(new BoxLayout(fontBox, BoxLayout.X_AXIS)); - fontBox.add(familyCombo); - fontBox.add(sizeCombo); - fontBox.setBorder(BorderFactory.createTitledBorder(" Font ")); - panel.add(fontBox); - panel.add(Box.createVerticalStrut(10)); - - // bold/italic panel - final JPanel effectsBox = new JPanel(); - effectsBox.setLayout(new BoxLayout(effectsBox, BoxLayout.X_AXIS)); - effectsBox.add(italicChk); - effectsBox.add(boldChk); - effectsBox.setBorder(BorderFactory.createTitledBorder(" Effects ")); - panel.add(effectsBox); - - // sample panel - sampleTextArea = new JTextArea("Type your sample here..."); - final JPanel samplePanel = new JPanel(new GridLayout(1, 1)); - - samplePanel.add(sampleTextArea); - - samplePanel.setBorder(BorderFactory.createTitledBorder(" Sample ")); - panel.add(samplePanel); - panel.add(Box.createVerticalStrut(10)); - - // add a small border around the whole thing - panel.setBorder(BorderFactory.createEmptyBorder(5, 5, 0, 5)); - add(panel); - }// initGuiComponents() - - /** initialize the listeners */ - protected void initListeners() { - familyCombo.addActionListener(new ActionListener() { - public void actionPerformed(final ActionEvent e) { - updateFont(); - } - }); - - sizeCombo.addActionListener(new ActionListener() { - public void actionPerformed(final ActionEvent e) { - updateFont(); - } - }); - - boldChk.addActionListener(new ActionListener() { - public void actionPerformed(final ActionEvent e) { - updateFont(); - } - }); - - italicChk.addActionListener(new ActionListener() { - public void actionPerformed(final ActionEvent e) { - updateFont(); - } - }); - } - - protected void updateFont() { - final Map<TextAttribute, Object> fontAttrs = new HashMap<TextAttribute, Object>(); - fontAttrs.put(TextAttribute.FAMILY, (String) familyCombo.getSelectedItem()); - fontAttrs.put(TextAttribute.SIZE, new Float((String) sizeCombo.getSelectedItem())); - - if (boldChk.isSelected()) { - fontAttrs.put(TextAttribute.WEIGHT, TextAttribute.WEIGHT_BOLD); - } else { - fontAttrs.put(TextAttribute.WEIGHT, TextAttribute.WEIGHT_REGULAR); - } - - if (italicChk.isSelected()) { - fontAttrs.put(TextAttribute.POSTURE, TextAttribute.POSTURE_OBLIQUE); - } else { - fontAttrs.put(TextAttribute.POSTURE, TextAttribute.POSTURE_REGULAR); - } - - final Font newFont = new Font(fontAttrs); - final Font oldFont = fontValue; - fontValue = newFont; - sampleTextArea.setFont(newFont); - final String text = sampleTextArea.getText(); - sampleTextArea.setText(""); - sampleTextArea.setText(text); - sampleTextArea.repaint(100); - - firePropertyChange("fontValue", oldFont, newFont); - }//updateFont() - - /** Test code */ - public static void main(final String args[]) { - try { - UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); - } catch (final Exception e) { - e.printStackTrace(); - } - final JFrame frame = new JFrame("Foo frame"); - frame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE); - final JButton btn = new JButton("Show dialog"); - btn.addActionListener(new ActionListener() { - public void actionPerformed(final ActionEvent e) { - log.info(showDialog(frame, "Fonter", UIManager.getFont("Button.font"))); - } - }); - frame.getContentPane().add(btn); - frame.setSize(new Dimension(300, 300)); - frame.setVisible(true); - log.info("Font: " + UIManager.getFont("Button.font")); - showDialog(frame, "Fonter", UIManager.getFont("Button.font")); - }// main - - /** - * Set selected font - * @param newfontValue new font - */ - public void setFontValue(final Font newfontValue) { - if (newfontValue != null) { - boldChk.setSelected(newfontValue.isBold()); - italicChk.setSelected(newfontValue.isItalic()); - familyCombo.setSelectedItem(newfontValue.getName()); - sizeCombo.setSelectedItem(Integer.toString(newfontValue.getSize())); - } - this.fontValue = newfontValue; - } - - /** Convert fontsize into the htmal size which is most appropriate. */ - public static int getHtmlSize(final int fontsize) { - if (fontsize <= 11) { - return 1; - } else if (fontsize <= 13) { - return 2; - } else if (fontsize <= 17) { - return 3; - } else if (fontsize <= 21) { - return 4; - } else { - return 5; - } - } - - /** - * Convert a text-string message into a message with html (font) tags to - * display in message-window-popups. (This is currently not used.) - * @param msg the ascii message text with '\n' linebreaks - * @param f the custom font used, or null for default - * @return the new message with html tags - */ - public static String msgToHtml(String msg, final Font f) { - if (f == null) { // default font needs no tags to display - return msg; - } - - int t; // temp. value - while ((t = msg.indexOf("<")) >= 0) { - msg = msg.substring(0, t) + "<" + msg.substring(t + 1); - } - while ((t = msg.indexOf(">")) >= 0) { - msg = msg.substring(0, t) + ">" + msg.substring(t + 1); - } - - String new_msg = ""; // return value: new message with html tags - while (msg.indexOf("\n") >= 0) { - new_msg = new_msg + "<html><font color=black size=\"" + getHtmlSize(f.getSize()) + - "\" face=\"" + f.getFontName() + "\"><b>" + msg.substring(0, msg.indexOf("\n")) + "</b></font></html>§"; - msg = msg.substring(msg.indexOf("\n") + 1); - } - new_msg = new_msg + "<html><font color=black size=\"" + getHtmlSize(f.getSize()) + - "\" face=\"" + f.getFontName() + "\"><b>" + msg + "</b></font></html>"; - - new_msg = new_msg.replace('§', '\n'); - return new_msg; - } - - /** Set the default font for all Swing components. */ - public static void setUIFont(final Font new_font) { - final FontUIResource plainf = new FontUIResource( - new_font.getFontName(), Font.PLAIN, new_font.getSize()); - final FontUIResource boldf = new FontUIResource( - new_font.getFontName(), Font.BOLD, new_font.getSize()); - - final Enumeration keys = UIManager.getDefaults().keys(); - while (keys.hasMoreElements()) { - final Object key = keys.nextElement(); - final Object value = UIManager.get(key); - if (value instanceof FontUIResource) { - if (((FontUIResource) value).getStyle() == Font.PLAIN) { - UIManager.put(key, plainf); - } else if (((FontUIResource) value).getStyle() == Font.BOLD) { - UIManager.put(key, boldf); - } - } - } - } - - public Font getFontValue() { - return fontValue; - } - - public static Font getDefaultFont() { - return defaultFont; - } -} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2006-12-04 21:36:47
|
Revision: 886 http://svn.sourceforge.net/gridarta/?rev=886&view=rev Author: akirschbaum Date: 2006-12-04 13:36:45 -0800 (Mon, 04 Dec 2006) Log Message: ----------- Unify use of getAttribute() functions. Modified Paths: -------------- trunk/crossfire/src/cfeditor/CAttribDialog.java trunk/crossfire/src/cfeditor/gameobject/GameObject.java trunk/daimonin/src/daieditor/CAttribDialog.java trunk/daimonin/src/daieditor/CFArchTypeList.java trunk/daimonin/src/daieditor/CMainControl.java trunk/daimonin/src/daieditor/ScriptArchData.java trunk/daimonin/src/daieditor/gameobject/GameObject.java Modified: trunk/crossfire/src/cfeditor/CAttribDialog.java =================================================================== --- trunk/crossfire/src/cfeditor/CAttribDialog.java 2006-12-04 21:05:21 UTC (rev 885) +++ trunk/crossfire/src/cfeditor/CAttribDialog.java 2006-12-04 21:36:45 UTC (rev 886) @@ -650,13 +650,13 @@ final Number value; switch (dType) { case INT: - value = gameObject.getAttributeInt(nameOld, true); + value = gameObject.getAttributeInt(nameOld); break; case LONG: - value = gameObject.getAttributeLong(nameOld, true); + value = gameObject.getAttributeLong(nameOld); break; case FLOAT: - value = gameObject.getAttributeDouble(nameOld, true); + value = gameObject.getAttributeDouble(nameOld); break; default: value = null; @@ -751,7 +751,7 @@ input.setText(bitmask.getText(((BitmaskAttrib) (DialogAttrib<JTextComponent>) newAttr).getValue())); cComp = input; ((DialogAttrib<JTextComponent>) newAttr).input = input; - ((BitmaskAttrib) (DialogAttrib<JTextComponent>) newAttr).setValue(gameObject.getAttributeInt(nameOld, true)); + ((BitmaskAttrib) (DialogAttrib<JTextComponent>) newAttr).setValue(gameObject.getAttributeInt(nameOld)); } else { cRow = new JLabel("Error: Undefined Bitmask"); } Modified: trunk/crossfire/src/cfeditor/gameobject/GameObject.java =================================================================== --- trunk/crossfire/src/cfeditor/gameobject/GameObject.java 2006-12-04 21:05:21 UTC (rev 885) +++ trunk/crossfire/src/cfeditor/gameobject/GameObject.java 2006-12-04 21:36:45 UTC (rev 886) @@ -142,25 +142,25 @@ } if ((checkType & IGUIConstants.TILE_EDIT_BACKGROUND) != 0 - && getAttributeInt("is_floor", true) == 1 - && getAttributeInt("no_pick", true) == 1) { + && getAttributeInt("is_floor") == 1 + && getAttributeInt("no_pick") == 1) { // Backgroud: floors editType |= IGUIConstants.TILE_EDIT_BACKGROUND; } if ((checkType & IGUIConstants.TILE_EDIT_MONSTER) != 0 - && getAttributeInt("alive", true) == 1 - && (getAttributeInt("monster", true) == 1 || getAttributeInt("generator", true) == 1)) { + && getAttributeInt("alive") == 1 + && (getAttributeInt("monster") == 1 || getAttributeInt("generator") == 1)) { // Monster: monsters/npcs/generators editType |= IGUIConstants.TILE_EDIT_MONSTER; } if ((checkType & IGUIConstants.TILE_EDIT_WALL) != 0 && archType == 0 - && getAttributeInt("no_pass", true) == 1) { + && getAttributeInt("no_pass") == 1) { // Walls editType |= IGUIConstants.TILE_EDIT_WALL; } if ((checkType & IGUIConstants.TILE_EDIT_CONNECTED) != 0 - && getAttributeInt("connected", true) != 0) { + && getAttributeInt("connected") != 0) { // Connected Objects editType |= IGUIConstants.TILE_EDIT_CONNECTED; } @@ -170,7 +170,7 @@ editType |= IGUIConstants.TILE_EDIT_EXIT; } if ((checkType & IGUIConstants.TILE_EDIT_TREASURE) != 0 - && getAttributeInt("no_pick", true) == 0 + && getAttributeInt("no_pick") == 0 && (archType == 4 || archType == 5 || archType == 36 || archType == 60 || archType == 85 || archType == 111 || archType == 123 || archType == 124 || archType == 130)) { // Treasure: randomtreasure/money/gems/potions/spellbooks/scrolls editType |= IGUIConstants.TILE_EDIT_TREASURE; @@ -181,7 +181,7 @@ editType |= IGUIConstants.TILE_EDIT_DOOR; } if ((checkType & IGUIConstants.TILE_EDIT_EQUIP) != 0 - && getAttributeInt("no_pick", true) == 0 + && getAttributeInt("no_pick") == 0 && (archType >= 13 && archType <= 16 || archType == 33 || archType == 34 || archType == 35 || archType == 39 || archType == 70 || archType == 87 || archType == 99 || archType == 100 || archType == 104 || archType == 109 || archType == 113 || archType == 122 || archType == 3)) { // Equipment: weapons/armour/wands/rods editType |= IGUIConstants.TILE_EDIT_EQUIP; Modified: trunk/daimonin/src/daieditor/CAttribDialog.java =================================================================== --- trunk/daimonin/src/daieditor/CAttribDialog.java 2006-12-04 21:05:21 UTC (rev 885) +++ trunk/daimonin/src/daieditor/CAttribDialog.java 2006-12-04 21:36:45 UTC (rev 886) @@ -234,7 +234,7 @@ } for (int t = 0, l = numArgs * 2; t < l; t += 2) { - final String attrValue = this.gameObject.getAttributeString(tmp.getTypeAttr()[t], true); + final String attrValue = this.gameObject.getAttributeString(tmp.getTypeAttr()[t]); if (log.isDebugEnabled()) { log.debug(" arch: '" + attrValue + "', type: '" + tmp.getTypeAttr()[t + 1] + "'"); @@ -352,7 +352,7 @@ private JComboBox buildSpellBox(final CFArchAttrib attr) { // first parse the spell-number value from gameObject - int spnum = gameObject.getAttributeInt(attr.getNameOld(), true); // spell number + int spnum = gameObject.getAttributeInt(attr.getNameOld()); // spell number if (spnum < 0 || spnum >= CFArchTypeList.getSpells().getSpellNumbers().length - 1) { spnum = 0; // undefined spellnumbers be zero @@ -360,7 +360,7 @@ // do we have "none" spell? final int active; - if (spnum == 0 && (gameObject.getAttributeString(attr.getNameOld(), true).length() == 0 || attr.getDataType() == ZSPELL)) { + if (spnum == 0 && (gameObject.getAttributeString(attr.getNameOld()).length() == 0 || attr.getDataType() == ZSPELL)) { active = 0; } else { // now look up the spell-number in the array of spells @@ -388,7 +388,7 @@ // build the array of list-items final String[] array = new String[(int) (listData.size() / 2.0)]; boolean hasSelection = false; - int active = gameObject.getAttributeInt(attr.getNameOld(), true); + int active = gameObject.getAttributeInt(attr.getNameOld()); for (int i = 0; i < array.length; i++) { array[i] = (String) listData.get((i << 1) + 1); // put string to array @@ -614,16 +614,16 @@ switch (dType) { case BOOL: // normal bool - input = new JCheckBox(attrib.getNameNew(), gameObject.getAttributeInt(nameOld, true) == 1); + input = new JCheckBox(attrib.getNameNew(), gameObject.getAttributeInt(nameOld) == 1); break; case BOOL_SPEC: { // parse values for customized bool final String trueVal = attrib.getMisc()[0]; if ("0".equals(trueVal)) { - final String attrString = gameObject.getAttributeString(nameOld, true); + final String attrString = gameObject.getAttributeString(nameOld); input = new JCheckBox(attrib.getNameNew(), attrString.length() == 0 || "0".equals(attrString)); } else { - input = new JCheckBox(attrib.getNameNew(), gameObject.getAttributeString(nameOld, true).equals(trueVal)); + input = new JCheckBox(attrib.getNameNew(), gameObject.getAttributeString(nameOld).equals(trueVal)); } } break; @@ -665,13 +665,13 @@ final Number value; switch (dType) { case INT: - value = gameObject.getAttributeInt(nameOld, true); + value = gameObject.getAttributeInt(nameOld); break; case LONG: - value = gameObject.getAttributeLong(nameOld, true); + value = gameObject.getAttributeLong(nameOld); break; case FLOAT: - value = gameObject.getAttributeDouble(nameOld, true); + value = gameObject.getAttributeDouble(nameOld); break; default: value = null; @@ -703,7 +703,7 @@ dtxt = archetype.getFaceRealName(); } } else { - dtxt = gameObject.getAttributeString(nameOld, true); + dtxt = gameObject.getAttributeString(nameOld); } final JTextField input = new JTextField(dtxt, TEXTFIELD_COLUMNS); switch (dType) { @@ -780,7 +780,7 @@ if (attrib.getMisc() != null && typelist.getListTable().containsKey(attrib.getMisc()[0]) && typelist.getListTable().containsKey(attrib.getMisc()[1])) { // Hack to set preselected if available - final int active = gameObject.getAttributeInt(nameOld, true); + final int active = gameObject.getAttributeInt(nameOld); final int[] activepart = {active & 0x0F, active & 0xF0}; // build the lists from vector data for (int j = 0; j < 2; j++) { @@ -817,7 +817,7 @@ input.setText(bitmask.getText(((BitmaskAttrib) (DialogAttrib<JTextComponent>) newAttr).getValue())); cComp = input; ((DialogAttrib<JTextComponent>) newAttr).input = input; - ((BitmaskAttrib) (DialogAttrib<JTextComponent>) newAttr).setValue(gameObject.getAttributeInt(nameOld, true)); + ((BitmaskAttrib) (DialogAttrib<JTextComponent>) newAttr).setValue(gameObject.getAttributeInt(nameOld)); } else { cRow = new JLabel("Error: Undefined Bitmask"); } @@ -826,7 +826,7 @@ case TREASURE: { newAttr = new DialogAttrib<JTextField>(attrib); // textfield (no direct input, text is set by the treasurelist dialog) - String treasureName = gameObject.getAttributeString(nameOld, true); + String treasureName = gameObject.getAttributeString(nameOld); if (treasureName.trim().length() == 0 || "none".equalsIgnoreCase(treasureName.trim())) { treasureName = CFTreasureListTree.NONE_SYM; } Modified: trunk/daimonin/src/daieditor/CFArchTypeList.java =================================================================== --- trunk/daimonin/src/daieditor/CFArchTypeList.java 2006-12-04 21:05:21 UTC (rev 885) +++ trunk/daimonin/src/daieditor/CFArchTypeList.java 2006-12-04 21:36:45 UTC (rev 886) @@ -386,7 +386,7 @@ final int numArgs = (int) (tmp.getTypeAttr().length / 2.0); boolean match = true; for (int t = 0, l = numArgs * 2; t < l && match; t += 2) { - final String archvalue = arch.getAttributeString(tmp.getTypeAttr()[t], true); + final String archvalue = arch.getAttributeString(tmp.getTypeAttr()[t]); if (!archvalue.equals(tmp.getTypeAttr()[t + 1]) && !("0".equals(tmp.getTypeAttr()[t + 1]) && archvalue.length() == 0)) { match = false; } Modified: trunk/daimonin/src/daieditor/CMainControl.java =================================================================== --- trunk/daimonin/src/daieditor/CMainControl.java 2006-12-04 21:05:21 UTC (rev 885) +++ trunk/daimonin/src/daieditor/CMainControl.java 2006-12-04 21:36:45 UTC (rev 886) @@ -1552,10 +1552,10 @@ return; } final Point d = new Point(); - d.x = exit.getAttributeInt("hp", true); // exit destination coords. - d.y = exit.getAttributeInt("sp", true); + d.x = exit.getAttributeInt("hp"); // exit destination coords. + d.y = exit.getAttributeInt("sp"); - final String path = exit.getAttributeString("slaying", true); // exit path + final String path = exit.getAttributeString("slaying"); // exit path if (path == null || path.length() == 0) { ACTION_FACTORY.showMessageDialog(mainView, "enterExitNoExit"); return; Modified: trunk/daimonin/src/daieditor/ScriptArchData.java =================================================================== --- trunk/daimonin/src/daieditor/ScriptArchData.java 2006-12-04 21:05:21 UTC (rev 885) +++ trunk/daimonin/src/daieditor/ScriptArchData.java 2006-12-04 21:36:45 UTC (rev 886) @@ -754,7 +754,7 @@ } public int getEventType() { - return event.getAttributeInt("sub_type", true); + return event.getAttributeInt("sub_type"); } public String getPluginName() { @@ -762,11 +762,11 @@ } public String getFilePath() { - return event.getAttributeString("race", true); + return event.getAttributeString("race"); } public String getOptions() { - return event.getAttributeString("slaying", true); + return event.getAttributeString("slaying"); } public void setPluginName(final String name) { Modified: trunk/daimonin/src/daieditor/gameobject/GameObject.java =================================================================== --- trunk/daimonin/src/daieditor/gameobject/GameObject.java 2006-12-04 21:05:21 UTC (rev 885) +++ trunk/daimonin/src/daieditor/gameobject/GameObject.java 2006-12-04 21:36:45 UTC (rev 886) @@ -157,24 +157,24 @@ } if ((checkType & IGUIConstants.TILE_EDIT_BACKGROUND) != 0 - && getAttributeInt("is_floor", true) == 1 - && getAttributeInt("no_pick", true) == 1) { + && getAttributeInt("is_floor") == 1 + && getAttributeInt("no_pick") == 1) { // Backgroud: floors editType |= IGUIConstants.TILE_EDIT_BACKGROUND; } if ((checkType & IGUIConstants.TILE_EDIT_MONSTER) != 0 - && (getAttributeInt("monster", true) == 1 || archType == 80 || archType == 81 || archType == 83 || getAttributeInt("generator", true) == 1)) { + && (getAttributeInt("monster") == 1 || archType == 80 || archType == 81 || archType == 83 || getAttributeInt("generator") == 1)) { // Monster: monsters/npcs/generators and spawn points editType |= IGUIConstants.TILE_EDIT_MONSTER; } if ((checkType & IGUIConstants.TILE_EDIT_WALL) != 0 && (archType == 77 || archType == 79) - && getAttributeInt("no_pass", true) == 1) { + && getAttributeInt("no_pass") == 1) { // Walls editType |= IGUIConstants.TILE_EDIT_WALL; } if ((checkType & IGUIConstants.TILE_EDIT_CONNECTED) != 0 - && getAttributeInt("connected", true) != 0) { + && getAttributeInt("connected") != 0) { // Connected Objects editType |= IGUIConstants.TILE_EDIT_CONNECTED; } @@ -184,7 +184,7 @@ editType |= IGUIConstants.TILE_EDIT_EXIT; } if ((checkType & IGUIConstants.TILE_EDIT_TREASURE) != 0 - && getAttributeInt("no_pick", true) == 0 + && getAttributeInt("no_pick") == 0 && (archType == 4 || archType == 5 || archType == 36 || archType == 60 || archType == 85 || archType == 111 || archType == 123 || archType == 124 || archType == 130)) { // Treasure: randomtreasure/money/gems/potions/spellbooks/scrolls editType |= IGUIConstants.TILE_EDIT_TREASURE; @@ -195,7 +195,7 @@ editType |= IGUIConstants.TILE_EDIT_DOOR; } if ((checkType & IGUIConstants.TILE_EDIT_EQUIP) != 0 - && getAttributeInt("no_pick", true) == 0 + && getAttributeInt("no_pick") == 0 && (archType >= 13 && archType <= 16 || archType == 33 || archType == 34 || archType == 35 || archType == 39 || archType == 70 || archType == 87 || archType == 99 || archType == 100 || archType == 104 || archType == 109 || archType == 113 || archType == 122 || archType == 3)) { // Equipment: weapons/armour/wands/rods editType |= IGUIConstants.TILE_EDIT_EQUIP; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2006-12-04 21:05:22
|
Revision: 885 http://svn.sourceforge.net/gridarta/?rev=885&view=rev Author: akirschbaum Date: 2006-12-04 13:05:21 -0800 (Mon, 04 Dec 2006) Log Message: ----------- Add German translations to CFJavaEditor. Modified Paths: -------------- trunk/crossfire/src/cfeditor/gui/map/MapPropertiesDialog.java trunk/crossfire/src/cfeditor/messages.properties trunk/crossfire/src/cfeditor/messages_de.properties trunk/daimonin/src/daieditor/messages.properties trunk/daimonin/src/daieditor/messages_de.properties trunk/src/app/net/sf/gridarta/messages.properties Modified: trunk/crossfire/src/cfeditor/gui/map/MapPropertiesDialog.java =================================================================== --- trunk/crossfire/src/cfeditor/gui/map/MapPropertiesDialog.java 2006-12-04 19:48:44 UTC (rev 884) +++ trunk/crossfire/src/cfeditor/gui/map/MapPropertiesDialog.java 2006-12-04 21:05:21 UTC (rev 885) @@ -194,10 +194,10 @@ final Size2D mapSize = mapControl.getMapSize(); panel.add(createPanelLine(levelWidthField, 10, String.valueOf(mapSize.getWidth()), "mapWidth")); panel.add(createPanelLine(levelHeightField, 10, String.valueOf(mapSize.getHeight()), "mapHeight")); - panel.add(createPanelCBox(checkboxUnique, map.isUnique(), "mapUniqueMap")); - panel.add(createPanelCBox(checkboxOutdoor, map.isOutdoor(), "mapOutdoorMap")); + panel.add(createPanelCBox(checkboxUnique, map.isUnique(), "mapUnique")); + panel.add(createPanelCBox(checkboxOutdoor, map.isOutdoor(), "mapOutdoor")); panel.add(createPanelCBox(checkboxFixedReset, map.isFixedReset(), "mapFixedReset")); - panel.add(createPanelCBox(checkboxNosmooth, map.isNosmooth(), "mapNosmoothMap")); + panel.add(createPanelCBox(checkboxNosmooth, map.isNosmooth(), "mapNosmooth")); return panel; } Modified: trunk/crossfire/src/cfeditor/messages.properties =================================================================== --- trunk/crossfire/src/cfeditor/messages.properties 2006-12-04 19:48:44 UTC (rev 884) +++ trunk/crossfire/src/cfeditor/messages.properties 2006-12-04 21:05:21 UTC (rev 885) @@ -13,9 +13,9 @@ mapErrorInvalidDarkness.message=Darkness level must be in range 0-5. mapRegion=Region -mapUniqueMap=Unique map -mapOutdoorMap=Outdoor map -mapNosmoothMap=Nosmooth map +mapUnique=Unique map +mapOutdoor=Outdoor map +mapNosmooth=Nosmooth map mapShopType=Shop type mapShopGreed=Greed mapUpperPriceLimit=Upper price limit Modified: trunk/crossfire/src/cfeditor/messages_de.properties =================================================================== --- trunk/crossfire/src/cfeditor/messages_de.properties 2006-12-04 19:48:44 UTC (rev 884) +++ trunk/crossfire/src/cfeditor/messages_de.properties 2006-12-04 21:05:21 UTC (rev 885) @@ -16,12 +16,73 @@ newPickmapNoName.title=Pickmap fehlt newPickmapNoName.message=Der Pickmapname fehlt. Es ist ein eindeutiger Name erforderlich. +mapTitle={0} ({1}) - Karteneigenschaften +mapName=Name +mapRegion=Region mapWidth=Breite mapHeight=H\xF6he -mapOkay.text=Ok +mapOutdoor=Im Freien +mapFixedReset=Fixer Reset +mapEnterX=Startpunkt X +mapEnterY=Startpunkt Y +mapDifficulty=Schwierigkeit +mapDarkness=Dunkelheit +mapSwapTime=Swap-Zeit +mapNosmooth=Ohne Bild\xFCberg\xE4ng +#mapUnique=??? +mapResetTimeout=Reset-Zeit +mapNorth=Norden +mapEast=Osten +mapSouth=S\xFCden +mapWest=Westen +mapTop=Oben +mapBottom=Unten + +mapHelp.text=Hilfe +mapOkay.text=OK +mapRestore.text=Zur\xFCcksetzen mapCancel.text=Abbrechen +mapMapTabTitle=Karte +mapParametersTabTitle=Parameter +mapTextTabTitle=Beschreibung +mapLoreTabTitle=Geschichte +mapTilesTabTitle=Verbindungspfade +mapShopTabTitle=Gesch\xE4ft +mapWeatherTabTitle=Wetter + +mapLowerPriceLimit=Mindestpreis +mapUpperPriceLimit=Maximalpreis +mapShopGreed=Geldgier +mapShopRace=Rasse +mapShopType=Typ + +mapHumidity=Luftfeuchte +mapPressure=Luftdruck +#mapSkySetting=??? +mapTemperature=Temperatur +mapWindDirection=Windrichtung +mapWindSpeed=Windgeschwindigkeit + +mapShrink.title=Karte verkleinern +mapShrink.message=Du hast eine neue Kartengr\xF6\xDFe von {0,number,integer} \xD7 {1,number,integer} gew\xE4hlt. Wenn die Karte\nso verkleinert wird, werden einige Objekte gel\xF6scht.\nBist Du sicher, dass Du das willst? +mapErrorMissingMapName.title=Kartenname fehlt +mapErrorMissingMapName.message=Dar Kartenname muss angegeben werden. +mapErrorIllegalSize.title=Ung\xFCltiger Wert +mapErrorIllegalSize.message=Die Kartengr\xF6\xDFe muss positiv sein. +mapErrorInvalidDarkness.title=Ung\xFCltiger Wert +mapErrorInvalidDarkness.message=Die Dunkelheit muss zwischen 0 und 5 liegen. +mapErrorInvalidEntry.title=Ung\xFCltiger Wert +mapErrorInvalidEntry.message=Ung\xFCltiger Wert:\n{0} + +nameOfAnimationObject=Animation +nameOfFaceObject=Bild +pickmapExists.title=Kann Pickmap nicht erstellen +pickmapExists.message=Die Pickmap '{0}' existiert bereits.\nSie m\xFCssen die existierende Pickmap erst l\xF6schen oder einen anderen Namen w\xE4hlen. + #replace +replaceOk.text=OK +replaceCancel.text=Abbrechen replaceTitle=Ersetze replaceOn=In replaceOnMap=der ganzen Karte @@ -31,8 +92,10 @@ replaceByObject=Objekt replaceByNothing=nichts (=l\xF6schen) +replaceMapGone.title=Karte nicht mehr verf\xFCgbar replaceMapGone.message=Karte {0} ist nicht mehr verf\xFCgbar.\n -replaceMapNoSelection.message=Ich kann ohne Selektion keine selektierten Felder\n auf der Karte "{0}" ersetzen. +replaceMapNoSelection.title=Keine Selektion +replaceMapNoSelection.message=Ich kann ohne Selektion keine selektierten Felder\nauf der Karte "{0}" ersetzen. replacedZero.title=Ersetzung fehlgeschlagen replacedZero.message=Keine passenden Objekte gefunden. replacedOne.title=Ersetzung erfolgreich @@ -48,3 +111,11 @@ attribOk.text=Ok attribApply.text=Anwenden attribCancel.text=Abbrechen + +fileDialog.filter.python=Python-Skripte + +chooseNamedObject.title=Auswahl von {0} +archCollectArches=Sammle Archetypen... +archCollectErrorIOException.title=Fehler beim Sammeln +archCollectErrorIOException.message=Fehler beim Sammeln: In {0} ist ein Ein-/Ausgabefehler ist aufgetreten:\n{1} +dialogDontShowAgain=Diesen Dialog n\xE4chstes Mal wieder anzeigen. Modified: trunk/daimonin/src/daieditor/messages.properties =================================================================== --- trunk/daimonin/src/daieditor/messages.properties 2006-12-04 19:48:44 UTC (rev 884) +++ trunk/daimonin/src/daieditor/messages.properties 2006-12-04 21:05:21 UTC (rev 885) @@ -878,7 +878,6 @@ exitWithoutExit=Trying to exit without System.exit(). unexpectedException=Unexpected exception: {0} archfileNotFound=Archfile {0} could not be found -namedTreeNodeWithoutPath=No path! Object Path: {0} Object Name: {1} Object Type: {2} faceObjectWithoutOriginalName=No originalName for {0}! duplicateAnimation=Duplicate Animation: {0} inventoryInDefArch=Found inventory Object in def arch: {0} Modified: trunk/daimonin/src/daieditor/messages_de.properties =================================================================== --- trunk/daimonin/src/daieditor/messages_de.properties 2006-12-04 19:48:44 UTC (rev 884) +++ trunk/daimonin/src/daieditor/messages_de.properties 2006-12-04 21:05:21 UTC (rev 885) @@ -88,9 +88,9 @@ mapTilesClear.text=Pfade l\xF6schen mapTilesClear.shortdescription=L\xF6scht die Verbindungspfade zu den benachbarten Karten. mapShrink.title=Karte verkleinern -mapShrink.message=Du hast eine neue Kartengr\xF6\xDFe von {0,number,integer} \xD7 {1,number,integer} gew\xE4hlt. Wenn die Karte\nso verkleinert wird, k\xF6nnten einige Objekte gel\xF6scht werden.\nBist Du sicher, dass Du das willst? +mapShrink.message=Du hast eine neue Kartengr\xF6\xDFe von {0,number,integer} \xD7 {1,number,integer} gew\xE4hlt. Wenn die Karte\nso verkleinert wird, werden einige Objekte gel\xF6scht.\nBist Du sicher, dass Du das willst? mapHelp.text=Hilfe -mapOkay.text=Ok +mapOkay.text=OK mapRestore.text=Zur\xFCcksetzen mapCancel.text=Abbrechen mapSizeDefault.text=Standardgr\xF6\xDFe (24 \xD7 24) @@ -124,7 +124,7 @@ replaceByNothing=nichts (=l\xF6schen) replaceMapGone.message=Karte {0} ist nicht mehr verf\xFCgbar.\n -replaceMapNoSelection.message=Ich kann ohne Selektion keine selektierten Felder\n auf der Karte "{0}" ersetzen. +replaceMapNoSelection.message=Ich kann ohne Selektion keine selektierten Felder\nauf der Karte "{0}" ersetzen. replacedZero.title=Ersetzung fehlgeschlagen replacedZero.message=Keine passenden Objekte gefunden. replacedOne.title=Ersetzung erfolgreich Modified: trunk/src/app/net/sf/gridarta/messages.properties =================================================================== --- trunk/src/app/net/sf/gridarta/messages.properties 2006-12-04 19:48:44 UTC (rev 884) +++ trunk/src/app/net/sf/gridarta/messages.properties 2006-12-04 21:05:21 UTC (rev 885) @@ -4,9 +4,6 @@ namedTreeNodeWithoutPath=No path! Object Path: {0} Object Name: {1} Object Type: {2} chooseNamedObject.title=Choose a {0} archCollectArches=Collecting Arches... -archCollectAnimations=Collecting Animations... -archCollectImages=Collecting Images... -archCollectDone=Collect Arches: done archCollectErrorIOException.title=Collect Error archCollectErrorIOException.message=Collect Error: An I/O Exception occurred on file {0}:\n{1} nameOfAnimationObject=Animation This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |