You can subscribe to this list here.
2006 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(103) |
Jun
(121) |
Jul
(16) |
Aug
(67) |
Sep
(126) |
Oct
(161) |
Nov
(164) |
Dec
(588) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2007 |
Jan
(394) |
Feb
(181) |
Mar
(131) |
Apr
(180) |
May
(255) |
Jun
(11) |
Jul
(79) |
Aug
(70) |
Sep
(274) |
Oct
(138) |
Nov
(195) |
Dec
(8) |
2008 |
Jan
(3) |
Feb
(142) |
Mar
(162) |
Apr
(124) |
May
(148) |
Jun
(157) |
Jul
(425) |
Aug
(373) |
Sep
(264) |
Oct
(315) |
Nov
(225) |
Dec
(6) |
2009 |
Jan
(67) |
Feb
(78) |
Mar
(279) |
Apr
(294) |
May
(92) |
Jun
(65) |
Jul
(134) |
Aug
(41) |
Sep
(138) |
Oct
(125) |
Nov
(126) |
Dec
(122) |
2010 |
Jan
(15) |
Feb
(48) |
Mar
(9) |
Apr
(195) |
May
(373) |
Jun
(507) |
Jul
(42) |
Aug
(16) |
Sep
(38) |
Oct
(81) |
Nov
(64) |
Dec
(18) |
2011 |
Jan
(13) |
Feb
(12) |
Mar
(39) |
Apr
(1) |
May
(2) |
Jun
(27) |
Jul
(27) |
Aug
(31) |
Sep
(14) |
Oct
(102) |
Nov
(20) |
Dec
(37) |
2012 |
Jan
(22) |
Feb
(1) |
Mar
(1) |
Apr
(2) |
May
(2) |
Jun
(18) |
Jul
(6) |
Aug
(1) |
Sep
(1) |
Oct
|
Nov
|
Dec
|
2013 |
Jan
(1) |
Feb
(2) |
Mar
(1) |
Apr
(1) |
May
(47) |
Jun
(7) |
Jul
(107) |
Aug
|
Sep
|
Oct
(112) |
Nov
(31) |
Dec
(17) |
2014 |
Jan
(29) |
Feb
(111) |
Mar
(34) |
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(2) |
Nov
(18) |
Dec
(10) |
From: <aki...@us...> - 2011-01-23 19:24:42
|
Revision: 8835 http://gridarta.svn.sourceforge.net/gridarta/?rev=8835&view=rev Author: akirschbaum Date: 2011-01-23 19:24:29 +0000 (Sun, 23 Jan 2011) Log Message: ----------- Fix Javadoc issues. Modified Paths: -------------- trunk/atrinik/src/app/net/sf/gridarta/var/atrinik/gui/mappropertiesdialog/DefaultMapPropertiesDialogFactory.java trunk/atrinik/src/app/net/sf/gridarta/var/atrinik/gui/mappropertiesdialog/MapPropertiesDialog.java trunk/build.xml trunk/crossfire/resource/resource/conf/types.xml trunk/crossfire/src/app/net/sf/gridarta/var/crossfire/gui/map/renderer/SmoothingRenderer.java trunk/crossfire/src/app/net/sf/gridarta/var/crossfire/gui/mappropertiesdialog/DefaultMapPropertiesDialogFactory.java trunk/crossfire/src/app/net/sf/gridarta/var/crossfire/gui/mappropertiesdialog/MapPropertiesDialog.java trunk/crossfire/src/app/net/sf/gridarta/var/crossfire/maincontrol/CrossfireEditor.java trunk/crossfire/src/app/net/sf/gridarta/var/crossfire/model/io/DefaultGameObjectParser.java trunk/crossfire/src/app/net/sf/gridarta/var/crossfire/model/maparchobject/MapArchObject.java trunk/crossfire/src/app/net/sf/gridarta/var/crossfire/model/scripts/DefaultScriptedEvent.java trunk/daimonin/src/app/net/sf/gridarta/var/daimonin/gui/mappropertiesdialog/DefaultMapPropertiesDialogFactory.java trunk/daimonin/src/app/net/sf/gridarta/var/daimonin/gui/mappropertiesdialog/MapPropertiesDialog.java trunk/model/src/app/net/sf/gridarta/model/anim/AbstractAnimationObjects.java trunk/model/src/app/net/sf/gridarta/model/anim/AnimationObject.java trunk/model/src/app/net/sf/gridarta/model/anim/AnimationObjects.java trunk/model/src/app/net/sf/gridarta/model/anim/AnimationValidator.java trunk/model/src/app/net/sf/gridarta/model/anim/DefaultAnimationObject.java trunk/model/src/app/net/sf/gridarta/model/anim/DefaultAnimationObjects.java trunk/model/src/app/net/sf/gridarta/model/archetype/AbstractArchetypeBuilder.java trunk/model/src/app/net/sf/gridarta/model/archetype/Archetype.java trunk/model/src/app/net/sf/gridarta/model/archetype/ArchetypeFactory.java trunk/model/src/app/net/sf/gridarta/model/archetype/ArchetypeSet.java trunk/model/src/app/net/sf/gridarta/model/archetypechooser/ArchetypeChooserFolder.java trunk/model/src/app/net/sf/gridarta/model/archetypechooser/ArchetypeChooserModel.java trunk/model/src/app/net/sf/gridarta/model/archetypechooser/ArchetypeChooserPanel.java trunk/model/src/app/net/sf/gridarta/model/archetypetype/AbstractArchetypeAttributeSpell.java trunk/model/src/app/net/sf/gridarta/model/archetypetype/ArchetypeType.java trunk/model/src/app/net/sf/gridarta/model/archetypetype/ArchetypeTypeSet.java trunk/model/src/app/net/sf/gridarta/model/autojoin/AutojoinList.java trunk/model/src/app/net/sf/gridarta/model/autojoin/AutojoinLists.java trunk/model/src/app/net/sf/gridarta/model/autojoin/InsertionResult.java trunk/model/src/app/net/sf/gridarta/model/baseobject/AbstractBaseObject.java trunk/model/src/app/net/sf/gridarta/model/baseobject/BaseObject.java trunk/model/src/app/net/sf/gridarta/model/baseobject/GameObjectContainer.java trunk/model/src/app/net/sf/gridarta/model/baseobject/GameObjectText.java trunk/model/src/app/net/sf/gridarta/model/configsource/ConfigSourceFactory.java trunk/model/src/app/net/sf/gridarta/model/connectionview/Connections.java trunk/model/src/app/net/sf/gridarta/model/data/AbstractNamedObjects.java trunk/model/src/app/net/sf/gridarta/model/data/NamedTreeNode.java trunk/model/src/app/net/sf/gridarta/model/face/DefaultFaceObject.java trunk/model/src/app/net/sf/gridarta/model/face/DefaultFaceObjects.java trunk/model/src/app/net/sf/gridarta/model/face/FaceObjectProviders.java trunk/model/src/app/net/sf/gridarta/model/face/FaceObjects.java trunk/model/src/app/net/sf/gridarta/model/filter/Filter.java trunk/model/src/app/net/sf/gridarta/model/gameobject/AbstractIsoGameObjectFactory.java trunk/model/src/app/net/sf/gridarta/model/gameobject/DefaultIsoGameObject.java trunk/model/src/app/net/sf/gridarta/model/gameobject/GameObject.java trunk/model/src/app/net/sf/gridarta/model/gameobject/GameObjectUtils.java trunk/model/src/app/net/sf/gridarta/model/gameobject/MultiArchData.java trunk/model/src/app/net/sf/gridarta/model/gameobject/NotInsideContainerException.java trunk/model/src/app/net/sf/gridarta/model/index/IndexListener.java trunk/model/src/app/net/sf/gridarta/model/io/AbstractGameObjectParser.java trunk/model/src/app/net/sf/gridarta/model/io/AbstractMapArchObjectParser.java trunk/model/src/app/net/sf/gridarta/model/io/DefaultMapReader.java trunk/model/src/app/net/sf/gridarta/model/io/GameObjectParser.java trunk/model/src/app/net/sf/gridarta/model/io/MapReader.java trunk/model/src/app/net/sf/gridarta/model/io/PathManager.java trunk/model/src/app/net/sf/gridarta/model/maparchobject/MapArchObject.java trunk/model/src/app/net/sf/gridarta/model/mapcursor/MapCursorListener.java trunk/model/src/app/net/sf/gridarta/model/mapgrid/MapGrid.java trunk/model/src/app/net/sf/gridarta/model/mapgrid/MapGridEvent.java trunk/model/src/app/net/sf/gridarta/model/mapgrid/MapGridListener.java trunk/model/src/app/net/sf/gridarta/model/mapmanager/MapManager.java trunk/model/src/app/net/sf/gridarta/model/mapmodel/DefaultMapModel.java trunk/model/src/app/net/sf/gridarta/model/mapmodel/InsertionModeSet.java trunk/model/src/app/net/sf/gridarta/model/mapmodel/MapModel.java trunk/model/src/app/net/sf/gridarta/model/mapmodel/MapModelFactory.java trunk/model/src/app/net/sf/gridarta/model/mapmodel/MapSquare.java trunk/model/src/app/net/sf/gridarta/model/mapmodel/MapTransactionListener.java trunk/model/src/app/net/sf/gridarta/model/mappathnormalizer/MapPathNormalizer.java trunk/model/src/app/net/sf/gridarta/model/mapviewsettings/MapViewSettings.java trunk/model/src/app/net/sf/gridarta/model/match/AndGameObjectMatcher.java trunk/model/src/app/net/sf/gridarta/model/match/GameObjectMatcher.java trunk/model/src/app/net/sf/gridarta/model/match/GameObjectMatcherParser.java trunk/model/src/app/net/sf/gridarta/model/match/GameObjectMatchersParser.java trunk/model/src/app/net/sf/gridarta/model/match/MutableOrGameObjectMatcher.java trunk/model/src/app/net/sf/gridarta/model/match/ViewGameObjectMatcherManager.java trunk/model/src/app/net/sf/gridarta/model/resource/AbstractResourcesReader.java trunk/model/src/app/net/sf/gridarta/model/scripts/AbstractScriptedEventFactory.java trunk/model/src/app/net/sf/gridarta/model/settings/AbstractGlobalSettings.java trunk/model/src/app/net/sf/gridarta/model/spells/ArchetypeSetSpellLoader.java trunk/model/src/app/net/sf/gridarta/model/spells/GameObjectSpell.java trunk/model/src/app/net/sf/gridarta/model/spells/NumberSpell.java trunk/model/src/app/net/sf/gridarta/model/spells/Spell.java trunk/model/src/app/net/sf/gridarta/model/spells/Spells.java trunk/model/src/app/net/sf/gridarta/model/spells/XMLSpellLoader.java trunk/model/src/app/net/sf/gridarta/model/treasurelist/TreasureLoader.java trunk/model/src/app/net/sf/gridarta/model/treasurelist/TreasureObj.java trunk/model/src/app/net/sf/gridarta/model/undo/UndoModel.java trunk/model/src/app/net/sf/gridarta/model/validation/checks/AttributeRangeChecker.java trunk/model/src/app/net/sf/gridarta/model/validation/checks/BlockedSquareChecker.java trunk/model/src/app/net/sf/gridarta/model/validation/checks/ConnectionChecker.java trunk/model/src/app/net/sf/gridarta/model/validation/checks/CustomTypeChecker.java trunk/model/src/app/net/sf/gridarta/model/validation/checks/Range.java trunk/model/src/app/net/sf/gridarta/model/validation/errors/BlockedMobOrSpawnPointError.java trunk/model/src/app/net/sf/gridarta/model/validation/errors/ExitError.java trunk/model/src/app/net/sf/gridarta/model/validation/errors/MapDifficultyError.java trunk/model/src/app/net/sf/gridarta/model/validation/errors/ValidationError.java trunk/preferences/src/app/net/sf/gridarta/preferences/Codec.java trunk/preferences/src/app/net/sf/gridarta/preferences/FilePreferences.java trunk/preferences/src/app/net/sf/gridarta/preferences/FilePreferencesFactory.java trunk/preferences/src/app/net/sf/gridarta/preferences/FilePreferencesNode.java trunk/preferences/src/app/net/sf/gridarta/preferences/FilePreferencesRoot.java trunk/preferences/src/app/net/sf/gridarta/preferences/NodeType.java trunk/preferences/src/app/net/sf/gridarta/preferences/Storage.java trunk/script/src/app/net/sf/gridarta/script/BshThread.java trunk/script/src/app/net/sf/gridarta/script/ScriptModel.java trunk/script/src/app/net/sf/gridarta/script/ScriptModelLoader.java trunk/src/app/net/sf/gridarta/actions/AttachTiledMaps.java trunk/src/app/net/sf/gridarta/actions/ExitConnectorActions.java trunk/src/app/net/sf/gridarta/commands/Collector.java trunk/src/app/net/sf/gridarta/gui/archetypechooser/ArchetypeChooserControl.java trunk/src/app/net/sf/gridarta/gui/archetypetype/ArchetypeTypeChecks.java trunk/src/app/net/sf/gridarta/gui/autovalidator/AutoValidator.java trunk/src/app/net/sf/gridarta/gui/connectionview/Connection.java trunk/src/app/net/sf/gridarta/gui/connectionview/ConnectionView.java trunk/src/app/net/sf/gridarta/gui/connectionview/LockedItemsView.java trunk/src/app/net/sf/gridarta/gui/connectionview/MonsterView.java trunk/src/app/net/sf/gridarta/gui/delayedmapmodel/DelayedMapModelListenerManager.java trunk/src/app/net/sf/gridarta/gui/filter/DefaultFilterControl.java trunk/src/app/net/sf/gridarta/gui/filter/MenuItemCreator.java trunk/src/app/net/sf/gridarta/gui/findarchetypes/FindArchetypesDialog.java trunk/src/app/net/sf/gridarta/gui/findarchetypes/TableModel.java trunk/src/app/net/sf/gridarta/gui/gameobjectattributesdialog/DialogAttributeBoolSpec.java trunk/src/app/net/sf/gridarta/gui/gameobjectattributesdialog/GameObjectAttributesDialog.java trunk/src/app/net/sf/gridarta/gui/gameobjectattributespanel/ErrorListView.java trunk/src/app/net/sf/gridarta/gui/gameobjectattributespanel/EventsTab.java trunk/src/app/net/sf/gridarta/gui/gameobjectattributespanel/GameObjectAttributesControl.java trunk/src/app/net/sf/gridarta/gui/map/AbstractPerMapDialogManager.java trunk/src/app/net/sf/gridarta/gui/map/MapPreviewAccessory.java trunk/src/app/net/sf/gridarta/gui/map/event/MouseOpEvent.java trunk/src/app/net/sf/gridarta/gui/map/maptilepane/MapTilePanel.java trunk/src/app/net/sf/gridarta/gui/map/mapview/DefaultMapView.java trunk/src/app/net/sf/gridarta/gui/map/mapview/DefaultMapViewBasic.java trunk/src/app/net/sf/gridarta/gui/map/mapview/MapView.java trunk/src/app/net/sf/gridarta/gui/map/mapview/MapViewBasic.java trunk/src/app/net/sf/gridarta/gui/map/mapview/MapViewManager.java trunk/src/app/net/sf/gridarta/gui/map/mapview/MapViews.java trunk/src/app/net/sf/gridarta/gui/map/mapview/MapViewsManager.java trunk/src/app/net/sf/gridarta/gui/map/renderer/AbstractIsoMapRenderer.java trunk/src/app/net/sf/gridarta/gui/map/renderer/AbstractMapRenderer.java trunk/src/app/net/sf/gridarta/gui/map/renderer/AbstractSimpleIsoMapRenderer.java trunk/src/app/net/sf/gridarta/gui/map/renderer/MapRenderer.java trunk/src/app/net/sf/gridarta/gui/map/tools/ToolPalette.java trunk/src/app/net/sf/gridarta/gui/map/tools/ToolSelector.java trunk/src/app/net/sf/gridarta/gui/mapcursor/MapCursorActions.java trunk/src/app/net/sf/gridarta/gui/mapdesktop/MapDesktop.java trunk/src/app/net/sf/gridarta/gui/mapdesktop/WindowAction.java trunk/src/app/net/sf/gridarta/gui/mapfiles/MapFileNameComparator.java trunk/src/app/net/sf/gridarta/gui/mapfiles/MapFolder.java trunk/src/app/net/sf/gridarta/gui/mapfiles/MapFolderListener.java trunk/src/app/net/sf/gridarta/gui/mapfiles/MapFolderTree.java trunk/src/app/net/sf/gridarta/gui/mapfiles/MapFolderTreeListener.java trunk/src/app/net/sf/gridarta/gui/mapimagecache/MapImageCache.java trunk/src/app/net/sf/gridarta/gui/misc/ShiftProcessor.java trunk/src/app/net/sf/gridarta/gui/misc/StatusBar.java trunk/src/app/net/sf/gridarta/gui/newmap/AbstractMapsizeNewMapDialog.java trunk/src/app/net/sf/gridarta/gui/newmap/AbstractNewMapDialog.java trunk/src/app/net/sf/gridarta/gui/newmap/NewMapDialog.java trunk/src/app/net/sf/gridarta/gui/newmap/NewPickmapDialog.java trunk/src/app/net/sf/gridarta/gui/pickmapchooser/PickmapChooserControl.java trunk/src/app/net/sf/gridarta/gui/prefs/MapValidatorPreferences.java trunk/src/app/net/sf/gridarta/gui/prefs/MiscPreferences.java trunk/src/app/net/sf/gridarta/gui/replacedialog/ReplaceDialog.java trunk/src/app/net/sf/gridarta/gui/script/ClosingIcon.java trunk/src/app/net/sf/gridarta/gui/script/ScriptController.java trunk/src/app/net/sf/gridarta/gui/script/ScriptManager.java trunk/src/app/net/sf/gridarta/gui/scripts/PathButtonListener.java trunk/src/app/net/sf/gridarta/gui/selectedsquare/MapSquareSelection.java trunk/src/app/net/sf/gridarta/gui/selectedsquare/SelectedSquareActions.java trunk/src/app/net/sf/gridarta/gui/selectedsquare/SelectedSquareModel.java trunk/src/app/net/sf/gridarta/gui/spells/SpellsUtils.java trunk/src/app/net/sf/gridarta/gui/treasurelist/TreasureCellRenderer.java trunk/src/app/net/sf/gridarta/gui/utils/DirectionLayout.java trunk/src/app/net/sf/gridarta/gui/utils/GSplitPane.java trunk/src/app/net/sf/gridarta/gui/utils/SwingUtils.java trunk/src/app/net/sf/gridarta/gui/utils/tristate/TristateState.java trunk/src/app/net/sf/gridarta/mainactions/DefaultExiter.java trunk/src/app/net/sf/gridarta/updater/Updater.java trunk/src/test/net/sf/gridarta/gui/map/mapview/TestMapView.java trunk/src/test/net/sf/gridarta/gui/utils/GSplitPaneTestApplication.java trunk/test-mapvalidator/daimonin/arch/dev/editor/conf/GameObjectMatchers.xml trunk/test-mapvalidator/daimonin/arch/dev/editor/conf/TreasureLists.xml trunk/test-mapvalidator/daimonin/arch/dev/editor/conf/spells.xml trunk/test-mapvalidator/daimonin/arch/dev/editor/conf/types.xml trunk/textedit/src/app/net/sf/gridarta/textedit/scripteditor/CFPythonPopup.java trunk/textedit/src/app/net/sf/gridarta/textedit/scripteditor/ScriptEditUndoActions.java trunk/textedit/src/app/net/sf/gridarta/textedit/scripteditor/ScriptEditView.java trunk/textedit/src/app/net/sf/gridarta/textedit/textarea/SyntaxStyle.java trunk/textedit/src/app/net/sf/gridarta/textedit/textarea/Token.java trunk/textedit/src/app/net/sf/gridarta/textedit/textarea/actions/Replace.java trunk/textedit/src/app/net/sf/gridarta/textedit/textarea/tokenmarker/CTokenMarker.java trunk/textedit/src/app/net/sf/gridarta/textedit/textarea/tokenmarker/KeywordMap.java trunk/textedit/src/app/net/sf/gridarta/textedit/textarea/tokenmarker/Node.java trunk/textedit/src/app/net/sf/gridarta/textedit/textarea/tokenmarker/TokenMarker.java trunk/textedit/src/app/net/sf/gridarta/textedit/textarea/tokenmarker/TokenMarkerFactory.java trunk/utils/src/app/net/sf/gridarta/utils/ConfigFileUtils.java trunk/utils/src/app/net/sf/gridarta/utils/CopyReader.java trunk/utils/src/app/net/sf/gridarta/utils/FileChooserUtils.java trunk/utils/src/app/net/sf/gridarta/utils/FileFilters.java trunk/utils/src/app/net/sf/gridarta/utils/GuiFileFilters.java trunk/utils/src/app/net/sf/gridarta/utils/StringUtils.java trunk/utils/src/app/net/sf/gridarta/utils/XmlHelper.java trunk/utils/src/test/net/sf/gridarta/utils/HideFileFilterProxyTest.java trunk/utils/src/test/net/sf/gridarta/utils/TestActionBuilder.java Modified: trunk/atrinik/src/app/net/sf/gridarta/var/atrinik/gui/mappropertiesdialog/DefaultMapPropertiesDialogFactory.java =================================================================== --- trunk/atrinik/src/app/net/sf/gridarta/var/atrinik/gui/mappropertiesdialog/DefaultMapPropertiesDialogFactory.java 2011-01-23 17:32:56 UTC (rev 8834) +++ trunk/atrinik/src/app/net/sf/gridarta/var/atrinik/gui/mappropertiesdialog/DefaultMapPropertiesDialogFactory.java 2011-01-23 19:24:29 UTC (rev 8835) @@ -53,7 +53,7 @@ /** * The {@link MapPathNormalizer} for converting map paths to {@link - * java.io.File}s. + * java.io.File Files}. */ @NotNull private final MapPathNormalizer mapPathNormalizer; Modified: trunk/atrinik/src/app/net/sf/gridarta/var/atrinik/gui/mappropertiesdialog/MapPropertiesDialog.java =================================================================== --- trunk/atrinik/src/app/net/sf/gridarta/var/atrinik/gui/mappropertiesdialog/MapPropertiesDialog.java 2011-01-23 17:32:56 UTC (rev 8834) +++ trunk/atrinik/src/app/net/sf/gridarta/var/atrinik/gui/mappropertiesdialog/MapPropertiesDialog.java 2011-01-23 19:24:29 UTC (rev 8835) @@ -569,8 +569,9 @@ /** * Creates a border to be used in dialogs to frame dialog component groups. - * @param key i18n Key to look up the l10n title using the ActionBuilder - * @return Border + * @param key the i18n Key for looking up the l10n title using the + * ActionBuilder + * @return the border */ @NotNull private static Border createTitledBorder(@NotNull final String key) { Modified: trunk/build.xml =================================================================== --- trunk/build.xml 2011-01-23 17:32:56 UTC (rev 8834) +++ trunk/build.xml 2011-01-23 19:24:29 UTC (rev 8835) @@ -1162,10 +1162,9 @@ <target name="preparePublish-atrinik" description="Prepare files to publish AtrinikEditor.jar." depends="jar" if="user.update.url.atrinik"> <mkdir dir="${dist.dir}/atrinik"/> <echo file="${dist.dir}/atrinik/update.properties"> -update.number=${build.number} -update.tstamp=${build.tstamp} -update.developer=${build.developer} -update.url=${user.update.url.atrinik} + update.number=${build.number} update.tstamp=${build.tstamp} + update.developer=${build.developer} + update.url=${user.update.url.atrinik} </echo> <copy file="AtrinikEditor.jar" tofile="${dist.dir}/atrinik/AtrinikEditor.jar"/> </target> @@ -1173,10 +1172,9 @@ <target name="preparePublish-crossfire" description="Prepare files to publish CrossfireEditor.jar." depends="jar" if="user.update.url.crossfire"> <mkdir dir="${dist.dir}/crossfire"/> <echo file="${dist.dir}/crossfire/update.properties"> -update.number=${build.number} -update.tstamp=${build.tstamp} -update.developer=${build.developer} -update.url=${user.update.url.crossfire} + update.number=${build.number} update.tstamp=${build.tstamp} + update.developer=${build.developer} + update.url=${user.update.url.crossfire} </echo> <copy file="CrossfireEditor.jar" tofile="${dist.dir}/crossfire/CrossfireEditor.jar"/> </target> @@ -1184,10 +1182,9 @@ <target name="preparePublish-daimonin" description="Prepare files to publish DaimoninEditor.jar." depends="jar" if="user.update.url.daimonin"> <mkdir dir="${dist.dir}/daimonin"/> <echo file="${dist.dir}/daimonin/update.properties"> -update.number=${build.number} -update.tstamp=${build.tstamp} -update.developer=${build.developer} -update.url=${user.update.url.daimonin} + update.number=${build.number} update.tstamp=${build.tstamp} + update.developer=${build.developer} + update.url=${user.update.url.daimonin} </echo> <copy file="DaimoninEditor.jar" tofile="${dist.dir}/daimonin/DaimoninEditor.jar"/> </target> Modified: trunk/crossfire/resource/resource/conf/types.xml =================================================================== --- trunk/crossfire/resource/resource/conf/types.xml 2011-01-23 17:32:56 UTC (rev 8834) +++ trunk/crossfire/resource/resource/conf/types.xml 2011-01-23 19:24:29 UTC (rev 8835) @@ -699,9 +699,9 @@ <attribute arch="wc" editor="weapon class" type="int" min="-128" max="127"> The <weapon class> value adds to the overall weapon class of the wielder's melee attacks. Weapon class improves the chance of - hitting the opponent. Weapon class is the "counter piece" of - <armor class>. It should usually be set only for weapon-like - items. Lower values are better. + hitting the opponent. Weapon class is the "counter piece" of <armor + class>. It should usually be set only for weapon-like items. + Lower values are better. </attribute> <attribute arch="item_power" editor="item power" type="int"> The <item power> value measures how "powerful" an artifact is. @@ -1311,10 +1311,9 @@ "arrows" and "keys". Unfortunately it is not easy to create new container classes, - because items need a matching counter piece attribute to the - <container class> before they can be put inside a container. - This attribute ("race") is set only for the existing container - classes. + because items need a matching counter piece attribute to the <container + class> before they can be put inside a container. This attribute + ("race") is set only for the existing container classes. </attribute> <attribute arch="slaying" editor="key string" type="string"> If <key string> is set, only players with a special key of @@ -1527,10 +1526,9 @@ areas too much, because that freaks out wizard-type players. ]]> </use> <attribute arch="sp" editor="direction" type="list_direction"> - Projectiles will leave the director flying in the selected - <direction>. A director with direction <none> simply - stops projectiles. (The latter works out a bit strange for some - spells). + Projectiles will leave the director flying in the selected <direction>. + A director with direction <none> simply stops projectiles. + (The latter works out a bit strange for some spells). </attribute> <attribute arch="move_on" editor="affected movement" type="bitmask_movement"> The movement types this director affects. @@ -1581,16 +1579,16 @@ catching it. </attribute> <attribute arch="last_grace" editor="attenuation" type="int" min="0" max="32767"> - The <attenuation> value reduces the diseases' - <infectiousness> every time it infects someone new. This - limits how many generations a disease can propagate. + The <attenuation> value reduces the diseases' <infectiousness> + every time it infects someone new. This limits how many + generations a disease can propagate. </attribute> <attribute arch="magic" editor="infection range" type="int"> <infection range> sets the range at which infection may occur. If positive, the <infection range> is level - dependant - If negative, it is not: E.g. "<infection - range> -6" means creatures can be infected in six square - range, and <plaque level> doesn't modify that. + dependant - If negative, it is not: E.g. "<infection range> + -6" means creatures can be infected in six square range, and + <plaque level> doesn't modify that. </attribute> <attribute arch="maxhp" editor="persistence" type="int" min="-32768" max="32767"> <persistence> defines how long the disease can persist @@ -1620,16 +1618,16 @@ </section> <section name="symptoms"> <attribute arch="attacktype" editor="attacktype" type="bitmask_attacktype"> - The disease will attack the host with the given - <attacktype>. Godpower attacktype is commonly used for - "unresistable" diseases. + The disease will attack the host with the given <attacktype>. + Godpower attacktype is commonly used for "unresistable" + diseases. </attribute> <attribute arch="dam" editor="damage" type="int" min="-100" max="32767"> A disease with a positive <damage> value will strike the player for that amount of damage every time the symptoms occur. - A negative <damage> value produces %-based damage: - "<damage> -10" means the player's health is reduced by - 10% every time the symptoms strike. + A negative <damage> value produces %-based damage: "<damage> + -10" means the player's health is reduced by 10% every time the + symptoms strike. Diseases with %-based damage can be dangerous - but not deadly - for players of all levels. @@ -1730,9 +1728,8 @@ If set to non-zero, the door cannot be destroyed by attacking it. </attribute> <attribute arch="ac" editor="armor class" type="int"> - Doors of high <armor class> are less likely to get hit. - <armor class> can be considered the "counter piece" to - <weapon class>. + Doors of high <armor class> are less likely to get hit. <armor + class> can be considered the "counter piece" to <weapon class>. </attribute> <attribute arch="other_arch" editor="drop arch" type="string"> This string defines the object that will be created when the door @@ -2671,11 +2668,11 @@ if the player does/don't carry an object that is of type <match type>. - Example: Set <match type> 15 (type 15 => weapon) and - <blocking passage> enabled. Now you have an inventory checker - blocking all players that carry any kind of melee weapon. To pass, a - player is forced to leave behind all his weaponry... bad news for a - warrior. ;) + Example: Set <match type> 15 (type 15 => weapon) and <blocking + passage> enabled. Now you have an inventory checker blocking all + players that carry any kind of melee weapon. To pass, a player is + forced to leave behind all his weaponry... bad news for a warrior. + ;) </attribute> <attribute arch="last_sp" editor="match = having" type="bool"> Enabled means having that object is a match. Disabled means not @@ -2846,10 +2843,9 @@ </attribute> <attribute arch_begin="msg" arch_end="endmsg" editor="keyword-matching" type="text" marker="crossfire-dialog"> This text field contains the keyword-matching-syntax. The text - should have the following format: - "@match <keyword1>|<keyword2>|...". Any number of - keywords from one to infinite is allowed. Make sure they are - separated by a '|'. + should have the following format: "@match <keyword1>|<keyword2>|...". + Any number of keywords from one to infinite is allowed. Make sure + they are separated by a '|'. Examples: "@match yes", "@match gold|treasure". The connected value will be triggered when the player speaks any of the given keywords @@ -2918,9 +2914,9 @@ per trigger) via connected lever/button/etc, you must set "speed 0". </attribute> <attribute arch="sp" editor="direction" type="list_direction"> - The magic wall will cast it's spells always in the specified - <direction>. A magic wall with direction set to <none> - will always fire in a random direction. + The magic wall will cast it's spells always in the specified <direction>. + A magic wall with direction set to <none> will always fire in + a random direction. </attribute> <attribute arch="move_block" editor="blocked movement" type="bitmask_movement"> If set, the object cannot be passed by players nor monsters. @@ -3128,12 +3124,11 @@ (masses of) monsters. Note that you can always put items into the monster's inventory. - Those will drop-at-kill just like the stuff from the - <treasurelist>. + Those will drop-at-kill just like the stuff from the <treasurelist>. </attribute> <attribute arch="level" editor="level" type="int" min="-32768" max="32767" check_min="1" check_max="115"> - A monster's <level> is the most important attribute. - <level> affects the power of a monster in various ways. + A monster's <level> is the most important attribute. <level> + affects the power of a monster in various ways. </attribute> <attribute arch="race" editor="race" type="string"> Every monster should have a race set to categorize it. The monster's Modified: trunk/crossfire/src/app/net/sf/gridarta/var/crossfire/gui/map/renderer/SmoothingRenderer.java =================================================================== --- trunk/crossfire/src/app/net/sf/gridarta/var/crossfire/gui/map/renderer/SmoothingRenderer.java 2011-01-23 17:32:56 UTC (rev 8834) +++ trunk/crossfire/src/app/net/sf/gridarta/var/crossfire/gui/map/renderer/SmoothingRenderer.java 2011-01-23 19:24:29 UTC (rev 8835) @@ -106,7 +106,7 @@ * @param x the x-coordinate of the map square to draw, in map coordinates * @param y the y-coordinate of the map square to draw, in map coordinates * @param level the limit smoothlevel (smooth levels above this are drawn) - * @param firstLayer the layer (map z coordinate) to draw. Note that + * @param firstLayer the layer (map z coordinate) to draw; note that * invisible objects are supposed to not use a layer, to stay coherent with * client behavior * @param allLayers whether or not to draw also layers above current one Modified: trunk/crossfire/src/app/net/sf/gridarta/var/crossfire/gui/mappropertiesdialog/DefaultMapPropertiesDialogFactory.java =================================================================== --- trunk/crossfire/src/app/net/sf/gridarta/var/crossfire/gui/mappropertiesdialog/DefaultMapPropertiesDialogFactory.java 2011-01-23 17:32:56 UTC (rev 8834) +++ trunk/crossfire/src/app/net/sf/gridarta/var/crossfire/gui/mappropertiesdialog/DefaultMapPropertiesDialogFactory.java 2011-01-23 19:24:29 UTC (rev 8835) @@ -53,7 +53,7 @@ /** * The {@link MapPathNormalizer} for converting map paths to {@link - * java.io.File}s. + * java.io.File Files}. */ @NotNull private final MapPathNormalizer mapPathNormalizer; Modified: trunk/crossfire/src/app/net/sf/gridarta/var/crossfire/gui/mappropertiesdialog/MapPropertiesDialog.java =================================================================== --- trunk/crossfire/src/app/net/sf/gridarta/var/crossfire/gui/mappropertiesdialog/MapPropertiesDialog.java 2011-01-23 17:32:56 UTC (rev 8834) +++ trunk/crossfire/src/app/net/sf/gridarta/var/crossfire/gui/mappropertiesdialog/MapPropertiesDialog.java 2011-01-23 19:24:29 UTC (rev 8835) @@ -358,7 +358,7 @@ * @param helpParent the parent frame for help windows * @param mapManager the map manager to use * @param globalSettings the global settings instance - * @param mapModel the map model whose properties are shown/edited. + * @param mapModel the map model whose properties are shown/edited * @param mapFileFilter the Swing file filter to use * @param mapPathNormalizer the map path normalizer for converting map paths * to files @@ -449,8 +449,8 @@ /** * Create the map panel. - * @param map MapArchObject to create map panel for. - * @return Newly created map panel. + * @param map the map arch object to create map panel for + * @return the newly created map panel */ @NotNull private Component createMapPanel(@NotNull final MapArchObject map) { @@ -470,8 +470,8 @@ /** * Create the parameters panel. - * @param map MapArchObject to create parameters panel for. - * @return Newly created parameters panel. + * @param map the map arch object to create parameters panel for + * @return the newly created parameters panel */ @NotNull private Component createParametersPanel(@NotNull final MapArchObject map) { @@ -489,8 +489,8 @@ /** * Create the shop panel. - * @param map MapArchObject to create shop panel for. - * @return Newly created shop panel. + * @param map the map arch object to create shop panel for + * @return the newly created shop panel */ @NotNull private Component createShopPanel(@NotNull final MapArchObject map) { @@ -506,8 +506,8 @@ /** * Create the weather panel. - * @param map MapArchObject to create weather panel for. - * @return Newly created weather panel. + * @param map the map arch object to create weather panel for + * @return the newly created weather panel */ @NotNull private Component createWeatherPanel(@NotNull final MapArchObject map) { @@ -524,8 +524,8 @@ /** * Create the lore panel. - * @param map MapArchObject to create lore panel for. - * @return Newly created lore panel. + * @param map the map arch object to create lore panel for + * @return the newly created lore panel */ @NotNull private Component createMapLorePanel(@NotNull final MapArchObject map) { @@ -540,8 +540,8 @@ /** * Create the map text panel. - * @param map MapArchObject to create map text panel for. - * @return Newly created map text panel. + * @param map the map arch object to create map text panel for + * @return the newly created map text panel */ @NotNull private Component createMapTextPanel(@NotNull final net.sf.gridarta.model.maparchobject.MapArchObject<MapArchObject> map) { @@ -556,8 +556,8 @@ /** * Create the tile path panel. - * @param mapTilePane The <code>MapTilePane<code> contents. - * @return Newly created tile path panel. + * @param mapTilePane the <code>MapTilePane<code> contents + * @return the newly created tile path panel */ @NotNull private static Component createTilePathPanel(@NotNull final Component mapTilePane) { Modified: trunk/crossfire/src/app/net/sf/gridarta/var/crossfire/maincontrol/CrossfireEditor.java =================================================================== --- trunk/crossfire/src/app/net/sf/gridarta/var/crossfire/maincontrol/CrossfireEditor.java 2011-01-23 17:32:56 UTC (rev 8834) +++ trunk/crossfire/src/app/net/sf/gridarta/var/crossfire/maincontrol/CrossfireEditor.java 2011-01-23 19:24:29 UTC (rev 8835) @@ -39,7 +39,7 @@ /** * The main method that is invoked by the Java Runtime. - * @param args The command line parameters given to the level editor. + * @param args the command line parameters given to the level editor */ public static void main(final String... args) { new GridartaEditor<GameObject, MapArchObject, Archetype>("net.sf.gridarta.var.crossfire.tod").run("net.sf.gridarta.var.crossfire", "CrossfireEditor.jar", new DefaultEditorFactory(), "crossfire.conf", args); Modified: trunk/crossfire/src/app/net/sf/gridarta/var/crossfire/model/io/DefaultGameObjectParser.java =================================================================== --- trunk/crossfire/src/app/net/sf/gridarta/var/crossfire/model/io/DefaultGameObjectParser.java 2011-01-23 17:32:56 UTC (rev 8834) +++ trunk/crossfire/src/app/net/sf/gridarta/var/crossfire/model/io/DefaultGameObjectParser.java 2011-01-23 19:24:29 UTC (rev 8835) @@ -289,9 +289,9 @@ private static int idKey = 1; /** - * Add a new key to {@link #keys}. The order in which the keys are added is + * Adds a new key to {@link #keys}. The order in which the keys are added is * the order in which the objects fields are written out. - * @param key Key to add. + * @param key the key to add */ private static void addKey(final String key) { keys.put(key.equals("msg") || key.equals("lore") ? key + "\n" : key + " ", idKey++); Modified: trunk/crossfire/src/app/net/sf/gridarta/var/crossfire/model/maparchobject/MapArchObject.java =================================================================== --- trunk/crossfire/src/app/net/sf/gridarta/var/crossfire/model/maparchobject/MapArchObject.java 2011-01-23 17:32:56 UTC (rev 8834) +++ trunk/crossfire/src/app/net/sf/gridarta/var/crossfire/model/maparchobject/MapArchObject.java 2011-01-23 19:24:29 UTC (rev 8835) @@ -549,7 +549,7 @@ /** * Returns the map lore. - * @return The map lore. + * @return the map lore */ @NotNull public String getLore() { Modified: trunk/crossfire/src/app/net/sf/gridarta/var/crossfire/model/scripts/DefaultScriptedEvent.java =================================================================== --- trunk/crossfire/src/app/net/sf/gridarta/var/crossfire/model/scripts/DefaultScriptedEvent.java 2011-01-23 17:32:56 UTC (rev 8834) +++ trunk/crossfire/src/app/net/sf/gridarta/var/crossfire/model/scripts/DefaultScriptedEvent.java 2011-01-23 19:24:29 UTC (rev 8835) @@ -72,9 +72,9 @@ private final ScriptedEventEditor<GameObject, MapArchObject, Archetype> scriptedEventEditor; /** - * Create a ScriptedEvent of given type (This is used for map-loading). + * Creates a new instance of a given type (This is used for map-loading). * @param scriptArchUtils the script arch utils instance to use - * @param event GameObject that describes the event. + * @param event the game object that describes the event * @param subtypeAttribute the attribute name for the subtype field * @param scriptedEventEditor the scripted event editor to use */ Modified: trunk/daimonin/src/app/net/sf/gridarta/var/daimonin/gui/mappropertiesdialog/DefaultMapPropertiesDialogFactory.java =================================================================== --- trunk/daimonin/src/app/net/sf/gridarta/var/daimonin/gui/mappropertiesdialog/DefaultMapPropertiesDialogFactory.java 2011-01-23 17:32:56 UTC (rev 8834) +++ trunk/daimonin/src/app/net/sf/gridarta/var/daimonin/gui/mappropertiesdialog/DefaultMapPropertiesDialogFactory.java 2011-01-23 19:24:29 UTC (rev 8835) @@ -53,7 +53,7 @@ /** * The {@link MapPathNormalizer} for converting map paths to {@link - * java.io.File}s. + * java.io.File Files}. */ @NotNull private final MapPathNormalizer mapPathNormalizer; Modified: trunk/daimonin/src/app/net/sf/gridarta/var/daimonin/gui/mappropertiesdialog/MapPropertiesDialog.java =================================================================== --- trunk/daimonin/src/app/net/sf/gridarta/var/daimonin/gui/mappropertiesdialog/MapPropertiesDialog.java 2011-01-23 17:32:56 UTC (rev 8834) +++ trunk/daimonin/src/app/net/sf/gridarta/var/daimonin/gui/mappropertiesdialog/MapPropertiesDialog.java 2011-01-23 19:24:29 UTC (rev 8835) @@ -357,9 +357,9 @@ } /** - * Create the mainPanel. - * @param map MapArchObject to create main panel for. - * @return Newly created main panel. + * Creates the main panel. + * @param map the map arch object to create main panel for + * @return the newly created main panel */ @NotNull private Component createMainPanel(@NotNull final MapArchObject map) { @@ -392,9 +392,9 @@ } /** - * Create the mapDataPanel. - * @param map MapArchObject to create panel for. - * @return Newly created mapDataPanel. + * Creates the map data panel. + * @param map the map arch object to create panel for + * @return the newly created mapDataPanel */ @NotNull private Component createMapDataPanel(@NotNull final net.sf.gridarta.model.maparchobject.MapArchObject<MapArchObject> map) { @@ -408,9 +408,9 @@ } /** - * Create the optionsPanel. - * @param map MapArchObject to create panel for. - * @return Newly created optionsPanel. + * Creates the options panel. + * @param map the map arch object to create panel for + * @return the newly created options panel */ @NotNull private Component createOptionsPanel(@NotNull final MapArchObject map) { @@ -440,9 +440,9 @@ } /** - * Create the mapPanel. - * @param map MapArchObject to create panel for. - * @return Newly created mapPanel. + * Creates the map panel. + * @param map the map arch object to create panel for + * @return the newly created map panel */ @NotNull private Component createMapPanel(@NotNull final MapArchObject map) { @@ -502,9 +502,9 @@ } /** - * Create the tile path panel. - * @param mapTilePane The <code>MapTilePane<code> contents. - * @return Newly created tile path panel. + * Creates the tile path panel. + * @param mapTilePane the <code>MapTilePane<code> contents + * @return the newly created tile path panel */ @NotNull private static Component createTilePathPanel(@NotNull final Component mapTilePane) { @@ -560,8 +560,9 @@ /** * Creates a border to be used in dialogs to frame dialog component groups. - * @param key i18n Key to look up the l10n title using the ActionBuilder - * @return Border + * @param key the i18n key for looking up the l10n title using the + * ActionBuilder + * @return the border */ @NotNull private static Border createTitledBorder(@NotNull final String key) { @@ -571,10 +572,10 @@ /** * Create an "attribute"-line (format: <label> <textfield>). * @param textField formatted textfield - * @param n length of textfield - * @param defaultValue initial value in formatted textfield - * @param labelKey (attribute-)label key - * @return created panel + * @param n the length of textfield + * @param defaultValue the initial value in formatted textfield + * @param labelKey the (attribute-)label key + * @return the created panel */ @NotNull private static Component createPanelLine(@NotNull final JTextField textField, final int n, final int defaultValue, @NotNull final String labelKey) { @@ -587,11 +588,11 @@ } /** - * Create a checkbox-line, similar to createPanelLine. - * @param checkBox checkbox - * @param state initial state - * @param labelKey (attribute-)label key - * @return created Checkbox + * Creates a checkbox-line, similar to createPanelLine. + * @param checkBox the checkbox + * @param state the initial state + * @param labelKey the (attribute-)label key + * @return the created checkbox */ @NotNull private static Component createPanelCBox(@NotNull final AbstractButton checkBox, final boolean state, @NotNull final String labelKey) { @@ -606,7 +607,7 @@ /** * Checks the given values and modifies the current map. * @return <code>true</code> if the map properties were edited, - * <code>false</code> if the parameters were wrong. + * <code>false</code> if the parameters were wrong */ private boolean modifyMapProperties() { // first check if the entries are all okay @@ -697,10 +698,10 @@ /** * This is a simple string-to-int parser that throws * IllegalArgumentExceptions with appropriate error messages. - * @param s string to be parse - * @param label attribute label for error message - * @return value of String 's', zero if 's' is empty - * @throws IllegalArgumentException when parsing fails + * @param s the string to be parse + * @param label the attribute label for error message + * @return the value of String 's', zero if 's' is empty + * @throws IllegalArgumentException if parsing fails */ private static int parseProperty(@NotNull final String s, @NotNull final String label) { if (s.length() == 0) { @@ -716,7 +717,7 @@ } /** - * Reset all map properties to the saved values in the map arch object. + * Resets all map properties to the saved values in the map arch object. */ private void restoreMapProperties() { final MapArchObject map = mapModel.getMapArchObject(); Modified: trunk/model/src/app/net/sf/gridarta/model/anim/AbstractAnimationObjects.java =================================================================== --- trunk/model/src/app/net/sf/gridarta/model/anim/AbstractAnimationObjects.java 2011-01-23 17:32:56 UTC (rev 8834) +++ trunk/model/src/app/net/sf/gridarta/model/anim/AbstractAnimationObjects.java 2011-01-23 19:24:29 UTC (rev 8835) @@ -35,7 +35,7 @@ /** * Creates a new instance. - * @param name localized name of the object type, e.g. used in dialogs + * @param name the localized name of the object type, e.g. used in dialogs */ protected AbstractAnimationObjects(final String name) { super(name); Modified: trunk/model/src/app/net/sf/gridarta/model/anim/AnimationObject.java =================================================================== --- trunk/model/src/app/net/sf/gridarta/model/anim/AnimationObject.java 2011-01-23 17:32:56 UTC (rev 8834) +++ trunk/model/src/app/net/sf/gridarta/model/anim/AnimationObject.java 2011-01-23 19:24:29 UTC (rev 8835) @@ -32,7 +32,7 @@ /** * Get the animName, which is the name of the animation as usable by the * "animations" attribute. - * @return the name of this animation. + * @return the name of this animation */ @NotNull String getAnimName(); @@ -40,7 +40,7 @@ /** * Returns the animation list of this animation. The individual entries are * all suffixed with '\n'. - * @return the animation list of this animation. + * @return the animation list of this animation */ @NotNull String getAnimList(); Modified: trunk/model/src/app/net/sf/gridarta/model/anim/AnimationObjects.java =================================================================== --- trunk/model/src/app/net/sf/gridarta/model/anim/AnimationObjects.java 2011-01-23 17:32:56 UTC (rev 8834) +++ trunk/model/src/app/net/sf/gridarta/model/anim/AnimationObjects.java 2011-01-23 19:24:29 UTC (rev 8835) @@ -27,7 +27,8 @@ import org.jetbrains.annotations.NotNull; /** - * AnimationObjects is a container for {@link AnimationObject}s. + * AnimationObjects is a container for {@link AnimationObject + * AnimationObjects}. * @author <a href="mailto:ch...@ri...">Christian Hujer</a> */ public interface AnimationObjects<G extends GameObject<G, A, R>, A extends MapArchObject<A>, R extends Archetype<G, A, R>> extends Collectable<G, A, R>, NamedObjects<AnimationObject> { Modified: trunk/model/src/app/net/sf/gridarta/model/anim/AnimationValidator.java =================================================================== --- trunk/model/src/app/net/sf/gridarta/model/anim/AnimationValidator.java 2011-01-23 17:32:56 UTC (rev 8834) +++ trunk/model/src/app/net/sf/gridarta/model/anim/AnimationValidator.java 2011-01-23 19:24:29 UTC (rev 8835) @@ -60,7 +60,7 @@ } /** - * Validates a set of {@link AnimationObject}s. + * Validates a set of {@link AnimationObject AnimationObjects}. * @param animationObjects the animation objects instance to validate */ public void validate(@NotNull final Iterable<AnimationObject> animationObjects) { Modified: trunk/model/src/app/net/sf/gridarta/model/anim/DefaultAnimationObject.java =================================================================== --- trunk/model/src/app/net/sf/gridarta/model/anim/DefaultAnimationObject.java 2011-01-23 17:32:56 UTC (rev 8834) +++ trunk/model/src/app/net/sf/gridarta/model/anim/DefaultAnimationObject.java 2011-01-23 19:24:29 UTC (rev 8835) @@ -84,15 +84,15 @@ private static final Pattern PATTERN_END_OF_LINE = Pattern.compile("\n"); /** - * Create an AnimationObject. Therefore animList is parsed. Do not invoke - * this constructor directly, use {@link AnimationObjects#addAnimationObject(String,String,String)} + * Creates a new instance. Therefore animList is parsed. Do not invoke this + * constructor directly, use {@link AnimationObjects#addAnimationObject(String,String,String)} * instead. If you invoke this constructor directly, the created * AnimationObject will not be registered. * @param animName name of the animation * @param animList list of animation as found between "anim" and "mina", * separated with "\n", including "facings" but including neither "anim" nor * "mina" - * @param path Path for this AnimationObject. + * @param path the path for this animation object */ public DefaultAnimationObject(@NotNull final String animName, @NotNull final String animList, @NotNull final String path) { super(path); @@ -134,7 +134,7 @@ /** * {@inheritDoc} - * @return the same String as {@link #getAnimName()}. + * @return the same String as <code>getAnimName()</code> */ @NotNull @Override Modified: trunk/model/src/app/net/sf/gridarta/model/anim/DefaultAnimationObjects.java =================================================================== --- trunk/model/src/app/net/sf/gridarta/model/anim/DefaultAnimationObjects.java 2011-01-23 17:32:56 UTC (rev 8834) +++ trunk/model/src/app/net/sf/gridarta/model/anim/DefaultAnimationObjects.java 2011-01-23 19:24:29 UTC (rev 8835) @@ -80,7 +80,7 @@ /** * Collects the animation data into the file "animations". - * @param progress Progress to report progress to. + * @param progress the progress to report progress to * @param collectedDirectory the destination directory to collect data to * @throws IOException in case of I/O problems during collection */ @@ -103,7 +103,7 @@ /** * Collects the animation data into the file "animations". - * @param progress Progress to report progress to. + * @param progress the progress to report progress to * @param collectedDirectory the destination directory to collect data to * @throws IOException in case of I/O problems during collection */ Modified: trunk/model/src/app/net/sf/gridarta/model/archetype/AbstractArchetypeBuilder.java =================================================================== --- trunk/model/src/app/net/sf/gridarta/model/archetype/AbstractArchetypeBuilder.java 2011-01-23 17:32:56 UTC (rev 8834) +++ trunk/model/src/app/net/sf/gridarta/model/archetype/AbstractArchetypeBuilder.java 2011-01-23 19:24:29 UTC (rev 8835) @@ -58,7 +58,8 @@ private final Map<String, String> attributes = new LinkedHashMap<String, String>(); /** - * The {@link GameObjectFactory} for creating new {@link Archetype}s. + * The {@link GameObjectFactory} for creating new {@link Archetype + * Archetypes}. */ @NotNull private final GameObjectFactory<G, A, R> gameObjectFactory; Modified: trunk/model/src/app/net/sf/gridarta/model/archetype/Archetype.java =================================================================== --- trunk/model/src/app/net/sf/gridarta/model/archetype/Archetype.java 2011-01-23 17:32:56 UTC (rev 8834) +++ trunk/model/src/app/net/sf/gridarta/model/archetype/Archetype.java 2011-01-23 19:24:29 UTC (rev 8835) @@ -40,15 +40,15 @@ public interface Archetype<G extends GameObject<G, A, R>, A extends MapArchObject<A>, R extends Archetype<G, A, R>> extends BaseObject<G, A, R, R> { /** - * Return all inventory objects. - * @return An iterator returning all inventory objects. + * Returns all inventory objects. + * @return an iterator returning all inventory objects */ @NotNull @Override Iterator<G> iterator(); /** - * Add the given GameObject at the end of this Container. + * Adds the given {@link GameObject} at the end of this Container. * @param gameObject the free yet unlinked <code>GameObject</code> to be * placed in the inventory * @throws IllegalArgumentException if <var>gameObject</var> already is @@ -57,7 +57,7 @@ void addLast(@NotNull G gameObject); /** - * Add the given GameObject at the beginning of this Container. + * Adds the given {@link GameObject} at the beginning of this Container. * @param gameObject the free yet unlinked <code>GameObject</code> to be * placed in the inventory * @throws IllegalArgumentException if <var>gameObject</var> already is @@ -86,29 +86,29 @@ boolean isUndefinedArchetype(); /** - * Set the x-position of this part of a multi-part object. The x-position is - * relative to the head part. + * Sets the x-position of this part of a multi-part object. The x-position + * is relative to the head part. * @param multiX the x-distance of this part to the head part */ void setMultiX(int multiX); /** - * Set the y-position of this part of a multi-part object. The y-position is - * relative to the head part. + * Sets the y-position of this part of a multi-part object. The y-position + * is relative to the head part. * @param multiY the y-distance of this part to the head part */ void setMultiY(int multiY); /** - * Get the x-distance of this part to the head part. For single-part objects - * this is always zero. + * Returns the x-distance of this part to the head part. For single-part + * objects this is always zero. * @return the x-distance of this part to the head part */ int getMultiX(); /** - * Get the y-distance of this part to the head part. For single-part objects - * this is always zero. + * Returns the y-distance of this part to the head part. For single-part + * objects this is always zero. * @return the y-distance of this part to the head part */ int getMultiY(); Modified: trunk/model/src/app/net/sf/gridarta/model/archetype/ArchetypeFactory.java =================================================================== --- trunk/model/src/app/net/sf/gridarta/model/archetype/ArchetypeFactory.java 2011-01-23 17:32:56 UTC (rev 8834) +++ trunk/model/src/app/net/sf/gridarta/model/archetype/ArchetypeFactory.java 2011-01-23 19:24:29 UTC (rev 8835) @@ -30,9 +30,9 @@ public interface ArchetypeFactory<G extends GameObject<G, A, R>, A extends MapArchObject<A>, R extends Archetype<G, A, R>> { /** - * Create a new undefined archetype instance. - * @param archetypeName The archetype name. - * @return The new undefined archetype instance. + * Creates a new undefined archetype instance. + * @param archetypeName the archetype name + * @return the new undefined archetype instance */ @NotNull R newUndefinedArchetype(@NotNull String archetypeName); Modified: trunk/model/src/app/net/sf/gridarta/model/archetype/ArchetypeSet.java =================================================================== --- trunk/model/src/app/net/sf/gridarta/model/archetype/ArchetypeSet.java 2011-01-23 17:32:56 UTC (rev 8834) +++ trunk/model/src/app/net/sf/gridarta/model/archetype/ArchetypeSet.java 2011-01-23 19:24:29 UTC (rev 8835) @@ -37,19 +37,19 @@ * Returns whether the Archetypes in this ArchetypeSet were loaded from an * archive. * @return <code>true</code> if loaded from an archive, otherwise - * <code>false</code>. + * <code>false</code> */ boolean isLoadedFromArchive(); /** * Returns the number of Archetypes available. - * @return The number of Archetypes available + * @return the number of Archetypes available */ int getArchetypeCount(); /** - * Get an Archetype by its name. - * @param archetypeName name of the Archetype to get + * Returns an Archetype by its name. + * @param archetypeName the name of the Archetype to get * @return the archetype * @throws UndefinedArchetypeException if the no such archetype exists * @see #getOrCreateArchetype(String) for a similar method that creates @@ -59,8 +59,8 @@ R getArchetype(@NotNull String archetypeName) throws UndefinedArchetypeException; /** - * Get an archetype by its name. If this archetype does not exist, return an - * {@link Archetype} which has {@link Archetype#isUndefinedArchetype()} + * Returns an archetype by its name. If this archetype does not exist, + * return an {@link Archetype} which has {@link Archetype#isUndefinedArchetype()} * set. * @param archetypeName the archetype name * @return the archetype @@ -70,35 +70,35 @@ /** * Adds an Archetype to this Set. - * @param archetype Archetype to add. + * @param archetype the archetype to add * @throws DuplicateArchetypeException if the archetype name is not unique * @throws IllegalArgumentException in case the added GameObject is not an - * Archetype. + * Archetype */ void addArchetype(@NotNull R archetype) throws DuplicateArchetypeException, IllegalArgumentException; /** - * Register an ArchetypeSetListener. - * @param listener ArchetypeSetListener to register + * Registers an {@link ArchetypeSetListener}. + * @param listener the listener to register */ void addArchetypeSetListener(@NotNull ArchetypeSetListener<G, A, R> listener); /** - * Remove an ArchetypeSetListener. - * @param listener ArchetypeSetListener to remove + * Removes an {@link ArchetypeSetListener}. + * @param listener the listener to remove */ void removeArchetypeSetListener(@NotNull ArchetypeSetListener<G, A, R> listener); /** - * Returns a read-only collection of all Archetypes. - * @return A read-only collection of all Archetypes. + * Returns a read-only collection of all {@link Archetype Archetypes}. + * @return a read-only collection of all archetypes */ Collection<R> getArchetypes(); void connectFaces(); /** - * Set whether Archetypes were loaded from an archive. + * Sets whether Archetypes were loaded from an archive. * @param loadedFromArchive <code>true</code> when loaded from archive, * otherwise <code>false</code> * @see #isLoadedFromArchive() Modified: trunk/model/src/app/net/sf/gridarta/model/archetypechooser/ArchetypeChooserFolder.java =================================================================== --- trunk/model/src/app/net/sf/gridarta/model/archetypechooser/ArchetypeChooserFolder.java 2011-01-23 17:32:56 UTC (rev 8834) +++ trunk/model/src/app/net/sf/gridarta/model/archetypechooser/ArchetypeChooserFolder.java 2011-01-23 19:24:29 UTC (rev 8835) @@ -33,8 +33,8 @@ /** * A named folder within the {@link ArchetypeChooserModel}. A folder consists of - * a set of {@link Archetype}s. One (or no) archetype may be selected at any - * time. + * a set of {@link Archetype Archetypes}. One (or no) archetype may be selected + * at any time. * @author Andreas Kirschbaum */ public class ArchetypeChooserFolder<G extends GameObject<G, A, R>, A extends MapArchObject<A>, R extends Archetype<G, A, R>> implements Serializable { @@ -51,7 +51,7 @@ private final String name; /** - * The {@link Archetype}s in this folder. + * The {@link Archetype Archetypes} in this folder. */ @NotNull private final Set<R> archetypes = new HashSet<R>(); @@ -103,7 +103,7 @@ } /** - * Returns the {@link Archetype}s. ... [truncated message content] |
From: <aki...@us...> - 2011-01-23 17:33:03
|
Revision: 8834 http://gridarta.svn.sourceforge.net/gridarta/?rev=8834&view=rev Author: akirschbaum Date: 2011-01-23 17:32:56 +0000 (Sun, 23 Jan 2011) Log Message: ----------- Simplify code calling AbstractMapMenuPreferences.newMapMenuEntry(). Modified Paths: -------------- trunk/src/app/net/sf/gridarta/gui/mapmenu/AbstractMapMenuPreferences.java trunk/src/app/net/sf/gridarta/gui/mapmenu/BookmarksMapMenuPreferences.java trunk/src/app/net/sf/gridarta/gui/mapmenu/RecentMapMenuPreferences.java trunk/src/test/net/sf/gridarta/gui/mapmenu/MapMenuManagerTest.java Modified: trunk/src/app/net/sf/gridarta/gui/mapmenu/AbstractMapMenuPreferences.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/mapmenu/AbstractMapMenuPreferences.java 2011-01-11 20:12:02 UTC (rev 8833) +++ trunk/src/app/net/sf/gridarta/gui/mapmenu/AbstractMapMenuPreferences.java 2011-01-23 17:32:56 UTC (rev 8834) @@ -88,11 +88,18 @@ * Creates a new {@link MapMenuEntry}. * @param title the entry's title * @param mapFile the entry's map file - * @return the new instance + * @param replaceExisting whether an existing entry should be replaced */ - @NotNull - protected MapMenuEntry<G, A, R> newMapMenuEntry(@NotNull final String title, @NotNull final File mapFile) { - return new MapMenuEntry<G, A, R>(title, mapFile, mapViewsManager, mapImageCache, fileControl, getShortDescription(title, getShortMapFile(globalSettings.getMapsDirectory(), mapFile))); + protected void newMapMenuEntry(@NotNull final String title, @NotNull final File mapFile, final boolean replaceExisting) { + final MapMenuEntry<G, A, R> mapMenuEntry = new MapMenuEntry<G, A, R>(title, mapFile, mapViewsManager, mapImageCache, fileControl, getShortDescription(title, getShortMapFile(globalSettings.getMapsDirectory(), mapFile))); + final int index; + if (replaceExisting) { + removeMapMenuEntryInt(mapMenuEntry); // remove old entry to get new entry at first pos. + index = 0; + } else { + index = getSize(); + } + addMapMenuEntryInt(index, mapMenuEntry); } /** Modified: trunk/src/app/net/sf/gridarta/gui/mapmenu/BookmarksMapMenuPreferences.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/mapmenu/BookmarksMapMenuPreferences.java 2011-01-11 20:12:02 UTC (rev 8833) +++ trunk/src/app/net/sf/gridarta/gui/mapmenu/BookmarksMapMenuPreferences.java 2011-01-23 17:32:56 UTC (rev 8834) @@ -127,7 +127,7 @@ */ @Override protected void addMapMenuEntryInt(@NotNull final String title, @NotNull final File mapFile) { - addMapMenuEntryInt(getSize(), newMapMenuEntry(title, mapFile)); + newMapMenuEntry(title, mapFile, false); } /** Modified: trunk/src/app/net/sf/gridarta/gui/mapmenu/RecentMapMenuPreferences.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/mapmenu/RecentMapMenuPreferences.java 2011-01-11 20:12:02 UTC (rev 8833) +++ trunk/src/app/net/sf/gridarta/gui/mapmenu/RecentMapMenuPreferences.java 2011-01-23 17:32:56 UTC (rev 8834) @@ -115,9 +115,7 @@ */ @Override protected void addMapMenuEntryInt(@NotNull final String title, @NotNull final File mapFile) { - final MapMenuEntry<G, A, R> mapMenuEntry = newMapMenuEntry(title, mapFile); - removeMapMenuEntryInt(mapMenuEntry); // remove old entry to get new entry at first pos. - addMapMenuEntryInt(0, mapMenuEntry); + newMapMenuEntry(title, mapFile, true); // Now remove those that are too many. // Please keep this while loop as the constant 10 might be replaced by a preferences var int i = 0; Modified: trunk/src/test/net/sf/gridarta/gui/mapmenu/MapMenuManagerTest.java =================================================================== --- trunk/src/test/net/sf/gridarta/gui/mapmenu/MapMenuManagerTest.java 2011-01-11 20:12:02 UTC (rev 8833) +++ trunk/src/test/net/sf/gridarta/gui/mapmenu/MapMenuManagerTest.java 2011-01-23 17:32:56 UTC (rev 8834) @@ -94,8 +94,7 @@ @Override protected void addMapMenuEntryInt(@NotNull final String title, @NotNull final File mapFile) { - final MapMenuEntry<TestGameObject, TestMapArchObject, TestArchetype> mapMenuEntry = newMapMenuEntry(title, mapFile); - addMapMenuEntryInt(getSize(), mapMenuEntry); + newMapMenuEntry(title, mapFile, false); } }; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2011-01-11 20:12:09
|
Revision: 8833 http://gridarta.svn.sourceforge.net/gridarta/?rev=8833&view=rev Author: akirschbaum Date: 2011-01-11 20:12:02 +0000 (Tue, 11 Jan 2011) Log Message: ----------- Unify action implementations. Modified Paths: -------------- trunk/src/app/net/sf/gridarta/gui/pickmapchooser/PickmapChooserControl.java Modified: trunk/src/app/net/sf/gridarta/gui/pickmapchooser/PickmapChooserControl.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/pickmapchooser/PickmapChooserControl.java 2011-01-11 19:52:53 UTC (rev 8832) +++ trunk/src/app/net/sf/gridarta/gui/pickmapchooser/PickmapChooserControl.java 2011-01-11 20:12:02 UTC (rev 8833) @@ -52,6 +52,7 @@ import net.sf.gridarta.model.mapmanager.FileControl; import net.sf.gridarta.model.mapmanager.MapManager; import net.sf.gridarta.model.mapmanager.MapManagerListener; +import net.sf.gridarta.model.mapmodel.MapModel; import net.sf.gridarta.model.mapmodel.MapModelListener; import net.sf.gridarta.model.mapmodel.MapSquare; import net.sf.gridarta.model.pickmapsettings.PickmapSettings; @@ -596,9 +597,7 @@ */ @ActionMethod public void addNewPickmap() { - if (isAddNewPickmapEnabled()) { - newMapDialogFactory.showNewPickmapDialog(); - } + doAddNewPickmap(true); } /** @@ -606,15 +605,7 @@ */ @ActionMethod public void openPickmapMap() { - final MapFile<G, A, R> mapFile = getOpenPickmapMap(); - if (mapFile != null) { - final File file = mapFile.getFile(); - try { - mapViewsManager.openMapFileWithView(file, null); - } catch (final IOException ex) { - fileControl.reportLoadError(file, ex.getMessage()); - } - } + doOpenPickmapMap(true); } /** @@ -622,14 +613,7 @@ */ @ActionMethod public void deletePickmap() { - final MapFile<G, A, R> mapFile = getDeletePickmap(); - if (mapFile != null) { - if (!ACTION_BUILDER.showQuestionDialog(parent, "confirmDeletePickmap", mapFile.getFile().getName())) { - return; - } - - mapFile.remove(true); - } + doDeletePickmap(true); } /** @@ -637,14 +621,7 @@ */ @ActionMethod public void savePickmap() { - final MapFile<G, A, R> mapFile = getSavePickmap(); - if (mapFile != null) { - try { - mapFile.save(); - } catch (final IOException e) { - ACTION_BUILDER.showMessageDialog(parent, "encodeMapFile", mapFile, e.getMessage()); - } - } + doSavePickmap(true); } /** @@ -653,39 +630,10 @@ */ @ActionMethod public void revertPickmap() { - final MapFile<G, A, R> mapFile = getRevertPickmap(); - if (mapFile != null) { - final MapControl<G, A, R> mapControl = mapFile.getPickmap(); - if (mapControl.getMapModel().isModified() && !ACTION_BUILDER.showQuestionDialog(parent, "confirmRevertPickmap", mapFile.getFile().getName())) { - return; - } - - final File mapControlMapFile = mapControl.getMapModel().getMapFile(); - if (mapControlMapFile != null) { - if (!mapControlMapFile.exists()) { - ACTION_BUILDER.showMessageDialog(parent, "revertPickmapGone", mapControl.getMapModel().getMapFile()); - return; - } - - try { - mapFile.revert(); - } catch (final IOException ex) { - ACTION_BUILDER.showMessageDialog(null/*XXX:parent*/, "pickmapIOError", mapFile.getFile().getName(), ex.getMessage()); - } - } - } + doRevertPickmap(true); } /** - * Determine if "add new pickmap" is enabled. - * @return <code>true</code> if "add new pickmap" is enabled, - * <code>false</code> otherwise - */ - private boolean isAddNewPickmapEnabled() { - return !pickmapSettings.isLocked(); - } - - /** * Determine if "open pickmap as map" is enabled. * @return the pickmap to open as map, or <code>null</code> if "open pickmap * as map" is disabled @@ -699,55 +647,6 @@ } /** - * Determine if "delete active pickmap" is enabled. - * @return the pickmap to delete, or <code>null</code> if "delete active - * pickmap" is disabled - */ - @Nullable - private MapFile<G, A, R> getDeletePickmap() { - if (pickmapSettings.isLocked() || !active) { - return null; - } - return currentMapFile; - } - - /** - * Determine if "save active pickmap" is enabled. - * @return the pickmap to save, or <code>null</code> if "save active - * pickmap" is disabled - */ - @Nullable - private MapFile<G, A, R> getSavePickmap() { - if (pickmapSettings.isLocked() || !active) { - return null; - } - - if (currentMapFile == null || currentPickmapControl == null || !currentPickmapControl.getMapModel().isModified()) { - return null; - } - - return currentMapFile; - } - - /** - * Determine if "revert active pickmap" is enabled. - * @return the pickmap to revert, or <code>null</code> if "revert active - * pickmap" is disabled - */ - @Nullable - private MapFile<G, A, R> getRevertPickmap() { - if (pickmapSettings.isLocked() || !active) { - return null; - } - - if (currentMapFile == null || currentPickmapControl == null || !currentPickmapControl.getMapModel().isModified() || !currentMapFile.getFile().exists()) { - return null; - } - - return currentMapFile; - } - - /** * Set the currently active pickmap. * @param currentMapFile the currently active pickmap */ @@ -786,11 +685,161 @@ * Update the actions' states. */ private void refresh() { - aAddNewPickmap.setEnabled(isAddNewPickmapEnabled()); - aOpenPickmapMap.setEnabled(getOpenPickmapMap() != null); - aDeletePickmap.setEnabled(getDeletePickmap() != null); - aSavePickmap.setEnabled(getSavePickmap() != null); - aRevertPickmap.setEnabled(getRevertPickmap() != null); + aAddNewPickmap.setEnabled(doAddNewPickmap(false)); + aOpenPickmapMap.setEnabled(doOpenPickmapMap(false)); + aDeletePickmap.setEnabled(doDeletePickmap(false)); + aSavePickmap.setEnabled(doSavePickmap(false)); + aRevertPickmap.setEnabled(doRevertPickmap(false)); } + /** + * Performs or checks availability of the "add new pickmap" action. + * @param performAction whether the action should be performed + * @return whether the action was or can be performed + */ + private boolean doAddNewPickmap(final boolean performAction) { + if (pickmapSettings.isLocked()) { + return false; + } + + if (performAction) { + newMapDialogFactory.showNewPickmapDialog(); + } + + return true; + } + + /** + * Performs or checks availability of the "open pickmap map" action. + * @param performAction whether the action should be performed + * @return whether the action was or can be performed + */ + private boolean doOpenPickmapMap(final boolean performAction) { + final MapFile<G, A, R> mapFile = getOpenPickmapMap(); + if (mapFile == null) { + return false; + } + + if (performAction) { + final File file = mapFile.getFile(); + try { + mapViewsManager.openMapFileWithView(file, null); + } catch (final IOException ex) { + fileControl.reportLoadError(file, ex.getMessage()); + return false; + } + } + + return true; + } + + /** + * Performs or checks availability of the "delete pickmap" action. + * @param performAction whether the action should be performed + * @return whether the action was or can be performed + */ + private boolean doDeletePickmap(final boolean performAction) { + if (pickmapSettings.isLocked() || !active) { + return false; + } + + final MapFile<G, A, R> mapFile = currentMapFile; + if (mapFile == null) { + return false; + } + + if (performAction) { + if (!ACTION_BUILDER.showQuestionDialog(parent, "confirmDeletePickmap", mapFile.getFile().getName())) { + return false; + } + + mapFile.remove(true); + } + + return true; + } + + /** + * Performs or checks availability of the "save pickmap" action. + * @param performAction whether the action should be performed + * @return whether the action was or can be performed + */ + private boolean doSavePickmap(final boolean performAction) { + if (pickmapSettings.isLocked() || !active) { + return false; + } + + if (currentMapFile == null || currentPickmapControl == null || !currentPickmapControl.getMapModel().isModified()) { + return false; + } + + final MapFile<G, A, R> mapFile = currentMapFile; + if (mapFile == null) { + return false; + } + + if (performAction) { + try { + mapFile.save(); + } catch (final IOException e) { + ACTION_BUILDER.showMessageDialog(parent, "encodeMapFile", mapFile, e.getMessage()); + return false; + } + } + + return true; + } + + /** + * Performs or checks availability of the "revert pickmap" action. + * @param performAction whether the action should be performed + * @return whether the action was or can be performed + */ + private boolean doRevertPickmap(final boolean performAction) { + if (pickmapSettings.isLocked() || !active) { + return false; + } + + final MapFile<G, A, R> mapFile = currentMapFile; + if (mapFile == null) { + return false; + } + + final File mapFileFile = mapFile.getFile(); + if (currentPickmapControl == null || !currentPickmapControl.getMapModel().isModified() || !mapFileFile.exists()) { + return false; + } + + final MapControl<G, A, R> mapControl = mapFile.getPickmap(); + if (mapControl == null) { + return false; + } + + final MapModel<G, A, R> mapModel = mapControl.getMapModel(); + final File mapControlMapFile = mapModel.getMapFile(); + if (mapControlMapFile == null) { + return false; + } + + if (performAction) { + if (!mapControlMapFile.exists()) { + ACTION_BUILDER.showMessageDialog(parent, "revertPickmapGone", mapControlMapFile); + return false; + } + + if (mapModel.isModified() && !ACTION_BUILDER.showQuestionDialog(parent, "confirmRevertPickmap", mapFileFile.getName())) { + return false; + } + + try { + mapFile.revert(); + } catch (final IOException ex) { + ACTION_BUILDER.showMessageDialog(null/*XXX:parent*/, "pickmapIOError", mapFileFile.getName(), ex.getMessage()); + return false; + } + } + + return true; + } + } // class PickmapChooserControl This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2011-01-11 19:53:00
|
Revision: 8832 http://gridarta.svn.sourceforge.net/gridarta/?rev=8832&view=rev Author: akirschbaum Date: 2011-01-11 19:52:53 +0000 (Tue, 11 Jan 2011) Log Message: ----------- Unify action implementations. Modified Paths: -------------- trunk/src/app/net/sf/gridarta/gui/map/mapview/MapViewManager.java trunk/src/app/net/sf/gridarta/gui/mapdesktop/MapDesktop.java Modified: trunk/src/app/net/sf/gridarta/gui/map/mapview/MapViewManager.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/map/mapview/MapViewManager.java 2011-01-11 19:37:04 UTC (rev 8831) +++ trunk/src/app/net/sf/gridarta/gui/map/mapview/MapViewManager.java 2011-01-11 19:52:53 UTC (rev 8832) @@ -181,7 +181,7 @@ * @param performAction whether the action should be performed * @return whether the action was or can be performed */ - public boolean prevWindow(final boolean performAction) { + public boolean doPrevWindow(final boolean performAction) { if (mapViewsList.size() <= 1) { return false; } @@ -201,7 +201,7 @@ * @param performAction whether the action should be performed * @return whether the action was or can be performed */ - public boolean nextWindow(final boolean performAction) { + public boolean doNextWindow(final boolean performAction) { final int size = mapViewsList.size(); if (size <= 1) { return false; Modified: trunk/src/app/net/sf/gridarta/gui/mapdesktop/MapDesktop.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/mapdesktop/MapDesktop.java 2011-01-11 19:37:04 UTC (rev 8831) +++ trunk/src/app/net/sf/gridarta/gui/mapdesktop/MapDesktop.java 2011-01-11 19:52:53 UTC (rev 8832) @@ -104,13 +104,13 @@ * The action for "prev window". */ @NotNull - private final Action aPrevWindow; + private final Action aPrevWindow = ActionUtils.newAction(ACTION_BUILDER, "Map,Window", this, "prevWindow"); /** * The action for "next window". */ @NotNull - private final Action aNextWindow; + private final Action aNextWindow = ActionUtils.newAction(ACTION_BUILDER, "Map,Window", this, "nextWindow"); /** * The actions to select windows. @@ -259,8 +259,6 @@ this.mapManager = mapManager; this.mapImageCache = mapImageCache; this.mapViewsManager = mapViewsManager; - aPrevWindow = ActionUtils.newAction(ACTION_BUILDER, "Map,Window", this, "prevWindow"); - aNextWindow = ActionUtils.newAction(ACTION_BUILDER, "Map,Window", this, "nextWindow"); mapManager.addMapManagerListener(mapManagerListener); mapImageCache.addMapImageCacheListener(mapImageCacheListener); updateFocus(false); @@ -429,9 +427,7 @@ */ @ActionMethod public void prevWindow() { - if (mapViewManager.prevWindow(true)) { - updateFocus(false); - } + doPrevWindow(true); } /** @@ -439,17 +435,49 @@ */ @ActionMethod public void nextWindow() { - if (mapViewManager.nextWindow(true)) { - updateFocus(false); - } + doNextWindow(true); } /** * Enables/disables the actions according to the current state. */ private void refreshMenus() { - aPrevWindow.setEnabled(mapViewManager.prevWindow(false)); - aNextWindow.setEnabled(mapViewManager.nextWindow(false)); + aPrevWindow.setEnabled(doPrevWindow(false)); + aNextWindow.setEnabled(doNextWindow(false)); } + /** + * Performs or checks availability of the "prev window" action. + * @param performAction whether the action should be performed + * @return whether the action was or can be performed + */ + private boolean doPrevWindow(final boolean performAction) { + if (!mapViewManager.doPrevWindow(performAction)) { + return false; + } + + if (performAction) { + updateFocus(false); + } + + return true; + } + + /** + * Performs or checks availability of the "next window" action. + * @param performAction whether the action should be performed + * @return whether the action was or can be performed + */ + private boolean doNextWindow(final boolean performAction) { + if (!mapViewManager.doNextWindow(performAction)) { + return false; + } + + if (performAction) { + updateFocus(false); + } + + return true; + } + } // class MapDesktop This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2011-01-11 19:37:10
|
Revision: 8831 http://gridarta.svn.sourceforge.net/gridarta/?rev=8831&view=rev Author: akirschbaum Date: 2011-01-11 19:37:04 +0000 (Tue, 11 Jan 2011) Log Message: ----------- Add @NotNull annotations. Modified Paths: -------------- trunk/src/app/net/sf/gridarta/gui/exitconnector/ExitConnectorController.java Modified: trunk/src/app/net/sf/gridarta/gui/exitconnector/ExitConnectorController.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/exitconnector/ExitConnectorController.java 2011-01-11 19:35:52 UTC (rev 8830) +++ trunk/src/app/net/sf/gridarta/gui/exitconnector/ExitConnectorController.java 2011-01-11 19:37:04 UTC (rev 8831) @@ -51,6 +51,7 @@ /** * The action builder. */ + @NotNull private static final ActionBuilder ACTION_BUILDER = ActionBuilderFactory.getInstance().getActionBuilder("net.sf.gridarta"); /** @@ -86,6 +87,7 @@ /** * The {@link ExitConnectorModelListener} registered to the model. */ + @NotNull private final ExitConnectorModelListener exitConnectorModelListener = new ExitConnectorModelListener() { /** {@inheritDoc} */ @@ -117,6 +119,7 @@ /** * The {@link MapViewManagerListener} used to track the current map. */ + @NotNull private final MapViewManagerListener<G, A, R> mapViewManagerListener = new MapViewManagerListener<G, A, R>() { /** {@inheritDoc} */ @@ -143,6 +146,7 @@ * The {@link MapCursorListener} used to track cursor state changes in * {@link #currentMapView}. */ + @NotNull private final MapCursorListener mapCursorListener = new MapCursorListener() { /** {@inheritDoc} */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2011-01-11 19:35:59
|
Revision: 8830 http://gridarta.svn.sourceforge.net/gridarta/?rev=8830&view=rev Author: akirschbaum Date: 2011-01-11 19:35:52 +0000 (Tue, 11 Jan 2011) Log Message: ----------- Rename field name. Modified Paths: -------------- trunk/src/app/net/sf/gridarta/gui/bookmarks/BookmarkActions.java Modified: trunk/src/app/net/sf/gridarta/gui/bookmarks/BookmarkActions.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/bookmarks/BookmarkActions.java 2011-01-11 19:34:49 UTC (rev 8829) +++ trunk/src/app/net/sf/gridarta/gui/bookmarks/BookmarkActions.java 2011-01-11 19:35:52 UTC (rev 8830) @@ -86,7 +86,7 @@ * The {@link Action} for "add bookmark". */ @NotNull - private final Action addBookmarkAction = ActionUtils.newAction(ACTION_BUILDER, "Bookmarks", this, "addBookmark"); + private final Action aAddBookmark = ActionUtils.newAction(ACTION_BUILDER, "Bookmarks", this, "addBookmark"); /** * The {@link ManageBookmarksDialog} instance. Set to <code>null</code> if @@ -161,7 +161,7 @@ * Updates the enabled state of all actions. */ private void updateActions() { - addBookmarkAction.setEnabled(doAddBookmark(false)); + aAddBookmark.setEnabled(doAddBookmark(false)); } /** This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2011-01-11 19:34:55
|
Revision: 8829 http://gridarta.svn.sourceforge.net/gridarta/?rev=8829&view=rev Author: akirschbaum Date: 2011-01-11 19:34:49 +0000 (Tue, 11 Jan 2011) Log Message: ----------- Simplify code. Modified Paths: -------------- trunk/src/app/net/sf/gridarta/gui/bookmarks/BookmarkActions.java trunk/src/app/net/sf/gridarta/gui/bookmarks/EditBookmarkDialog.java trunk/src/app/net/sf/gridarta/gui/bookmarks/ManageBookmarksDialog.java Modified: trunk/src/app/net/sf/gridarta/gui/bookmarks/BookmarkActions.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/bookmarks/BookmarkActions.java 2011-01-11 19:31:49 UTC (rev 8828) +++ trunk/src/app/net/sf/gridarta/gui/bookmarks/BookmarkActions.java 2011-01-11 19:34:49 UTC (rev 8829) @@ -184,7 +184,7 @@ if (performAction) { final A mapArchObject = mapModel.getMapArchObject(); final EditBookmarkDialog<G, A, R> editBookmarkDialog = new EditBookmarkDialog<G, A, R>(mapView.getInternalFrame(), mapArchObject.getMapName()); - if (editBookmarkDialog.showDialog(mapView.getInternalFrame())) { + if (editBookmarkDialog.showDialog()) { bookmarksMapMenuManager.addRecent(mapModel, editBookmarkDialog.getDescription()); } } Modified: trunk/src/app/net/sf/gridarta/gui/bookmarks/EditBookmarkDialog.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/bookmarks/EditBookmarkDialog.java 2011-01-11 19:31:49 UTC (rev 8828) +++ trunk/src/app/net/sf/gridarta/gui/bookmarks/EditBookmarkDialog.java 2011-01-11 19:34:49 UTC (rev 8829) @@ -129,15 +129,14 @@ dialog.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE); dialog.getRootPane().setDefaultButton(okButton); dialog.pack(); + dialog.setLocationRelativeTo(parentComponent); } /** * Opens the dialog. Returns when the dialog has been dismissed. - * @param parentComponent the parent component for the dialog * @return whether "ok" was selected */ - public boolean showDialog(@NotNull final Component parentComponent) { - dialog.setLocationRelativeTo(parentComponent); + public boolean showDialog() { dialog.setVisible(true); return getValue() == okButton; } Modified: trunk/src/app/net/sf/gridarta/gui/bookmarks/ManageBookmarksDialog.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/bookmarks/ManageBookmarksDialog.java 2011-01-11 19:31:49 UTC (rev 8828) +++ trunk/src/app/net/sf/gridarta/gui/bookmarks/ManageBookmarksDialog.java 2011-01-11 19:34:49 UTC (rev 8829) @@ -321,7 +321,7 @@ if (performAction) { final EditBookmarkDialog<G, A, R> editBookmarkDialog = new EditBookmarkDialog<G, A, R>(this, mapMenuEntry.getTitle()); - if (editBookmarkDialog.showDialog(this)) { + if (editBookmarkDialog.showDialog()) { bookmarksMapMenuPreferences.setTitle(mapMenuEntry, editBookmarkDialog.getDescription()); } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2011-01-11 19:31:55
|
Revision: 8828 http://gridarta.svn.sourceforge.net/gridarta/?rev=8828&view=rev Author: akirschbaum Date: 2011-01-11 19:31:49 +0000 (Tue, 11 Jan 2011) Log Message: ----------- Move field initialization from constructor to declaration. Modified Paths: -------------- trunk/src/app/net/sf/gridarta/gui/bookmarks/BookmarkActions.java Modified: trunk/src/app/net/sf/gridarta/gui/bookmarks/BookmarkActions.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/bookmarks/BookmarkActions.java 2011-01-11 18:19:35 UTC (rev 8827) +++ trunk/src/app/net/sf/gridarta/gui/bookmarks/BookmarkActions.java 2011-01-11 19:31:49 UTC (rev 8828) @@ -86,7 +86,7 @@ * The {@link Action} for "add bookmark". */ @NotNull - private final Action addBookmarkAction; + private final Action addBookmarkAction = ActionUtils.newAction(ACTION_BUILDER, "Bookmarks", this, "addBookmark"); /** * The {@link ManageBookmarksDialog} instance. Set to <code>null</code> if @@ -111,7 +111,6 @@ this.mapViewManager = mapViewManager; this.parentComponent = parentComponent; this.mapImageCache = mapImageCache; - addBookmarkAction = ActionUtils.newAction(ACTION_BUILDER, "Bookmarks", this, "addBookmark"); ActionUtils.newAction(ACTION_BUILDER, "Bookmarks", this, "manageBookmarks"); final MapViewManagerListener<G, A, R> mapViewManagerListener = new MapViewManagerListener<G, A, R>() { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2011-01-11 18:19:41
|
Revision: 8827 http://gridarta.svn.sourceforge.net/gridarta/?rev=8827&view=rev Author: akirschbaum Date: 2011-01-11 18:19:35 +0000 (Tue, 11 Jan 2011) Log Message: ----------- Remove unused code. Modified Paths: -------------- trunk/src/app/net/sf/gridarta/gui/selectedsquare/SelectedSquareControl.java Modified: trunk/src/app/net/sf/gridarta/gui/selectedsquare/SelectedSquareControl.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/selectedsquare/SelectedSquareControl.java 2011-01-10 09:28:31 UTC (rev 8826) +++ trunk/src/app/net/sf/gridarta/gui/selectedsquare/SelectedSquareControl.java 2011-01-11 18:19:35 UTC (rev 8827) @@ -112,11 +112,7 @@ this.gameObjectAttributesDialogFactory = gameObjectAttributesDialogFactory; this.objectChooser = objectChooser; this.selectedSquareView = selectedSquareView; - - selectedSquareView.addListMouseListener(mouseListener); - - refreshActions(); } /** @@ -242,14 +238,4 @@ return (e.getModifiers() & InputEvent.BUTTON2_MASK) != 0 || (e.getModifiers() & (InputEvent.BUTTON3_MASK | InputEvent.CTRL_MASK)) == (InputEvent.BUTTON3_MASK | InputEvent.CTRL_MASK); } - /** - * Updates the enabled state of all actions. - */ - private void refreshActions() { - // aMoveSquareTop.setEnabled(selectedSquareActions.doMoveSquareTop(false)); - // aMoveSquareUp.setEnabled(selectedSquareActions.doMoveSquareUp(false)); - // aMoveSquareDown.setEnabled(selectedSquareActions.doMoveSquareDown(false)); - // aMoveSquareBottom.setEnabled(selectedSquareActions.doMoveSquareBottom(false)); - } - } // class SelectedSquareControl This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2011-01-10 09:28:38
|
Revision: 8826 http://gridarta.svn.sourceforge.net/gridarta/?rev=8826&view=rev Author: akirschbaum Date: 2011-01-10 09:28:31 +0000 (Mon, 10 Jan 2011) Log Message: ----------- Properly create inventory objects when inserting game objects into maps. [Atrinik, Crossfire] Modified Paths: -------------- trunk/atrinik/ChangeLog trunk/crossfire/ChangeLog trunk/model/src/app/net/sf/gridarta/model/gameobject/AbstractGameObjectFactory.java trunk/model/src/app/net/sf/gridarta/model/gameobject/GameObjectFactory.java trunk/model/src/app/net/sf/gridarta/model/mapmodel/DefaultMapModel.java trunk/src/app/net/sf/gridarta/gui/gameobjectattributespanel/GameObjectAttributesControl.java Modified: trunk/atrinik/ChangeLog =================================================================== --- trunk/atrinik/ChangeLog 2010-12-20 22:39:16 UTC (rev 8825) +++ trunk/atrinik/ChangeLog 2011-01-10 09:28:31 UTC (rev 8826) @@ -1,3 +1,8 @@ +2011-01-10 Andreas Kirschbaum + + * Properly create inventory objects when inserting game objects + into maps. + 2010-12-20 Andreas Kirschbaum * Report truncated archetype definitions. Modified: trunk/crossfire/ChangeLog =================================================================== --- trunk/crossfire/ChangeLog 2010-12-20 22:39:16 UTC (rev 8825) +++ trunk/crossfire/ChangeLog 2011-01-10 09:28:31 UTC (rev 8826) @@ -1,3 +1,8 @@ +2011-01-10 Andreas Kirschbaum + + * Properly create inventory objects when inserting game objects + into maps. + 2010-12-20 Andreas Kirschbaum * Report truncated archetype definitions. Modified: trunk/model/src/app/net/sf/gridarta/model/gameobject/AbstractGameObjectFactory.java =================================================================== --- trunk/model/src/app/net/sf/gridarta/model/gameobject/AbstractGameObjectFactory.java 2010-12-20 22:39:16 UTC (rev 8825) +++ trunk/model/src/app/net/sf/gridarta/model/gameobject/AbstractGameObjectFactory.java 2011-01-10 09:28:31 UTC (rev 8826) @@ -42,4 +42,14 @@ return newHead; } + /** + * {@inheritDoc} + */ + @Override + public void createInventory(@NotNull final GameObject<G, A, R> gameObject, @NotNull final Iterable<G> archetype) { + for (final G invGameObject : archetype) { + gameObject.addLast(cloneGameObject(invGameObject)); + } + } + } // class DefaultGameObjectFactory Modified: trunk/model/src/app/net/sf/gridarta/model/gameobject/GameObjectFactory.java =================================================================== --- trunk/model/src/app/net/sf/gridarta/model/gameobject/GameObjectFactory.java 2010-12-20 22:39:16 UTC (rev 8825) +++ trunk/model/src/app/net/sf/gridarta/model/gameobject/GameObjectFactory.java 2011-01-10 09:28:31 UTC (rev 8826) @@ -72,4 +72,11 @@ @NotNull G cloneMultiGameObject(@NotNull G gameObject); + /** + * Copies inventory objects from an archetype into a game object. + * @param gameObject the game object to add to + * @param archetype the archetype to copy from + */ + void createInventory(@NotNull GameObject<G, A, R> gameObject, @NotNull Iterable<G> archetype); + } // interface GameObjectFactory Modified: trunk/model/src/app/net/sf/gridarta/model/mapmodel/DefaultMapModel.java =================================================================== --- trunk/model/src/app/net/sf/gridarta/model/mapmodel/DefaultMapModel.java 2010-12-20 22:39:16 UTC (rev 8825) +++ trunk/model/src/app/net/sf/gridarta/model/mapmodel/DefaultMapModel.java 2011-01-10 09:28:31 UTC (rev 8826) @@ -756,6 +756,9 @@ } else { newGameObject = templateBaseObject.newInstance(gameObjectFactory); nextGameObjectEnv.addLast(newGameObject); + if (templateBaseObject instanceof Archetype) { + gameObjectFactory.createInventory(newGameObject, templateBaseObject); + } } return newGameObject; @@ -819,8 +822,8 @@ } final G head = parts.get(0); - for (final G invObject : effectiveArchetype) { - head.addLast(gameObjectFactory.cloneGameObject(invObject)); + if (baseObject instanceof Archetype) { + gameObjectFactory.createInventory(head, effectiveArchetype); } return head; Modified: trunk/src/app/net/sf/gridarta/gui/gameobjectattributespanel/GameObjectAttributesControl.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/gameobjectattributespanel/GameObjectAttributesControl.java 2010-12-20 22:39:16 UTC (rev 8825) +++ trunk/src/app/net/sf/gridarta/gui/gameobjectattributespanel/GameObjectAttributesControl.java 2011-01-10 09:28:31 UTC (rev 8826) @@ -575,6 +575,9 @@ mapModel.beginTransaction("Add to inventory"); try { gameObject.addLast(invNew); + if (arch instanceof Archetype) { + gameObjectFactory.createInventory(invNew, arch); + } } finally { mapModel.endTransaction(); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2010-12-20 23:22:57
|
Revision: 8825 http://gridarta.svn.sourceforge.net/gridarta/?rev=8825&view=rev Author: akirschbaum Date: 2010-12-20 22:39:16 +0000 (Mon, 20 Dec 2010) Log Message: ----------- Report truncated archetype definitions. Modified Paths: -------------- trunk/atrinik/ChangeLog trunk/crossfire/ChangeLog trunk/daimonin/ChangeLog trunk/model/src/app/net/sf/gridarta/model/archetype/AbstractArchetypeParser.java trunk/model/src/test/net/sf/gridarta/model/archetype/ArchetypeParserTest.java Modified: trunk/atrinik/ChangeLog =================================================================== --- trunk/atrinik/ChangeLog 2010-12-20 22:26:58 UTC (rev 8824) +++ trunk/atrinik/ChangeLog 2010-12-20 22:39:16 UTC (rev 8825) @@ -1,5 +1,7 @@ 2010-12-20 Andreas Kirschbaum + * Report truncated archetype definitions. + * Fix validators not using head part attributes but incorrectly checking tail part attributes. Modified: trunk/crossfire/ChangeLog =================================================================== --- trunk/crossfire/ChangeLog 2010-12-20 22:26:58 UTC (rev 8824) +++ trunk/crossfire/ChangeLog 2010-12-20 22:39:16 UTC (rev 8825) @@ -1,5 +1,7 @@ 2010-12-20 Andreas Kirschbaum + * Report truncated archetype definitions. + * Fix validators not using head part attributes but incorrectly checking tail part attributes. Modified: trunk/daimonin/ChangeLog =================================================================== --- trunk/daimonin/ChangeLog 2010-12-20 22:26:58 UTC (rev 8824) +++ trunk/daimonin/ChangeLog 2010-12-20 22:39:16 UTC (rev 8825) @@ -1,5 +1,7 @@ 2010-12-20 Andreas Kirschbaum + * Report truncated archetype definitions. + * Fix validators not using head part attributes but incorrectly checking tail part attributes. Modified: trunk/model/src/app/net/sf/gridarta/model/archetype/AbstractArchetypeParser.java =================================================================== --- trunk/model/src/app/net/sf/gridarta/model/archetype/AbstractArchetypeParser.java 2010-12-20 22:26:58 UTC (rev 8824) +++ trunk/model/src/app/net/sf/gridarta/model/archetype/AbstractArchetypeParser.java 2010-12-20 22:39:16 UTC (rev 8825) @@ -155,6 +155,7 @@ while (true) { thisLine2 = in.readLine(); if (thisLine2 == null) { + errorViewCollector.addError(ErrorViewCategory.ARCHETYPE_INVALID, "missing 'end' line"); break LOOP; } Modified: trunk/model/src/test/net/sf/gridarta/model/archetype/ArchetypeParserTest.java =================================================================== --- trunk/model/src/test/net/sf/gridarta/model/archetype/ArchetypeParserTest.java 2010-12-20 22:26:58 UTC (rev 8824) +++ trunk/model/src/test/net/sf/gridarta/model/archetype/ArchetypeParserTest.java 2010-12-20 22:39:16 UTC (rev 8825) @@ -66,6 +66,15 @@ } /** + * Checks that a missing "end" line is reported. + * @throws IOException if the test fails + */ + @Test + public void testMissingEnd() throws IOException { + check("Object test\n", true, false, 0); + } + + /** * Checks that msg...endmsg fields are parsed correctly. * @throws IOException if the test fails * @throws UndefinedArchetypeException if the test fails This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2010-12-20 22:27:06
|
Revision: 8824 http://gridarta.svn.sourceforge.net/gridarta/?rev=8824&view=rev Author: akirschbaum Date: 2010-12-20 22:26:58 +0000 (Mon, 20 Dec 2010) Log Message: ----------- Fix validators not using head part attributes but incorrectly checking tail part attributes. Modified Paths: -------------- trunk/atrinik/ChangeLog trunk/crossfire/ChangeLog trunk/daimonin/ChangeLog trunk/model/src/app/net/sf/gridarta/model/validation/checks/BlockedSpawnPointChecker.java trunk/model/src/app/net/sf/gridarta/model/validation/checks/ConnectedPickableChecker.java trunk/model/src/app/net/sf/gridarta/model/validation/checks/DoubleLayerChecker.java trunk/model/src/app/net/sf/gridarta/model/validation/checks/SysObjectNotOnLayerZeroChecker.java trunk/model/src/app/net/sf/gridarta/model/validation/checks/Type.java Added Paths: ----------- trunk/test-mapvalidator/daimonin/arch/floor_fstone2a.arc trunk/test-mapvalidator/daimonin/arch/wagon_big.arc trunk/test-mapvalidator/daimonin/arch/wall_black1.arc trunk/test-mapvalidator/daimonin/maps/Layer trunk/test-mapvalidator/daimonin/maps/Layer.expected Modified: trunk/atrinik/ChangeLog =================================================================== --- trunk/atrinik/ChangeLog 2010-12-20 20:53:50 UTC (rev 8823) +++ trunk/atrinik/ChangeLog 2010-12-20 22:26:58 UTC (rev 8824) @@ -1,5 +1,8 @@ 2010-12-20 Andreas Kirschbaum + * Fix validators not using head part attributes but incorrectly + checking tail part attributes. + * Ignore case of file name extensions on case-insensitive file systems. Modified: trunk/crossfire/ChangeLog =================================================================== --- trunk/crossfire/ChangeLog 2010-12-20 20:53:50 UTC (rev 8823) +++ trunk/crossfire/ChangeLog 2010-12-20 22:26:58 UTC (rev 8824) @@ -1,5 +1,8 @@ 2010-12-20 Andreas Kirschbaum + * Fix validators not using head part attributes but incorrectly + checking tail part attributes. + * Ignore case of file name extensions on case-insensitive file systems. Modified: trunk/daimonin/ChangeLog =================================================================== --- trunk/daimonin/ChangeLog 2010-12-20 20:53:50 UTC (rev 8823) +++ trunk/daimonin/ChangeLog 2010-12-20 22:26:58 UTC (rev 8824) @@ -1,5 +1,8 @@ 2010-12-20 Andreas Kirschbaum + * Fix validators not using head part attributes but incorrectly + checking tail part attributes. + * Ignore case of file name extensions on case-insensitive file systems. Modified: trunk/model/src/app/net/sf/gridarta/model/validation/checks/BlockedSpawnPointChecker.java =================================================================== --- trunk/model/src/app/net/sf/gridarta/model/validation/checks/BlockedSpawnPointChecker.java 2010-12-20 20:53:50 UTC (rev 8823) +++ trunk/model/src/app/net/sf/gridarta/model/validation/checks/BlockedSpawnPointChecker.java 2010-12-20 22:26:58 UTC (rev 8824) @@ -112,11 +112,12 @@ * @param errorCollector where to add the errors to */ private void checkSpawnPoint(@NotNull final G gameObject, @NotNull final Point pos, @NotNull final BlockedMatrix<G, A, R> blocked, @NotNull final ErrorCollector<G, A, R> errorCollector) { - if (!typeNumbers.contains(gameObject.getTypeNo())) { + final GameObject<G, A, R> head = gameObject.getHead(); + if (!typeNumbers.contains(head.getTypeNo())) { return; } - final int spawnRange = Math.min(gameObject.getAttributeInt("last_heal"), freeArrX.length); + final int spawnRange = Math.min(head.getAttributeInt("last_heal"), freeArrX.length); for (int i = 0; i < spawnRange; i++) { if (!blocked.isBlocked(pos.x + freeArrX[i], pos.y + freeArrY[i])) { return; Modified: trunk/model/src/app/net/sf/gridarta/model/validation/checks/ConnectedPickableChecker.java =================================================================== --- trunk/model/src/app/net/sf/gridarta/model/validation/checks/ConnectedPickableChecker.java 2010-12-20 20:53:50 UTC (rev 8823) +++ trunk/model/src/app/net/sf/gridarta/model/validation/checks/ConnectedPickableChecker.java 2010-12-20 22:26:58 UTC (rev 8824) @@ -48,8 +48,9 @@ */ @Override public void validateGameObject(@NotNull final G gameObject, @NotNull final ErrorCollector<G, A, R> errorCollector) { - final boolean pickable = gameObject.getAttributeInt("no_pick", true) == 0; - final CharSequence connection = gameObject.getAttributeString("connected", true); + final GameObject<G, A, R> head = gameObject.getHead(); + final boolean pickable = head.getAttributeInt("no_pick", true) == 0; + final CharSequence connection = head.getAttributeString("connected", true); final boolean connected = connection.length() > 0; if (connected && pickable) { errorCollector.collect(new ConnectedPickableError<G, A, R>(gameObject)); Modified: trunk/model/src/app/net/sf/gridarta/model/validation/checks/DoubleLayerChecker.java =================================================================== --- trunk/model/src/app/net/sf/gridarta/model/validation/checks/DoubleLayerChecker.java 2010-12-20 20:53:50 UTC (rev 8823) +++ trunk/model/src/app/net/sf/gridarta/model/validation/checks/DoubleLayerChecker.java 2010-12-20 22:26:58 UTC (rev 8824) @@ -55,7 +55,7 @@ final Map<Integer, G> gameObjects = new HashMap<Integer, G>(); final Map<Integer, DoubleLayerError<G, A, R>> errors = new HashMap<Integer, DoubleLayerError<G, A, R>>(); for (final G gameObject : mapSquare) { - final int layer = gameObject.getAttributeInt("layer", true); + final int layer = gameObject.getHead().getAttributeInt("layer", true); if (layer == 0) { // ignore layer 0 } else { Modified: trunk/model/src/app/net/sf/gridarta/model/validation/checks/SysObjectNotOnLayerZeroChecker.java =================================================================== --- trunk/model/src/app/net/sf/gridarta/model/validation/checks/SysObjectNotOnLayerZeroChecker.java 2010-12-20 20:53:50 UTC (rev 8823) +++ trunk/model/src/app/net/sf/gridarta/model/validation/checks/SysObjectNotOnLayerZeroChecker.java 2010-12-20 22:26:58 UTC (rev 8824) @@ -48,7 +48,8 @@ */ @Override public void validateGameObject(@NotNull final G gameObject, @NotNull final ErrorCollector<G, A, R> errorCollector) { - if (gameObject.getAttributeInt("sys_object", true) == 1 && gameObject.getAttributeInt("layer", true) != 0) { + final GameObject<G, A, R> head = gameObject.getHead(); + if (head.getAttributeInt("sys_object", true) == 1 && head.getAttributeInt("layer", true) != 0) { errorCollector.collect(new SysObjectNotOnLayerZeroError<G, A, R>(gameObject)); } } Modified: trunk/model/src/app/net/sf/gridarta/model/validation/checks/Type.java =================================================================== --- trunk/model/src/app/net/sf/gridarta/model/validation/checks/Type.java 2010-12-20 20:53:50 UTC (rev 8823) +++ trunk/model/src/app/net/sf/gridarta/model/validation/checks/Type.java 2010-12-20 22:26:58 UTC (rev 8824) @@ -64,7 +64,7 @@ for (final Map.Entry<String, RangeEntry<G, A, R>> e : entries.entrySet()) { final String name = e.getKey(); final RangeEntry<G, A, R> entry = e.getValue(); - entry.validate(gameObject.getAttributeInt(name), gameObject, errorCollector); + entry.validate(gameObject.getHead().getAttributeInt(name), gameObject, errorCollector); } } Added: trunk/test-mapvalidator/daimonin/arch/floor_fstone2a.arc =================================================================== --- trunk/test-mapvalidator/daimonin/arch/floor_fstone2a.arc (rev 0) +++ trunk/test-mapvalidator/daimonin/arch/floor_fstone2a.arc 2010-12-20 22:26:58 UTC (rev 8824) @@ -0,0 +1,9 @@ +Object floor_fstone2a +name floor +#face floor_fstone2a.101 +layer 1 +terrain_type 1 +type 71 +no_teleport 1 +no_pick 1 +end Property changes on: trunk/test-mapvalidator/daimonin/arch/floor_fstone2a.arc ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:eol-style + LF Added: trunk/test-mapvalidator/daimonin/arch/wagon_big.arc =================================================================== --- trunk/test-mapvalidator/daimonin/arch/wagon_big.arc (rev 0) +++ trunk/test-mapvalidator/daimonin/arch/wagon_big.arc 2010-12-20 22:26:58 UTC (rev 8824) @@ -0,0 +1,46 @@ +Object wagon_big +name big wagon +layer 5 +type 79 +mpart_id 3 +#face wagon_big.131 +#animation wagon_big +is_turnable 1 +direction 1 +no_pass 1 +no_pick 1 +end +More +Object wagon_big_a +name big wagon +layer 5 +type 79 +mpart_id 3 +mpart_nr 1 +x 1 +no_pass 1 +no_pick 1 +end +More +Object wagon_big_b +name big wagon +layer 5 +type 79 +mpart_id 3 +mpart_nr 2 +y 1 +no_pass 1 +no_pick 1 +end +More +Object wagon_big_c +name big wagon +layer 5 +type 79 +mpart_id 3 +mpart_nr 3 +x 1 +y 1 +no_pass 1 +no_pick 1 +end Property changes on: trunk/test-mapvalidator/daimonin/arch/wagon_big.arc ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:eol-style + LF Added: trunk/test-mapvalidator/daimonin/arch/wall_black1.arc =================================================================== --- trunk/test-mapvalidator/daimonin/arch/wall_black1.arc (rev 0) +++ trunk/test-mapvalidator/daimonin/arch/wall_black1.arc 2010-12-20 22:26:58 UTC (rev 8824) @@ -0,0 +1,9 @@ +Object wall_black1.111 +name stone wall +#face wall_black1.d.111 +blocksview 1 +type 77 +layer 5 +no_pick 1 +no_pass 1 +end Property changes on: trunk/test-mapvalidator/daimonin/arch/wall_black1.arc ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:eol-style + LF Added: trunk/test-mapvalidator/daimonin/maps/Layer =================================================================== --- trunk/test-mapvalidator/daimonin/maps/Layer (rev 0) +++ trunk/test-mapvalidator/daimonin/maps/Layer 2010-12-20 22:26:58 UTC (rev 8824) @@ -0,0 +1,32 @@ +arch map +name validation error +msg +Created: 2010-12-20 smacky +endmsg +width 2 +height 2 +difficulty 1 +darkness -1 +end +arch floor_fstone2a +end +arch wagon_big +layer 4 +end +arch floor_fstone2a +y 1 +end +arch wall_black1.111 +y 1 +end +arch floor_fstone2a +x 1 +end +arch floor_fstone2a +x 1 +y 1 +end +arch wall_black1.111 +x 1 +y 1 +end Property changes on: trunk/test-mapvalidator/daimonin/maps/Layer ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:eol-style + LF Property changes on: trunk/test-mapvalidator/daimonin/maps/Layer.expected ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:eol-style + LF This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2010-12-20 20:53:57
|
Revision: 8823 http://gridarta.svn.sourceforge.net/gridarta/?rev=8823&view=rev Author: akirschbaum Date: 2010-12-20 20:53:50 +0000 (Mon, 20 Dec 2010) Log Message: ----------- Ignore case of file name extensions on case-insensitive file systems. Modified Paths: -------------- trunk/atrinik/ChangeLog trunk/atrinik.iml trunk/build.xml trunk/crossfire/ChangeLog trunk/crossfire.iml trunk/daimonin/ChangeLog trunk/daimonin.iml trunk/gridarta.iml trunk/model.iml trunk/utils.iml Added Paths: ----------- trunk/lib/japi-lib-util-trunk-1410.jar Removed Paths: ------------- trunk/lib/japi-lib-util-trunk-1379.jar Modified: trunk/atrinik/ChangeLog =================================================================== --- trunk/atrinik/ChangeLog 2010-12-20 19:18:01 UTC (rev 8822) +++ trunk/atrinik/ChangeLog 2010-12-20 20:53:50 UTC (rev 8823) @@ -1,5 +1,8 @@ 2010-12-20 Andreas Kirschbaum + * Ignore case of file name extensions on case-insensitive file + systems. + * Enable/disable "enter xyz map" actions when tile paths are modified. Modified: trunk/atrinik.iml =================================================================== --- trunk/atrinik.iml 2010-12-20 19:18:01 UTC (rev 8822) +++ trunk/atrinik.iml 2010-12-20 20:53:50 UTC (rev 8823) @@ -71,7 +71,7 @@ <orderEntry type="module-library"> <library> <CLASSES> - <root url="jar://$MODULE_DIR$/lib/japi-lib-util-trunk-1379.jar!/" /> + <root url="jar://$MODULE_DIR$/lib/japi-lib-util-trunk-1410.jar!/" /> </CLASSES> <JAVADOC /> <SOURCES /> Modified: trunk/build.xml =================================================================== --- trunk/build.xml 2010-12-20 19:18:01 UTC (rev 8822) +++ trunk/build.xml 2010-12-20 20:53:50 UTC (rev 8823) @@ -139,7 +139,7 @@ <path id="path.lib.japi-swing-misc" location="lib/japi-lib-swing-misc-trunk-1398.jar"/> <path id="path.lib.japi-swing-prefs" location="lib/japi-lib-swing-prefs-0.1.0.jar"/> <path id="path.lib.japi-swing-tod" location="lib/japi-lib-swing-tod-0.1.0.jar"/> - <path id="path.lib.japi-util" location="lib/japi-lib-util-trunk-1379.jar"/> + <path id="path.lib.japi-util" location="lib/japi-lib-util-trunk-1410.jar"/> <path id="path.lib.japi-xml" location="lib/japi-lib-xml-0.1.0.jar"/> <path id="path.lib.jdom" location="lib/jdom.jar"/> <path id="path.lib.log4j" location="lib/log4j-1.2.13.jar"/> Modified: trunk/crossfire/ChangeLog =================================================================== --- trunk/crossfire/ChangeLog 2010-12-20 19:18:01 UTC (rev 8822) +++ trunk/crossfire/ChangeLog 2010-12-20 20:53:50 UTC (rev 8823) @@ -1,5 +1,8 @@ 2010-12-20 Andreas Kirschbaum + * Ignore case of file name extensions on case-insensitive file + systems. + * Enable/disable "enter xyz map" actions when tile paths are modified. Modified: trunk/crossfire.iml =================================================================== --- trunk/crossfire.iml 2010-12-20 19:18:01 UTC (rev 8822) +++ trunk/crossfire.iml 2010-12-20 20:53:50 UTC (rev 8823) @@ -90,7 +90,7 @@ <orderEntry type="module-library"> <library> <CLASSES> - <root url="jar://$MODULE_DIR$/lib/japi-lib-util-trunk-1379.jar!/" /> + <root url="jar://$MODULE_DIR$/lib/japi-lib-util-trunk-1410.jar!/" /> </CLASSES> <JAVADOC /> <SOURCES /> Modified: trunk/daimonin/ChangeLog =================================================================== --- trunk/daimonin/ChangeLog 2010-12-20 19:18:01 UTC (rev 8822) +++ trunk/daimonin/ChangeLog 2010-12-20 20:53:50 UTC (rev 8823) @@ -1,5 +1,8 @@ 2010-12-20 Andreas Kirschbaum + * Ignore case of file name extensions on case-insensitive file + systems. + * Enable/disable "enter xyz map" actions when tile paths are modified. Modified: trunk/daimonin.iml =================================================================== --- trunk/daimonin.iml 2010-12-20 19:18:01 UTC (rev 8822) +++ trunk/daimonin.iml 2010-12-20 20:53:50 UTC (rev 8823) @@ -71,7 +71,7 @@ <orderEntry type="module-library"> <library> <CLASSES> - <root url="jar://$MODULE_DIR$/lib/japi-lib-util-trunk-1379.jar!/" /> + <root url="jar://$MODULE_DIR$/lib/japi-lib-util-trunk-1410.jar!/" /> </CLASSES> <JAVADOC /> <SOURCES /> Modified: trunk/gridarta.iml =================================================================== --- trunk/gridarta.iml 2010-12-20 19:18:01 UTC (rev 8822) +++ trunk/gridarta.iml 2010-12-20 20:53:50 UTC (rev 8823) @@ -127,7 +127,7 @@ <orderEntry type="module-library"> <library> <CLASSES> - <root url="jar://$MODULE_DIR$/lib/japi-lib-util-trunk-1379.jar!/" /> + <root url="jar://$MODULE_DIR$/lib/japi-lib-util-trunk-1410.jar!/" /> </CLASSES> <JAVADOC /> <SOURCES /> Deleted: trunk/lib/japi-lib-util-trunk-1379.jar =================================================================== (Binary files differ) Added: trunk/lib/japi-lib-util-trunk-1410.jar =================================================================== (Binary files differ) Property changes on: trunk/lib/japi-lib-util-trunk-1410.jar ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Modified: trunk/model.iml =================================================================== --- trunk/model.iml 2010-12-20 19:18:01 UTC (rev 8822) +++ trunk/model.iml 2010-12-20 20:53:50 UTC (rev 8823) @@ -39,7 +39,7 @@ <orderEntry type="module-library"> <library> <CLASSES> - <root url="jar://$MODULE_DIR$/lib/japi-lib-util-trunk-1379.jar!/" /> + <root url="jar://$MODULE_DIR$/lib/japi-lib-util-trunk-1410.jar!/" /> </CLASSES> <JAVADOC /> <SOURCES /> Modified: trunk/utils.iml =================================================================== --- trunk/utils.iml 2010-12-20 19:18:01 UTC (rev 8822) +++ trunk/utils.iml 2010-12-20 20:53:50 UTC (rev 8823) @@ -28,7 +28,7 @@ <orderEntry type="module-library"> <library> <CLASSES> - <root url="jar://$MODULE_DIR$/lib/japi-lib-util-trunk-1379.jar!/" /> + <root url="jar://$MODULE_DIR$/lib/japi-lib-util-trunk-1410.jar!/" /> </CLASSES> <JAVADOC /> <SOURCES /> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2010-12-20 19:18:08
|
Revision: 8822 http://gridarta.svn.sourceforge.net/gridarta/?rev=8822&view=rev Author: akirschbaum Date: 2010-12-20 19:18:01 +0000 (Mon, 20 Dec 2010) Log Message: ----------- Enable/disable "enter xyz map" actions when tile paths are modified. Modified Paths: -------------- trunk/atrinik/ChangeLog trunk/crossfire/ChangeLog trunk/daimonin/ChangeLog trunk/src/app/net/sf/gridarta/gui/map/mapactions/MapActions.java Modified: trunk/atrinik/ChangeLog =================================================================== --- trunk/atrinik/ChangeLog 2010-12-20 19:04:00 UTC (rev 8821) +++ trunk/atrinik/ChangeLog 2010-12-20 19:18:01 UTC (rev 8822) @@ -1,3 +1,8 @@ +2010-12-20 Andreas Kirschbaum + + * Enable/disable "enter xyz map" actions when tile paths are + modified. + 2010-12-12 Andreas Kirschbaum * Always edit the head part of multi-square game objects in the Modified: trunk/crossfire/ChangeLog =================================================================== --- trunk/crossfire/ChangeLog 2010-12-20 19:04:00 UTC (rev 8821) +++ trunk/crossfire/ChangeLog 2010-12-20 19:18:01 UTC (rev 8822) @@ -1,3 +1,8 @@ +2010-12-20 Andreas Kirschbaum + + * Enable/disable "enter xyz map" actions when tile paths are + modified. + 2010-12-12 Andreas Kirschbaum * Always edit the head part of multi-square game objects in the Modified: trunk/daimonin/ChangeLog =================================================================== --- trunk/daimonin/ChangeLog 2010-12-20 19:04:00 UTC (rev 8821) +++ trunk/daimonin/ChangeLog 2010-12-20 19:18:01 UTC (rev 8822) @@ -1,3 +1,8 @@ +2010-12-20 Andreas Kirschbaum + + * Enable/disable "enter xyz map" actions when tile paths are + modified. + 2010-12-12 Andreas Kirschbaum * Always edit the head part of multi-square game objects in the Modified: trunk/src/app/net/sf/gridarta/gui/map/mapactions/MapActions.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/map/mapactions/MapActions.java 2010-12-20 19:04:00 UTC (rev 8821) +++ trunk/src/app/net/sf/gridarta/gui/map/mapactions/MapActions.java 2010-12-20 19:18:01 UTC (rev 8822) @@ -44,6 +44,7 @@ import net.sf.gridarta.model.exitconnector.ExitMatcher; import net.sf.gridarta.model.gameobject.GameObject; import net.sf.gridarta.model.maparchobject.MapArchObject; +import net.sf.gridarta.model.maparchobject.MapArchObjectListener; import net.sf.gridarta.model.mapcontrol.MapControl; import net.sf.gridarta.model.mapcursor.MapCursor; import net.sf.gridarta.model.mapcursor.MapCursorEvent; @@ -342,10 +343,14 @@ public void activeMapViewChanged(@Nullable final MapView<G, A, R> mapView) { if (currentMapView != null) { currentMapView.getMapViewBasic().getMapCursor().removeMapCursorListener(mapCursorListener); + assert currentMapView != null; + currentMapView.getMapControl().getMapModel().getMapArchObject().removeMapArchObjectListener(mapArchObjectListener); } currentMapView = mapView; if (currentMapView != null) { currentMapView.getMapViewBasic().getMapCursor().addMapCursorListener(mapCursorListener); + assert currentMapView != null; + currentMapView.getMapControl().getMapModel().getMapArchObject().addMapArchObjectListener(mapArchObjectListener); } updateActions(); } @@ -385,6 +390,24 @@ }; /** + * The {@link MapArchObjectListener} attached to {@link #currentMapView}. + */ + @NotNull + private final MapArchObjectListener mapArchObjectListener = new MapArchObjectListener() { + + @Override + public void mapMetaChanged() { + updateActions(); + } + + @Override + public void mapSizeChanged(@NotNull final Size2D mapSize) { + // ignore + } + + }; + + /** * Create a new instance. * @param parent the component for showing dialog boxes * @param helpParent the parent frame for help windows @@ -424,6 +447,8 @@ currentMapView = mapViewManager.getActiveMapView(); if (currentMapView != null) { currentMapView.getMapViewBasic().getMapCursor().addMapCursorListener(mapCursorListener); + assert currentMapView != null; + currentMapView.getMapControl().getMapModel().getMapArchObject().addMapArchObjectListener(mapArchObjectListener); } updateActions(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2010-12-20 19:04:06
|
Revision: 8821 http://gridarta.svn.sourceforge.net/gridarta/?rev=8821&view=rev Author: akirschbaum Date: 2010-12-20 19:04:00 +0000 (Mon, 20 Dec 2010) Log Message: ----------- Add @NotNull annotations. Modified Paths: -------------- trunk/model/src/app/net/sf/gridarta/model/maparchobject/AbstractMapArchObject.java Modified: trunk/model/src/app/net/sf/gridarta/model/maparchobject/AbstractMapArchObject.java =================================================================== --- trunk/model/src/app/net/sf/gridarta/model/maparchobject/AbstractMapArchObject.java 2010-12-20 18:58:47 UTC (rev 8820) +++ trunk/model/src/app/net/sf/gridarta/model/maparchobject/AbstractMapArchObject.java 2010-12-20 19:04:00 UTC (rev 8821) @@ -60,16 +60,19 @@ * The prefix for the map attribute that is updated with the last * modification timestamp. */ + @NotNull private static final String MODIFIED_ATTRIBUTE = "Modified:"; /** * The pattern to find the {@link #MODIFIED_ATTRIBUTE} in the message text. */ + @NotNull private static final Pattern MODIFIED_ATTRIBUTE_PATTERN = Pattern.compile("^" + MODIFIED_ATTRIBUTE + " *(.*)$", Pattern.MULTILINE); /** * The map text. */ + @NotNull private StringBuilder msgText = new StringBuilder(); /** @@ -130,11 +133,13 @@ * The map tile paths used for map tiling. 0 = north, 1 = east, 2 = south, 3 * = west. 4 = northeast, 5 = southeast, 6 = southwest, 7 = northwest */ + @NotNull private String[] tilePaths = new String[Direction.values().length]; /** * The registered event listeners. */ + @NotNull private final EventListenerList2<MapArchObjectListener> listenerList = new EventListenerList2<MapArchObjectListener>(MapArchObjectListener.class); /** @@ -671,6 +676,7 @@ * Returns this map arch object cast to its real type. * @return this map arch object */ + @NotNull protected abstract A getThis(); } // class AbstractMapArchObject This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2010-12-20 18:58:54
|
Revision: 8820 http://gridarta.svn.sourceforge.net/gridarta/?rev=8820&view=rev Author: akirschbaum Date: 2010-12-20 18:58:47 +0000 (Mon, 20 Dec 2010) Log Message: ----------- Add @NotNull annotations. Modified Paths: -------------- trunk/src/app/net/sf/gridarta/gui/map/mapactions/MapActions.java Modified: trunk/src/app/net/sf/gridarta/gui/map/mapactions/MapActions.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/map/mapactions/MapActions.java 2010-12-20 18:57:15 UTC (rev 8819) +++ trunk/src/app/net/sf/gridarta/gui/map/mapactions/MapActions.java 2010-12-20 18:58:47 UTC (rev 8820) @@ -77,6 +77,7 @@ /** * Action Builder to create Actions. */ + @NotNull private static final ActionBuilder ACTION_BUILDER = ActionBuilderFactory.getInstance().getActionBuilder("net.sf.gridarta"); /** @@ -256,6 +257,7 @@ * The {@link MapViewSettingsListener} attached to {@link * #mapViewSettings}. */ + @NotNull private final MapViewSettingsListener mapViewSettingsListener = new MapViewSettingsListener() { /** {@inheritDoc} */ @@ -300,6 +302,7 @@ * The map manager listener which is attached to the current map if the * current map is tracked. Otherwise it is unused. */ + @NotNull private final MapManagerListener<G, A, R> mapManagerListener = new MapManagerListener<G, A, R>() { /** {@inheritDoc} */ @@ -364,6 +367,7 @@ /** * The map cursor listener which is attached to {@link #currentMapView}. */ + @NotNull private final MapCursorListener mapCursorListener = new MapCursorListener() { /** {@inheritDoc} */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2010-12-20 18:57:21
|
Revision: 8819 http://gridarta.svn.sourceforge.net/gridarta/?rev=8819&view=rev Author: akirschbaum Date: 2010-12-20 18:57:15 +0000 (Mon, 20 Dec 2010) Log Message: ----------- Add @NotNull annotations. Modified Paths: -------------- trunk/src/app/net/sf/gridarta/gui/mapcursor/MapCursorActions.java Modified: trunk/src/app/net/sf/gridarta/gui/mapcursor/MapCursorActions.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/mapcursor/MapCursorActions.java 2010-12-12 14:43:17 UTC (rev 8818) +++ trunk/src/app/net/sf/gridarta/gui/mapcursor/MapCursorActions.java 2010-12-20 18:57:15 UTC (rev 8819) @@ -54,82 +54,98 @@ /** * Actions for "go". */ + @NotNull private final Action[] aGo; /** * Action for "go location". */ + @NotNull private final Action aGoLocation; /** * Action for "select square". */ + @NotNull private final Action aSelectSquare; /** * Action for "add to selection". */ + @NotNull private final Action aAddToSelection; /** * Action for "remove from selection". */ + @NotNull private final Action aSubFromSelection; /** * Action for "stop stop drag". */ + @NotNull private final Action aStartStopDrag; /** * Action for "release drag". */ + @NotNull private final Action aReleaseDrag; /** * Action for "insert arch". */ + @NotNull private final Action aInsertArch; /** * Action for "delete arch". */ + @NotNull private final Action aDeleteArch; /** * Action for "select arch above". */ + @NotNull private final Action aSelectArchAbove; /** * Action for "select arch below". */ + @NotNull private final Action aSelectArchBelow; /** * Action for "arch attributes". */ + @NotNull private final Action aArchAttributes; /** * The factory for creating game object attributes dialog instances. - */ + */@NotNull + private final GameObjectAttributesDialogFactory<G, A, R> gameObjectAttributesDialogFactory; /** * The selected square control. */ + @NotNull private final SelectedSquareControl<G, A, R> selectedSquareControl; /** * The selected square model. */ + @NotNull private final SelectedSquareModel<G, A, R> selectedSquareModel; /** * The {@link GoLocationDialogManager} to track go location dialog * instances. */ + @NotNull private final AbstractPerMapDialogManager<G, A, R, GoLocationDialog<G, A, R>> goLocationDialogManager; /** @@ -141,6 +157,7 @@ /** * The map view manager listener used to detect changed current maps. */ + @NotNull private final MapViewManagerListener<G, A, R> mapViewManagerListener = new MapViewManagerListener<G, A, R>() { /** {@inheritDoc} */ @@ -168,6 +185,7 @@ * The map cursor listener used to detect cursor state changes in {@link * #currentMapView}. */ + @NotNull private final MapCursorListener mapCursorListener = new MapCursorListener() { /** {@inheritDoc} */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2010-12-12 14:43:23
|
Revision: 8818 http://gridarta.svn.sourceforge.net/gridarta/?rev=8818&view=rev Author: akirschbaum Date: 2010-12-12 14:43:17 +0000 (Sun, 12 Dec 2010) Log Message: ----------- Always edit the head part of multi-square game objects in the game object text editor. Modified Paths: -------------- trunk/atrinik/ChangeLog trunk/crossfire/ChangeLog trunk/daimonin/ChangeLog trunk/src/app/net/sf/gridarta/gui/gameobjectattributespanel/GameObjectAttributesControl.java trunk/src/app/net/sf/gridarta/gui/selectedsquare/SelectedSquareModel.java trunk/src/app/net/sf/gridarta/gui/selectedsquare/SelectedSquareModelListener.java Modified: trunk/atrinik/ChangeLog =================================================================== --- trunk/atrinik/ChangeLog 2010-12-12 14:29:57 UTC (rev 8817) +++ trunk/atrinik/ChangeLog 2010-12-12 14:43:17 UTC (rev 8818) @@ -1,5 +1,8 @@ 2010-12-12 Andreas Kirschbaum + * Always edit the head part of multi-square game objects in the + game object text editor. + * Add "Split Mode" action for tabs in main window. This allows up to two open tabs on each side of the main window. Modified: trunk/crossfire/ChangeLog =================================================================== --- trunk/crossfire/ChangeLog 2010-12-12 14:29:57 UTC (rev 8817) +++ trunk/crossfire/ChangeLog 2010-12-12 14:43:17 UTC (rev 8818) @@ -1,5 +1,8 @@ 2010-12-12 Andreas Kirschbaum + * Always edit the head part of multi-square game objects in the + game object text editor. + * Add "Split Mode" action for tabs in main window. This allows up to two open tabs on each side of the main window. Modified: trunk/daimonin/ChangeLog =================================================================== --- trunk/daimonin/ChangeLog 2010-12-12 14:29:57 UTC (rev 8817) +++ trunk/daimonin/ChangeLog 2010-12-12 14:43:17 UTC (rev 8818) @@ -1,5 +1,8 @@ 2010-12-12 Andreas Kirschbaum + * Always edit the head part of multi-square game objects in the + game object text editor. + * Add "Split Mode" action for tabs in main window. This allows up to two open tabs on each side of the main window. Modified: trunk/src/app/net/sf/gridarta/gui/gameobjectattributespanel/GameObjectAttributesControl.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/gameobjectattributespanel/GameObjectAttributesControl.java 2010-12-12 14:29:57 UTC (rev 8817) +++ trunk/src/app/net/sf/gridarta/gui/gameobjectattributespanel/GameObjectAttributesControl.java 2010-12-12 14:43:17 UTC (rev 8818) @@ -335,7 +335,7 @@ /** {@inheritDoc} */ @Override public void selectedGameObjectChanged(@Nullable final G gameObject) { - gameObjectAttributesModel.setSelectedGameObject(gameObject == null ? null : gameObject.getHead()); + gameObjectAttributesModel.setSelectedGameObject(gameObject); } /** {@inheritDoc} */ Modified: trunk/src/app/net/sf/gridarta/gui/selectedsquare/SelectedSquareModel.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/selectedsquare/SelectedSquareModel.java 2010-12-12 14:29:57 UTC (rev 8817) +++ trunk/src/app/net/sf/gridarta/gui/selectedsquare/SelectedSquareModel.java 2010-12-12 14:43:17 UTC (rev 8818) @@ -95,8 +95,9 @@ * @param gameObject the currently selected game object */ private void fireSelectedGameObjectChangedEvent(@Nullable final G gameObject) { + final G head = gameObject == null ? null : gameObject.getHead(); for (final SelectedSquareModelListener<G, A, R> listener : listenerList.getListeners()) { - listener.selectedGameObjectChanged(gameObject); + listener.selectedGameObjectChanged(head); } } Modified: trunk/src/app/net/sf/gridarta/gui/selectedsquare/SelectedSquareModelListener.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/selectedsquare/SelectedSquareModelListener.java 2010-12-12 14:29:57 UTC (rev 8817) +++ trunk/src/app/net/sf/gridarta/gui/selectedsquare/SelectedSquareModelListener.java 2010-12-12 14:43:17 UTC (rev 8818) @@ -33,7 +33,8 @@ public interface SelectedSquareModelListener<G extends GameObject<G, A, R>, A extends MapArchObject<A>, R extends Archetype<G, A, R>> extends EventListener { /** - * The selected game object has changed. + * The selected game object has changed. The passed game object is always + * the head part. * @param gameObject the new game object, or <code>null</code> if no game * object is selected */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2010-12-12 14:30:03
|
Revision: 8817 http://gridarta.svn.sourceforge.net/gridarta/?rev=8817&view=rev Author: akirschbaum Date: 2010-12-12 14:29:57 +0000 (Sun, 12 Dec 2010) Log Message: ----------- Use proper map transactions when applying changes from the game object text editor. Modified Paths: -------------- trunk/src/app/net/sf/gridarta/gui/mainwindow/GameObjectTextEditorTab.java Modified: trunk/src/app/net/sf/gridarta/gui/mainwindow/GameObjectTextEditorTab.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/mainwindow/GameObjectTextEditorTab.java 2010-12-12 14:24:55 UTC (rev 8816) +++ trunk/src/app/net/sf/gridarta/gui/mainwindow/GameObjectTextEditorTab.java 2010-12-12 14:29:57 UTC (rev 8817) @@ -276,13 +276,26 @@ * Applies pending changed. Protects against recursive calls. */ private void autoApplyArchPanelChanges() { - if (selectedGameObject == null || isInAutoApplyArchPanelChanges || isInMapTransaction) { + final GameObject<G, A, R> gameObject = selectedGameObject; + if (gameObject == null || isInAutoApplyArchPanelChanges || isInMapTransaction) { return; } + final MapSquare<G, A, R> mapSquare = gameObject.getMapSquare(); + if (mapSquare == null) { + return; + } + + final MapModel<G, A, R> mapModel = mapSquare.getMapModel(); + isInAutoApplyArchPanelChanges = true; try { - gameObjectTextEditor.applyChanges(selectedGameObject); + mapModel.beginTransaction("Change object attributes"); + try { + gameObjectTextEditor.applyChanges(gameObject); + } finally { + mapModel.endTransaction(); + } } finally { isInAutoApplyArchPanelChanges = false; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2010-12-12 14:25:03
|
Revision: 8816 http://gridarta.svn.sourceforge.net/gridarta/?rev=8816&view=rev Author: akirschbaum Date: 2010-12-12 14:24:55 +0000 (Sun, 12 Dec 2010) Log Message: ----------- Add "Split Mode" action for tabs in main window. Modified Paths: -------------- trunk/atrinik/ChangeLog trunk/crossfire/ChangeLog trunk/daimonin/ChangeLog trunk/src/app/net/sf/gridarta/gui/mainwindow/GameObjectTab.java trunk/src/app/net/sf/gridarta/gui/mainwindow/GameObjectTextEditorTab.java trunk/src/app/net/sf/gridarta/gui/mainwindow/WarningsTab.java trunk/src/app/net/sf/gridarta/gui/misc/MainView.java trunk/src/app/net/sf/gridarta/gui/misc/MainViewActions.java trunk/src/app/net/sf/gridarta/gui/utils/borderpanel/BorderPanel.java trunk/src/app/net/sf/gridarta/gui/utils/borderpanel/BorderPanelListener.java trunk/src/app/net/sf/gridarta/gui/utils/borderpanel/BorderSplitPane.java trunk/src/app/net/sf/gridarta/gui/utils/borderpanel/BorderSplitPaneListener.java trunk/src/app/net/sf/gridarta/gui/utils/borderpanel/Location.java trunk/src/app/net/sf/gridarta/gui/utils/tabbedpanel/ButtonList.java trunk/src/app/net/sf/gridarta/gui/utils/tabbedpanel/ButtonLists.java trunk/src/app/net/sf/gridarta/gui/utils/tabbedpanel/MoveToActions.java trunk/src/app/net/sf/gridarta/gui/utils/tabbedpanel/Tab.java trunk/src/app/net/sf/gridarta/gui/utils/tabbedpanel/TabbedPanel.java trunk/src/app/net/sf/gridarta/maincontrol/GUIMainControl.java trunk/src/app/net/sf/gridarta/messages.properties trunk/src/app/net/sf/gridarta/messages_de.properties trunk/src/app/net/sf/gridarta/messages_fr.properties trunk/src/app/net/sf/gridarta/messages_sv.properties Added Paths: ----------- trunk/src/app/net/sf/gridarta/gui/utils/tabbedpanel/DoubleButtonList.java Modified: trunk/atrinik/ChangeLog =================================================================== --- trunk/atrinik/ChangeLog 2010-12-10 19:57:25 UTC (rev 8815) +++ trunk/atrinik/ChangeLog 2010-12-12 14:24:55 UTC (rev 8816) @@ -1,3 +1,8 @@ +2010-12-12 Andreas Kirschbaum + + * Add "Split Mode" action for tabs in main window. This allows up + to two open tabs on each side of the main window. + 2010-12-10 Andreas Kirschbaum * Add "Text Editor" tab. Modified: trunk/crossfire/ChangeLog =================================================================== --- trunk/crossfire/ChangeLog 2010-12-10 19:57:25 UTC (rev 8815) +++ trunk/crossfire/ChangeLog 2010-12-12 14:24:55 UTC (rev 8816) @@ -1,3 +1,8 @@ +2010-12-12 Andreas Kirschbaum + + * Add "Split Mode" action for tabs in main window. This allows up + to two open tabs on each side of the main window. + 2010-12-10 Andreas Kirschbaum * Add "Text Editor" tab. Modified: trunk/daimonin/ChangeLog =================================================================== --- trunk/daimonin/ChangeLog 2010-12-10 19:57:25 UTC (rev 8815) +++ trunk/daimonin/ChangeLog 2010-12-12 14:24:55 UTC (rev 8816) @@ -1,3 +1,8 @@ +2010-12-12 Andreas Kirschbaum + + * Add "Split Mode" action for tabs in main window. This allows up + to two open tabs on each side of the main window. + 2010-12-10 Andreas Kirschbaum * Add "Text Editor" tab. Modified: trunk/src/app/net/sf/gridarta/gui/mainwindow/GameObjectTab.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/mainwindow/GameObjectTab.java 2010-12-10 19:57:25 UTC (rev 8815) +++ trunk/src/app/net/sf/gridarta/gui/mainwindow/GameObjectTab.java 2010-12-12 14:24:55 UTC (rev 8816) @@ -41,11 +41,13 @@ * @param gameObjectAttributesControl the game object attributes control to * display * @param location the tab's location + * @param alternativeLocation whether the tab is shown in the alternative + * location * @param index the tab's index for ordering * @param defaultOpen the tab's default opened status */ - public GameObjectTab(@NotNull final String ident, @NotNull final GameObjectAttributesControl<G, A, R> gameObjectAttributesControl, @NotNull final Location location, final int index, final boolean defaultOpen) { - super(ident, gameObjectAttributesControl, location, index, defaultOpen); + public GameObjectTab(@NotNull final String ident, @NotNull final GameObjectAttributesControl<G, A, R> gameObjectAttributesControl, @NotNull final Location location, final boolean alternativeLocation, final int index, final boolean defaultOpen) { + super(ident, gameObjectAttributesControl, location, alternativeLocation, index, defaultOpen); final GameObjectAttributesControlListener gameObjectAttributesControlListener = new GameObjectAttributesControlListener() { /** Modified: trunk/src/app/net/sf/gridarta/gui/mainwindow/GameObjectTextEditorTab.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/mainwindow/GameObjectTextEditorTab.java 2010-12-10 19:57:25 UTC (rev 8815) +++ trunk/src/app/net/sf/gridarta/gui/mainwindow/GameObjectTextEditorTab.java 2010-12-12 14:24:55 UTC (rev 8816) @@ -221,13 +221,15 @@ * @param ident the tab's identification string * @param gameObjectTextEditor the game object text editor to show * @param defaultLocation the tab's default location + * @param alternativeLocation whether the tab is shown in the alternative + * location * @param index the tab's index for ordering * @param defaultOpen the tab's default opened status * @param selectedSquareModel the selected square mode to track * @param mapManager the map manager to track */ - public GameObjectTextEditorTab(@NotNull final String ident, @NotNull final GameObjectTextEditor gameObjectTextEditor, @NotNull final Location defaultLocation, final int index, final boolean defaultOpen, @NotNull final SelectedSquareModel<G, A, R> selectedSquareModel, @NotNull final MapManager<G, A, R> mapManager) { - super(ident, gameObjectTextEditor, defaultLocation, index, defaultOpen); + public GameObjectTextEditorTab(@NotNull final String ident, @NotNull final GameObjectTextEditor gameObjectTextEditor, @NotNull final Location defaultLocation, final boolean alternativeLocation, final int index, final boolean defaultOpen, @NotNull final SelectedSquareModel<G, A, R> selectedSquareModel, @NotNull final MapManager<G, A, R> mapManager) { + super(ident, gameObjectTextEditor, defaultLocation, alternativeLocation, index, defaultOpen); this.gameObjectTextEditor = gameObjectTextEditor; selectedSquareModel.addSelectedSquareListener(new SelectedSquareModelListener<G, A, R>() { Modified: trunk/src/app/net/sf/gridarta/gui/mainwindow/WarningsTab.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/mainwindow/WarningsTab.java 2010-12-10 19:57:25 UTC (rev 8815) +++ trunk/src/app/net/sf/gridarta/gui/mainwindow/WarningsTab.java 2010-12-12 14:24:55 UTC (rev 8816) @@ -40,11 +40,13 @@ * @param ident the tab's identification string * @param errorListView the error list view to display * @param location the tab's location + * @param alternativeLocation whether the tab is shown in the alternative + * location * @param index the tab's index for ordering * @param defaultOpen the tab's default opened status */ - public WarningsTab(@NotNull final String ident, @NotNull final ErrorListView<G, A, R> errorListView, @NotNull final Location location, final int index, final boolean defaultOpen) { - super(ident, errorListView, location, index, defaultOpen); + public WarningsTab(@NotNull final String ident, @NotNull final ErrorListView<G, A, R> errorListView, @NotNull final Location location, final boolean alternativeLocation, final int index, final boolean defaultOpen) { + super(ident, errorListView, location, alternativeLocation, index, defaultOpen); final ErrorListViewListener errorListViewListener = new ErrorListViewListener() { /** Modified: trunk/src/app/net/sf/gridarta/gui/misc/MainView.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/misc/MainView.java 2010-12-10 19:57:25 UTC (rev 8815) +++ trunk/src/app/net/sf/gridarta/gui/misc/MainView.java 2010-12-12 14:24:55 UTC (rev 8816) @@ -185,11 +185,13 @@ * Returns the active {@link Tab} on a given {@link Location} of the main * view. * @param location the location + * @param alternativeLocation whether the alternative location should be + * checked * @return the tab or <code>null</code> if no active tab exists */ @Nullable - public Tab getActiveTab(@NotNull final Location location) { - return tabbedPanel.getActiveTab(location); + public Tab getActiveTab(@NotNull final Location location, final boolean alternativeLocation) { + return tabbedPanel.getActiveTab(location, alternativeLocation); } /** Modified: trunk/src/app/net/sf/gridarta/gui/misc/MainViewActions.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/misc/MainViewActions.java 2010-12-10 19:57:25 UTC (rev 8815) +++ trunk/src/app/net/sf/gridarta/gui/misc/MainViewActions.java 2010-12-12 14:24:55 UTC (rev 8816) @@ -105,7 +105,7 @@ */ @ActionMethod public void gameObjectTextEditor() { - final Tab activeTab = mainView.getActiveTab(gameObjectTab.getLocation()); + final Tab activeTab = mainView.getActiveTab(gameObjectTab.getLocation(), gameObjectTab.isAlternativeLocation()); final GameObjectAttributesTab<G, A, R> activeTab2 = gameObjectAttributesControl.getSelectedTab(); final boolean gameObjectTextEditorIsActive = activeTab != null && activeTab == gameObjectTab && activeTab2 == textEditorTab; if (!gameObjectTextEditorIsActive) { Modified: trunk/src/app/net/sf/gridarta/gui/utils/borderpanel/BorderPanel.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/utils/borderpanel/BorderPanel.java 2010-12-10 19:57:25 UTC (rev 8815) +++ trunk/src/app/net/sf/gridarta/gui/utils/borderpanel/BorderPanel.java 2010-12-12 14:24:55 UTC (rev 8816) @@ -63,8 +63,16 @@ borderPanelListener.sizeChanged(optionalComponent, size); } + /** + * {@inheritDoc} + */ + @Override + public void size2Changed(final int size2) { + borderPanelListener.size2Changed(location, size2); + } + }; - final BorderSplitPane tmp = new BorderSplitPane(nextComponent, location, borderSplitPaneListener); + final BorderSplitPane tmp = new BorderSplitPane(nextComponent, location, borderSplitPaneListener, borderPanelListener.getSize2(location)); splitPanes[location.ordinal()] = tmp; nextComponent = tmp; } @@ -76,21 +84,25 @@ * Sets the optional {@link Component} for a location. * @param location the location * @param component the component + * @param alternativeLocation whether the component should be shown in the + * alternative location * @param size the size of the component; width or height, depending on * <code>location</code> * @noinspection TypeMayBeWeakened */ - public void setComponent(@NotNull final Location location, @NotNull final Component component, final int size) { - splitPanes[location.ordinal()].setOptionalComponent(component, size); + public void setComponent(@NotNull final Location location, @NotNull final Component component, final boolean alternativeLocation, final int size) { + splitPanes[location.ordinal()].setOptionalComponent(component, alternativeLocation, size); } /** * Unsets the optional {@link Component} for a location. * @param location the location + * @param alternativeLocation whether the component in the alternative + * location should be unset * @noinspection TypeMayBeWeakened */ - public void unsetComponent(@NotNull final Location location) { - splitPanes[location.ordinal()].setOptionalComponent(null, 0); + public void unsetComponent(@NotNull final Location location, final boolean alternativeLocation) { + splitPanes[location.ordinal()].setOptionalComponent(null, alternativeLocation, 0); } } // class BorderPanel Modified: trunk/src/app/net/sf/gridarta/gui/utils/borderpanel/BorderPanelListener.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/utils/borderpanel/BorderPanelListener.java 2010-12-10 19:57:25 UTC (rev 8815) +++ trunk/src/app/net/sf/gridarta/gui/utils/borderpanel/BorderPanelListener.java 2010-12-12 14:24:55 UTC (rev 8816) @@ -35,4 +35,18 @@ */ void sizeChanged(@NotNull Component component, int size); + /** + * The position of a the inner split pane has changed. + * @param location the location that has changed + * @param size2 the new size + */ + void size2Changed(@NotNull Location location, int size2); + + /** + * Returns the preferred position of the inner split pane. + * @param location the location + * @return the preferred position or <code>-1</code> + */ + int getSize2(Location location); + } Modified: trunk/src/app/net/sf/gridarta/gui/utils/borderpanel/BorderSplitPane.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/utils/borderpanel/BorderSplitPane.java 2010-12-10 19:57:25 UTC (rev 8815) +++ trunk/src/app/net/sf/gridarta/gui/utils/borderpanel/BorderSplitPane.java 2010-12-12 14:24:55 UTC (rev 8816) @@ -22,6 +22,7 @@ import java.awt.BorderLayout; import java.awt.Component; import java.awt.Container; +import java.awt.Dimension; import java.awt.event.HierarchyEvent; import java.awt.event.HierarchyListener; import java.beans.PropertyChangeEvent; @@ -32,7 +33,7 @@ /** * A {@link Component} that permanently shows another component and optionally - * displays a {@link JSplitPane} and another component. + * displays a {@link JSplitPane} and one or two other components. * @author Andreas Kirschbaum */ public class BorderSplitPane extends Container { @@ -57,48 +58,74 @@ private final Location location; /** - * The optionally shown {@link Component}. + * The two optionally shown {@link Component Components}. * @serial */ - @Nullable - private Component optionalComponent = null; + @NotNull + private final Component[] optionalComponents = new Component[2]; /** * The {@link JSplitPane} to separate {@link #component} and {@link - * #optionalComponent}. + * #optionalComponents}. * @serial */ @NotNull private final JSplitPane splitPane; /** + * The {@link JSplitPane} to separate both elements of {@link + * #optionalComponents}. + * @serial + */ + @NotNull + private final JSplitPane splitPane2; + + /** * Whether this component is visible. * @serial */ private boolean showing = false; /** - * The pending size of this component. Unless <code>-1</code>, this - * component will be resized to this size when it becomes visible. Unused if + * The pending size of {@link #splitPane}. Unless <code>-1</code>, the split + * pane will be resized to this size when it becomes visible. Unused if * {@link #showing} is set. * @serial */ private int size = -1; /** + * The pending size of {@link #splitPane2}. Unless <code>-1</code>, the + * split pane will be resized to this size when it becomes visible. Unused + * if {@link #showing} is set. + * @serial + */ + private int size2; + + /** + * If set, do not report split pane size changes. + */ + private boolean ignoreSizeChange = false; + + /** * Creates a new instance. * @param component the permanently shown component * @param location the location of the optional component * @param borderSplitPaneListener the listener to notify + * @param size2 the initial size or <code>-1</code> for default */ - public BorderSplitPane(@NotNull final Component component, @NotNull final Location location, @NotNull final BorderSplitPaneListener borderSplitPaneListener) { + public BorderSplitPane(@NotNull final Component component, @NotNull final Location location, @NotNull final BorderSplitPaneListener borderSplitPaneListener, final int size2) { this.component = component; this.location = location; + this.size2 = size2; splitPane = new JSplitPane(location.getSplitPaneOrientation(), true, null, null); splitPane.setOneTouchExpandable(false); splitPane.setResizeWeight(location.getSplitPaneResizeWeight()); + splitPane2 = new JSplitPane(location.getSplitPaneOppositeOrientation(), true, null, null); + splitPane2.setOneTouchExpandable(false); + splitPane2.setResizeWeight(0.5); setLayout(new BorderLayout()); - setOptionalComponent(null, 0, true); + setOptionalComponent(null, false, 0, true); splitPane.addPropertyChangeListener(new PropertyChangeListener() { @@ -107,22 +134,53 @@ */ @Override public void propertyChange(final PropertyChangeEvent evt) { - if (optionalComponent != null) { + if (ignoreSizeChange) { + return; + } + if (optionalComponents[0] != null || optionalComponents[1] != null) { //Property names are interned strings. //noinspection StringEquality if (evt.getPropertyName() == JSplitPane.DIVIDER_LOCATION_PROPERTY) { final Object value = evt.getNewValue(); if (value != null && value instanceof Integer) { - final int size = (Integer) value; - final int splitPaneSize = getSplitPaneSize(size); - assert optionalComponent != null; - borderSplitPaneListener.sizeChanged(optionalComponent, splitPaneSize); + final int newSize = (Integer) value; + final int splitPaneSize = getSplitPaneSize(newSize); + for (final Component optionalComponent : optionalComponents) { + if (optionalComponent != null) { + borderSplitPaneListener.sizeChanged(optionalComponent, splitPaneSize); + } + } } } } } }); + splitPane2.addPropertyChangeListener(new PropertyChangeListener() { + + /** + * {@inheritDoc} + */ + @Override + public void propertyChange(final PropertyChangeEvent evt) { + if (ignoreSizeChange) { + return; + } + if (optionalComponents[0] != null && optionalComponents[1] != null) { + //Property names are interned strings. + //noinspection StringEquality + if (evt.getPropertyName() == JSplitPane.DIVIDER_LOCATION_PROPERTY) { + final Object value = evt.getNewValue(); + if (value != null && value instanceof Integer) { + final int newSize = (Integer) value; + BorderSplitPane.this.size2 = newSize; + borderSplitPaneListener.size2Changed(newSize); + } + } + } + } + }); + final HierarchyListener hierarchyListener = new HierarchyListener() { /** @@ -135,9 +193,10 @@ assert !showing; showing = true; if (size != -1) { - setSize(size); + setDividerSize(size); size = -1; } + setDividerSize2(); } } @@ -149,72 +208,189 @@ * Sets the optional {@link Component}. * @param optionalComponent the optional component or <code>null</code> to * remove the optional component + * @param alternativeLocation whether the component should be shown in the + * alternative location * @param size the size of the component; width for left or right location, * height for top or bottom location */ - public void setOptionalComponent(@Nullable final Component optionalComponent, final int size) { - setOptionalComponent(optionalComponent, size, false); + public void setOptionalComponent(@Nullable final Component optionalComponent, final boolean alternativeLocation, final int size) { + setOptionalComponent(optionalComponent, alternativeLocation, size, false); } /** * Sets the optional {@link Component}. * @param optionalComponent the optional component or <code>null</code> to * remove the optional component + * @param alternativeLocation whether the component should be shown in the + * alternative location * @param size the size of the component; width for left or right location, * height for top or bottom location * @param force if set, forcibly rebuild the layout */ - public final void setOptionalComponent(@Nullable final Component optionalComponent, final int size, final boolean force) { - if (force || this.optionalComponent != optionalComponent) { - this.optionalComponent = optionalComponent; - removeAll(); - if (optionalComponent == null) { - add(component, BorderLayout.CENTER); + public final void setOptionalComponent(@Nullable final Component optionalComponent, final boolean alternativeLocation, final int size, final boolean force) { + final int index = alternativeLocation ? 1 : 0; + if (!force && optionalComponents[index] == optionalComponent) { + return; + } + + optionalComponents[index] = optionalComponent; + + final Component centerComponent; + final boolean setSize2; + if (optionalComponents[0] == null && optionalComponents[1] == null) { + setSize2 = false; + centerComponent = component; + } else { + centerComponent = splitPane; + + final Component tmp; + if (optionalComponents[0] == null) { + setSize2 = false; + tmp = optionalComponents[1]; + assert tmp != null; + } else if (optionalComponents[1] == null) { + setSize2 = false; + tmp = optionalComponents[0]; + assert tmp != null; } else { - if (location.isTopOrLeft()) { - splitPane.setTopComponent(optionalComponent); - splitPane.setBottomComponent(component); - } else { - splitPane.setTopComponent(component); - splitPane.setBottomComponent(optionalComponent); - } - add(splitPane, BorderLayout.CENTER); + setSize2 = true; + tmp = splitPane2; + splitPane2.setTopComponent(optionalComponents[0]); + splitPane2.setBottomComponent(optionalComponents[1]); } + + if (location.isTopOrLeft()) { + splitPane.setTopComponent(tmp); + splitPane.setBottomComponent(component); + } else { + splitPane.setTopComponent(component); + splitPane.setBottomComponent(tmp); + } + } + + removeAll(); + add(centerComponent, BorderLayout.CENTER); + ignoreSizeChange = true; + try { validate(); - repaint(); + } finally { + ignoreSizeChange = false; } - if (optionalComponent != null) { - if (showing) { - setSize(size); + final Component otherComponent = optionalComponents[1 - index]; + if (optionalComponent == null) { + if (otherComponent == null) { + // no resize } else { - this.size = size; + final Dimension preferredSizeTmp = otherComponent.getPreferredSize(); + final int preferredSize = getSplitPaneSize(preferredSizeTmp == null ? 50 : location.isTopOrBottom() ? preferredSizeTmp.height : preferredSizeTmp.width); + setDividerSizeInt(preferredSize); } + } else { + if (otherComponent == null) { + setDividerSizeInt(size); + } else { + final Dimension preferredSizeTmp = otherComponent.getPreferredSize(); + final int preferredSize = getSplitPaneSize(preferredSizeTmp == null ? 50 : location.isTopOrBottom() ? preferredSizeTmp.height : preferredSizeTmp.width); + setDividerSizeInt(Math.max(size, preferredSize)); + } } + + if (setSize2) { + setDividerSize2(); + } + + validate(); } /** * Sets the new size of {@link #splitPane}. * @param size the size */ - private void setSize(final int size) { + private void setDividerSizeInt(final int size) { + if (showing) { + setDividerSize(size); + } else { + this.size = size; + } + } + + /** + * Sets the new size of {@link #splitPane}. + * @param size the size + */ + private void setDividerSize(final int size) { splitPane.setDividerLocation(getSplitPaneSize(size)); } /** + * Sets the new size of {@link #splitPane2}. + */ + private void setDividerSize2() { + if (size2 == -1) { + return; + } + splitPane2.setDividerLocation(size2); + } + + /** * Converts between logical and physical sizes of {@link #splitPane}. * @param size the logical or physical size * @return the physical or logical size */ private int getSplitPaneSize(final int size) { - final int size2; + final Dimension preferredSize = getSplitPanePreferredSize(); + if (location.isTopOrBottom()) { + preferredSize.height = size; + } else { + preferredSize.width = size; + } + setSplitPanePreferredSize(preferredSize); + + final int result; if (location.isTopOrLeft()) { - size2 = size; + result = size; } else { final int splitPaneSize = (location.isTopOrBottom() ? splitPane.getHeight() : splitPane.getWidth()) - splitPane.getDividerSize(); - size2 = Math.max(0, splitPaneSize - size); + result = Math.max(0, splitPaneSize - size); } - return size2; + return result; } + /** + * Calculates the preferred size of the {@link #splitPane split pane}. + * @return the preferred size + */ + @NotNull + private Dimension getSplitPanePreferredSize() { + for (final Component optionalComponent : optionalComponents) { + if (optionalComponent != null) { + final Dimension preferredSize = optionalComponent.getPreferredSize(); + if (preferredSize != null) { + return preferredSize; + } + } + } + + for (final Component optionalComponent : optionalComponents) { + if (optionalComponent != null) { + return optionalComponent.getSize(); + } + } + + return splitPane.getSize(); + } + + /** + * Sets the preferred size of all shown optional components. + * @param preferredSize the preferred size to set + */ + private void setSplitPanePreferredSize(@NotNull final Dimension preferredSize) { + for (final Component optionalComponent : optionalComponents) { + if (optionalComponent != null) { + optionalComponent.setPreferredSize(preferredSize); + } + } + } + } // class BorderSplitPane Modified: trunk/src/app/net/sf/gridarta/gui/utils/borderpanel/BorderSplitPaneListener.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/utils/borderpanel/BorderSplitPaneListener.java 2010-12-10 19:57:25 UTC (rev 8815) +++ trunk/src/app/net/sf/gridarta/gui/utils/borderpanel/BorderSplitPaneListener.java 2010-12-12 14:24:55 UTC (rev 8816) @@ -36,4 +36,11 @@ */ void sizeChanged(@NotNull Component optionalComponent, int size); + /** + * The size of the inner split pane separating two optional components has + * changed. + * @param size2 the new size + */ + void size2Changed(int size2); + } Modified: trunk/src/app/net/sf/gridarta/gui/utils/borderpanel/Location.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/utils/borderpanel/Location.java 2010-12-10 19:57:25 UTC (rev 8815) +++ trunk/src/app/net/sf/gridarta/gui/utils/borderpanel/Location.java 2010-12-12 14:24:55 UTC (rev 8816) @@ -58,7 +58,25 @@ /** * {@inheritDoc} */ + @NotNull @Override + public String getBorderLocationStandardLocation() { + return BorderLayout.WEST; + } + + /** + * {@inheritDoc} + */ + @NotNull + @Override + public String getBorderLocationAlternativeLocation() { + return BorderLayout.EAST; + } + + /** + * {@inheritDoc} + */ + @Override public int getAxis() { return BoxLayout.X_AXIS; } @@ -75,6 +93,14 @@ * {@inheritDoc} */ @Override + public int getSplitPaneOppositeOrientation() { + return JSplitPane.HORIZONTAL_SPLIT; + } + + /** + * {@inheritDoc} + */ + @Override public double getSplitPaneResizeWeight() { return 0.0; } @@ -132,7 +158,25 @@ /** * {@inheritDoc} */ + @NotNull @Override + public String getBorderLocationStandardLocation() { + return BorderLayout.WEST; + } + + /** + * {@inheritDoc} + */ + @NotNull + @Override + public String getBorderLocationAlternativeLocation() { + return BorderLayout.EAST; + } + + /** + * {@inheritDoc} + */ + @Override public int getAxis() { return BoxLayout.X_AXIS; } @@ -149,6 +193,14 @@ * {@inheritDoc} */ @Override + public int getSplitPaneOppositeOrientation() { + return JSplitPane.HORIZONTAL_SPLIT; + } + + /** + * {@inheritDoc} + */ + @Override public double getSplitPaneResizeWeight() { return 1.0; } @@ -206,7 +258,25 @@ /** * {@inheritDoc} */ + @NotNull @Override + public String getBorderLocationStandardLocation() { + return BorderLayout.NORTH; + } + + /** + * {@inheritDoc} + */ + @NotNull + @Override + public String getBorderLocationAlternativeLocation() { + return BorderLayout.SOUTH; + } + + /** + * {@inheritDoc} + */ + @Override public int getAxis() { return BoxLayout.Y_AXIS; } @@ -223,6 +293,14 @@ * {@inheritDoc} */ @Override + public int getSplitPaneOppositeOrientation() { + return JSplitPane.VERTICAL_SPLIT; + } + + /** + * {@inheritDoc} + */ + @Override public double getSplitPaneResizeWeight() { return 0.0; } @@ -280,7 +358,25 @@ /** * {@inheritDoc} */ + @NotNull @Override + public String getBorderLocationStandardLocation() { + return BorderLayout.NORTH; + } + + /** + * {@inheritDoc} + */ + @NotNull + @Override + public String getBorderLocationAlternativeLocation() { + return BorderLayout.SOUTH; + } + + /** + * {@inheritDoc} + */ + @Override public int getAxis() { return BoxLayout.Y_AXIS; } @@ -297,6 +393,14 @@ * {@inheritDoc} */ @Override + public int getSplitPaneOppositeOrientation() { + return JSplitPane.VERTICAL_SPLIT; + } + + /** + * {@inheritDoc} + */ + @Override public double getSplitPaneResizeWeight() { return 1.0; } @@ -344,6 +448,22 @@ public abstract String getBorderLocation(); /** + * Returns the {@link BorderLayout} constraint of this location for buttons + * in the standard location. + * @return the constraint + */ + @NotNull + public abstract String getBorderLocationStandardLocation(); + + /** + * Returns the {@link BorderLayout} constraint of this location for buttons + * in the alternative location. + * @return the constraint + */ + @NotNull + public abstract String getBorderLocationAlternativeLocation(); + + /** * Returns the {@link BoxLayout} axis of this location. * @return the axis */ @@ -356,6 +476,12 @@ public abstract int getSplitPaneOrientation(); /** + * Returns the opposite orientation for a {@link JSplitPane}. + * @return the opposite orientation + */ + public abstract int getSplitPaneOppositeOrientation(); + + /** * Returns the resize weight for a {@link JSplitPane}. * @return the resize weight */ Modified: trunk/src/app/net/sf/gridarta/gui/utils/tabbedpanel/ButtonList.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/utils/tabbedpanel/ButtonList.java 2010-12-10 19:57:25 UTC (rev 8815) +++ trunk/src/app/net/sf/gridarta/gui/utils/tabbedpanel/ButtonList.java 2010-12-12 14:24:55 UTC (rev 8816) @@ -125,19 +125,18 @@ } buttons.add(button, index); buttons.validate(); - buttons.repaint(); button.addChangeListener(changeListener); } /** - * Removes a button. + * Removes a button. Does nothing if the button is not part of this button + * list. * @param button the button */ public void removeButton(@NotNull final AbstractButton button) { button.removeChangeListener(changeListener); buttons.remove(button); buttons.validate(); - buttons.repaint(); final int index = selectedButtons.indexOf(button); if (index != -1) { selectedButtons.remove(index); @@ -196,4 +195,12 @@ return buttons; } + /** + * Returns the total number of buttons. + * @return the total number of buttons + */ + public int getButtonCount() { + return buttons.getComponentCount(); + } + } Modified: trunk/src/app/net/sf/gridarta/gui/utils/tabbedpanel/ButtonLists.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/utils/tabbedpanel/ButtonLists.java 2010-12-10 19:57:25 UTC (rev 8815) +++ trunk/src/app/net/sf/gridarta/gui/utils/tabbedpanel/ButtonLists.java 2010-12-12 14:24:55 UTC (rev 8816) @@ -37,7 +37,7 @@ * The list of buttons for each {@link Location}. */ @NotNull - private final ButtonList[] buttonLists = new ButtonList[Location.values().length]; + private final DoubleButtonList[] buttonLists = new DoubleButtonList[Location.values().length]; /** * Maps button instance to {@link Tab} instance. @@ -51,7 +51,7 @@ */ public ButtonLists(@NotNull final ButtonListsListener buttonListsListener) { for (final Location location : Location.values()) { - final ButtonList buttonList = new ButtonList(location); + final DoubleButtonList buttonList = new DoubleButtonList(location); buttonLists[location.ordinal()] = buttonList; final ButtonListListener buttonListListener = new ButtonListListener() { @@ -81,10 +81,10 @@ * @return the button list the tab was added to */ @NotNull - public ButtonList addTab(@NotNull final Tab tab) { - final ButtonList buttonList = buttonLists[tab.getLocation().ordinal()]; + public DoubleButtonList addTab(@NotNull final Tab tab) { + final DoubleButtonList buttonList = buttonLists[tab.getLocation().ordinal()]; final AbstractButton button = tab.getButton(); - buttonList.addButton(button); + buttonList.addButton(button, tab.isAlternativeLocation()); tabs.put(button, tab); return buttonList; } @@ -98,35 +98,52 @@ * the tab was added to */ @NotNull - public ButtonList[] moveTab(@NotNull final Tab tab, @NotNull final Location location) { + public DoubleButtonList[] moveTab(@NotNull final Tab tab, @NotNull final Location location) { if (tabs.get(tab.getButton()) == null) { throw new IllegalArgumentException(); } - final ButtonList oldButtonList = buttonLists[tab.getLocation().ordinal()]; - final ButtonList newButtonList = buttonLists[location.ordinal()]; + final DoubleButtonList oldButtonList = buttonLists[tab.getLocation().ordinal()]; + final DoubleButtonList newButtonList = buttonLists[location.ordinal()]; final AbstractButton oldButton = tab.getButton(); - oldButtonList.removeButton(oldButton); + oldButtonList.removeButton(oldButton, tab.isAlternativeLocation()); oldButton.setSelected(false); tab.setLocation(location); final AbstractButton newButton = tab.getButton(); - newButtonList.addButton(newButton); + newButtonList.addButton(newButton, tab.isAlternativeLocation()); tabs.remove(oldButton); tabs.put(newButton, tab); - return new ButtonList[] { oldButtonList, newButtonList, }; + return new DoubleButtonList[] { oldButtonList, newButtonList, }; } + @NotNull + public DoubleButtonList toggleTabSplitMode(@NotNull final Tab tab) { + final boolean alternativeLocation = !tab.isAlternativeLocation(); + final DoubleButtonList buttonList = buttonLists[tab.getLocation().ordinal()]; + final AbstractButton oldButton = tab.getButton(); + buttonList.removeButton(oldButton, tab.isAlternativeLocation()); + oldButton.setSelected(false); + tab.setAlternativeLocation(alternativeLocation); + final AbstractButton newButton = tab.getButton(); + buttonList.addButton(newButton, tab.isAlternativeLocation()); + tabs.remove(oldButton); + tabs.put(newButton, tab); + return buttonList; + } + /** * Returns the active {@link Tab} on a given {@link Location} of the main * view. * @param location the location + * @param alternativeLocation whether the alternative location should be + * checked * @return the tab or <code>null</code> if no active tab exists * @noinspection TypeMayBeWeakened */ @Nullable - public Tab getActiveTab(@NotNull final Location location) { - final ButtonList buttonList = buttonLists[location.ordinal()]; - final AbstractButton selectedButton = buttonList.getSelectedButton(); + public Tab getActiveTab(@NotNull final Location location, final boolean alternativeLocation) { + final DoubleButtonList buttonList = buttonLists[location.ordinal()]; + final AbstractButton selectedButton = buttonList.getSelectedButton(alternativeLocation); if (selectedButton == null) { return null; } Copied: trunk/src/app/net/sf/gridarta/gui/utils/tabbedpanel/DoubleButtonList.java (from rev 8815, trunk/src/app/net/sf/gridarta/gui/utils/tabbedpanel/ButtonList.java) =================================================================== --- trunk/src/app/net/sf/gridarta/gui/utils/tabbedpanel/DoubleButtonList.java (rev 0) +++ trunk/src/app/net/sf/gridarta/gui/utils/tabbedpanel/DoubleButtonList.java 2010-12-12 14:24:55 UTC (rev 8816) @@ -0,0 +1,143 @@ +/* + * Gridarta MMORPG map editor for Crossfire, Daimonin and similar games. + * Copyright (C) 2000-2010 The Gridarta Developers. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ + +package net.sf.gridarta.gui.utils.tabbedpanel; + +import java.awt.BorderLayout; +import java.awt.Container; +import javax.swing.AbstractButton; +import javax.swing.JPanel; +import net.sf.gridarta.gui.utils.borderpanel.Location; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; + +/** + * A list of {@link AbstractButton buttons} divided into two parts. At most one + * button in each part is active at any time. + * @author Andreas Kirschbaum + */ +public class DoubleButtonList { + + /** + * The {@link Container} that contains all buttons. + */ + @NotNull + private final Container buttons = new JPanel(); + + /** + * The {@link Container} that contains all buttons in the standard + * location. + */ + @NotNull + private final ButtonList leftButtonList; + + /** + * The {@link Container} that contains all buttons in the alternative + * location. + */ + @NotNull + private final ButtonList rightButtonList; + + /** + * Creates a new instance. + * @param location the location + */ + public DoubleButtonList(@NotNull final Location location) { + leftButtonList = new ButtonList(location); + rightButtonList = new ButtonList(location); + buttons.setLayout(new BorderLayout()); + buttons.add(leftButtonList.getButtons(), location.getBorderLocationStandardLocation()); + buttons.add(rightButtonList.getButtons(), location.getBorderLocationAlternativeLocation()); + } + + /** + * Adds a {@link ButtonListListener} to be notified. + * @param listener the button list listener + */ + + public void addButtonListListener(@NotNull final ButtonListListener listener) { + leftButtonList.addButtonListListener(listener); + rightButtonList.addButtonListListener(listener); + } + + /** + * Adds a button. + * @param button the button + * @param alternativeLocation whether to add the button into the alternative + * location + */ + public void addButton(@NotNull final AbstractButton button, final boolean alternativeLocation) { + final ButtonList buttonList = alternativeLocation ? rightButtonList : leftButtonList; + buttonList.addButton(button); + buttons.validate(); + } + + /** + * Removes a button. + * @param button the button + * @param alternativeLocation whether to remove the button from the + * alternative location + */ + public void removeButton(@NotNull final AbstractButton button, final boolean alternativeLocation) { + final ButtonList buttonList = alternativeLocation ? rightButtonList : leftButtonList; + buttonList.removeButton(button); + buttons.validate(); + } + + /** + * Selects a button. + * @param button the button + * @param alternativeLocation whether to select the button in the + * alternative location + */ + public void selectButton(@NotNull final AbstractButton button, final boolean alternativeLocation) { + final ButtonList buttonList = alternativeLocation ? rightButtonList : leftButtonList; + buttonList.selectButton(button); + } + + /** + * Returns the currently selected button. + * @param alternativeLocation whether to remove the button from the + * alternative location + * @return the selected button or <code>null</code> if no button exists + */ + @Nullable + public AbstractButton getSelectedButton(final boolean alternativeLocation) { + final ButtonList buttonList = alternativeLocation ? rightButtonList : leftButtonList; + return buttonList.getSelectedButton(); + } + + /** + * Returns the {@link Container} that contains all buttons. + * @return the container + */ + @NotNull + public Container getButtons() { + return buttons; + } + + /** + * Returns the total number of buttons. + * @return the total number of buttons + */ + public int getButtonCount() { + return leftButtonList.getButtonCount() + rightButtonList.getButtonCount(); + } + +} Modified: trunk/src/app/net/sf/gridarta/gui/utils/tabbedpanel/MoveToActions.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/utils/tabbedpanel/MoveToActions.java 2010-12-10 19:57:25 UTC (rev 8815) +++ trunk/src/app/net/sf/gridarta/gui/utils/tabbedpanel/MoveToActions.java 2010-12-12 14:24:55 UTC (rev 8816) @@ -83,4 +83,22 @@ tabbedPanel.moveTab(tab, Location.RIGHT); } + /** + * Action method to query split mode. + * @return whether split mode is enabled + */ + @ActionMethod + public boolean isTabSplitMode() { + return tab.isAlternativeLocation(); + } + + /** + * Action method set split mode. + * @param splitMode whether to enable split mode + */ + @ActionMethod + public void setTabSplitMode(final boolean splitMode) { + tabbedPanel.setTabSplitMode(tab, splitMode); + } + } // class MoveToActions Modified: trunk/src/app/net/sf/gridarta/gui/utils/tabbedpanel/Tab.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/utils/tabbedpanel/Tab.java 2010-12-10 19:57:25 UTC (rev 8815) +++ trunk/src/app/net/sf/gridarta/gui/utils/tabbedpanel/Tab.java 2010-12-12 14:24:55 UTC (rev 8816) @@ -39,7 +39,9 @@ import net.sf.gridarta.utils.EventListenerList2; import net.sf.japi.swing.action.ActionBuilder; import net.sf.japi.swing.action.ActionBuilderFactory; +import net.sf.japi.swing.action.ToggleAction; import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; /** * A tab in a {@link TabbedPanel} component. It consists of an {@link @@ -76,6 +78,11 @@ private static final String TAB_LOCATION = "MainWindow.tab_location."; /** + * The key used to store the current location of a tab. + */ + private static final String TAB_ALT_LOCATION = "MainWindow.tab_alt_location."; + + /** * The {@link ActionBuilder}. */ @NotNull @@ -129,12 +136,24 @@ private final JMenu moveToMenu; /** + * The {@link ToggleAction} to update if the "split mode" state changes. + */ + @Nullable + private ToggleAction splitModeAction = null; + + /** * The tab's location. */ @NotNull private Location location; /** + * Whether the tab is shown in the alternative location (<code>true</code>) + * or in the standard location (<code>false</code>). + */ + private boolean alternativeLocation; + + /** * The tab's index for ordering. */ private final int index; @@ -204,10 +223,12 @@ * @param ident the tab's identification string * @param component the component that is shown when this tab is active * @param defaultLocation the tab's default location + * @param alternativeLocation whether the tab is shown in the alternative + * location * @param index the tab's index for ordering * @param defaultOpen the tab's default opened status */ - public Tab(@NotNull final String ident, @NotNull final JComponent component, @NotNull final Location defaultLocation, final int index, final boolean defaultOpen) { + public Tab(@NotNull final String ident, @NotNull final JComponent component, @NotNull final Location defaultLocation, final boolean alternativeLocation, final int index, final boolean defaultOpen) { this.ident = ident; this.component = component; final Dimension preferredSize = component.getPreferredSize(); @@ -224,6 +245,7 @@ } catch (final IllegalArgumentException ignored) { location = defaultLocation; } + this.alternativeLocation = preferences.getBoolean(TAB_ALT_LOCATION + ident, alternativeLocation); this.index = index; button = createButton(); final JMenu tmp = MenuUtils.findMenu(popupMenu, "tabButtonMoveTo"); @@ -231,7 +253,6 @@ throw new MissingResourceException("missing action ", MenuUtils.class.getName(), "tabButtonMoveTo"); } moveToMenu = tmp; - popupMenu.add(moveToMenu); } /** @@ -304,6 +325,36 @@ } /** + * Sets the {@link ToggleAction} to update if the "split mode" state + * changes. + * @param splitModeAction the toggle action + */ + public void setSplitModeAction(@Nullable final ToggleAction splitModeAction) { + this.splitModeAction = splitModeAction; + } + + /** + * Returns whether the button is shown in the alternative location. + * @return whether the button is shown in the alternative location + */ + public boolean isAlternativeLocation() { + return alternativeLocation; + } + + /** + * Sets whether the button is shown in the alternative location. + * @param alternativeLocation whether the button is shown in the alternative + * location + */ + public void setAlternativeLocation(final boolean alternativeLocation) { + this.alternativeLocation = alternativeLocation; + preferences.putBoolean(TAB_ALT_LOCATION + ident, alternativeLocation); + if (splitModeAction != null) { + splitModeAction.setSelected(alternativeLocation); + } + } + + /** * Returns the tab's location. * @return the location */ Modified: trunk/src/app/net/sf/gridarta/gui/utils/tabbedpanel/TabbedPanel.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/utils/tabbedpanel/TabbedPanel.java 2010-12-10 19:57:25 UTC (rev 8815) +++ trunk/src/app/net/sf/gridarta/gui/utils/tabbedpanel/TabbedPanel.java 2010-12-12 14:24:55 UTC (rev 8816) @@ -24,13 +24,17 @@ import java.awt.Container; import java.util.IdentityHashMap; import java.util.Map; +import java.util.prefs.Preferences; import javax.swing.JMenu; +import javax.swing.JPopupMenu; +import net.sf.gridarta.MainControl; import net.sf.gridarta.gui.utils.MenuUtils; import net.sf.gridarta.gui.utils.borderpanel.BorderPanel; import net.sf.gridarta.gui.utils.borderpanel.BorderPanelListener; import net.sf.gridarta.gui.utils.borderpanel.Location; import net.sf.japi.swing.action.ActionBuilder; import net.sf.japi.swing.action.ActionBuilderFactory; +import net.sf.japi.swing.action.ToggleAction; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; @@ -43,6 +47,11 @@ public class TabbedPanel extends Container { /** + * The key used to store the preferred height of a tab. + */ + private static final String TAB_PREFIX = "MainWindow.tab"; + + /** * The serial version UID. */ private static final long serialVersionUID = 1L; @@ -54,6 +63,11 @@ private static final ActionBuilder ACTION_BUILDER = ActionBuilderFactory.getInstance().getActionBuilder("net.sf.gridarta"); /** + * The {@link Preferences}. + */ + private static final Preferences preferences = Preferences.userNodeForPackage(MainControl.class); + + /** * The {@link BorderPanel}. * @serial */ @@ -111,6 +125,22 @@ } } + /** + * {@inheritDoc} + */ + @Override + public void size2Changed(@NotNull final Location location, final int size2) { + preferences.putInt(TAB_PREFIX + location.getName() + ".position", size2); + } + + /** + * {@inheritDoc} + */ + @Override + public int getSize2(final Location location) { + return preferences.getInt(TAB_PREFIX + location.getName() + ".position", -1); + } + }; borderPanel = new BorderPanel(centerComponent, borderPanelListener); setLayout(new BorderLayout()); @@ -122,8 +152,8 @@ * @param tab the tab to add */ public void addTab(@NotNull final Tab tab) { - final ButtonList buttonList = buttonLists.addTab(tab); - fillContextMenu(tab); + final DoubleButtonList buttonList = buttonLists.addTab(tab); + fillContextMenu(tab, true); tabAdded(tab, buttonList, tab.isOpen()); } @@ -131,12 +161,14 @@ * Returns the active {@link Tab} on a given {@link Location} of the main * view. * @param location the location + * @param alternativeLocation whether the alternative location should be + * checked * @return the tab or <code>null</code> if no active tab exists * @noinspection TypeMayBeWeakened */ @Nullable - public Tab getActiveTab(@NotNull final Location location) { - return buttonLists.getActiveTab(location); + public Tab getActiveTab(@NotNull final Location location, final boolean alternativeLocation) { + return buttonLists.getActiveTab(location, alternativeLocation); } /** @@ -150,32 +182,47 @@ } final boolean open = tab.isOpen(); - final ButtonList[] result = buttonLists.moveTab(tab, location); - final ButtonList oldButtonList = result[0]; - final ButtonList newButtonList = result[1]; + final DoubleButtonList[] result = buttonLists.moveTab(tab, location); + final DoubleButtonList oldButtonList = result[0]; + final DoubleButtonList newButtonList = result[1]; - fillContextMenu(tab); + fillContextMenu(tab, false); tabRemoved(oldButtonList); tabAdded(tab, newButtonList, open); } /** + * Toggles split mode for the given tab. + * @param tab the tab + * @param splitMode whether to enable split mode + */ + public void setTabSplitMode(@NotNull final Tab tab, final boolean splitMode) { + if (tab.isAlternativeLocation() == splitMode) { + return; + } + + final boolean open = tab.isOpen(); + final DoubleButtonList buttonList = buttonLists.toggleTabSplitMode(tab); + if (open) { + buttonList.selectButton(tab.getButton(), tab.isAlternativeLocation()); + } + } + + /** * Called whenever a {@link Tab} has been added to a {@link ButtonList}. * Shows the button list component if the first tab has been added. * @param tab the tab * @param buttonList the button list * @param open whether the tab is open */ - private void tabAdded(@NotNull final Tab tab, @NotNull final ButtonList buttonList, final boolean open) { - final Container buttons = buttonList.getButtons(); - if (buttons.getComponentCount() == 1) { - add(buttons, tab.getLocation().getBorderLocation()); + private void tabAdded(@NotNull final Tab tab, @NotNull final DoubleButtonList buttonList, final boolean open) { + if (buttonList.getButtonCount() == 1) { + add(buttonList.getButtons(), tab.getLocation().getBorderLocation()); validate(); - repaint(); } if (open) { - buttonList.selectButton(tab.getButton()); + buttonList.selectButton(tab.getButton(), tab.isAlternativeLocation()); } } @@ -184,23 +231,30 @@ * Hides the button list component if the last tab has been removed. * @param buttonList the button list */ - private void tabRemoved(final ButtonList buttonList) { - final Container buttons = buttonList.getButtons(); - if (buttons.getComponentCount() == 0) { - remove(buttons); + private void tabRemoved(@NotNull final DoubleButtonList buttonList) { + if (buttonList.getButtonCount() == 0) { + remove(buttonList.getButtons()); validate(); - repaint(); } } /** * Fills in context popup menu entries for a tab in a given location. * @param tab the tab + * @param initialize whether this is the initial call */ - private void fillContextMenu(@NotNull final Tab tab) { + private void fillContextMenu(@NotNull final Tab tab, final boolean initialize) { + final MoveToActions moveToActions = new MoveToActions(tab, this); + if (initialize) { + final JPopupMenu popupMenu = tab.getPopupMenu(); + final ToggleAction splitModeAction = (ToggleAction) ACTION_BUILDER.createToggle(false, "tabSplitMode", moveToActions); + splitModeAction.setSelected(tab.isAlternativeLocation()); + popupMenu.insert(splitModeAction.createCheckBoxMenuItem(), 0); + tab.setSplitModeAction(splitModeAction); + } + final JMenu moveToMenu = tab.getMoveToMenu(); MenuUtils.removeAll(moveToMenu); - final MoveToActions moveToActions = new MoveToActions(tab, this); final Location location = tab.getLocation(); for (final Location thisLocation : Location.values()) { if (thisLocation != location) { @@ -215,7 +269,7 @@ */ private void open(@NotNull final Tab tab) { openTabs.put(tab.getComponent(), tab); - borderPanel.setComponent(tab.getLocation(), tab.getComponent(), tab.getSize()); + borderPanel.setComponent(tab.getLocation(), tab.getComponent(), tab.isAlternativeLocation(), tab.getSize()); tab.setOpen(true); } @@ -233,7 +287,7 @@ * @param tab the tab */ private void closeInt(final Tab tab) { - borderPanel.unsetComponent(tab.getLocation()); + borderPanel.unsetComponent(tab.getLocation(), tab.isAlternativeLocation()); openTabs.remove(tab.getComponent()); } Modified: trunk/src/app/net/sf/gridarta/maincontrol/GUIMainControl.java =================================================================== --- trunk/src/app/net/sf/gridarta/maincontrol/GUIMainControl.java 2010-12-10 19:57:25 UTC (rev 8815) +++ trunk/src/app/net/sf/gridarta/maincontrol/GUIMainControl.java 2010-12-12 14:24:55 UTC (rev 8816) @@ -500,7 +500,7 @@ updaterManager = new UpdaterManager(exiter, mapManager, mainViewFrame, gridartaJarFilename); final TextEditorTab<G, A, R> textEditorTab = new TextEditorTab<G, A, R>(gameObjectAttributesModel, archetypeTypeSet); - final GameObjectTab<G, A, R> gameObjectTab = new GameObjectTab<G, A, R>("gameObject", gameObjectAttributesControl, Location.BOTTOM, 0, true); + final GameObjectTab<G, A, R> gameObjectTab = new GameObjectTab<G, A, R>("gameObject", gameObjectAttributesControl, Location.BOTTOM, false, 0, true); ... [truncated message content] |
From: <aki...@us...> - 2010-12-10 19:57:32
|
Revision: 8815 http://gridarta.svn.sourceforge.net/gridarta/?rev=8815&view=rev Author: akirschbaum Date: 2010-12-10 19:57:25 +0000 (Fri, 10 Dec 2010) Log Message: ----------- Add "Text Editor" tab. Modified Paths: -------------- trunk/atrinik/ChangeLog trunk/crossfire/ChangeLog trunk/daimonin/ChangeLog trunk/src/app/net/sf/gridarta/maincontrol/GUIMainControl.java trunk/src/app/net/sf/gridarta/messages.properties trunk/src/app/net/sf/gridarta/messages_de.properties trunk/src/app/net/sf/gridarta/messages_fr.properties trunk/src/app/net/sf/gridarta/messages_sv.properties Added Paths: ----------- trunk/src/app/net/sf/gridarta/gui/mainwindow/GameObjectTextEditorTab.java Modified: trunk/atrinik/ChangeLog =================================================================== --- trunk/atrinik/ChangeLog 2010-12-10 19:53:09 UTC (rev 8814) +++ trunk/atrinik/ChangeLog 2010-12-10 19:57:25 UTC (rev 8815) @@ -1,5 +1,7 @@ 2010-12-10 Andreas Kirschbaum + * Add "Text Editor" tab. + * Display red "Game Object" tab if the selected game object includes incorrect attributes. Modified: trunk/crossfire/ChangeLog =================================================================== --- trunk/crossfire/ChangeLog 2010-12-10 19:53:09 UTC (rev 8814) +++ trunk/crossfire/ChangeLog 2010-12-10 19:57:25 UTC (rev 8815) @@ -1,5 +1,7 @@ 2010-12-10 Andreas Kirschbaum + * Add "Text Editor" tab. + * Display red "Game Object" tab if the selected game object includes incorrect attributes. Modified: trunk/daimonin/ChangeLog =================================================================== --- trunk/daimonin/ChangeLog 2010-12-10 19:53:09 UTC (rev 8814) +++ trunk/daimonin/ChangeLog 2010-12-10 19:57:25 UTC (rev 8815) @@ -1,5 +1,7 @@ 2010-12-10 Andreas Kirschbaum + * Add "Text Editor" tab. + * Display red "Game Object" tab if the selected game object includes incorrect attributes. Added: trunk/src/app/net/sf/gridarta/gui/mainwindow/GameObjectTextEditorTab.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/mainwindow/GameObjectTextEditorTab.java (rev 0) +++ trunk/src/app/net/sf/gridarta/gui/mainwindow/GameObjectTextEditorTab.java 2010-12-10 19:57:25 UTC (rev 8815) @@ -0,0 +1,296 @@ +/* + * Gridarta MMORPG map editor for Crossfire, Daimonin and similar games. + * Copyright (C) 2000-2010 The Gridarta Developers. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ + +package net.sf.gridarta.gui.mainwindow; + +import java.awt.event.FocusEvent; +import java.awt.event.FocusListener; +import java.io.File; +import java.util.Set; +import net.sf.gridarta.gui.gameobjecttexteditor.GameObjectTextEditor; +import net.sf.gridarta.gui.selectedsquare.MapSquareSelection; +import net.sf.gridarta.gui.selectedsquare.SelectedSquareModel; +import net.sf.gridarta.gui.selectedsquare.SelectedSquareModelListener; +import net.sf.gridarta.gui.utils.borderpanel.Location; +import net.sf.gridarta.gui.utils.tabbedpanel.Tab; +import net.sf.gridarta.model.archetype.Archetype; +import net.sf.gridarta.model.gameobject.GameObject; +import net.sf.gridarta.model.maparchobject.MapArchObject; +import net.sf.gridarta.model.mapcontrol.MapControl; +import net.sf.gridarta.model.mapmanager.MapManager; +import net.sf.gridarta.model.mapmanager.MapManagerListener; +import net.sf.gridarta.model.mapmodel.MapModel; +import net.sf.gridarta.model.mapmodel.MapModelListener; +import net.sf.gridarta.model.mapmodel.MapSquare; +import net.sf.gridarta.model.mapmodel.MapTransactionListener; +import net.sf.gridarta.model.mapmodel.SavedSquares; +import net.sf.gridarta.model.validation.ErrorCollector; +import net.sf.gridarta.utils.Size2D; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; + +/** + * The {@link Tab} displaying the game object text editor. + * @author Andreas Kirschbaum + */ +public class GameObjectTextEditorTab<G extends GameObject<G, A, R>, A extends MapArchObject<A>, R extends Archetype<G, A, R>> extends Tab { + + /** + * The displayed {@link GameObjectTextEditor} instance. + */ + @NotNull + private final GameObjectTextEditor gameObjectTextEditor; + + /** + * Last known active map. This map has {@link #mapModelListener} attached. + */ + @Nullable + private MapControl<G, A, R> currentMapControl; + + /** + * Whether {@link #autoApplyArchPanelChanges()} is currently running. + */ + private boolean isInAutoApplyArchPanelChanges = false; + + /** + * The currently selected game object. + */ + @Nullable + private G selectedGameObject = null; + + /** + * Records whether a map transaction is active. This is used to prevent + * start recursive map transactions in {@link #autoApplyArchPanelChanges()}. + */ + private boolean isInMapTransaction = false; + + /** + * The map manager listener. + */ + @NotNull + private final MapManagerListener<G, A, R> mapManagerListener = new MapManagerListener<G, A, R>() { + + /** {@inheritDoc} */ + @Override + public void currentMapChanged(@Nullable final MapControl<G, A, R> mapControl) { + if (currentMapControl != null) { + final MapModel<G, A, R> mapModel = currentMapControl.getMapModel(); + mapModel.removeMapModelListener(mapModelListener); + mapModel.removeMapTransactionListener(mapTransactionListener); + } + currentMapControl = mapControl; + if (currentMapControl != null) { + final MapModel<G, A, R> mapModel = currentMapControl.getMapModel(); + mapModel.addMapModelListener(mapModelListener); + mapModel.addMapTransactionListener(mapTransactionListener); + } + } + + /** {@inheritDoc} */ + @Override + public void mapCreated(@NotNull final MapControl<G, A, R> mapControl, final boolean interactive) { + // ignore + } + + /** {@inheritDoc} */ + @Override + public void mapClosing(@NotNull final MapControl<G, A, R> mapControl) { + // ignore + } + + /** {@inheritDoc} */ + @Override + public void mapClosed(@NotNull final MapControl<G, A, R> mapControl) { + // ignore + } + + }; + + /** + * The map transaction listener which is attached to {@link + * #currentMapControl}. It triggers auto-apply whenever a map transaction is + * about to start. + */ + @NotNull + private final MapTransactionListener<G, A, R> mapTransactionListener = new MapTransactionListener<G, A, R>() { + + /** {@inheritDoc} */ + @Override + public void preBeginTransaction() { + autoApplyArchPanelChanges(); + isInMapTransaction = true; + } + + /** {@inheritDoc} */ + @Override + public void beginTransaction(@NotNull final MapModel<G, A, R> mapModel, @NotNull final String name) { + // ignore + } + + /** {@inheritDoc} */ + @Override + public void endTransaction(@NotNull final MapModel<G, A, R> mapModel, @NotNull final SavedSquares<G, A, R> savedSquares) { + // ignore + } + + /** {@inheritDoc} */ + @Override + public void postEndTransaction() { + isInMapTransaction = false; + } + + }; + + /** + * The map model listener which is attached to {@link #currentMapControl}. + */ + @NotNull + private final MapModelListener<G, A, R> mapModelListener = new MapModelListener<G, A, R>() { + + /** {@inheritDoc} */ + @Override + public void mapSizeChanged(@NotNull final Size2D newSize) { + // ignore + } + + /** {@inheritDoc} */ + @Override + public void mapSquaresChanged(@NotNull final Set<MapSquare<G, A, R>> mapSquares) { + if (selectedGameObject == null) { + return; + } + + final G topGameObject = selectedGameObject.getTopContainer(); + for (final Iterable<G> mapSquare : mapSquares) { + for (final G gameObject : mapSquare) { + if (gameObject == topGameObject) { + refreshDisplay(); + } + } + } + } + + /** {@inheritDoc} */ + @Override + public void mapObjectsChanged(@NotNull final Set<G> gameObjects, @NotNull final Set<G> transientGameObjects) { + for (final GameObject<G, A, R> gameObject : gameObjects) { + if (selectedGameObject == gameObject.getHead()) { + refreshDisplay(); + } + } + } + + /** {@inheritDoc} */ + @Override + public void errorsChanged(@NotNull final ErrorCollector<G, A, R> errors) { + // ignore + } + + /** {@inheritDoc} */ + @Override + public void mapFileChanged(@Nullable final File oldMapFile) { + // ignore + } + + /** {@inheritDoc} */ + @Override + public void modifiedChanged() { + // ignore + } + + }; + + /** + * Creates a new instance. + * @param ident the tab's identification string + * @param gameObjectTextEditor the game object text editor to show + * @param defaultLocation the tab's default location + * @param index the tab's index for ordering + * @param defaultOpen the tab's default opened status + * @param selectedSquareModel the selected square mode to track + * @param mapManager the map manager to track + */ + public GameObjectTextEditorTab(@NotNull final String ident, @NotNull final GameObjectTextEditor gameObjectTextEditor, @NotNull final Location defaultLocation, final int index, final boolean defaultOpen, @NotNull final SelectedSquareModel<G, A, R> selectedSquareModel, @NotNull final MapManager<G, A, R> mapManager) { + super(ident, gameObjectTextEditor, defaultLocation, index, defaultOpen); + this.gameObjectTextEditor = gameObjectTextEditor; + selectedSquareModel.addSelectedSquareListener(new SelectedSquareModelListener<G, A, R>() { + + @Override + public void selectedGameObjectChanged(@Nullable final G gameObject) { + autoApplyArchPanelChanges(); + selectedGameObject = gameObject; + refreshDisplay(); + } + + @Override + public void selectedMapSquareSelectionChanged(@Nullable final MapSquareSelection<G, A, R> mapSquareSelection) { + // ignore + } + + }); + currentMapControl = mapManager.getCurrentMap(); + if (currentMapControl != null) { + final MapModel<G, A, R> mapModel = currentMapControl.getMapModel(); + mapModel.addMapModelListener(mapModelListener); + mapModel.addMapTransactionListener(mapTransactionListener); + } + mapManager.addMapManagerListener(mapManagerListener); + selectedGameObject = selectedSquareModel.getSelectedGameObject(); + refreshDisplay(); + gameObjectTextEditor.getTextPane().addFocusListener(new FocusListener() { + + /** {@inheritDoc} */ + @Override + public void focusGained(final FocusEvent e) { + // ignore + } + + /** {@inheritDoc} */ + @Override + public void focusLost(final FocusEvent e) { + autoApplyArchPanelChanges(); + } + + }); + } + + /** + * Applies pending changed. Protects against recursive calls. + */ + private void autoApplyArchPanelChanges() { + if (selectedGameObject == null || isInAutoApplyArchPanelChanges || isInMapTransaction) { + return; + } + + isInAutoApplyArchPanelChanges = true; + try { + gameObjectTextEditor.applyChanges(selectedGameObject); + } finally { + isInAutoApplyArchPanelChanges = false; + } + } + + /** + * Refreshes the tab's state from a {@link #selectedGameObject}. + */ + private void refreshDisplay() { + setSeverity(gameObjectTextEditor.refreshDisplay(selectedGameObject)); + } + +} // class GameObjectTextEditorTab Property changes on: trunk/src/app/net/sf/gridarta/gui/mainwindow/GameObjectTextEditorTab.java ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:eol-style + LF Modified: trunk/src/app/net/sf/gridarta/maincontrol/GUIMainControl.java =================================================================== --- trunk/src/app/net/sf/gridarta/maincontrol/GUIMainControl.java 2010-12-10 19:53:09 UTC (rev 8814) +++ trunk/src/app/net/sf/gridarta/maincontrol/GUIMainControl.java 2010-12-10 19:57:25 UTC (rev 8815) @@ -56,7 +56,10 @@ import net.sf.gridarta.gui.gameobjectattributespanel.GameObjectAttributesModel; import net.sf.gridarta.gui.gameobjectattributespanel.MsgTextTab; import net.sf.gridarta.gui.gameobjectattributespanel.TextEditorTab; +import net.sf.gridarta.gui.gameobjecttexteditor.GameObjectTextEditor; +import net.sf.gridarta.gui.gomapdialog.GoMapDialogManager; import net.sf.gridarta.gui.mainwindow.GameObjectTab; +import net.sf.gridarta.gui.mainwindow.GameObjectTextEditorTab; import net.sf.gridarta.gui.mainwindow.WarningsTab; import net.sf.gridarta.gui.map.MapFileActions; import net.sf.gridarta.gui.map.mapactions.MapActions; @@ -582,6 +585,7 @@ mainView.addTab(new Tab("connections", new ConnectionControl<G, A, R>(mapViewManager, delayedMapModelListenerManager).getView(), Location.BOTTOM, 5, false)); mainView.addTab(new Tab("lockedItems", lockedItemsControl.getView(), Location.BOTTOM, 6, false)); mainView.addTab(new WarningsTab<G, A, R>("warnings", errorListView, Location.BOTTOM, 7, false)); + mainView.addTab(new GameObjectTextEditorTab<G, A, R>("textEditor", new GameObjectTextEditor(archetypeTypeSet), Location.BOTTOM, 8, false, selectedSquareModel, mapManager)); new ArchetypeValidator(animationObjects, faceObjects, errorView).validate(archetypeSet); new AnimationValidator(faceObjects, errorView).validate(animationObjects); Modified: trunk/src/app/net/sf/gridarta/messages.properties =================================================================== --- trunk/src/app/net/sf/gridarta/messages.properties 2010-12-10 19:53:09 UTC (rev 8814) +++ trunk/src/app/net/sf/gridarta/messages.properties 2010-12-10 19:57:25 UTC (rev 8815) @@ -1622,6 +1622,9 @@ tabButton.lockedItems.title1=Locked Items tabButton.lockedItems.title2={0}: Locked Items tabButton.lockedItems.shortdescription=Display the locked items of the current map. +tabButton.textEditor.title1=Text Editor +tabButton.textEditor.title2={0}: Text Editor +tabButton.textEditor.shortdescription=Display the game object text editor for the selected game object. tabButton.warnings.title1=Warnings tabButton.warnings.title2={0}: Warnings tabButton.warnings.shortdescription=Display the warnings of the current map. Modified: trunk/src/app/net/sf/gridarta/messages_de.properties =================================================================== --- trunk/src/app/net/sf/gridarta/messages_de.properties 2010-12-10 19:53:09 UTC (rev 8814) +++ trunk/src/app/net/sf/gridarta/messages_de.properties 2010-12-10 19:57:25 UTC (rev 8815) @@ -1395,6 +1395,9 @@ tabButton.lockedItems.title1=Verriegelte Objekte tabButton.lockedItems.title2={0}: Verriegelte Objekte tabButton.lockedItems.shortdescription=Zeigt verriegelte T\u00fcren und Schl\u00fcssel in der aktuellen Karte. +tabButton.textEditor.title1=Text Editor +tabButton.textEditor.title2={0}: Text Editor +tabButton.textEditor.shortdescription=Zeigt den Objekt-Text des ausgew\u00e4hlten Objekts an. tabButton.warnings.title1=Warnungen tabButton.warnings.title2={0}: Warnungen tabButton.warnings.shortdescription=Zeigt Warnungen der aktuellen Karte. Modified: trunk/src/app/net/sf/gridarta/messages_fr.properties =================================================================== --- trunk/src/app/net/sf/gridarta/messages_fr.properties 2010-12-10 19:53:09 UTC (rev 8814) +++ trunk/src/app/net/sf/gridarta/messages_fr.properties 2010-12-10 19:57:25 UTC (rev 8815) @@ -1384,6 +1384,9 @@ tabButton.lockedItems.title1=Objets verrouill\u00e9s tabButton.lockedItems.title2={0} : Objets verrouill\u00e9s #tabButton.lockedItems.shortdescription= +#tabButton.textEditor.title1= +#tabButton.textEditor.title2= +#tabButton.textEditor.shortdescription= tabButton.warnings.title1=Alertes tabButton.warnings.title2={0} : Alertes #tabButton.warnings.shortdescription= Modified: trunk/src/app/net/sf/gridarta/messages_sv.properties =================================================================== --- trunk/src/app/net/sf/gridarta/messages_sv.properties 2010-12-10 19:53:09 UTC (rev 8814) +++ trunk/src/app/net/sf/gridarta/messages_sv.properties 2010-12-10 19:57:25 UTC (rev 8815) @@ -1383,6 +1383,9 @@ #tabButton.lockedItems.title1= #tabButton.lockedItems.title2= #tabButton.lockedItems.shortdescription= +#tabButton.textEditor.title1= +#tabButton.textEditor.title2= +#tabButton.textEditor.shortdescription= #tabButton.warnings.title1= #tabButton.warnings.title2= #tabButton.warnings.shortdescription= This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2010-12-10 19:53:15
|
Revision: 8814 http://gridarta.svn.sourceforge.net/gridarta/?rev=8814&view=rev Author: akirschbaum Date: 2010-12-10 19:53:09 +0000 (Fri, 10 Dec 2010) Log Message: ----------- Order import statements. Modified Paths: -------------- trunk/src/app/net/sf/gridarta/maincontrol/GUIMainControl.java Modified: trunk/src/app/net/sf/gridarta/maincontrol/GUIMainControl.java =================================================================== --- trunk/src/app/net/sf/gridarta/maincontrol/GUIMainControl.java 2010-12-10 19:48:59 UTC (rev 8813) +++ trunk/src/app/net/sf/gridarta/maincontrol/GUIMainControl.java 2010-12-10 19:53:09 UTC (rev 8814) @@ -35,7 +35,6 @@ import javax.swing.filechooser.FileFilter; import net.sf.gridarta.MainControl; import net.sf.gridarta.actions.ExitConnectorActions; -import net.sf.gridarta.gui.delayedmapmodel.DelayedMapModelListenerManager; import net.sf.gridarta.gui.archetypechooser.ArchetypeChooserControl; import net.sf.gridarta.gui.autovalidator.AutoValidator; import net.sf.gridarta.gui.bookmarks.BookmarkActions; @@ -44,6 +43,7 @@ import net.sf.gridarta.gui.connectionview.LockedItemsControl; import net.sf.gridarta.gui.connectionview.MonsterControl; import net.sf.gridarta.gui.copybuffer.CopyBuffer; +import net.sf.gridarta.gui.delayedmapmodel.DelayedMapModelListenerManager; import net.sf.gridarta.gui.exitconnector.ExitConnectorController; import net.sf.gridarta.gui.filter.FilterControl; import net.sf.gridarta.gui.findarchetypes.FindArchetypesDialogManager; @@ -56,7 +56,6 @@ import net.sf.gridarta.gui.gameobjectattributespanel.GameObjectAttributesModel; import net.sf.gridarta.gui.gameobjectattributespanel.MsgTextTab; import net.sf.gridarta.gui.gameobjectattributespanel.TextEditorTab; -import net.sf.gridarta.gui.gomapdialog.GoMapDialogManager; import net.sf.gridarta.gui.mainwindow.GameObjectTab; import net.sf.gridarta.gui.mainwindow.WarningsTab; import net.sf.gridarta.gui.map.MapFileActions; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2010-12-10 19:49:05
|
Revision: 8813 http://gridarta.svn.sourceforge.net/gridarta/?rev=8813&view=rev Author: akirschbaum Date: 2010-12-10 19:48:59 +0000 (Fri, 10 Dec 2010) Log Message: ----------- Add @NotNull annotations. Modified Paths: -------------- trunk/src/app/net/sf/gridarta/gui/gameobjectattributespanel/AbstractGameObjectAttributesTab.java trunk/src/app/net/sf/gridarta/gui/gameobjecttexteditor/GameObjectTextEditor.java Modified: trunk/src/app/net/sf/gridarta/gui/gameobjectattributespanel/AbstractGameObjectAttributesTab.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/gameobjectattributespanel/AbstractGameObjectAttributesTab.java 2010-12-10 18:04:11 UTC (rev 8812) +++ trunk/src/app/net/sf/gridarta/gui/gameobjectattributespanel/AbstractGameObjectAttributesTab.java 2010-12-10 19:48:59 UTC (rev 8813) @@ -58,6 +58,7 @@ * The focus listener to implement auto-applying. See {@link * #addAutoApply(Component)}. */ + @NotNull private final FocusListener focusListener = new FocusListener() { /** {@inheritDoc} */ Modified: trunk/src/app/net/sf/gridarta/gui/gameobjecttexteditor/GameObjectTextEditor.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/gameobjecttexteditor/GameObjectTextEditor.java 2010-12-10 18:04:11 UTC (rev 8812) +++ trunk/src/app/net/sf/gridarta/gui/gameobjecttexteditor/GameObjectTextEditor.java 2010-12-10 19:48:59 UTC (rev 8813) @@ -66,6 +66,7 @@ /** * The {@link JTextPane} that contains the attributes of the game object. */ + @NotNull private final JTextPane archEdit = new ScrollingTextPane(); /** This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2010-12-10 18:04:18
|
Revision: 8812 http://gridarta.svn.sourceforge.net/gridarta/?rev=8812&view=rev Author: akirschbaum Date: 2010-12-10 18:04:11 +0000 (Fri, 10 Dec 2010) Log Message: ----------- Display red "Game Object" tab if the selected game object includes incorrect attributes. Modified Paths: -------------- trunk/atrinik/ChangeLog trunk/crossfire/ChangeLog trunk/daimonin/ChangeLog trunk/src/app/net/sf/gridarta/gui/gameobjectattributespanel/TextEditorTab.java trunk/src/app/net/sf/gridarta/gui/gameobjecttexteditor/GameObjectTextEditor.java Modified: trunk/atrinik/ChangeLog =================================================================== --- trunk/atrinik/ChangeLog 2010-12-10 07:35:01 UTC (rev 8811) +++ trunk/atrinik/ChangeLog 2010-12-10 18:04:11 UTC (rev 8812) @@ -1,3 +1,8 @@ +2010-12-10 Andreas Kirschbaum + + * Display red "Game Object" tab if the selected game object + includes incorrect attributes. + 2010-12-05 Andreas Kirschbaum * Fix display issues in map preview tool. Modified: trunk/crossfire/ChangeLog =================================================================== --- trunk/crossfire/ChangeLog 2010-12-10 07:35:01 UTC (rev 8811) +++ trunk/crossfire/ChangeLog 2010-12-10 18:04:11 UTC (rev 8812) @@ -1,3 +1,8 @@ +2010-12-10 Andreas Kirschbaum + + * Display red "Game Object" tab if the selected game object + includes incorrect attributes. + 2010-11-24 Andreas Kirschbaum * Fix keyboard shortcuts of the go map and find archetype dialogs Modified: trunk/daimonin/ChangeLog =================================================================== --- trunk/daimonin/ChangeLog 2010-12-10 07:35:01 UTC (rev 8811) +++ trunk/daimonin/ChangeLog 2010-12-10 18:04:11 UTC (rev 8812) @@ -1,3 +1,8 @@ +2010-12-10 Andreas Kirschbaum + + * Display red "Game Object" tab if the selected game object + includes incorrect attributes. + 2010-12-05 Andreas Kirschbaum * Fix display issues in map preview tool. Modified: trunk/src/app/net/sf/gridarta/gui/gameobjectattributespanel/TextEditorTab.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/gameobjectattributespanel/TextEditorTab.java 2010-12-10 07:35:01 UTC (rev 8811) +++ trunk/src/app/net/sf/gridarta/gui/gameobjectattributespanel/TextEditorTab.java 2010-12-10 18:04:11 UTC (rev 8812) @@ -21,7 +21,6 @@ import javax.swing.JPanel; import net.sf.gridarta.gui.gameobjecttexteditor.GameObjectTextEditor; -import net.sf.gridarta.gui.utils.Severity; import net.sf.gridarta.model.archetype.Archetype; import net.sf.gridarta.model.archetypetype.ArchetypeTypeSet; import net.sf.gridarta.model.gameobject.GameObject; @@ -75,8 +74,7 @@ */ @Override protected void refresh(@Nullable final G gameObject) { - gameObjectTextEditor.refreshDisplay(gameObject); - setTabSeverity(gameObject == null || gameObject.getObjectText().isEmpty() ? Severity.DEFAULT : Severity.MODIFIED); + setTabSeverity(gameObjectTextEditor.refreshDisplay(gameObject)); } /** Modified: trunk/src/app/net/sf/gridarta/gui/gameobjecttexteditor/GameObjectTextEditor.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/gameobjecttexteditor/GameObjectTextEditor.java 2010-12-10 07:35:01 UTC (rev 8811) +++ trunk/src/app/net/sf/gridarta/gui/gameobjecttexteditor/GameObjectTextEditor.java 2010-12-10 18:04:11 UTC (rev 8812) @@ -35,6 +35,7 @@ import javax.swing.text.MutableAttributeSet; import javax.swing.text.StyleConstants; import javax.swing.text.StyleContext; +import net.sf.gridarta.gui.utils.Severity; import net.sf.gridarta.model.archetype.AttributeListUtils; import net.sf.gridarta.model.archetypetype.ArchetypeType; import net.sf.gridarta.model.archetypetype.ArchetypeTypeSet; @@ -110,10 +111,13 @@ * Refreshes the input field to show the attributes of a {@link * GameObject}. * @param gameObject the game object to set the contents from + * @return the severity corresponding to the attribute values */ - public void refreshDisplay(@Nullable final GameObject<?, ?, ?> gameObject) { + @NotNull + public Severity refreshDisplay(@Nullable final GameObject<?, ?, ?> gameObject) { archEdit.setEnabled(gameObject != null); archEdit.setText(""); + Severity severity = Severity.DEFAULT; if (gameObject != null) { final MutableAttributeSet currentAttributes = archEdit.getStyle(StyleContext.DEFAULT_STYLE); try { @@ -122,17 +126,23 @@ final ArchetypeType typeStruct = archetypeTypeSet.getTypeOfArch(gameObject); final String errorText = GameObjectUtils.getSyntaxErrors(gameObject, typeStruct); + final String objectText = gameObject.getObjectText(); if (errorText == null) { StyleConstants.setForeground(currentAttributes, Color.blue); - document.insertString(document.getLength(), gameObject.getObjectText(), currentAttributes); + document.insertString(document.getLength(), objectText, currentAttributes); + if (!objectText.isEmpty()) { + severity = Severity.MODIFIED; + } } else { + severity = Severity.ERROR; + StyleConstants.setForeground(currentAttributes, Color.red); document.insertString(document.getLength(), errorText, currentAttributes); final Collection<String> errors = new HashSet<String>(); errors.addAll(Arrays.asList(StringUtils.PATTERN_END_OF_LINE.split(errorText))); StyleConstants.setForeground(currentAttributes, Color.blue); - for (final String line : StringUtils.PATTERN_END_OF_LINE.split(gameObject.getObjectText())) { + for (final String line : StringUtils.PATTERN_END_OF_LINE.split(objectText)) { if (!errors.contains(line)) { document.insertString(document.getLength(), line + '\n', currentAttributes); } @@ -147,6 +157,7 @@ } archEdit.setCaretPosition(0); defaultArchEditValue = archEdit.getText(); + return severity; } /** This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2010-12-10 07:35:07
|
Revision: 8811 http://gridarta.svn.sourceforge.net/gridarta/?rev=8811&view=rev Author: akirschbaum Date: 2010-12-10 07:35:01 +0000 (Fri, 10 Dec 2010) Log Message: ----------- Remove unused code. Modified Paths: -------------- trunk/src/app/net/sf/gridarta/gui/gameobjectattributespanel/GameObjectAttributesControl.java trunk/src/app/net/sf/gridarta/maincontrol/GUIMainControl.java Modified: trunk/src/app/net/sf/gridarta/gui/gameobjectattributespanel/GameObjectAttributesControl.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/gameobjectattributespanel/GameObjectAttributesControl.java 2010-12-05 10:17:25 UTC (rev 8810) +++ trunk/src/app/net/sf/gridarta/gui/gameobjectattributespanel/GameObjectAttributesControl.java 2010-12-10 07:35:01 UTC (rev 8811) @@ -55,7 +55,6 @@ import net.sf.gridarta.model.mapmodel.MapSquare; import net.sf.gridarta.model.mapmodel.MapTransactionListener; import net.sf.gridarta.model.mapmodel.SavedSquares; -import net.sf.gridarta.model.match.GameObjectMatchers; import net.sf.gridarta.model.validation.ErrorCollector; import net.sf.gridarta.utils.EventListenerList2; import net.sf.gridarta.utils.Size2D; @@ -108,12 +107,6 @@ private final GameObjectFactory<G, A, R> gameObjectFactory; /** - * The {@link GameObjectMatchers} to use. - */ - @NotNull - private final GameObjectMatchers gameObjectMatchers; - - /** * The main panel. */ @NotNull @@ -406,16 +399,14 @@ * @param selectedSquareView the selected square view to update * @param gameObjectFactory the game object factory for creating new game * objects - * @param gameObjectMatchers the game object matchers to use */ - public GameObjectAttributesControl(@NotNull final GameObjectAttributesModel<G, A, R> gameObjectAttributesModel, @NotNull final GameObjectAttributesDialogFactory<G, A, R> gameObjectAttributesDialogFactory, @NotNull final ObjectChooser<G, A, R> objectChooser, @NotNull final MapManager<G, A, R> mapManager, @NotNull final SelectedSquareModel<G, A, R> selectedSquareModel, @NotNull final SelectedSquareView<G, A, R> selectedSquareView, @NotNull final GameObjectFactory<G, A, R> gameObjectFactory, @NotNull final GameObjectMatchers gameObjectMatchers) { + public GameObjectAttributesControl(@NotNull final GameObjectAttributesModel<G, A, R> gameObjectAttributesModel, @NotNull final GameObjectAttributesDialogFactory<G, A, R> gameObjectAttributesDialogFactory, @NotNull final ObjectChooser<G, A, R> objectChooser, @NotNull final MapManager<G, A, R> mapManager, @NotNull final SelectedSquareModel<G, A, R> selectedSquareModel, @NotNull final SelectedSquareView<G, A, R> selectedSquareView, @NotNull final GameObjectFactory<G, A, R> gameObjectFactory) { super(new BorderLayout()); this.gameObjectAttributesModel = gameObjectAttributesModel; this.gameObjectAttributesDialogFactory = gameObjectAttributesDialogFactory; this.objectChooser = objectChooser; this.selectedSquareView = selectedSquareView; this.gameObjectFactory = gameObjectFactory; - this.gameObjectMatchers = gameObjectMatchers; final Container mapArchPanel = new JPanel(); mapArchPanel.setLayout(new BorderLayout()); Modified: trunk/src/app/net/sf/gridarta/maincontrol/GUIMainControl.java =================================================================== --- trunk/src/app/net/sf/gridarta/maincontrol/GUIMainControl.java 2010-12-05 10:17:25 UTC (rev 8810) +++ trunk/src/app/net/sf/gridarta/maincontrol/GUIMainControl.java 2010-12-10 07:35:01 UTC (rev 8811) @@ -490,7 +490,7 @@ final DelayedMapModelListenerManager<G, A, R> delayedMapModelListenerManager = new DelayedMapModelListenerManager<G, A, R>(mapManager, exiter); final Control<?, G, A, R> lockedItemsControl = new LockedItemsControl<G, A, R>(mapViewManager, delayedMapModelListenerManager, lockedItemsTypeNumbers); final GameObjectAttributesModel<G, A, R> gameObjectAttributesModel = new GameObjectAttributesModel<G, A, R>(); - final GameObjectAttributesControl<G, A, R> gameObjectAttributesControl = new GameObjectAttributesControl<G, A, R>(gameObjectAttributesModel, gameObjectAttributesDialogFactory, objectChooser, mapManager, selectedSquareModel, selectedSquareView, gameObjectFactory, gameObjectMatchers); + final GameObjectAttributesControl<G, A, R> gameObjectAttributesControl = new GameObjectAttributesControl<G, A, R>(gameObjectAttributesModel, gameObjectAttributesDialogFactory, objectChooser, mapManager, selectedSquareModel, selectedSquareView, gameObjectFactory); final PluginParameterViewFactory<G, A, R> pluginParameterViewFactory = new PluginParameterViewFactory<G, A, R>(archetypeSet, gameObjectAttributesModel, objectChooser, mapManager, faceObjectProviders); final File scriptsFile = new File(globalSettings.getMapsDirectory(), scriptsDir); scriptControl = new ScriptController<G, A, R>(filterControl, scriptParameters, mainViewFrame, pluginParameterViewFactory, scriptsFile, scriptModel, pluginParameterFactory, scriptExecutor, systemIcons); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |