From: <aki...@us...> - 2006-12-02 23:02:50
|
Revision: 798 http://svn.sourceforge.net/gridarta/?rev=798&view=rev Author: akirschbaum Date: 2006-12-02 15:02:50 -0800 (Sat, 02 Dec 2006) Log Message: ----------- Use correct key name in new map dialog. Modified Paths: -------------- trunk/crossfire/src/cfeditor/messages_de.properties trunk/daimonin/src/daieditor/messages_de.properties trunk/src/app/net/sf/gridarta/messages.properties Modified: trunk/crossfire/src/cfeditor/messages_de.properties =================================================================== --- trunk/crossfire/src/cfeditor/messages_de.properties 2006-12-02 22:44:26 UTC (rev 797) +++ trunk/crossfire/src/cfeditor/messages_de.properties 2006-12-02 23:02:50 UTC (rev 798) @@ -5,7 +5,7 @@ newMap.title=Neue Karte erstellen newPickmap.title=Neue Pickmap erstellen newMapMapName=Name: -newMapParameter=Parameter +newMapParameters=Parameter newMapPickmapName=Name: newMapDimensionOutOfRange.title=Ung\xFCltiger Wert newMapDimensionOutOfRange.message=Die Kartengr\xF6\xDFe muss positiv sein Modified: trunk/daimonin/src/daieditor/messages_de.properties =================================================================== --- trunk/daimonin/src/daieditor/messages_de.properties 2006-12-02 22:44:26 UTC (rev 797) +++ trunk/daimonin/src/daieditor/messages_de.properties 2006-12-02 23:02:50 UTC (rev 798) @@ -37,7 +37,7 @@ newMap.title=Neue Karte erstellen newPickmap.title=Neue Pickmap erstellen newMapMapName=Name: -newMapParameter=Parameter +newMapParameters=Parameter newMapPickmapName=Name: newMapDimensionOutOfRange.title=Ung\xFCltiger Wert newMapDimensionOutOfRange.message=Die Kartengr\xF6\xDFe muss positiv sein Modified: trunk/src/app/net/sf/gridarta/messages.properties =================================================================== --- trunk/src/app/net/sf/gridarta/messages.properties 2006-12-02 22:44:26 UTC (rev 797) +++ trunk/src/app/net/sf/gridarta/messages.properties 2006-12-02 23:02:50 UTC (rev 798) @@ -20,7 +20,7 @@ newMap.title=Create New Map newPickmap.title=Create New Pickmap newMapMapName=Map name: -newMapParameter=Parameters +newMapParameters=Parameters newMapPickmapName=Pickmap name: newMapDimensionOutOfRange.title=Illegal Value newMapDimensionOutOfRange.message=Map dimensions must be greater or equal 1 and less or equal 2147483647 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2006-12-02 23:40:33
|
Revision: 799 http://svn.sourceforge.net/gridarta/?rev=799&view=rev Author: akirschbaum Date: 2006-12-02 15:40:33 -0800 (Sat, 02 Dec 2006) Log Message: ----------- Rename '<key>=...' to '<key>.message=...'. Modified Paths: -------------- trunk/crossfire/src/cfeditor/messages_de.properties trunk/crossfire/src/cfeditor/messages_fr.properties trunk/daimonin/src/daieditor/messages_de.properties trunk/daimonin/src/daieditor/messages_fr.properties trunk/daimonin/src/daieditor/messages_sv.properties Modified: trunk/crossfire/src/cfeditor/messages_de.properties =================================================================== --- trunk/crossfire/src/cfeditor/messages_de.properties 2006-12-02 23:02:50 UTC (rev 798) +++ trunk/crossfire/src/cfeditor/messages_de.properties 2006-12-02 23:40:33 UTC (rev 799) @@ -31,8 +31,8 @@ replaceByObject=Objekt replaceByNothing=nichts (=l\xF6schen) -replaceMapGone=Karte {0} ist nicht mehr verf\xFCgbar.\n -replaceMapNoSelection=Ich kann ohne Selektion keine selektierten Felder\n auf der Karte "{0}" ersetzen. +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. replacedZero.title=Ersetzung fehlgeschlagen replacedZero.message=Keine passenden Objekte gefunden. replacedOne.title=Ersetzung erfolgreich Modified: trunk/crossfire/src/cfeditor/messages_fr.properties =================================================================== --- trunk/crossfire/src/cfeditor/messages_fr.properties 2006-12-02 23:02:50 UTC (rev 798) +++ trunk/crossfire/src/cfeditor/messages_fr.properties 2006-12-02 23:40:33 UTC (rev 799) @@ -12,8 +12,8 @@ replaceByObject=objet replaceByNothing=rien -replaceMapGone=La carte {0} n'est plus disponible.\n -replaceMapNoSelection=Vous avez choisi de remplacer les cases s\xE9lectionn\xE9es de la \ncarte \"{0}\", mais il n'y a pas de s\xE9lection. +replaceMapGone.message=La carte {0} n'est plus disponible.\n +replaceMapNoSelection.message=Vous avez choisi de remplacer les cases s\xE9lectionn\xE9es de la \ncarte \"{0}\", mais il n'y a pas de s\xE9lection. replacedZero.message=Aucun objet correspondant trouv\xE9. replacedOne.message=1 L'objet a \xE9t\xE9 remplac\xE9. replacedMany.message={0} Les objets ont \xE9t\xE9 remplac\xE9s. Modified: trunk/daimonin/src/daieditor/messages_de.properties =================================================================== --- trunk/daimonin/src/daieditor/messages_de.properties 2006-12-02 23:02:50 UTC (rev 798) +++ trunk/daimonin/src/daieditor/messages_de.properties 2006-12-02 23:40:33 UTC (rev 799) @@ -123,8 +123,8 @@ replaceByPickmap=Pickmap replaceByNothing=nichts (=l\xF6schen) -replaceMapGone=Karte {0} ist nicht mehr verf\xFCgbar.\n -replaceMapNoSelection=Ich kann ohne Selektion keine selektierten Felder\n auf der Karte "{0}" ersetzen. +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. replacedZero.title=Ersetzung fehlgeschlagen replacedZero.message=Keine passenden Objekte gefunden. replacedOne.title=Ersetzung erfolgreich @@ -481,7 +481,7 @@ updateCloseMaps.title=Fehler beim Update updateCloseMaps.message=Alle Dateien m\xFCssen geschlossen werden, bevor ein Update durchgef\xFChrt werden kann. update.message=Nach Update suchen? -updateAvailable=Eine neuere Version des Editors ist verf\xFCgbar. Update installieren? +updateAvailable.message=Eine neuere Version des Editors ist verf\xFCgbar. Update installieren? ################# # Map Validation Modified: trunk/daimonin/src/daieditor/messages_fr.properties =================================================================== --- trunk/daimonin/src/daieditor/messages_fr.properties 2006-12-02 23:02:50 UTC (rev 798) +++ trunk/daimonin/src/daieditor/messages_fr.properties 2006-12-02 23:40:33 UTC (rev 799) @@ -5,7 +5,7 @@ ########## # Dialogs warning=Attention! -overwriteOtherFile=Un fichier nomm\xE9 "{0}" existe d\xE9j\xE0.\n\nVoulez vous vraiment le remplacer? +overwriteOtherFile.message=Un fichier nomm\xE9 "{0}" existe d\xE9j\xE0.\n\nVoulez vous vraiment le remplacer? mapTitle={0} ({1}) - Propri\xE9t\xE9s de la carte mapShrink.title=Confirm shrinking map @@ -21,8 +21,8 @@ replaceByObject=objet replaceByNothing=rien -replaceMapGone=La carte {0} n'est plus disponible.\n -replaceMapNoSelection=Vous avez choisi de remplacer les cases s\xE9lectionn\xE9es de la \ncarte \"{0}\", mais il n'y a pas de s\xE9lection. +replaceMapGone.message=La carte {0} n'est plus disponible.\n +replaceMapNoSelection.message=Vous avez choisi de remplacer les cases s\xE9lectionn\xE9es de la \ncarte \"{0}\", mais il n'y a pas de s\xE9lection. replacedZero.message=Aucun objet correspondant trouv\xE9. replacedOne.message=1 L'objet a \xE9t\xE9 remplac\xE9. replacedMany.message={0} Les objets ont \xE9t\xE9 remplac\xE9s. Modified: trunk/daimonin/src/daieditor/messages_sv.properties =================================================================== --- trunk/daimonin/src/daieditor/messages_sv.properties 2006-12-02 23:02:50 UTC (rev 798) +++ trunk/daimonin/src/daieditor/messages_sv.properties 2006-12-02 23:40:33 UTC (rev 799) @@ -148,19 +148,19 @@ confirmClosePickmap.message=Om du st\xE4nger plockkartan ''{0}'' kommer alla nyliga\n\xE4ndringar att f\xF6rloras.\n Vill du verkligen st\xE4nga den? confirmDeletePickmap.title=Radera fil f\xF6r plockkarta? -confirmDeletePickmap=Plockkartan ''{0}'' \xE4r st\xE4ngd.\nVill du ocks\xE5 ta bort filen ''{1}''?\nBorttagning av filen kommer att permanent radera plockkartan. +confirmDeletePickmap.message=Plockkartan ''{0}'' \xE4r st\xE4ngd.\nVill du ocks\xE5 ta bort filen ''{1}''?\nBorttagning av filen kommer att permanent radera plockkartan. confirmSaveChanges.title=Spara \xE4ndringar? -confirmSaveChanges=Vill du spara \xE4ndringar p\xE5 kartan {0}? +confirmSaveChanges.message=Vill du spara \xE4ndringar p\xE5 kartan {0}? confirmCreatePickmap.title=Kan inte \xF6ppna plockkarta -confirmCreatePickmap=Det finns ingen kartfil f\xF6r ''{0}''.\nVill du skapa den filen genom att spara denna plockkarta? +confirmCreatePickmap.message=Det finns ingen kartfil f\xF6r ''{0}''.\nVill du skapa den filen genom att spara denna plockkarta? confirmRevertMap.title=\xC5terst\xE4ll karta? -confirmRevertMap=Om du \xE5terst\xE4ller kartan ''{0}''\ntill dess senaste sparade version kommer alla nyliga \xE4ndringar att f\xF6rloras.\nVill du verkligen \xE5terst\xE4lla kartan? +confirmRevertMap.message=Om du \xE5terst\xE4ller kartan ''{0}''\ntill dess senaste sparade version kommer alla nyliga \xE4ndringar att f\xF6rloras.\nVill du verkligen \xE5terst\xE4lla kartan? confirmRevertPickmap.title=\xC5terst\xE4ll plockkarta? -confirmRevertPickmap=Om du \xE5terst\xE4ller plockkartan ''{0}''\ntill dess senaste sparade version kommer alla nyliga \xE4ndringar att f\xF6rloras.\nVill du verkligen \xE5terst\xE4lla plockkartan? +confirmRevertPickmap.message=Om du \xE5terst\xE4ller plockkartan ''{0}''\ntill dess senaste sparade version kommer alla nyliga \xE4ndringar att f\xF6rloras.\nVill du verkligen \xE5terst\xE4lla plockkartan? loadDuplicateFace.title=Fel: duplicerad bild loadDuplicateFace.message=Varning!\n\nDuplicerad bild: ''{0}''\nFil: ''{1}''\nJag kommer att ignorera detta duplikat. @@ -218,11 +218,11 @@ mapErrorPath.title=Fel vid skapande av s\xF6kv\xE4g mapErrorPath.message=Var v\xE4nlig kontrollera att kartans s\xF6kv\xE4g existerar och \xE4r korrekt: "{0}". mapQueryLoaded.title=Kartan \xE4r inladdad -mapQueryLoaded=Kartan {0} \xE4r \xF6ppen i editorn.\nSka jag autospara och uppdatera den? +mapQueryLoaded.message=Kartan {0} \xE4r \xF6ppen i editorn.\nSka jag autospara och uppdatera den? mapErrorPath2.title=Kan inte hitta karta mapErrorPath2.message=Var v\xE4nlig kontrollera s\xF6kv\xE4gen: "{0}". mapErrorInvalid.title=Ogiltig anslutning till n\xE4rliggande karta -mapErrorInvalid=I {0}: {1}\nanslutningen till {2} \xE4r ogiltig.\nAnslutningen till {3} \xE4r {4}\ngenererad anslutning:{5}\nSka jag avbryta anslutningen? +mapErrorInvalid.message=I {0}: {1}\nanslutningen till {2} \xE4r ogiltig.\nAnslutningen till {3} \xE4r {4}\ngenererad anslutning:{5}\nSka jag avbryta anslutningen? mapErrorFatalPath.title=Kan inte h\xE4mta s\xF6kv\xE4g mapErrorFatalPath.message=Kan inte h\xE4mta s\xF6kv\xE4g\n\xD6desdigert fel:\n{0} mapErrorFatalWrite.title=Kan inte skriva karta @@ -240,7 +240,7 @@ mapMapTabTitle=Kartinst\xE4llningar mapTilesTabTitle=N\xE4rliggande kartor mapTilesNoMapFileNoMapTilePane.title=N\xE4rliggande kartor ej tillg\xE4ngligt -mapTilesNoMapFileNoMapTilePane=Kartan har inget filnamn (den \xE4r inte sparad \xE4nnu).\nEn karta utan filnamn kan inte anslutas till andra kartor.\nD\xE4rf\xF6r kan du inte v\xE4lja n\xE4rliggande kartor utan att f\xF6rst spara kartan. +mapTilesNoMapFileNoMapTilePane.message=Kartan har inget filnamn (den \xE4r inte sparad \xE4nnu).\nEn karta utan filnamn kan inte anslutas till andra kartor.\nD\xE4rf\xF6r kan du inte v\xE4lja n\xE4rliggande kartor utan att f\xF6rst spara kartan. mapTileRevert.shortdescription=\xC5terst\xE4ll till lagrad s\xF6kv\xE4g mapTileClear.shortdescription=Radera s\xF6kv\xE4g mapTileChoose.shortdescription=V\xE4lj s\xF6kv\xE4g till n\xE4rliggande karta @@ -302,13 +302,13 @@ optionsAppClient=Klient optionsAppEditor=Editor optionsRestart.title=Varning -optionsRestart=De flesta inst\xE4llningarna kr\xE4ver att editor startas om f\xF6r att g\xE4lla. +optionsRestart.message=De flesta inst\xE4llningarna kr\xE4ver att editor startas om f\xF6r att g\xE4lla. optionsValidation=Validering autoValidate.text=Validera automatiskt efter varje \xE4ndring optionsValidators=Validerare # Old Libraries -oldLibsFound=Hittade gamla bibliotek.\nS\xF6kv\xE4g: {0}\nDe anv\xE4nds inte l\xE4ngre. Skall jag ta bort dem? +oldLibsFound.message=Hittade gamla bibliotek.\nS\xF6kv\xE4g: {0}\nDe anv\xE4nds inte l\xE4ngre. Skall jag ta bort dem? oldLibsFound.title=Ta bort gamla bibliotek? #attribute dialog @@ -326,7 +326,7 @@ archCollectDone=Sammanst\xE4ll arketyper: klart! archCollectWarningMultipartTailInPanel.title=Varning under sammanst\xE4llning -archCollectWarningMultipartTailInPanel=Varning under sammanst\xE4llning: hittade svans till multidelsobjekt i panelen! +archCollectWarningMultipartTailInPanel.message=Varning under sammanst\xE4llning: hittade svans till multidelsobjekt i panelen! archCollectWarningMultipartTooShort.title=Varning under sammanst\xE4llning archCollectWarningMultipartTooShort.message=Varning under sammanst\xE4llning: f\xF6r kort multidelsobject! archCollectWarningMissed.title=Varning under sammanst\xE4llning @@ -653,7 +653,7 @@ controlStop.accel=ESCAPE controlOutput=Outdata controlServerWarning.title=Varning -controlServerWarning=<html><h3>Varning!</h3><p>Java kan inte hantera processer som anv\xE4nder signalhanterare f\xF6r mycket arbete.<br>Daimoninservern \xE4r en s\xE5dan process.<br>Stopp av servern med "stoppa"-knappen kommer med stor sannolikhet<br>att resultera i en zombie-process som bara g\xE5r att ta bort med operativsystemets verktyg.</p><p><strong>Du har blivit varnad!</strong></p></html> +controlServerWarning.message=<html><h3>Varning!</h3><p>Java kan inte hantera processer som anv\xE4nder signalhanterare f\xF6r mycket arbete.<br>Daimoninservern \xE4r en s\xE5dan process.<br>Stopp av servern med "stoppa"-knappen kommer med stor sannolikhet<br>att resultera i en zombie-process som bara g\xE5r att ta bort med operativsystemets verktyg.</p><p><strong>Du har blivit varnad!</strong></p></html> controlCloseOkay=Du kan st\xE4nga f\xF6nstret nu. checkMap.text=Validera karta @@ -803,11 +803,11 @@ updateError.title=Fel under uppdatering updateError.message=Fel under uppdatering:\n{0}\n\nVar v\xE4nlig uppdatera manuellt. updateErrorUnknownHost.title=Fel under uppdatering -updateErrorUnknownHost=Fel under uppdatering:\nUppdateringsservern kunde inte hittas ("{0}").\n\nVar v\xE4nlig uppdatera manuellt. +updateErrorUnknownHost.message=Fel under uppdatering:\nUppdateringsservern kunde inte hittas ("{0}").\n\nVar v\xE4nlig uppdatera manuellt. updateUnavailable.title=Ingen ny uppdatering tillg\xE4nglig 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">Installerad</th><th class="cell">Tillg\xE4nglig</th></tr><tr><th class="cell">Version</th><td class="cell">{0}</td><td class="cell">{1}</td></tr><tr><th class="cell">Utvecklare</th><td class="cell">{2}</td><td class="cell">{3}</td></tr><tr><th class="cell">Datum</th><td class="cell">{4}</td><td class="cell">{5}</td></tr></table><p align="center">Ingen nyare version hittad.</p><p>K\xE4lla: {6}<br>Ladda ner: {7}</p></html> updateAvailable.title=Uppdatering tillg\xE4nglig! -updateAvailable=<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">Installerad</th><th class="cell">Tillg\xE4nglig</th></tr><tr><th class="cell">Version</th><td class="cell">{0}</td><td class="cell">{1}</td></tr><tr><th class="cell">Utvecklare</th><td class="cell">{2}</td><td class="cell">{3}</td></tr><tr><th class="cell">Datum</th><td class="cell">{4}</td><td class="cell">{5}</td></tr></table><p align="center">En nyare version \xE4r tillg\xE4nglig. Installera uppdatering?</p><p>OBS: Detta uppdaterar enbart DaimoninEditor.jar. Dina arketypfiler kommer inte att uppdateras.</p><p>(Editorn kan inte anv\xE4ndas medan uppdatering p\xE5g\xE5r)</p><p>K\xE4lla: {6}<br>Nerladdning: {7}</p></html> +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">Installerad</th><th class="cell">Tillg\xE4nglig</th></tr><tr><th class="cell">Version</th><td class="cell">{0}</td><td class="cell">{1}</td></tr><tr><th class="cell">Utvecklare</th><td class="cell">{2}</td><td class="cell">{3}</td></tr><tr><th class="cell">Datum</th><td class="cell">{4}</td><td class="cell">{5}</td></tr></table><p align="center">En nyare version \xE4r tillg\xE4nglig. Installera uppdatering?</p><p>OBS: Detta uppdaterar enbart DaimoninEditor.jar. Dina arketypfiler kommer inte att uppdateras.</p><p>(Editorn kan inte anv\xE4ndas medan uppdatering p\xE5g\xE5r)</p><p>K\xE4lla: {6}<br>Nerladdning: {7}</p></html> updateFailedNoBackup.title=Uppdatering misslyckades updateFailedNoBackup.message=<html>Kunde inte skapa s\xE4kerhetskopia, updatering misslyckades.<br>Var v\xE4nlig utf\xF6r f\xF6ljande steg manuellt efter att avslutat editorn:<ol><li>d\xF6p om DaimoninEditor.jar till DaimoninEditor.jar.bak<li>d\xF6p om DaimoninEditor.jar.tmp till DaimoninEditor.jar</ol></html> updateFailedNoDownload.title=Uppdatering misslyckades This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2006-12-03 10:24:22
|
Revision: 800 http://svn.sourceforge.net/gridarta/?rev=800&view=rev Author: akirschbaum Date: 2006-12-03 02:24:21 -0800 (Sun, 03 Dec 2006) Log Message: ----------- Remove unused messages. Modified Paths: -------------- trunk/daimonin/src/daieditor/messages.properties trunk/daimonin/src/daieditor/messages_de.properties trunk/daimonin/src/daieditor/messages_fr.properties trunk/daimonin/src/daieditor/messages_sv.properties trunk/src/app/net/sf/gridarta/messages.properties Modified: trunk/daimonin/src/daieditor/messages.properties =================================================================== --- trunk/daimonin/src/daieditor/messages.properties 2006-12-02 23:40:33 UTC (rev 799) +++ trunk/daimonin/src/daieditor/messages.properties 2006-12-03 10:24:21 UTC (rev 800) @@ -284,12 +284,11 @@ archCollectArches=Collecting Arches... archCollectAnimations=Collecting Animations... -archCollectAnimationTree=Collecting Animation Tree... archCollectImages=Collecting Images... archCollectDone=Collect Arches: done -archCollectWarningMultipartTailInPanel.title=Collect Warning -archCollectWarningMultipartTailInPanel.message=Collect Warning: Found Multipart tail in Panel! +#archCollectWarningMultipartTailInPanel.title=Collect Warning +#archCollectWarningMultipartTailInPanel.message=Collect Warning: Found Multipart tail in Panel! archCollectWarningMultipartTooShort.title=Collect Warning archCollectWarningMultipartTooShort.message=Collect Warning: Multipart object too short! archCollectWarningMissed.title=Collect Warning @@ -773,8 +772,6 @@ update.message=Check for updates? updateError.title=Error while updating updateError.message=Error while updating:\n{0}\n\nPlease update manually. -updateErrorUnknownHost.title=Error while updating -updateErrorUnknownHost.message=Error while updating:\nThe update host could not be resolved ("{0}").\n\nPlease update manually. updateUnavailable.title=No update available 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! @@ -904,7 +901,6 @@ ####################### # Various Log Messages -setGridVisibilityWithoutCurrentMap=setGridVisibility() called without current map. canonIOE=IOException while canonizing path: {0} saveLevelAsWithNull=DEBUG: CMainControl.saveLevelAsWanted(CMapControl level) invoked with null argument. imageCreated=Created image "{0}" of map "{1}". Modified: trunk/daimonin/src/daieditor/messages_de.properties =================================================================== --- trunk/daimonin/src/daieditor/messages_de.properties 2006-12-02 23:40:33 UTC (rev 799) +++ trunk/daimonin/src/daieditor/messages_de.properties 2006-12-03 10:24:21 UTC (rev 800) @@ -165,7 +165,6 @@ statusMouseOff=Maus au\xDFerhalb der Karte statusSelect=Maus x:{0,number,integer} y:{1,number,integer} Karte x:{2,number,integer} y:{3,number,integer} Auswahl x:{4,number,integer} y:{5,number,integer} statusNormal=Maus x:{0,number,integer} y:{1,number,integer} Karte x:{2,number,integer} y:{3,number,integer} -statusInsert=Maus x:{0,number,integer} y:{1,number,integer} Karte x:{2,number,integer} y:{3,number,integer} Einf\xFCgen: {4} ####### # File @@ -393,8 +392,6 @@ viewShow.text=Zeige nur viewAlpha.text=Durchsichtig -changeFont.text=Zeichensatz \xE4ndern - showMonsters.text=Zeige Monster showExits.text=Zeige Ausg\xE4nge Modified: trunk/daimonin/src/daieditor/messages_fr.properties =================================================================== --- trunk/daimonin/src/daieditor/messages_fr.properties 2006-12-02 23:40:33 UTC (rev 799) +++ trunk/daimonin/src/daieditor/messages_fr.properties 2006-12-03 10:24:21 UTC (rev 800) @@ -36,7 +36,6 @@ statusMouseOff=Souris hors de la carte statusSelect=Souris x:{0,number,integer} y:{1,number,integer} Carte x:{2,number,integer} y:{3,number,integer} Selectionn\xE9 x:{4,number,integer} y:{5,number,integer} statusNormal=Souris x:{0,number,integer} y:{1,number,integer} Carte x:{2,number,integer} y:{3,number,integer} -statusInsert=Souris x:{0,number,integer} y:{1,number,integer} Carte x:{2,number,integer} y:{3,number,integer} Ins\xE9rer: {4} ####### # File @@ -168,10 +167,6 @@ map.text=Carte map.mnemonic=C -autoJoin.text=Jointure automatique -autoJoin.mnemonic=J -autoJoin.accel=ctrl pressed J - gridVisible.text=Montrer la grille gridVisible.mnemonic=G gridVisible.accel=ctrl pressed G @@ -262,8 +257,6 @@ view.text=Affichage view.mnemonic=A -changeFont.text=Police - showMonsters.text=Afficher monstres showExits.text=Afficher sorties @@ -289,10 +282,6 @@ window.text=Fen\xEAtres window.mnemonic=F -newWindow.text=Nouvelle fen\xEAtre -newWindow.mnemonic=N -newWindow.accel=shift pressed W - closeAll.text=Tout fermer closeAll.mnemonic=T Modified: trunk/daimonin/src/daieditor/messages_sv.properties =================================================================== --- trunk/daimonin/src/daieditor/messages_sv.properties 2006-12-02 23:40:33 UTC (rev 799) +++ trunk/daimonin/src/daieditor/messages_sv.properties 2006-12-03 10:24:21 UTC (rev 800) @@ -53,7 +53,6 @@ mapOutOfMemory.title=Slut p\xE5 minne mapOutOfMemory.message=<html>Det finns inte tillr\xE4ckligt med minne f\xF6r att \xF6ppna kartan!<br>Du kan h\xF6ja minnesgr\xE4nsen med <code>-Xmx</code> -flaggan.<br>Till exempel: <code>java -Xmx128m -jar DaimoninEditor.jar</code></html> -mapImagesOutOfMemory=Inte tillr\xE4ckligt minne f\xF6r f\xF6rhandsbisning och ikon. mapUnsaved.title=Kartan har inte sparats. mapUnsaved.message=Var v\xE4nlig och spara den h\xE4r kartan f\xF6rst. @@ -321,12 +320,11 @@ archCollectArches=Sammanst\xE4ller arketyper... archCollectAnimations=Sammanst\xE4ller animationer... -archCollectAnimationTree=Sammanst\xE4ller animationstr\xE4d... archCollectImages=Sammanst\xE4ller bilder... archCollectDone=Sammanst\xE4ll arketyper: klart! -archCollectWarningMultipartTailInPanel.title=Varning under sammanst\xE4llning -archCollectWarningMultipartTailInPanel.message=Varning under sammanst\xE4llning: hittade svans till multidelsobjekt i panelen! +#archCollectWarningMultipartTailInPanel.title=Varning under sammanst\xE4llning +#archCollectWarningMultipartTailInPanel.message=Varning under sammanst\xE4llning: hittade svans till multidelsobjekt i panelen! archCollectWarningMultipartTooShort.title=Varning under sammanst\xE4llning archCollectWarningMultipartTooShort.message=Varning under sammanst\xE4llning: f\xF6r kort multidelsobject! archCollectWarningMissed.title=Varning under sammanst\xE4llning @@ -802,8 +800,6 @@ update.message=Leta efter uppdateringar? updateError.title=Fel under uppdatering updateError.message=Fel under uppdatering:\n{0}\n\nVar v\xE4nlig uppdatera manuellt. -updateErrorUnknownHost.title=Fel under uppdatering -updateErrorUnknownHost.message=Fel under uppdatering:\nUppdateringsservern kunde inte hittas ("{0}").\n\nVar v\xE4nlig uppdatera manuellt. updateUnavailable.title=Ingen ny uppdatering tillg\xE4nglig 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">Installerad</th><th class="cell">Tillg\xE4nglig</th></tr><tr><th class="cell">Version</th><td class="cell">{0}</td><td class="cell">{1}</td></tr><tr><th class="cell">Utvecklare</th><td class="cell">{2}</td><td class="cell">{3}</td></tr><tr><th class="cell">Datum</th><td class="cell">{4}</td><td class="cell">{5}</td></tr></table><p align="center">Ingen nyare version hittad.</p><p>K\xE4lla: {6}<br>Ladda ner: {7}</p></html> updateAvailable.title=Uppdatering tillg\xE4nglig! @@ -921,7 +917,6 @@ ####################### # Various Log Messages -setGridVisibilityWithoutCurrentMap=setGridVisibility() called without current map. canonIOE=IOException while canonizing path: {0} saveLevelAsWithNull=DEBUG: CMainControl.saveLevelAsWanted(CMapControl level) invoked with null argument. imageCreated=Created image "{0}" of map "{1}". Modified: trunk/src/app/net/sf/gridarta/messages.properties =================================================================== --- trunk/src/app/net/sf/gridarta/messages.properties 2006-12-02 23:40:33 UTC (rev 799) +++ trunk/src/app/net/sf/gridarta/messages.properties 2006-12-03 10:24:21 UTC (rev 800) @@ -5,7 +5,6 @@ chooseNamedObject.title=Choose a {0} archCollectArches=Collecting Arches... archCollectAnimations=Collecting Animations... -archCollectAnimationTree=Collecting Animation Tree... archCollectImages=Collecting Images... archCollectDone=Collect Arches: done nameOfAnimationObject=Animation This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2006-12-03 15:44:51
|
Revision: 818 http://svn.sourceforge.net/gridarta/?rev=818&view=rev Author: akirschbaum Date: 2006-12-03 07:44:52 -0800 (Sun, 03 Dec 2006) Log Message: ----------- Move message keys used by gridarta to gridarta messages. Modified Paths: -------------- trunk/daimonin/src/daieditor/messages.properties trunk/src/app/net/sf/gridarta/messages.properties Modified: trunk/daimonin/src/daieditor/messages.properties =================================================================== --- trunk/daimonin/src/daieditor/messages.properties 2006-12-03 14:39:08 UTC (rev 817) +++ trunk/daimonin/src/daieditor/messages.properties 2006-12-03 15:44:52 UTC (rev 818) @@ -289,8 +289,6 @@ archCollectWarningMultipartTooShort.message=Collect Warning: Multipart object too short! archCollectWarningMissed.title=Collect Warning archCollectWarningMissed.message=Collect Warning: {0} arches have been missed during collect! -archCollectErrorIOException.title=Collect Error -archCollectErrorIOException.message=Collect Error: An I/O Exception occurred on file {0}:\n{1} archCollectErrorFileNotFound.title=Collect Error archCollectErrorFileNotFound.message=Collect Error: Cannot open input file\n{0} archCollectErrorFileUnexpectedEOF.title=Collect Error @@ -896,8 +894,6 @@ # Status Bar memory=({0}/{1}) Memory: {2} used, {3} free, {4} total. -dialogDontShowAgain=Show this dialog again next time. - ####################### # Various Log Messages canonIOE=IOException while canonizing path: {0} Modified: trunk/src/app/net/sf/gridarta/messages.properties =================================================================== --- trunk/src/app/net/sf/gridarta/messages.properties 2006-12-03 14:39:08 UTC (rev 817) +++ trunk/src/app/net/sf/gridarta/messages.properties 2006-12-03 15:44:52 UTC (rev 818) @@ -7,6 +7,8 @@ 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 nameOfFaceObject=Face @@ -15,6 +17,8 @@ pickmapExists.title=Cannot Create Pickmap pickmapExists.message=A pickmap named {0} already exists.\nEither remove the existing one or choose a different name. +dialogDontShowAgain=Show this dialog again next time. + # New Map newMap.title=Create New Map newPickmap.title=Create New Pickmap This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2006-12-03 15:56:25
|
Revision: 820 http://svn.sourceforge.net/gridarta/?rev=820&view=rev Author: akirschbaum Date: 2006-12-03 07:56:25 -0800 (Sun, 03 Dec 2006) Log Message: ----------- Make fields private. 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-03 15:50:35 UTC (rev 819) +++ trunk/crossfire/src/cfeditor/CMainControl.java 2006-12-03 15:56:25 UTC (rev 820) @@ -81,25 +81,25 @@ /** 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 MAP_DIR_KEY = "mapDirectory"; + private static final String MAP_DIR_KEY = "mapDirectory"; - public static final String DEFAULT_MAP_DIR = "maps"; + private static final String DEFAULT_MAP_DIR = "maps"; - public static final String ARCH_DIR_KEY = "archDirectory"; + private static final String ARCH_DIR_KEY = "archDirectory"; - public static final String DEFAULT_ARCH_DIR = "arch"; + private static final String DEFAULT_ARCH_DIR = "arch"; - public static final String SCRIPT_DIR_KEY = "scriptDirectory"; + private static final String SCRIPT_DIR_KEY = "scriptDirectory"; - public static final String DEFAULT_SCRIPT_DIR = "script"; + private static final String DEFAULT_SCRIPT_DIR = "script"; - public static final String USE_IMAGESET = "useImageSet"; + private static final String USE_IMAGESET = "useImageSet"; - public static final String USE_FONT = "useFont"; + private static final String USE_FONT = "useFont"; - public static final String LOAD_ARCH_COLL = "loadArchFromCollection"; + private static final String LOAD_ARCH_COLL = "loadArchFromCollection"; public static final String PICKMAPS_LOCKED = "pickmapsLocked"; Modified: trunk/daimonin/src/daieditor/CMainControl.java =================================================================== --- trunk/daimonin/src/daieditor/CMainControl.java 2006-12-03 15:50:35 UTC (rev 819) +++ trunk/daimonin/src/daieditor/CMainControl.java 2006-12-03 15:56:25 UTC (rev 820) @@ -214,7 +214,7 @@ public static ImageIcon mapCursorIcon; - public static ImageIcon mapGridIcon; + private static ImageIcon mapGridIcon; public static ImageIcon unknownTileIcon; @@ -287,16 +287,16 @@ public static final boolean PREFS_VALIDATOR_AUTO_DEFAULT = false; /** The GameObjectMatcher for show only. */ - public MutableOrGameObjectMatcher moaomShow = new MutableOrGameObjectMatcher(true); + private MutableOrGameObjectMatcher moaomShow = new MutableOrGameObjectMatcher(true); /** The GameObjectMatcher for alpha. */ - public MutableOrGameObjectMatcher moaomAlpha = new MutableOrGameObjectMatcher(false); + private MutableOrGameObjectMatcher moaomAlpha = new MutableOrGameObjectMatcher(false); /** The ViewGameObjectMatcherManager for show only. */ - public final ViewGameObjectMatcherManager vaommShow = new ViewGameObjectMatcherManager(moaomShow); + private final ViewGameObjectMatcherManager vaommShow = new ViewGameObjectMatcherManager(moaomShow); /** The ViewGameObjectMatcherManager for alpha. */ - public final ViewGameObjectMatcherManager vaommAlpha = new ViewGameObjectMatcherManager(moaomAlpha); + private final ViewGameObjectMatcherManager vaommAlpha = new ViewGameObjectMatcherManager(moaomAlpha); private boolean gridVisible; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2006-12-03 16:15:07
|
Revision: 822 http://svn.sourceforge.net/gridarta/?rev=822&view=rev Author: akirschbaum Date: 2006-12-03 08:15:01 -0800 (Sun, 03 Dec 2006) Log Message: ----------- Rename variable name. Modified Paths: -------------- trunk/crossfire/src/cfeditor/CArchPanel.java trunk/daimonin/src/daieditor/CArchPanel.java Modified: trunk/crossfire/src/cfeditor/CArchPanel.java =================================================================== --- trunk/crossfire/src/cfeditor/CArchPanel.java 2006-12-03 16:08:44 UTC (rev 821) +++ trunk/crossfire/src/cfeditor/CArchPanel.java 2006-12-03 16:15:01 UTC (rev 822) @@ -113,12 +113,12 @@ // we must set the list of the selected list depend on combo selection tabDesktop.addChangeListener(new ChangeListener() { public void stateChanged(final ChangeEvent e) { - final JTabbedPane tp = (JTabbedPane) e.getSource(); + final JTabbedPane tabbedPane = (JTabbedPane) e.getSource(); // This is weird: we need to compare against SelectedComponent, // and *not* SelectedIndex. The index seemed to get all messed up during // load proccess, leading to odd behaviour and sometimes wrecked panes. - final Component sel = tp.getSelectedComponent(); + final Component sel = tabbedPane.getSelectedComponent(); PanelNode node = panelNodeStart; while (node != null && node.data.getPanel() != sel) { node = node.next; Modified: trunk/daimonin/src/daieditor/CArchPanel.java =================================================================== --- trunk/daimonin/src/daieditor/CArchPanel.java 2006-12-03 16:08:44 UTC (rev 821) +++ trunk/daimonin/src/daieditor/CArchPanel.java 2006-12-03 16:15:01 UTC (rev 822) @@ -109,10 +109,10 @@ // we must set the list of the selected list depend on combo selection tabDesktop.addChangeListener(new ChangeListener() { public void stateChanged(final ChangeEvent e) { - final JTabbedPane tp = (JTabbedPane) e.getSource(); + final JTabbedPane tabbedPane = (JTabbedPane) e.getSource(); setSelectedArch(null); - final PanelNode node = panelNodeList.get(tp.getSelectedIndex()); + final PanelNode node = panelNodeList.get(tabbedPane.getSelectedIndex()); selectedPanel = node.getData(); if (selectedPanel != null) { selectedPanel.showArchList(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2006-12-03 16:48:36
|
Revision: 825 http://svn.sourceforge.net/gridarta/?rev=825&view=rev Author: akirschbaum Date: 2006-12-03 08:48:34 -0800 (Sun, 03 Dec 2006) Log Message: ----------- Unify CArchPanel. Modified Paths: -------------- trunk/crossfire/src/cfeditor/CArchPanel.java trunk/crossfire/src/cfeditor/CArchPanelPan.java trunk/crossfire/src/cfeditor/CMainView.java trunk/daimonin/src/daieditor/CArchPanel.java Modified: trunk/crossfire/src/cfeditor/CArchPanel.java =================================================================== --- trunk/crossfire/src/cfeditor/CArchPanel.java 2006-12-03 16:36:47 UTC (rev 824) +++ trunk/crossfire/src/cfeditor/CArchPanel.java 2006-12-03 16:48:34 UTC (rev 825) @@ -56,8 +56,10 @@ /** Controller of this subview. */ private final transient CMainControl mainControl; - /** The "Import..." button. */ - + /** + * Name of the selected arch. + * @serial include + */ private String selectedArch; /** Panel holding both archlist and pickmaps. */ @@ -115,6 +117,7 @@ public void stateChanged(final ChangeEvent e) { final JTabbedPane tabbedPane = (JTabbedPane) e.getSource(); + setSelectedArch(null); final PanelNode node = panelNodeList.get(tabbedPane.getSelectedIndex()); selectedPanel = node.getData(); if (selectedPanel != null) { @@ -136,15 +139,11 @@ } @Nullable public GameObject getArchPanelSelection() { - if (selectedPanel == null) { - return null; - } - - return selectedPanel.getArchListObject(); + return selectedPanel != null ? selectedPanel.getArchListObject() : null; } - public void showArchPanelQuickObject(final GameObject arch) { - archQuickPanel.showArchPanelQuickObject(arch); + public void showArchPanelQuickObject(final GameObject gameObject) { + archQuickPanel.showArchPanelQuickObject(gameObject); } public int addArchPanelCombo(final String name) { @@ -206,12 +205,20 @@ settings.setProperty(ARCHPANEL_LOCATION_KEY, String.valueOf(splitPane.getDividerLocation())); } - public String getPanelArch() { + /** + * Get name of selected Arch + * @return Name of selected arch in arch panel + */ + public String getSelectedArch() { return selectedArch; } - public void setPanelArch(final String archname) { - selectedArch = archname; + /** + * Set selected Arch + * @param selectedArch name of selected arch in arch panel + */ + public void setSelectedArch(final String selectedArch) { + this.selectedArch = selectedArch; } void refresh() { @@ -223,7 +230,10 @@ private final CArchPanelPan data; - private final String title; // title of this PanelNode + /** + * Title of this node. + */ + private final String title; public PanelNode(final CArchPanelPan data, final String title) { this.data = data; Modified: trunk/crossfire/src/cfeditor/CArchPanelPan.java =================================================================== --- trunk/crossfire/src/cfeditor/CArchPanelPan.java 2006-12-03 16:36:47 UTC (rev 824) +++ trunk/crossfire/src/cfeditor/CArchPanelPan.java 2006-12-03 16:48:34 UTC (rev 825) @@ -271,7 +271,7 @@ */ final GameObject archetype = mainControl.getArchetypeSet().getArchetype(value.toString()); if (isSelected) { - archPanel.setPanelArch(value.toString()); + archPanel.setSelectedArch(value.toString()); mainControl.setStatusText(" " + value + " "); } assert archetype != null : "Archetype not found: " + value.toString(); Modified: trunk/crossfire/src/cfeditor/CMainView.java =================================================================== --- trunk/crossfire/src/cfeditor/CMainView.java 2006-12-03 16:36:47 UTC (rev 824) +++ trunk/crossfire/src/cfeditor/CMainView.java 2006-12-03 16:48:34 UTC (rev 825) @@ -375,9 +375,12 @@ archPanel.addArchPanelArch(archname, index); } - // selected arch in arch panel + /** + * Return the name of the selected arch in arch panel. + * @return name of selected arch in arch panel + */ public String getPanelArch() { - return archPanel.getPanelArch(); + return archPanel.getSelectedArch(); } /** Modified: trunk/daimonin/src/daieditor/CArchPanel.java =================================================================== --- trunk/daimonin/src/daieditor/CArchPanel.java 2006-12-03 16:36:47 UTC (rev 824) +++ trunk/daimonin/src/daieditor/CArchPanel.java 2006-12-03 16:48:34 UTC (rev 825) @@ -199,7 +199,10 @@ private final CArchPanelPan data; - private final String title; // title of this panelNode + /** + * Title of this node. + */ + private final String title; public PanelNode(final CArchPanelPan data, final String title) { this.data = data; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2006-12-03 17:02:43
|
Revision: 828 http://svn.sourceforge.net/gridarta/?rev=828&view=rev Author: akirschbaum Date: 2006-12-03 09:02:44 -0800 (Sun, 03 Dec 2006) Log Message: ----------- Unify expressions. Modified Paths: -------------- trunk/crossfire/src/cfeditor/CAttribBitmask.java trunk/daimonin/src/daieditor/CAttribBitmask.java Modified: trunk/crossfire/src/cfeditor/CAttribBitmask.java =================================================================== --- trunk/crossfire/src/cfeditor/CAttribBitmask.java 2006-12-03 16:59:26 UTC (rev 827) +++ trunk/crossfire/src/cfeditor/CAttribBitmask.java 2006-12-03 17:02:44 UTC (rev 828) @@ -119,7 +119,7 @@ } number = bitName.length - 1; - maxvalue = ((int) Math.pow(2., (double) (bitName.length + 1))) - 1; + maxvalue = (1 << (bitName.length + 1)) - 1; } else { // Error: this is an "empty" bitmask log.warn("Error in \"" + IGUIConstants.TYPEDEF_FILE + "\": Found a bitmask without content!"); @@ -138,7 +138,8 @@ * <code>false</code> */ private static boolean isActive(final int index, final int mask) { - return ((int) (Math.pow(2., (double) (index - 1))) & mask) != 0; + final int bit = 1 << (index - 1); + return (mask & bit) == bit; } /** Modified: trunk/daimonin/src/daieditor/CAttribBitmask.java =================================================================== --- trunk/daimonin/src/daieditor/CAttribBitmask.java 2006-12-03 16:59:26 UTC (rev 827) +++ trunk/daimonin/src/daieditor/CAttribBitmask.java 2006-12-03 17:02:44 UTC (rev 828) @@ -82,7 +82,7 @@ * <code>false</code> */ private static boolean isActive(final int index, final int mask) { - final int bit = 1 << index - 1; + final int bit = 1 << (index - 1); return (mask & bit) == bit; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2006-12-03 19:17:57
|
Revision: 836 http://svn.sourceforge.net/gridarta/?rev=836&view=rev Author: akirschbaum Date: 2006-12-03 11:17:57 -0800 (Sun, 03 Dec 2006) Log Message: ----------- Unify comments. Modified Paths: -------------- trunk/crossfire/src/cfeditor/gui/map/MapPropertiesDialog.java trunk/daimonin/src/daieditor/gui/map/MapPropertiesDialog.java Modified: trunk/crossfire/src/cfeditor/gui/map/MapPropertiesDialog.java =================================================================== --- trunk/crossfire/src/cfeditor/gui/map/MapPropertiesDialog.java 2006-12-03 19:08:02 UTC (rev 835) +++ trunk/crossfire/src/cfeditor/gui/map/MapPropertiesDialog.java 2006-12-03 19:17:57 UTC (rev 836) @@ -60,7 +60,7 @@ import net.sf.gridarta.help.Help; /** - * Dialog used to ask the user the properties for the new level. + * A dialog to change the properties of a map, like several flags and settings about the environment and the map tiles. * @author <a href="mailto:and...@gm...">Andreas Vogl</a> * @author <a href="mailto:mic...@no...">Michael Toennies</a> */ @@ -359,10 +359,10 @@ /** * Create an "attribute"-line (format: <label> <textfield>) - * @param textField textfield - * @param n lenght of textfield - * @param defaultText initial text in textfield - * @param labelKey (attribute-)label key + * @param textField textfield + * @param n lenght of textfield + * @param defaultText initial text in textfield + * @param labelKey (attribute-)label key * @return created panel */ private static JPanel createPanelLine(final JTextField textField, final int n, final String defaultText, final String labelKey) { @@ -380,7 +380,7 @@ * @param checkBox checkbox * @param state initial state * @param labelKey (attribute-)label key - * @return created panel + * @return created Checkbox */ private static JPanel createPanelCBox(final JCheckBox checkBox, final boolean state, final String labelKey) { final JPanel lineLayout = new JPanel(new FlowLayout(FlowLayout.CENTER)); // layout for this line @@ -393,8 +393,8 @@ /** * Checks the given values and modifies the current level. - * @return true if the level properties were edited, false if the - * parameters were wrong. + * @return <code>true</code> if the level properties were edited, + * <code>false</code> if the parameters were wrong. */ private boolean modifyMapProperties() { final MapArchObject map = mapControl.getMapModel().getMapArchObject(); // map arch object Modified: trunk/daimonin/src/daieditor/gui/map/MapPropertiesDialog.java =================================================================== --- trunk/daimonin/src/daieditor/gui/map/MapPropertiesDialog.java 2006-12-03 19:08:02 UTC (rev 835) +++ trunk/daimonin/src/daieditor/gui/map/MapPropertiesDialog.java 2006-12-03 19:17:57 UTC (rev 836) @@ -519,8 +519,8 @@ } /** - * Open a popup and ask user to confirm his map-resizing selection. - * This popup dialog disables all other windows (and threads). + * Open a popup and ask user to confirm his map-resizing selection. This + * popup dialog disables all other windows (and threads). * @return true if user confirmed, false if user cancelled resize */ private boolean askConfirmResize(final Size2D size) { @@ -545,4 +545,4 @@ } } -} // class CMapPropertiesDialog +} // class MapPropertiesDialog This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2006-12-03 21:31:21
|
Revision: 841 http://svn.sourceforge.net/gridarta/?rev=841&view=rev Author: akirschbaum Date: 2006-12-03 13:31:17 -0800 (Sun, 03 Dec 2006) Log Message: ----------- Change layout of map properties dialog. Modified Paths: -------------- trunk/crossfire/ChangeLog trunk/crossfire/src/cfeditor/CMainControl.java trunk/crossfire/src/cfeditor/gui/map/MapPropertiesDialog.java trunk/crossfire/src/cfeditor/messages.properties trunk/daimonin/src/daieditor/messages.properties trunk/src/app/net/sf/gridarta/messages.properties Modified: trunk/crossfire/ChangeLog =================================================================== --- trunk/crossfire/ChangeLog 2006-12-03 21:27:19 UTC (rev 840) +++ trunk/crossfire/ChangeLog 2006-12-03 21:31:17 UTC (rev 841) @@ -1,3 +1,7 @@ +2006-12-03 Andreas Kirschbaum + + * Change layout of map properties dialog. + 2006-12-02 Andreas Kirschbaum * Add "permanent experience" attribute for SKILL objects. Modified: trunk/crossfire/src/cfeditor/CMainControl.java =================================================================== --- trunk/crossfire/src/cfeditor/CMainControl.java 2006-12-03 21:27:19 UTC (rev 840) +++ trunk/crossfire/src/cfeditor/CMainControl.java 2006-12-03 21:31:17 UTC (rev 841) @@ -1164,7 +1164,7 @@ */ void showMapProperties(final MapControl level) { if (level != null) { - new MapPropertiesDialog(this, mainView, level); + MapPropertiesDialog.showDialog(mainView, this, level); } } Modified: trunk/crossfire/src/cfeditor/gui/map/MapPropertiesDialog.java =================================================================== --- trunk/crossfire/src/cfeditor/gui/map/MapPropertiesDialog.java 2006-12-03 21:27:19 UTC (rev 840) +++ trunk/crossfire/src/cfeditor/gui/map/MapPropertiesDialog.java 2006-12-03 21:31:17 UTC (rev 841) @@ -24,26 +24,21 @@ package cfeditor.gui.map; -import cfeditor.CDialogBase; import cfeditor.CMainControl; +import cfeditor.CMainView; import cfeditor.GridderException; import cfeditor.IGUIConstants; import cfeditor.map.MapArchObject; import cfeditor.map.MapControl; import java.awt.BorderLayout; -import java.awt.Dimension; import java.awt.FlowLayout; -import java.awt.Frame; import java.awt.GridBagConstraints; import java.awt.GridBagLayout; import java.awt.GridLayout; -import java.awt.event.ActionEvent; -import java.awt.event.ActionListener; import javax.swing.BorderFactory; -import javax.swing.Box; -import javax.swing.BoxLayout; import javax.swing.JButton; import javax.swing.JCheckBox; +import javax.swing.JDialog; import javax.swing.JLabel; import javax.swing.JOptionPane; import javax.swing.JPanel; @@ -51,21 +46,23 @@ import javax.swing.JTabbedPane; import javax.swing.JTextArea; import javax.swing.JTextField; -import javax.swing.JViewport; -import javax.swing.border.CompoundBorder; import javax.swing.border.EmptyBorder; -import javax.swing.border.EtchedBorder; -import javax.swing.border.TitledBorder; import net.sf.gridarta.Size2D; import net.sf.gridarta.help.Help; +import net.sf.japi.swing.ActionFactory; /** * A dialog to change the properties of a map, like several flags and settings about the environment and the map tiles. * @author <a href="mailto:and...@gm...">Andreas Vogl</a> * @author <a href="mailto:mic...@no...">Michael Toennies</a> + * @author <a href="mailto:ch...@ri...">Christian Hujer</a> + * @author Andreas Kirschbaum */ -public final class MapPropertiesDialog extends CDialogBase { +public final class MapPropertiesDialog extends JOptionPane { + /** Action Factory. */ + private static final ActionFactory ACTION_FACTORY = ActionFactory.getFactory("cfeditor"); + public static final String CENTER_MAP_KEY = "MapProperties.centerMapOnResize"; private final CMainControl mainControl; @@ -131,254 +128,177 @@ private static final long serialVersionUID = 1L; + /** JButton for help. */ + private final JButton helpButton = new JButton(ACTION_FACTORY.createAction(false, "mapHelp", this)); + + /** JButton for ok. */ + private final JButton okButton = new JButton(ACTION_FACTORY.createAction(false, "mapOkay", this)); + + /** JButton for restore. */ + private final JButton restoreButton = new JButton(ACTION_FACTORY.createAction(false, "mapRestore", this)); + + /** JButton for cancel. */ + private final JButton cancelButton = new JButton(ACTION_FACTORY.createAction(false, "mapCancel", this)); + /** * Constructs the map-options dialog. * @param mainControl The controller of this dialog. - * @param parentFrame The parent frame of this dialog. * @param mapControl The level whose properties are shown/edited. */ - public MapPropertiesDialog(final CMainControl mainControl, final Frame parentFrame, final MapControl mapControl) { - // set title - super(parentFrame, "" + mapControl.getMapName() + " - Map Properties"); + private MapPropertiesDialog(final CMainControl mainControl, final MapControl mapControl) { + okButton.setDefaultCapable(true); + setOptions(new Object[]{helpButton, okButton, restoreButton, cancelButton}); final MapArchObject map = mapControl.getMapModel().getMapArchObject(); // map arch object - this.mainControl = mainControl; // main control - this.mapControl = mapControl; // map control + this.mainControl = mainControl; + this.mapControl = mapControl; - getContentPane().setLayout(new BorderLayout()); + final JTabbedPane tabs = new JTabbedPane(); + tabs.setBorder(new EmptyBorder(10, 4, 4, 4)); - // main panel (gridbag) - final GridBagLayout gridbag = new GridBagLayout(); - final GridBagConstraints c = new GridBagConstraints(); - final JPanel mainPanel = new JPanel(gridbag); - //mainPanel.setLayout(new CardLayout()); - mainPanel.setBorder(new EmptyBorder( - IGUIConstants.DIALOG_INSETS, - IGUIConstants.DIALOG_INSETS, - IGUIConstants.DIALOG_INSETS, - IGUIConstants.DIALOG_INSETS)); - - // 1. map panel: final JPanel mapPanel = createMapPanel(map); - // set constraints - c.fill = GridBagConstraints.BOTH; - c.weightx = 1.0; - c.weighty = 1.0; - gridbag.setConstraints(mapPanel, c); - mainPanel.add(mapPanel); + tabs.add(ACTION_FACTORY.getString("mapMapTabTitle"), mapPanel); - // 2. options panel: - final JTabbedPane tabPane = new JTabbedPane(JTabbedPane.TOP); - tabPane.setBorder(BorderFactory.createEmptyBorder(0, 3, 3, 0)); + final JPanel textPanel = createMapTextPanel(map); + tabs.add(ACTION_FACTORY.getString("mapTextTabTitle"), textPanel); - final JPanel optionPanel = createOptionPanel(map); - // set constraints - c.weightx = 1.0; - c.weighty = 1.0; - c.gridwidth = GridBagConstraints.REMAINDER; //end row - gridbag.setConstraints(tabPane, c); + final JPanel lorePanel = createMapLorePanel(map); + tabs.add(ACTION_FACTORY.getString("mapLoreTabTitle"), lorePanel); - tabPane.addTab("Options", optionPanel); - mapLore.setText(mapControl.getMapLore()); - mapLore.setCaretPosition(0); - mapLore.setBorder(BorderFactory.createEmptyBorder(1, 4, 0, 0)); - final JScrollPane lscrollPane = new JScrollPane(mapLore); - lscrollPane.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED); - lscrollPane.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED); - lscrollPane.setPreferredSize(new Dimension(20, 20)); + final JPanel parametersPanel = createParametersPanel(map); + tabs.add(ACTION_FACTORY.getString("mapParametersTabTitle"), parametersPanel); - tabPane.addTab("Lore", lscrollPane); - mainPanel.add(tabPane); + final JPanel shopPanel = createShopPanel(map); + tabs.add(ACTION_FACTORY.getString("mapShopTabTitle"), shopPanel); - // 3. map text panel: - final JPanel mapDataPanel = createMapTextPanel(map); - // set constraints - c.weightx = 1.0; - c.weighty = 1.0; - c.gridwidth = GridBagConstraints.RELATIVE; - gridbag.setConstraints(mapDataPanel, c); - mainPanel.add(mapDataPanel); + final JPanel weatherPanel = createWeatherPanel(map); + tabs.add(ACTION_FACTORY.getString("mapWeatherTabTitle"), weatherPanel); - // 4. map tiling panel: - final JPanel tilePathPanel = createTilePathPanel(map); - // set constraints - c.weightx = 1.0; - c.weighty = 1.0; - gridbag.setConstraints(tilePathPanel, c); - mainPanel.add(tilePathPanel); + final JPanel tilePanel = createTilePathPanel(map); + tabs.add(ACTION_FACTORY.getString("mapTilesTabTitle"), tilePanel); - getContentPane().add(mainPanel, BorderLayout.CENTER); + // The layoutHack is used because otherwise a tabbed pane isn't increased to its vertical size by some OptionPaneUI implementations. + final JPanel layoutHack = new JPanel(new BorderLayout()); + layoutHack.add(tabs); + setMessage(layoutHack); + } - // build the button panel - final JPanel buttonPanel = new JPanel(); - buttonPanel.setLayout(new BorderLayout()); - buttonPanel.add(Box.createGlue()); - final JPanel left_buttons = new JPanel(new FlowLayout(FlowLayout.LEFT)); - final JPanel right_buttons = new JPanel(new FlowLayout(FlowLayout.RIGHT)); + /** Create the map panel. */ + private JPanel createMapPanel(final MapArchObject map) { + final JPanel panel = new JPanel(new GridLayout(0, 1)); - // Help button - JButton button = new JButton("Help"); - button.addActionListener(new ActionListener() { - public void actionPerformed(final ActionEvent event) { - // open the help window - new Help(mainControl.getMainView(), "tut_mapattr.html").setVisible(true); - } - }); - left_buttons.add(button); + panel.add(createPanelLine(mapName, 16, mapControl.getMapName(), "Name")); + panel.add(createPanelLine(mapRegion, 16, map.getMapRegion(), "Region")); + final Size2D mapSize = mapControl.getMapSize(); + panel.add(createPanelLine(levelWidthField, 10, String.valueOf(mapSize.getWidth()), "Width")); + panel.add(createPanelLine(levelHeightField, 10, String.valueOf(mapSize.getHeight()), "Height")); + panel.add(createPanelCBox(checkboxUnique, map.isUnique(), " Unique Map")); + panel.add(createPanelCBox(checkboxOutdoor, map.isOutdoor(), " Outdoor Map")); + panel.add(createPanelCBox(checkboxFixedReset, map.isFixedReset(), " Fixed Reset")); + panel.add(createPanelCBox(checkboxNosmooth, map.isNosmooth(), " Nosmooth Map")); - // OK button - button = new JButton("OK"); - button.addActionListener(new ActionListener() { - public void actionPerformed(final ActionEvent event) { - // try to apply changes, then kill window - if (modifyMapProperties()) { - dispose(); - } - } - }); - right_buttons.add(button); + return panel; + } - // Restore Button - button = new JButton("Restore"); - button.addActionListener(new ActionListener() { - public void actionPerformed(final ActionEvent event) { - // restore to saved values from maparch - restoreMapProperties(); - } - }); - right_buttons.add(button); + /** Create the parameters panel. */ + private JPanel createParametersPanel(final MapArchObject map) { + final JPanel panel = new JPanel(new GridLayout(0, 1)); - // Cancel Button - button = new JButton("Cancel"); - button.addActionListener(new ActionListener() { - public void actionPerformed(final ActionEvent event) { - // kill window - dispose(); - } - }); - right_buttons.add(button); + panel.add(createPanelLine(fieldEnterX, 10, String.valueOf(map.getEnterX()), "Enter X")); + panel.add(createPanelLine(fieldEnterY, 10, String.valueOf(map.getEnterY()), "Enter Y")); + panel.add(createPanelLine(fieldDifficulty, 10, String.valueOf(map.getDifficulty()), "Difficulty")); + panel.add(createPanelLine(fieldDarkness, 10, String.valueOf(map.getDarkness()), "Darkness")); + panel.add(createPanelLine(fieldSwapTime, 10, String.valueOf(map.getSwapTime()), "Swap Time")); + panel.add(createPanelLine(fieldResetTimeout, 10, String.valueOf(map.getResetTimeout()), "Reset Timeout")); - buttonPanel.add(left_buttons, BorderLayout.WEST); - buttonPanel.add(right_buttons, BorderLayout.EAST); - - getContentPane().add(buttonPanel, BorderLayout.SOUTH); - - setBounds(this.mainControl.getMainView().getX() + (this.mainControl.getMainView().getWidth() - 545) / 2, - this.mainControl.getMainView().getY() + (this.mainControl.getMainView().getHeight() - 480) / 2, - 545, 480); - pack(); - setVisible(true); + return panel; } - /** Create the map panel. */ - private JPanel createMapPanel(final MapArchObject map) { - final JPanel mapPanel = new JPanel(new GridLayout(0, 1)); - mapPanel.setBorder( - new CompoundBorder( - new TitledBorder(new EtchedBorder(), "Map"), - new EmptyBorder( - IGUIConstants.DIALOG_INSETS, - IGUIConstants.DIALOG_INSETS, - IGUIConstants.DIALOG_INSETS, - IGUIConstants.DIALOG_INSETS))); + /** Create the shop panel. */ + private JPanel createShopPanel(final MapArchObject map) { + final JPanel panel = new JPanel(new GridLayout(0, 1)); - mapPanel.add(createPanelLine(mapName, 16, mapControl.getMapName(), "Name: ")); - mapPanel.add(createPanelLine(mapRegion, 16, map.getMapRegion(), "Region: ")); - final Size2D mapSize = mapControl.getMapSize(); - mapPanel.add(createPanelLine(levelWidthField, 10, String.valueOf(mapSize.getWidth()), "Width: ")); - mapPanel.add(createPanelLine(levelHeightField, 10, String.valueOf(mapSize.getHeight()), "Height: ")); - mapPanel.add(createPanelCBox(checkboxUnique, map.isUnique(), " Unique Map")); - mapPanel.add(createPanelCBox(checkboxOutdoor, map.isOutdoor(), " Outdoor Map")); - mapPanel.add(createPanelCBox(checkboxFixedReset, map.isFixedReset(), " Fixed Reset")); - mapPanel.add(createPanelCBox(checkboxNosmooth, map.isNosmooth(), " Nosmooth Map")); + panel.add(createPanelLine(fieldShopitems, 10, map.getShopItems(), "Shop Type")); + panel.add(createPanelLine(fieldShopgreed, 10, String.valueOf(map.getShopGreed()), "Shop Greed")); + panel.add(createPanelLine(fieldShopmax, 10, String.valueOf(map.getShopMax()), "Upper Price Limit")); + panel.add(createPanelLine(fieldShopmin, 10, String.valueOf(map.getShopMin()), "Lower Price Limit")); + panel.add(createPanelLine(fieldShoprace, 10, map.getShopRace(), "Shop Race")); - return mapPanel; + return panel; } - /** Create the option panel. */ - private JPanel createOptionPanel(final MapArchObject map) { - final JPanel optionPanel = new JPanel(new GridLayout(1, 1)); - final JPanel optionPanel2 = new JPanel(); - optionPanel2.setLayout(new BoxLayout(optionPanel2, BoxLayout.Y_AXIS)); - final JScrollPane scrollPane2 = new JScrollPane(optionPanel2); - scrollPane2.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_NEVER); - scrollPane2.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS); - scrollPane2.getViewport().setScrollMode(JViewport.SIMPLE_SCROLL_MODE); + /** Create the weather panel. */ + private JPanel createWeatherPanel(final MapArchObject map) { + final JPanel panel = new JPanel(new GridLayout(0, 1)); - optionPanel2.add(createPanelLine(fieldEnterX, 10, String.valueOf(map.getEnterX()), "Enter X: ")); - optionPanel2.add(createPanelLine(fieldEnterY, 10, String.valueOf(map.getEnterY()), "Enter Y: ")); - optionPanel2.add(createPanelLine(fieldDifficulty, 10, String.valueOf(map.getDifficulty()), "Difficulty: ")); - optionPanel2.add(createPanelLine(fieldDarkness, 10, String.valueOf(map.getDarkness()), "Darkness: ")); - optionPanel2.add(createPanelLine(fieldSwapTime, 10, String.valueOf(map.getSwapTime()), "Swap Time: ")); - optionPanel2.add(createPanelLine(fieldResetTimeout, 10, String.valueOf(map.getResetTimeout()), "Reset Timeout: ")); + panel.add(createPanelLine(fieldTemperature, 10, String.valueOf(map.getTemp()), "Temperature")); + panel.add(createPanelLine(fieldPressure, 10, String.valueOf(map.getPressure()), "Pressure")); + panel.add(createPanelLine(fieldHumidity, 10, String.valueOf(map.getHumid()), "Humidity")); + panel.add(createPanelLine(fieldWindspeed, 10, String.valueOf(map.getWindspeed()), "Wind Speed")); + panel.add(createPanelLine(fieldWindDirection, 10, String.valueOf(map.getWinddir()), "Wind Direction")); + panel.add(createPanelLine(fieldSkySetting, 10, String.valueOf(map.getSky()), "Sky Setting")); - optionPanel2.add(createPanelLine(fieldShopitems, 10, map.getShopItems(), "Shop Type: ")); - optionPanel2.add(createPanelLine(fieldShopgreed, 10, String.valueOf(map.getShopGreed()), "Shop Greed: ")); - optionPanel2.add(createPanelLine(fieldShopmax, 10, String.valueOf(map.getShopMax()), "Upper Price Limit: ")); - optionPanel2.add(createPanelLine(fieldShopmin, 10, String.valueOf(map.getShopMin()), "Lower Price Limit: ")); - optionPanel2.add(createPanelLine(fieldShoprace, 10, map.getShopRace(), "Shop Race: ")); + return panel; + } - optionPanel2.add(createPanelLine(fieldTemperature, 10, String.valueOf(map.getTemp()), "Temperature: ")); - optionPanel2.add(createPanelLine(fieldPressure, 10, String.valueOf(map.getPressure()), "Pressure: ")); - optionPanel2.add(createPanelLine(fieldHumidity, 10, String.valueOf(map.getHumid()), "Humidity: ")); - optionPanel2.add(createPanelLine(fieldWindspeed, 10, String.valueOf(map.getWindspeed()), "Wind Speed: ")); - optionPanel2.add(createPanelLine(fieldWindDirection, 10, String.valueOf(map.getWinddir()), "Wind Direction: ")); - optionPanel2.add(createPanelLine(fieldSkySetting, 10, String.valueOf(map.getSky()), "Sky Setting: ")); + /** Create map lore panel. */ + private JPanel createMapLorePanel(final MapArchObject map) { + final JPanel panel = new JPanel(new GridLayout(0, 1)); - optionPanel.add(scrollPane2); + mapLore.setText(mapControl.getMapLore()); + mapLore.setCaretPosition(0); + panel.add(mapLore); - optionPanel.setPreferredSize(new Dimension(240, 185)); - - return optionPanel; + return panel; } /** Create map text panel. */ private JPanel createMapTextPanel(final MapArchObject map) { - final JPanel mapDataPanel = new JPanel(new BorderLayout(1, 1)); - mapDataPanel.setBorder( - new CompoundBorder( - new TitledBorder(new EtchedBorder(), "Map Text"), - new EmptyBorder( - IGUIConstants.DIALOG_INSETS, - IGUIConstants.DIALOG_INSETS, - IGUIConstants.DIALOG_INSETS, - IGUIConstants.DIALOG_INSETS))); + final JPanel panel = new JPanel(new BorderLayout(1, 1)); - final JPanel labelPanel = new JPanel(new BorderLayout(1, 1)); mapDescription.setText(mapControl.getMapText()); mapDescription.setCaretPosition(0); - mapDescription.setBorder(BorderFactory.createEmptyBorder(1, 4, 0, 0)); - final JScrollPane scrollPane = new JScrollPane(mapDescription); - scrollPane.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_NEVER); + panel.add(mapDescription); - labelPanel.add(scrollPane, BorderLayout.CENTER); - mapDataPanel.add(labelPanel); - - return mapDataPanel; + return panel; } /** Create tile path panel. */ private JPanel createTilePathPanel(final MapArchObject map) { - final JPanel tilePathPanel = new JPanel(new GridLayout(IGUIConstants.DIRECTIONS, 2)); - tilePathPanel.setBorder( - new CompoundBorder( - new TitledBorder(new EtchedBorder(), "Paths for Map-Tiling"), - new EmptyBorder( - IGUIConstants.DIALOG_INSETS, - IGUIConstants.DIALOG_INSETS, - IGUIConstants.DIALOG_INSETS, - IGUIConstants.DIALOG_INSETS))); + final JPanel panel = new JPanel(new GridLayout(IGUIConstants.DIRECTIONS, 2)); - tilePathPanel.add(createPanelLine(fieldTilePath[0] = new JTextField(), 16, map.getTilePath(0), "North: ")); - tilePathPanel.add(createPanelLine(fieldTilePath[1] = new JTextField(), 16, map.getTilePath(1), "East: ")); - tilePathPanel.add(createPanelLine(fieldTilePath[2] = new JTextField(), 16, map.getTilePath(2), "South: ")); - tilePathPanel.add(createPanelLine(fieldTilePath[3] = new JTextField(), 16, map.getTilePath(3), "West: ")); - tilePathPanel.add(createPanelLine(fieldTilePath[4] = new JTextField(), 16, map.getTilePath(4), "Top: ")); - tilePathPanel.add(createPanelLine(fieldTilePath[5] = new JTextField(), 16, map.getTilePath(5), "Bottom: ")); + panel.add(createPanelLine(fieldTilePath[0] = new JTextField(), 16, map.getTilePath(0), "North")); + panel.add(createPanelLine(fieldTilePath[1] = new JTextField(), 16, map.getTilePath(1), "East")); + panel.add(createPanelLine(fieldTilePath[2] = new JTextField(), 16, map.getTilePath(2), "South")); + panel.add(createPanelLine(fieldTilePath[3] = new JTextField(), 16, map.getTilePath(3), "West")); + panel.add(createPanelLine(fieldTilePath[4] = new JTextField(), 16, map.getTilePath(4), "Top")); + panel.add(createPanelLine(fieldTilePath[5] = new JTextField(), 16, map.getTilePath(5), "Bottom")); - return tilePathPanel; + return panel; } + /** Action method for help. */ + public void mapHelp() { + new Help(mainControl.getMainView(), "tut_mapattr.html").setVisible(true); + } + + /** Action method for okay. */ + public void mapOkay() { + if (modifyMapProperties()) { + setValue(okButton); + } + } + + /** Action method for restore. */ + public void mapRestore() { + restoreMapProperties(); + } + + /** Action method for cancel. */ + public void mapCancel() { + setValue(cancelButton); + } + /** * Create an "attribute"-line (format: <label> <textfield>) * @param textField textfield @@ -404,13 +324,10 @@ * @param labelKey (attribute-)label key * @return created Checkbox */ - private static JPanel createPanelCBox(final JCheckBox checkBox, final boolean state, final String labelKey) { - final JPanel lineLayout = new JPanel(new FlowLayout(FlowLayout.CENTER)); // layout for this line - //checkBox = new JCheckBox(labelKey); // create checkbox + private static JCheckBox createPanelCBox(final JCheckBox checkBox, final boolean state, final String labelKey) { checkBox.setText(labelKey); - checkBox.setSelected(state); // set to current state - lineLayout.add(checkBox); // add checkbox to line - return lineLayout; + checkBox.setSelected(state); + return checkBox; } /** @@ -660,4 +577,19 @@ == JOptionPane.YES_OPTION; } + /** + * Show a dialog querying the user for map properties. + * @param mainView CMainView to show dialog on + * @param mainControl CMainControl with information + * @param level map to show dialog about + */ + public static void showDialog(final CMainView mainView, final CMainControl mainControl, final MapControl level) { + final MapPropertiesDialog pane = new MapPropertiesDialog(mainControl, level); + final JDialog dialog = pane.createDialog(mainView, ACTION_FACTORY.format("mapTitle", level.getMapArch().getMapDisplayName(), level.getMapFileName())); + dialog.getRootPane().setDefaultButton(pane.okButton); + dialog.setResizable(true); + dialog.setModal(false); + dialog.setVisible(true); + } + } // class MapPropertiesDialog Modified: trunk/crossfire/src/cfeditor/messages.properties =================================================================== --- trunk/crossfire/src/cfeditor/messages.properties 2006-12-03 21:27:19 UTC (rev 840) +++ trunk/crossfire/src/cfeditor/messages.properties 2006-12-03 21:31:17 UTC (rev 841) @@ -3,4 +3,9 @@ # Dialogs - +# Map Properties +mapParametersTabTitle=Parameters +mapShopTabTitle=Shop +mapWeatherTabTitle=Weather +mapTextTabTitle=Description +mapLoreTabTitle=Lore Modified: trunk/daimonin/src/daieditor/messages.properties =================================================================== --- trunk/daimonin/src/daieditor/messages.properties 2006-12-03 21:27:19 UTC (rev 840) +++ trunk/daimonin/src/daieditor/messages.properties 2006-12-03 21:31:17 UTC (rev 841) @@ -160,7 +160,6 @@ loadDuplicateArch.title=Error: Duplicate arch loadDuplicateArch.message=Warning!\n\nDuplicate arch: ''{0}''\nFile: ''{1}''\nI will ignore this duplicate. -mapTitle={0} ({1}) - Map Properties mapMap=Map mapName=Name mapSound=Background sound @@ -200,8 +199,6 @@ mapTilesClear.shortdescription=Clear all path names mapShrink.title=Confirm shrinking map mapShrink.message=You selected a new map size of {0,number,integer} \xD7 {1,number,integer}. If the map was\nresized in this way, some objects would get cut off and deleted.\nAre you really sure you want this? -mapHelp.text=Help -mapRestore.text=Restore mapSizeDefault.text=default map size (24 \xD7 24) mapErrorUnsaved.title=Missing File Path mapErrorUnsaved.message=Can''t attach unsaved map.\nMap must be saved to the map folder first! @@ -227,8 +224,6 @@ mapErrorArchOutOfGrid.message=Removing arch out of map bounds mapErrorDifferentSize.title=Different size mapErrorDifferentSize.message=The maps you''re attaching have different sizes.\n{0} has size {1} \xD7 {2}, while\n{3} has size {4} \xD7 {5}.\nThis is hazardous for server and client and MUST BE FIXED! -mapMapTabTitle=Map properties -mapTilesTabTitle=Map tiles mapTilesNoMapFileNoMapTilePane.title=Map tiles card unavailable mapTilesNoMapFileNoMapTilePane.message=The map has no file name (it wasn''t saved yet).\nA map without filename cannot be attached to other maps.\nTherefore, the Map tiles card is unavailable. mapTileRevert.shortdescription=Revert to stored path Modified: trunk/src/app/net/sf/gridarta/messages.properties =================================================================== --- trunk/src/app/net/sf/gridarta/messages.properties 2006-12-03 21:27:19 UTC (rev 840) +++ trunk/src/app/net/sf/gridarta/messages.properties 2006-12-03 21:31:17 UTC (rev 841) @@ -34,6 +34,13 @@ newPickmapNoName.title=Pickmap name is missing newPickmapNoName.message=You must enter a pickmap name! +# Map Properties +mapTitle={0} ({1}) - Map Properties +mapHelp.text=Help +mapRestore.text=Restore +mapMapTabTitle=Map properties +mapTilesTabTitle=Map tiles + # Other Strings mapWidth=Width mapHeight=Height This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2006-12-03 22:20:03
|
Revision: 848 http://svn.sourceforge.net/gridarta/?rev=848&view=rev Author: akirschbaum Date: 2006-12-03 14:20:03 -0800 (Sun, 03 Dec 2006) Log Message: ----------- Move messages from java code to message file. Modified Paths: -------------- trunk/crossfire/src/cfeditor/gui/map/MapPropertiesDialog.java trunk/daimonin/src/daieditor/messages.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-03 22:14:54 UTC (rev 847) +++ trunk/crossfire/src/cfeditor/gui/map/MapPropertiesDialog.java 2006-12-03 22:20:03 UTC (rev 848) @@ -585,14 +585,7 @@ * @return true if user confirmed, false if user cancelled resize */ private boolean askConfirmResize(final Size2D size) { - return JOptionPane.showConfirmDialog(this, - "You selected a new map size of " + size.getWidth() + "x" + size.getHeight() + ". If the map was\n" + - "resized in this way, some objects would get cut off and deleted.\n" + - "Are you really sure you want this?", - "Confirm", - JOptionPane.YES_NO_OPTION, - JOptionPane.INFORMATION_MESSAGE) - == JOptionPane.YES_OPTION; + return ACTION_FACTORY.showQuestionDialog(this, "mapShrink", size.getWidth(), size.getHeight()); } /** Modified: trunk/daimonin/src/daieditor/messages.properties =================================================================== --- trunk/daimonin/src/daieditor/messages.properties 2006-12-03 22:14:54 UTC (rev 847) +++ trunk/daimonin/src/daieditor/messages.properties 2006-12-03 22:20:03 UTC (rev 848) @@ -197,8 +197,6 @@ mapTilesAttach.shortdescription=Automatically attach the map in all possible directions mapTilesClear.text=Clear Paths mapTilesClear.shortdescription=Clear all path names -mapShrink.title=Confirm shrinking map -mapShrink.message=You selected a new map size of {0,number,integer} \xD7 {1,number,integer}. If the map was\nresized in this way, some objects would get cut off and deleted.\nAre you really sure you want this? mapSizeDefault.text=default map size (24 \xD7 24) mapErrorUnsaved.title=Missing File Path mapErrorUnsaved.message=Can''t attach unsaved map.\nMap must be saved to the map folder first! Modified: trunk/src/app/net/sf/gridarta/messages.properties =================================================================== --- trunk/src/app/net/sf/gridarta/messages.properties 2006-12-03 22:14:54 UTC (rev 847) +++ trunk/src/app/net/sf/gridarta/messages.properties 2006-12-03 22:20:03 UTC (rev 848) @@ -40,6 +40,8 @@ mapRestore.text=Restore mapMapTabTitle=Map properties mapTilesTabTitle=Map tiles +mapShrink.title=Confirm shrinking map +mapShrink.message=You selected a new map size of {0,number,integer} \xD7 {1,number,integer}. If the map was\nresized in this way, some objects would get cut off and deleted.\nAre you really sure you want this? # Other Strings mapWidth=Width This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2006-12-03 23:20:55
|
Revision: 853 http://svn.sourceforge.net/gridarta/?rev=853&view=rev Author: akirschbaum Date: 2006-12-03 15:20:54 -0800 (Sun, 03 Dec 2006) Log Message: ----------- Unify comments and whitespace. Modified Paths: -------------- trunk/crossfire/src/cfeditor/io/CMapWriter.java trunk/crossfire/src/cfeditor/map/DefaultMapModel.java trunk/crossfire/src/cfeditor/map/MapArchObject.java trunk/daimonin/src/daieditor/io/CMapWriter.java trunk/daimonin/src/daieditor/map/MapArchObject.java Modified: trunk/crossfire/src/cfeditor/io/CMapWriter.java =================================================================== --- trunk/crossfire/src/cfeditor/io/CMapWriter.java 2006-12-03 23:07:03 UTC (rev 852) +++ trunk/crossfire/src/cfeditor/io/CMapWriter.java 2006-12-03 23:20:54 UTC (rev 853) @@ -112,7 +112,7 @@ } if (archetype != null && gameObject.getArchTypNr() != archetype.getArchTypNr()) { - // this arch has special type + // this gameObject has special type if (gameObject.getObjectText().indexOf("type ") >= 0) { // oh oh - there might also be a type in the archtext which // is conflicting. remove the type from the archtext Modified: trunk/crossfire/src/cfeditor/map/DefaultMapModel.java =================================================================== --- trunk/crossfire/src/cfeditor/map/DefaultMapModel.java 2006-12-03 23:07:03 UTC (rev 852) +++ trunk/crossfire/src/cfeditor/map/DefaultMapModel.java 2006-12-03 23:20:54 UTC (rev 853) @@ -253,11 +253,9 @@ GameObject newarch; // our new suckers (copys, not ref ptrs) if (archName == null || !isPointValid(pos)) { - // invalid parameter return false; } if (!isMultiArchFittingToMap(archName, pos, allowDouble)) { - // does not fit on map return false; } Modified: trunk/crossfire/src/cfeditor/map/MapArchObject.java =================================================================== --- trunk/crossfire/src/cfeditor/map/MapArchObject.java 2006-12-03 23:07:03 UTC (rev 852) +++ trunk/crossfire/src/cfeditor/map/MapArchObject.java 2006-12-03 23:20:54 UTC (rev 853) @@ -331,6 +331,7 @@ * @param fname file name of the mapfile (relative name, no path) * @return true if reading the MapArchObject succeeded with sane results, * otherwise false + * @throws IOException in case of I/O problems */ public boolean parseMapArch(final BufferedReader reader, final String fname) throws IOException { setFileName(fname); Modified: trunk/daimonin/src/daieditor/io/CMapWriter.java =================================================================== --- trunk/daimonin/src/daieditor/io/CMapWriter.java 2006-12-03 23:07:03 UTC (rev 852) +++ trunk/daimonin/src/daieditor/io/CMapWriter.java 2006-12-03 23:20:54 UTC (rev 853) @@ -76,16 +76,20 @@ // ok, we start with the standard parts... this is valid for all types format.format("arch %s\n", gameObject.getArchetypeName()); + if (gameObject.getObjName() != null) { format.format("name %s\n", gameObject.getObjName()); } + // if (gameObject.getFaceName() != null) { // format.format("face %s\n", gameObject.getFaceName()); // } + final String msgText = gameObject.getMsgText(); if (msgText != null && !msgText.trim().equals(archetype.getMsgText() == null ? "" : archetype.getMsgText().trim())) { format.format("msg\n%s%sendmsg\n", msgText, msgText.endsWith("\n") ? "" : "\n"); } + if (archetype != null && gameObject.getArchTypNr() != archetype.getArchTypNr()) { // this gameObject has special type if (gameObject.getObjectText().contains("type ")) { Modified: trunk/daimonin/src/daieditor/map/MapArchObject.java =================================================================== --- trunk/daimonin/src/daieditor/map/MapArchObject.java 2006-12-03 23:07:03 UTC (rev 852) +++ trunk/daimonin/src/daieditor/map/MapArchObject.java 2006-12-03 23:20:54 UTC (rev 853) @@ -45,7 +45,8 @@ * @todo This class should be changed so map attributes are reflected in a more * generic way like arch attributes. */ -@SuppressWarnings({"HardcodedLineSeparator"}) public final class MapArchObject extends AbstractMapArchObject implements Serializable { +@SuppressWarnings({"HardcodedLineSeparator"}) +public final class MapArchObject extends AbstractMapArchObject implements Serializable { /** Serial Version. */ private static final long serialVersionUID = 1L; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2006-12-04 00:02:05
|
Revision: 868 http://svn.sourceforge.net/gridarta/?rev=868&view=rev Author: akirschbaum Date: 2006-12-03 16:02:05 -0800 (Sun, 03 Dec 2006) Log Message: ----------- Whitespace and comment changes. Modified Paths: -------------- trunk/crossfire/src/cfeditor/gui/map/LevelRenderer.java trunk/daimonin/src/daieditor/gui/map/LevelRenderer.java Modified: trunk/crossfire/src/cfeditor/gui/map/LevelRenderer.java =================================================================== --- trunk/crossfire/src/cfeditor/gui/map/LevelRenderer.java 2006-12-03 23:55:55 UTC (rev 867) +++ trunk/crossfire/src/cfeditor/gui/map/LevelRenderer.java 2006-12-04 00:02:05 UTC (rev 868) @@ -50,4 +50,5 @@ boolean resizeBackBuffer(); void freeBackBuffer(); -} + +} // interface LevelRenderer Modified: trunk/daimonin/src/daieditor/gui/map/LevelRenderer.java =================================================================== --- trunk/daimonin/src/daieditor/gui/map/LevelRenderer.java 2006-12-03 23:55:55 UTC (rev 867) +++ trunk/daimonin/src/daieditor/gui/map/LevelRenderer.java 2006-12-04 00:02:05 UTC (rev 868) @@ -25,5 +25,7 @@ import javax.swing.JComponent; public abstract class LevelRenderer extends JComponent { + public abstract BufferedImage getFullImage(); + } // class LevelRenderer This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2006-12-04 19:21:48
|
Revision: 877 http://svn.sourceforge.net/gridarta/?rev=877&view=rev Author: akirschbaum Date: 2006-12-04 11:21:44 -0800 (Mon, 04 Dec 2006) Log Message: ----------- Move text messages into message file. Modified Paths: -------------- trunk/crossfire/src/cfeditor/gui/map/MapPropertiesDialog.java trunk/crossfire/src/cfeditor/messages.properties trunk/daimonin/src/daieditor/messages.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:17:14 UTC (rev 876) +++ trunk/crossfire/src/cfeditor/gui/map/MapPropertiesDialog.java 2006-12-04 19:21:44 UTC (rev 877) @@ -189,15 +189,15 @@ private JPanel createMapPanel(final MapArchObject map) { final JPanel panel = new JPanel(new GridLayout(0, 1)); - panel.add(createPanelLine(mapName, 16, mapControl.getMapName(), "Name")); - panel.add(createPanelLine(mapRegion, 16, map.getMapRegion(), "Region")); + panel.add(createPanelLine(mapName, 16, mapControl.getMapName(), "mapName")); + panel.add(createPanelLine(mapRegion, 16, map.getMapRegion(), "mapRegion")); final Size2D mapSize = mapControl.getMapSize(); - panel.add(createPanelLine(levelWidthField, 10, String.valueOf(mapSize.getWidth()), "Width")); - panel.add(createPanelLine(levelHeightField, 10, String.valueOf(mapSize.getHeight()), "Height")); - panel.add(createPanelCBox(checkboxUnique, map.isUnique(), " Unique Map")); - panel.add(createPanelCBox(checkboxOutdoor, map.isOutdoor(), " Outdoor Map")); - panel.add(createPanelCBox(checkboxFixedReset, map.isFixedReset(), " Fixed Reset")); - panel.add(createPanelCBox(checkboxNosmooth, map.isNosmooth(), " Nosmooth Map")); + 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(checkboxFixedReset, map.isFixedReset(), "mapFixedReset")); + panel.add(createPanelCBox(checkboxNosmooth, map.isNosmooth(), "mapNosmoothMap")); return panel; } @@ -206,12 +206,12 @@ private JPanel createParametersPanel(final MapArchObject map) { final JPanel panel = new JPanel(new GridLayout(0, 1)); - panel.add(createPanelLine(fieldEnterX, 10, String.valueOf(map.getEnterX()), "Enter X")); - panel.add(createPanelLine(fieldEnterY, 10, String.valueOf(map.getEnterY()), "Enter Y")); - panel.add(createPanelLine(fieldDifficulty, 10, String.valueOf(map.getDifficulty()), "Difficulty")); - panel.add(createPanelLine(fieldDarkness, 10, String.valueOf(map.getDarkness()), "Darkness")); - panel.add(createPanelLine(fieldSwapTime, 10, String.valueOf(map.getSwapTime()), "Swap Time")); - panel.add(createPanelLine(fieldResetTimeout, 10, String.valueOf(map.getResetTimeout()), "Reset Timeout")); + panel.add(createPanelLine(fieldEnterX, 10, String.valueOf(map.getEnterX()), "mapEnterX")); + panel.add(createPanelLine(fieldEnterY, 10, String.valueOf(map.getEnterY()), "mapEnterY")); + panel.add(createPanelLine(fieldDifficulty, 10, String.valueOf(map.getDifficulty()), "mapDifficulty")); + panel.add(createPanelLine(fieldDarkness, 10, String.valueOf(map.getDarkness()), "mapDarkness")); + panel.add(createPanelLine(fieldSwapTime, 10, String.valueOf(map.getSwapTime()), "mapSwapTime")); + panel.add(createPanelLine(fieldResetTimeout, 10, String.valueOf(map.getResetTimeout()), "mapResetTimeout")); return panel; } @@ -220,11 +220,11 @@ private JPanel createShopPanel(final MapArchObject map) { final JPanel panel = new JPanel(new GridLayout(0, 1)); - panel.add(createPanelLine(fieldShopitems, 10, map.getShopItems(), "Shop Type")); - panel.add(createPanelLine(fieldShopgreed, 10, String.valueOf(map.getShopGreed()), "Shop Greed")); - panel.add(createPanelLine(fieldShopmax, 10, String.valueOf(map.getShopMax()), "Upper Price Limit")); - panel.add(createPanelLine(fieldShopmin, 10, String.valueOf(map.getShopMin()), "Lower Price Limit")); - panel.add(createPanelLine(fieldShoprace, 10, map.getShopRace(), "Shop Race")); + panel.add(createPanelLine(fieldShopitems, 10, map.getShopItems(), "mapShopType")); + panel.add(createPanelLine(fieldShopgreed, 10, String.valueOf(map.getShopGreed()), "mapShopGreed")); + panel.add(createPanelLine(fieldShopmax, 10, String.valueOf(map.getShopMax()), "mapUpperPriceLimit")); + panel.add(createPanelLine(fieldShopmin, 10, String.valueOf(map.getShopMin()), "mapLowerPriceLimit")); + panel.add(createPanelLine(fieldShoprace, 10, map.getShopRace(), "mapShopRace")); return panel; } @@ -233,12 +233,12 @@ private JPanel createWeatherPanel(final MapArchObject map) { final JPanel panel = new JPanel(new GridLayout(0, 1)); - panel.add(createPanelLine(fieldTemperature, 10, String.valueOf(map.getTemp()), "Temperature")); - panel.add(createPanelLine(fieldPressure, 10, String.valueOf(map.getPressure()), "Pressure")); - panel.add(createPanelLine(fieldHumidity, 10, String.valueOf(map.getHumid()), "Humidity")); - panel.add(createPanelLine(fieldWindspeed, 10, String.valueOf(map.getWindspeed()), "Wind Speed")); - panel.add(createPanelLine(fieldWindDirection, 10, String.valueOf(map.getWinddir()), "Wind Direction")); - panel.add(createPanelLine(fieldSkySetting, 10, String.valueOf(map.getSky()), "Sky Setting")); + panel.add(createPanelLine(fieldTemperature, 10, String.valueOf(map.getTemp()), "mapTemperature")); + panel.add(createPanelLine(fieldPressure, 10, String.valueOf(map.getPressure()), "mapPressure")); + panel.add(createPanelLine(fieldHumidity, 10, String.valueOf(map.getHumid()), "mapHumidity")); + panel.add(createPanelLine(fieldWindspeed, 10, String.valueOf(map.getWindspeed()), "mapWindSpeed")); + panel.add(createPanelLine(fieldWindDirection, 10, String.valueOf(map.getWinddir()), "mapWindDirection")); + panel.add(createPanelLine(fieldSkySetting, 10, String.valueOf(map.getSky()), "mapSkySetting")); return panel; } @@ -269,12 +269,12 @@ private JPanel createTilePathPanel(final MapArchObject map) { final JPanel panel = new JPanel(new GridLayout(IGUIConstants.DIRECTIONS, 2)); - panel.add(createPanelLine(fieldTilePath[0] = new JTextField(), 16, map.getTilePath(0), "North")); - panel.add(createPanelLine(fieldTilePath[1] = new JTextField(), 16, map.getTilePath(1), "East")); - panel.add(createPanelLine(fieldTilePath[2] = new JTextField(), 16, map.getTilePath(2), "South")); - panel.add(createPanelLine(fieldTilePath[3] = new JTextField(), 16, map.getTilePath(3), "West")); - panel.add(createPanelLine(fieldTilePath[4] = new JTextField(), 16, map.getTilePath(4), "Top")); - panel.add(createPanelLine(fieldTilePath[5] = new JTextField(), 16, map.getTilePath(5), "Bottom")); + panel.add(createPanelLine(fieldTilePath[0] = new JTextField(), 16, map.getTilePath(0), "mapNorth")); + panel.add(createPanelLine(fieldTilePath[1] = new JTextField(), 16, map.getTilePath(1), "mapEast")); + panel.add(createPanelLine(fieldTilePath[2] = new JTextField(), 16, map.getTilePath(2), "mapSouth")); + panel.add(createPanelLine(fieldTilePath[3] = new JTextField(), 16, map.getTilePath(3), "mapWest")); + panel.add(createPanelLine(fieldTilePath[4] = new JTextField(), 16, map.getTilePath(4), "mapTop")); + panel.add(createPanelLine(fieldTilePath[5] = new JTextField(), 16, map.getTilePath(5), "mapBottom")); return panel; } @@ -311,7 +311,7 @@ */ private static JPanel createPanelLine(final JTextField textField, final int n, final String defaultText, final String labelKey) { final JPanel lineLayout = new JPanel(new FlowLayout(FlowLayout.RIGHT)); // layout for this line - lineLayout.add(new JLabel(labelKey)); + lineLayout.add(new JLabel(ACTION_FACTORY.getString(labelKey))); textField.setColumns(n); textField.setText(defaultText); lineLayout.add(textField); @@ -327,8 +327,8 @@ * @return created panel */ private static JPanel createPanelLine(final JFormattedTextField textField, final int n, final Number defaultValue, final String labelKey) { - final JPanel lineLayout = new JPanel(new FlowLayout(FlowLayout.RIGHT)); // layout for this line - lineLayout.add(new JLabel(labelKey)); + final JPanel lineLayout = new JPanel(new FlowLayout(FlowLayout.RIGHT)); + lineLayout.add(new JLabel(ACTION_FACTORY.getString(labelKey))); textField.setColumns(n); textField.setValue(defaultValue); lineLayout.add(textField); @@ -343,7 +343,7 @@ * @return created Checkbox */ private static JCheckBox createPanelCBox(final JCheckBox checkBox, final boolean state, final String labelKey) { - checkBox.setText(labelKey); + checkBox.setText(ACTION_FACTORY.getString(labelKey)); checkBox.setSelected(state); return checkBox; } @@ -395,25 +395,19 @@ // Now do some sanity checks: if (width < 1 || height < 1) { - mainControl.showMessage( - "Illegal Value", - "Level dimensions must be greater than zero."); + ACTION_FACTORY.showMessageDialog(this, "mapErrorIllegalSize"); return false; } - if (t_darkness > 5) { - mainControl.showMessage( - "Illegal Value", - "Darkness level must be in range 0-5."); + if (t_darkness < 0 || t_darkness > 5) { + ACTION_FACTORY.showMessageDialog(this, "mapErrorInvalidDarkness"); return false; } if (mapName.getText().length() == 0) { - mainControl.showMessage( - "missing Map Name", - "You must specify a Map Name."); + ACTION_FACTORY.showMessageDialog(this, "mapErrorMissingMapName"); return false; } } catch (final GridderException e) { - mainControl.showMessage("Invalid Entry", e.getMessage()); + ACTION_FACTORY.showMessageDialog(this, "mapErrorInvalidEntry", e.getMessage()); return false; } Modified: trunk/crossfire/src/cfeditor/messages.properties =================================================================== --- trunk/crossfire/src/cfeditor/messages.properties 2006-12-04 19:17:14 UTC (rev 876) +++ trunk/crossfire/src/cfeditor/messages.properties 2006-12-04 19:21:44 UTC (rev 877) @@ -9,3 +9,23 @@ mapWeatherTabTitle=Weather mapTextTabTitle=Description mapLoreTabTitle=Lore +mapErrorInvalidDarkness.title=Invalid Value +mapErrorInvalidDarkness.message=Darkness level must be in range 0-5. + +mapRegion=Region +mapUniqueMap=Unique map +mapOutdoorMap=Outdoor map +mapNosmoothMap=Nosmooth map +mapShopType=Shop type +mapShopGreed=Greed +mapUpperPriceLimit=Upper price limit +mapLowerPriceLimit=Lower price limit +mapShopRace=Race +mapTemperature=Temperature +mapPressure=Pressure +mapHumidity=Humidity +mapWindSpeed=Wind speed +mapWindDirection=Wind direction +mapSkySetting=Sky setting +mapTop=Top +mapBottom=Bottom Modified: trunk/daimonin/src/daieditor/messages.properties =================================================================== --- trunk/daimonin/src/daieditor/messages.properties 2006-12-04 19:17:14 UTC (rev 876) +++ trunk/daimonin/src/daieditor/messages.properties 2006-12-04 19:21:44 UTC (rev 877) @@ -161,17 +161,9 @@ loadDuplicateArch.message=Warning!\n\nDuplicate arch: ''{0}''\nFile: ''{1}''\nI will ignore this duplicate. mapMap=Map -mapName=Name mapSound=Background sound mapOutdoor=Outdoor -mapFixedReset=Fixed Reset mapOptions=Options -mapEnterX=Enter X -mapEnterY=Enter Y -mapDifficulty=Difficulty -mapDarkness=Darkness -mapSwapTime=Swap Time -mapResetTimeout=Reset Timeout mapNoSave=No Save mapNoMagic=No Magic mapNoPrayers=No Prayers @@ -183,10 +175,6 @@ mapInstantDeath=Instant Death mapPvP=PvP Enabled mapText=Map Text -mapNorth=North -mapEast=East -mapSouth=South -mapWest=West mapNorthEast=Northeast mapNorthWest=Northwest mapSouthEast=Southeast @@ -212,12 +200,6 @@ mapErrorFatalPath.message=Can''t get path\nFatal Error:\n{0} mapErrorFatalWrite.title=Can''t Write Map mapErrorFatalWrite.message=Can''t write map\nFatal Error:\n{0} -mapErrorIllegalSize.title=Illegal Value -mapErrorIllegalSize.message=Level dimensions must be greater than zero. -mapErrorMissingMapName.title=Missing Map Name. -mapErrorMissingMapName.message=You must specify a map name. -mapErrorInvalidEntry.title=Invalid Entry -mapErrorInvalidEntry.message=Invalid Entry:\n{0} mapErrorArchOutOfGrid.title=Arch out of map mapErrorArchOutOfGrid.message=Removing arch out of map bounds mapErrorDifferentSize.title=Different size Modified: trunk/src/app/net/sf/gridarta/messages.properties =================================================================== --- trunk/src/app/net/sf/gridarta/messages.properties 2006-12-04 19:17:14 UTC (rev 876) +++ trunk/src/app/net/sf/gridarta/messages.properties 2006-12-04 19:21:44 UTC (rev 877) @@ -42,6 +42,25 @@ mapTilesTabTitle=Map tiles mapShrink.title=Confirm shrinking map mapShrink.message=You selected a new map size of {0,number,integer} \xD7 {1,number,integer}. If the map was\nresized in this way, some objects would get cut off and deleted.\nAre you really sure you want this? +mapErrorMissingMapName.title=Missing Map Name +mapErrorMissingMapName.message=You must specify a map name. +mapErrorInvalidEntry.title=Invalid Entry +mapErrorInvalidEntry.message=Invalid Entry:\n{0} +mapErrorIllegalSize.title=Illegal Value +mapErrorIllegalSize.message=Level dimensions must be greater than zero. +# attribute fields: +mapName=Name +mapSwapTime=Swap Time +mapFixedReset=Fixed Reset +mapEnterX=Enter X +mapEnterY=Enter Y +mapDifficulty=Difficulty +mapDarkness=Darkness +mapResetTimeout=Reset Timeout +mapNorth=North +mapEast=East +mapSouth=South +mapWest=West # Other Strings mapWidth=Width This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2006-12-04 19:47:01
|
Revision: 882 http://svn.sourceforge.net/gridarta/?rev=882&view=rev Author: akirschbaum Date: 2006-12-04 11:46:55 -0800 (Mon, 04 Dec 2006) Log Message: ----------- Unify comments and order of statements. Modified Paths: -------------- trunk/crossfire/src/cfeditor/gui/map/MapPropertiesDialog.java trunk/daimonin/src/daieditor/gui/map/MapPropertiesDialog.java Modified: trunk/crossfire/src/cfeditor/gui/map/MapPropertiesDialog.java =================================================================== --- trunk/crossfire/src/cfeditor/gui/map/MapPropertiesDialog.java 2006-12-04 19:37:49 UTC (rev 881) +++ trunk/crossfire/src/cfeditor/gui/map/MapPropertiesDialog.java 2006-12-04 19:46:55 UTC (rev 882) @@ -90,8 +90,6 @@ private final JCheckBox checkboxOutdoor = new JCheckBox(); // map outdoor - private final JCheckBox checkboxFixedReset = new JCheckBox(); // fixed reset - private final JCheckBox checkboxNosmooth = new JCheckBox(); // map nosmooth private final JFormattedTextField fieldEnterX = new JFormattedTextField(); // enter x @@ -106,6 +104,8 @@ private final JFormattedTextField fieldDarkness = new JFormattedTextField(); // darkness + private final JCheckBox checkboxFixedReset = new JCheckBox(); // fixed reset + private final JTextField[] fieldTilePath = new JTextField[IGUIConstants.DIRECTIONS]; // tile paths private final JTextField fieldShopitems = new JTextField(); // shopitems @@ -356,24 +356,29 @@ private boolean modifyMapProperties() { boolean modifyTilepaths = false; // true when map tile-paths were modified - // tmp variables for parsing - final int width, height; - final int enterX, enterY; - final int resetTimeout, swapTime; - final int difficulty, darkness; - final int temperature, pressure, humidity; - final int windSpeed, windDirection, skySetting; + // first check if the entries are all okay + final int darkness; + final int difficulty; + final int swapTime; + final int resetTimeout; + final int temperature; + final int pressure; + final int humidity; + final int windSpeed; + final int windDirection; + final int skySetting; final double shopGreedd; - final int shopMax, shopMin; - final String shopItems, shopRace; + final int shopMin, shopMax; + final String shopItems; + final String shopRace; final String region; - - // first check if the entries are all okay Size2D mapSize; + final int enterX; + final int enterY; try { // try to parse everything - width = parseProperty(levelWidthField.getText(), "Width"); - height = parseProperty(levelHeightField.getText(), "Height"); + final int width = parseProperty(levelWidthField.getText(), "Width"); + final int height = parseProperty(levelHeightField.getText(), "Height"); enterX = parseProperty(fieldEnterX.getText(), "Enter X"); enterY = parseProperty(fieldEnterY.getText(), "Enter Y"); swapTime = parseProperty(fieldSwapTime.getText(), "Swap Time"); @@ -433,10 +438,10 @@ map.setResetTimeout(resetTimeout); map.setSwapTime(swapTime); map.setDifficulty(difficulty); + map.setFixedReset(checkboxFixedReset.isSelected()); map.setDarkness(darkness); map.setUnique(checkboxUnique.isSelected()); map.setOutdoor(checkboxOutdoor.isSelected()); - map.setFixedReset(checkboxFixedReset.isSelected()); map.setNosmooth(checkboxNosmooth.isSelected()); map.setShopItems(shopItems); Modified: trunk/daimonin/src/daieditor/gui/map/MapPropertiesDialog.java =================================================================== --- trunk/daimonin/src/daieditor/gui/map/MapPropertiesDialog.java 2006-12-04 19:37:49 UTC (rev 881) +++ trunk/daimonin/src/daieditor/gui/map/MapPropertiesDialog.java 2006-12-04 19:46:55 UTC (rev 882) @@ -98,13 +98,12 @@ private final JFormattedTextField fieldResetTimeout = new JFormattedTextField(); // reset timeout - private final JFormattedTextField fieldDifficulty = new JFormattedTextField(); // map fieldDifficulty + private final JFormattedTextField fieldDifficulty = new JFormattedTextField(); // map difficulty - private final JFormattedTextField fieldDarkness = new JFormattedTextField(); // fieldDarkness + private final JFormattedTextField fieldDarkness = new JFormattedTextField(); // darkness private final JCheckBox checkboxFixedReset = new JCheckBox(); // fixed reset - // only for ISO: private final JCheckBox checkboxNoSave = new JCheckBox(); private final JCheckBox checkboxNoMagic = new JCheckBox(); @@ -383,8 +382,8 @@ final int swapTime; final int resetTimeout; Size2D mapSize; - final int enterY; final int enterX; + final int enterY; try { // try to parse everything final int width = parseProperty(levelWidthField.getText(), "Width"); @@ -448,7 +447,6 @@ map.setDarkness(darkness); map.setOutdoor(checkboxOutdoor.isSelected()); - // these flags are for daimonin only map.setNoSave(checkboxNoSave.isSelected()); map.setNoMagic(checkboxNoMagic.isSelected()); map.setNoPriest(checkboxNoPriest.isSelected()); 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. |
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 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 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: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-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: <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 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 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 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. |