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...> - 2010-05-08 18:35:27
|
Revision: 7710 http://gridarta.svn.sourceforge.net/gridarta/?rev=7710&view=rev Author: akirschbaum Date: 2010-05-08 18:35:21 +0000 (Sat, 08 May 2010) Log Message: ----------- Remove public constructor from non-public class. Modified Paths: -------------- trunk/src/app/net/sf/gridarta/delayedmapmodel/DelayedMapModelListenerManager.java Modified: trunk/src/app/net/sf/gridarta/delayedmapmodel/DelayedMapModelListenerManager.java =================================================================== --- trunk/src/app/net/sf/gridarta/delayedmapmodel/DelayedMapModelListenerManager.java 2010-05-08 18:31:55 UTC (rev 7709) +++ trunk/src/app/net/sf/gridarta/delayedmapmodel/DelayedMapModelListenerManager.java 2010-05-08 18:35:21 UTC (rev 7710) @@ -312,7 +312,7 @@ * Creates a new instance. * @param mapModel the map model to track */ - public MapModelListenerImpl(@NotNull final MapModel<G, A, R> mapModel) { + private MapModelListenerImpl(@NotNull final MapModel<G, A, R> mapModel) { this.mapModel = mapModel; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2010-05-08 18:32:01
|
Revision: 7709 http://gridarta.svn.sourceforge.net/gridarta/?rev=7709&view=rev Author: akirschbaum Date: 2010-05-08 18:31:55 +0000 (Sat, 08 May 2010) Log Message: ----------- Do not create the same objects multiple times. Modified Paths: -------------- trunk/src/app/net/sf/gridarta/gui/map/renderer/AbstractSimpleIsoMapRenderer.java Modified: trunk/src/app/net/sf/gridarta/gui/map/renderer/AbstractSimpleIsoMapRenderer.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/map/renderer/AbstractSimpleIsoMapRenderer.java 2010-05-08 18:26:29 UTC (rev 7708) +++ trunk/src/app/net/sf/gridarta/gui/map/renderer/AbstractSimpleIsoMapRenderer.java 2010-05-08 18:31:55 UTC (rev 7709) @@ -45,6 +45,12 @@ public abstract class AbstractSimpleIsoMapRenderer<G extends GameObject<G, A, R>, A extends MapArchObject<A>, R extends Archetype<G, A, R>> extends AbstractMapRenderer<G, A, R> { /** + * The background {@link Color} for created images. + */ + @NotNull + private static final Color BACKGROUND_COLOR = new Color(255, 255, 255, 0); + + /** * The {@link MapModel} to render. */ @NotNull @@ -150,7 +156,7 @@ // first create a storing place for the image final BufferedImage image = new BufferedImage(viewWidth, viewHeight, BufferedImage.TYPE_INT_ARGB); final Graphics2D bufGrfx = image.createGraphics(); - bufGrfx.setColor(new Color(255, 255, 255, 0)); + bufGrfx.setColor(BACKGROUND_COLOR); bufGrfx.fillRect(0, 0, viewWidth, viewHeight); // paint the mapview into the image This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2010-05-08 18:26:35
|
Revision: 7708 http://gridarta.svn.sourceforge.net/gridarta/?rev=7708&view=rev Author: akirschbaum Date: 2010-05-08 18:26:29 +0000 (Sat, 08 May 2010) Log Message: ----------- Remove check for 'this instanceof ...'. Modified Paths: -------------- trunk/src/app/net/sf/gridarta/model/treasurelist/ArchTreasureObj.java trunk/src/app/net/sf/gridarta/model/treasurelist/FolderTreasureObj.java trunk/src/app/net/sf/gridarta/model/treasurelist/NoTreasureObj.java trunk/src/app/net/sf/gridarta/model/treasurelist/TreasureListTreasureObj.java trunk/src/app/net/sf/gridarta/model/treasurelist/TreasureObj.java trunk/src/app/net/sf/gridarta/model/treasurelist/YesTreasureObj.java Modified: trunk/src/app/net/sf/gridarta/model/treasurelist/ArchTreasureObj.java =================================================================== --- trunk/src/app/net/sf/gridarta/model/treasurelist/ArchTreasureObj.java 2010-05-08 18:21:15 UTC (rev 7707) +++ trunk/src/app/net/sf/gridarta/model/treasurelist/ArchTreasureObj.java 2010-05-08 18:26:29 UTC (rev 7708) @@ -44,6 +44,13 @@ * {@inheritDoc} */ @Override + protected void appendToString(@NotNull final StringBuilder sb) { + } + + /** + * {@inheritDoc} + */ + @Override public void visit(@NotNull final TreasureObjVisitor visitor) { visitor.visit(this); } Modified: trunk/src/app/net/sf/gridarta/model/treasurelist/FolderTreasureObj.java =================================================================== --- trunk/src/app/net/sf/gridarta/model/treasurelist/FolderTreasureObj.java 2010-05-08 18:21:15 UTC (rev 7707) +++ trunk/src/app/net/sf/gridarta/model/treasurelist/FolderTreasureObj.java 2010-05-08 18:26:29 UTC (rev 7708) @@ -44,6 +44,13 @@ * {@inheritDoc} */ @Override + protected void appendToString(@NotNull final StringBuilder sb) { + } + + /** + * {@inheritDoc} + */ + @Override public void visit(@NotNull final TreasureObjVisitor visitor) { visitor.visit(this); } Modified: trunk/src/app/net/sf/gridarta/model/treasurelist/NoTreasureObj.java =================================================================== --- trunk/src/app/net/sf/gridarta/model/treasurelist/NoTreasureObj.java 2010-05-08 18:21:15 UTC (rev 7707) +++ trunk/src/app/net/sf/gridarta/model/treasurelist/NoTreasureObj.java 2010-05-08 18:26:29 UTC (rev 7708) @@ -45,6 +45,13 @@ * {@inheritDoc} */ @Override + protected void appendToString(@NotNull final StringBuilder sb) { + } + + /** + * {@inheritDoc} + */ + @Override public void visit(@NotNull final TreasureObjVisitor visitor) { visitor.visit(this); } Modified: trunk/src/app/net/sf/gridarta/model/treasurelist/TreasureListTreasureObj.java =================================================================== --- trunk/src/app/net/sf/gridarta/model/treasurelist/TreasureListTreasureObj.java 2010-05-08 18:21:15 UTC (rev 7707) +++ trunk/src/app/net/sf/gridarta/model/treasurelist/TreasureListTreasureObj.java 2010-05-08 18:26:29 UTC (rev 7708) @@ -69,6 +69,16 @@ * {@inheritDoc} */ @Override + protected void appendToString(@NotNull final StringBuilder sb) { + if (listType == TreasureListTreasureObjType.ONE) { + sb.append(" [one]"); + } + } + + /** + * {@inheritDoc} + */ + @Override public void visit(@NotNull final TreasureObjVisitor visitor) { visitor.visit(this); } Modified: trunk/src/app/net/sf/gridarta/model/treasurelist/TreasureObj.java =================================================================== --- trunk/src/app/net/sf/gridarta/model/treasurelist/TreasureObj.java 2010-05-08 18:21:15 UTC (rev 7707) +++ trunk/src/app/net/sf/gridarta/model/treasurelist/TreasureObj.java 2010-05-08 18:26:29 UTC (rev 7708) @@ -71,9 +71,7 @@ sb.append(nrof).append(" "); } sb.append(name); - if (this instanceof TreasureListTreasureObj && ((TreasureListTreasureObj) this).getListType() == TreasureListTreasureObjType.ONE) { - sb.append(" [one]"); - } + appendToString(sb); if (magic != UNSET) { sb.append(" +").append(magic); } @@ -83,6 +81,13 @@ return sb.toString(); } + /** + * Appends a description of this treasure object to a {@link + * StringBuilder}. + * @param sb the string builder + */ + protected abstract void appendToString(@NotNull final StringBuilder sb); + // --- GET/SET methods: --- public void setChance(final int value) { chance = value; Modified: trunk/src/app/net/sf/gridarta/model/treasurelist/YesTreasureObj.java =================================================================== --- trunk/src/app/net/sf/gridarta/model/treasurelist/YesTreasureObj.java 2010-05-08 18:21:15 UTC (rev 7707) +++ trunk/src/app/net/sf/gridarta/model/treasurelist/YesTreasureObj.java 2010-05-08 18:26:29 UTC (rev 7708) @@ -45,6 +45,13 @@ * {@inheritDoc} */ @Override + protected void appendToString(@NotNull final StringBuilder sb) { + } + + /** + * {@inheritDoc} + */ + @Override public void visit(@NotNull final TreasureObjVisitor visitor) { visitor.visit(this); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2010-05-08 18:21:22
|
Revision: 7707 http://gridarta.svn.sourceforge.net/gridarta/?rev=7707&view=rev Author: akirschbaum Date: 2010-05-08 18:21:15 +0000 (Sat, 08 May 2010) Log Message: ----------- Simplify code. Modified Paths: -------------- trunk/src/app/net/sf/gridarta/model/treasurelist/TreasureObj.java Modified: trunk/src/app/net/sf/gridarta/model/treasurelist/TreasureObj.java =================================================================== --- trunk/src/app/net/sf/gridarta/model/treasurelist/TreasureObj.java 2010-05-08 17:24:55 UTC (rev 7706) +++ trunk/src/app/net/sf/gridarta/model/treasurelist/TreasureObj.java 2010-05-08 18:21:15 UTC (rev 7707) @@ -66,7 +66,21 @@ */ @Override public String toString() { - return (nrof == UNSET ? "" : nrof + " ") + name + (this instanceof TreasureListTreasureObj && ((TreasureListTreasureObj) this).getListType() == TreasureListTreasureObjType.ONE ? " [one]" : "") + (magic == UNSET ? "" : " +" + magic) + (chance == UNSET ? "" : " (" + chance + " %)"); + final StringBuilder sb = new StringBuilder(); + if (nrof != UNSET) { + sb.append(nrof).append(" "); + } + sb.append(name); + if (this instanceof TreasureListTreasureObj && ((TreasureListTreasureObj) this).getListType() == TreasureListTreasureObjType.ONE) { + sb.append(" [one]"); + } + if (magic != UNSET) { + sb.append(" +").append(magic); + } + if (chance != UNSET) { + sb.append(" (").append(chance).append(" %)"); + } + return sb.toString(); } // --- GET/SET methods: --- This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2010-05-08 17:25:15
|
Revision: 7706 http://gridarta.svn.sourceforge.net/gridarta/?rev=7706&view=rev Author: akirschbaum Date: 2010-05-08 17:24:55 +0000 (Sat, 08 May 2010) Log Message: ----------- Consistently format source code. Modified Paths: -------------- trunk/atrinik/src/app/net/sf/gridarta/var/atrinik/IGUIConstants.java trunk/atrinik/src/app/net/sf/gridarta/var/atrinik/gui/map/renderer/DefaultRendererFactory.java 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/atrinik/src/app/net/sf/gridarta/var/atrinik/gui/scripts/DefaultScriptArchUtils.java trunk/atrinik/src/app/net/sf/gridarta/var/atrinik/maincontrol/AtrinikEditor.java trunk/atrinik/src/app/net/sf/gridarta/var/atrinik/maincontrol/DefaultEditorFactory.java trunk/atrinik/src/app/net/sf/gridarta/var/atrinik/model/archetype/ArchetypeParser.java trunk/atrinik/src/app/net/sf/gridarta/var/atrinik/model/archetype/ArchetypeSet.java trunk/atrinik/src/app/net/sf/gridarta/var/atrinik/model/archetype/DefaultArchetype.java trunk/atrinik/src/app/net/sf/gridarta/var/atrinik/model/archetype/DefaultArchetypeFactory.java trunk/atrinik/src/app/net/sf/gridarta/var/atrinik/model/archetype/UndefinedArchetype.java trunk/atrinik/src/app/net/sf/gridarta/var/atrinik/model/gameobject/DefaultGameObjectFactory.java trunk/atrinik/src/app/net/sf/gridarta/var/atrinik/model/gameobject/GameObject.java trunk/atrinik/src/app/net/sf/gridarta/var/atrinik/model/io/DefaultGameObjectParser.java trunk/atrinik/src/app/net/sf/gridarta/var/atrinik/model/io/DefaultGameObjectParserFactory.java trunk/atrinik/src/app/net/sf/gridarta/var/atrinik/model/io/DefaultMapArchObjectParserFactory.java trunk/atrinik/src/app/net/sf/gridarta/var/atrinik/model/io/MapArchObjectParser.java trunk/atrinik/src/app/net/sf/gridarta/var/atrinik/model/maparchobject/DefaultMapArchObjectFactory.java trunk/atrinik/src/app/net/sf/gridarta/var/atrinik/model/maparchobject/MapArchObject.java trunk/atrinik/src/app/net/sf/gridarta/var/atrinik/model/mapcontrol/DefaultMapControlFactory.java trunk/atrinik/src/app/net/sf/gridarta/var/atrinik/model/scripts/DefaultScriptedEvent.java trunk/atrinik/src/app/net/sf/gridarta/var/atrinik/model/scripts/DefaultScriptedEventFactory.java trunk/atrinik/src/app/net/sf/gridarta/var/atrinik/resource/AbstractResourcesReader.java trunk/atrinik/src/app/net/sf/gridarta/var/atrinik/resource/CollectedResourcesReader.java trunk/atrinik/src/app/net/sf/gridarta/var/atrinik/resource/DefaultResources.java trunk/atrinik/src/app/net/sf/gridarta/var/atrinik/resource/FilesResourcesReader.java trunk/atrinik/src/test/net/sf/gridarta/var/atrinik/model/maparchobject/MapArchObjectTest.java trunk/crossfire/src/app/net/sf/gridarta/var/crossfire/IGUIConstants.java trunk/crossfire/src/app/net/sf/gridarta/var/crossfire/gui/map/renderer/DefaultRendererFactory.java trunk/crossfire/src/app/net/sf/gridarta/var/crossfire/gui/map/renderer/FlatMapRenderer.java trunk/crossfire/src/app/net/sf/gridarta/var/crossfire/gui/map/renderer/FlatPickmapRenderer.java trunk/crossfire/src/app/net/sf/gridarta/var/crossfire/gui/map/renderer/SimpleFlatMapRenderer.java 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/gui/scripts/DefaultScriptArchUtils.java trunk/crossfire/src/app/net/sf/gridarta/var/crossfire/maincontrol/CrossfireEditor.java trunk/crossfire/src/app/net/sf/gridarta/var/crossfire/maincontrol/DefaultEditorFactory.java trunk/crossfire/src/app/net/sf/gridarta/var/crossfire/model/archetype/ArchetypeParser.java trunk/crossfire/src/app/net/sf/gridarta/var/crossfire/model/archetype/ArchetypeSet.java trunk/crossfire/src/app/net/sf/gridarta/var/crossfire/model/archetype/DefaultArchetype.java trunk/crossfire/src/app/net/sf/gridarta/var/crossfire/model/archetype/DefaultArchetypeFactory.java trunk/crossfire/src/app/net/sf/gridarta/var/crossfire/model/archetype/UndefinedArchetype.java trunk/crossfire/src/app/net/sf/gridarta/var/crossfire/model/gameobject/DefaultGameObjectFactory.java trunk/crossfire/src/app/net/sf/gridarta/var/crossfire/model/gameobject/GameObject.java trunk/crossfire/src/app/net/sf/gridarta/var/crossfire/model/io/DefaultGameObjectParser.java trunk/crossfire/src/app/net/sf/gridarta/var/crossfire/model/io/DefaultGameObjectParserFactory.java trunk/crossfire/src/app/net/sf/gridarta/var/crossfire/model/io/DefaultMapArchObjectParserFactory.java trunk/crossfire/src/app/net/sf/gridarta/var/crossfire/model/io/MapArchObjectParser.java trunk/crossfire/src/app/net/sf/gridarta/var/crossfire/model/maparchobject/DefaultMapArchObjectFactory.java trunk/crossfire/src/app/net/sf/gridarta/var/crossfire/model/maparchobject/MapArchObject.java trunk/crossfire/src/app/net/sf/gridarta/var/crossfire/model/mapcontrol/DefaultMapControlFactory.java trunk/crossfire/src/app/net/sf/gridarta/var/crossfire/model/scripts/DefaultScriptedEvent.java trunk/crossfire/src/app/net/sf/gridarta/var/crossfire/model/scripts/DefaultScriptedEventFactory.java trunk/crossfire/src/app/net/sf/gridarta/var/crossfire/model/smoothface/SmoothFaces.java trunk/crossfire/src/app/net/sf/gridarta/var/crossfire/model/smoothface/SmoothFacesLoader.java trunk/crossfire/src/app/net/sf/gridarta/var/crossfire/resource/AbstractResourcesReader.java trunk/crossfire/src/app/net/sf/gridarta/var/crossfire/resource/CollectedResourcesReader.java trunk/crossfire/src/app/net/sf/gridarta/var/crossfire/resource/DefaultResources.java trunk/crossfire/src/app/net/sf/gridarta/var/crossfire/resource/FilesResourcesReader.java trunk/daimonin/src/app/net/sf/gridarta/var/daimonin/IGUIConstants.java trunk/daimonin/src/app/net/sf/gridarta/var/daimonin/gui/map/renderer/DefaultRendererFactory.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/daimonin/src/app/net/sf/gridarta/var/daimonin/gui/scripts/DefaultScriptArchUtils.java trunk/daimonin/src/app/net/sf/gridarta/var/daimonin/maincontrol/DaimoninEditor.java trunk/daimonin/src/app/net/sf/gridarta/var/daimonin/maincontrol/DefaultEditorFactory.java trunk/daimonin/src/app/net/sf/gridarta/var/daimonin/model/archetype/ArchetypeParser.java trunk/daimonin/src/app/net/sf/gridarta/var/daimonin/model/archetype/ArchetypeSet.java trunk/daimonin/src/app/net/sf/gridarta/var/daimonin/model/archetype/DefaultArchetype.java trunk/daimonin/src/app/net/sf/gridarta/var/daimonin/model/archetype/DefaultArchetypeFactory.java trunk/daimonin/src/app/net/sf/gridarta/var/daimonin/model/archetype/UndefinedArchetype.java trunk/daimonin/src/app/net/sf/gridarta/var/daimonin/model/gameobject/DefaultGameObjectFactory.java trunk/daimonin/src/app/net/sf/gridarta/var/daimonin/model/gameobject/GameObject.java trunk/daimonin/src/app/net/sf/gridarta/var/daimonin/model/io/DefaultGameObjectParser.java trunk/daimonin/src/app/net/sf/gridarta/var/daimonin/model/io/DefaultGameObjectParserFactory.java trunk/daimonin/src/app/net/sf/gridarta/var/daimonin/model/io/DefaultMapArchObjectParserFactory.java trunk/daimonin/src/app/net/sf/gridarta/var/daimonin/model/io/MapArchObjectParser.java trunk/daimonin/src/app/net/sf/gridarta/var/daimonin/model/maparchobject/DefaultMapArchObjectFactory.java trunk/daimonin/src/app/net/sf/gridarta/var/daimonin/model/maparchobject/MapArchObject.java trunk/daimonin/src/app/net/sf/gridarta/var/daimonin/model/mapcontrol/DefaultMapControlFactory.java trunk/daimonin/src/app/net/sf/gridarta/var/daimonin/model/scripts/DefaultScriptedEvent.java trunk/daimonin/src/app/net/sf/gridarta/var/daimonin/model/scripts/DefaultScriptedEventFactory.java trunk/daimonin/src/app/net/sf/gridarta/var/daimonin/resource/AbstractResourcesReader.java trunk/daimonin/src/app/net/sf/gridarta/var/daimonin/resource/CollectedResourcesReader.java trunk/daimonin/src/app/net/sf/gridarta/var/daimonin/resource/DefaultResources.java trunk/daimonin/src/app/net/sf/gridarta/var/daimonin/resource/FilesResourcesReader.java trunk/daimonin/src/test/net/sf/gridarta/var/daimonin/model/maparchobject/MapArchObjectTest.java trunk/gridarta.ipr trunk/src/app/net/sf/gridarta/commands/BatchPngCommand.java trunk/src/app/net/sf/gridarta/commands/CollectArchesCommand.java trunk/src/app/net/sf/gridarta/commands/Collector.java trunk/src/app/net/sf/gridarta/commands/CreateThumbsCommand.java trunk/src/app/net/sf/gridarta/commands/ScriptCommand.java trunk/src/app/net/sf/gridarta/commands/SinglePngCommand.java trunk/src/app/net/sf/gridarta/delayedmapmodel/DelayedMapModelListenerManager.java trunk/src/app/net/sf/gridarta/exitconnector/ExitConnectorActions.java trunk/src/app/net/sf/gridarta/gui/archetypechooser/ArchetypeChooserControl.java trunk/src/app/net/sf/gridarta/gui/archetypechooser/ArchetypeChooserView.java trunk/src/app/net/sf/gridarta/gui/archetypechooser/ArchetypeIconCellRenderer.java trunk/src/app/net/sf/gridarta/gui/archetypechooser/ArchetypeNameCellRenderer.java trunk/src/app/net/sf/gridarta/gui/archetypechooser/ArchetypePanel.java trunk/src/app/net/sf/gridarta/gui/archetypechooser/DirectionPane.java trunk/src/app/net/sf/gridarta/gui/archetypechooser/DisplayMode.java trunk/src/app/net/sf/gridarta/gui/archetypechooser/DisplayNameCellRenderer.java trunk/src/app/net/sf/gridarta/gui/autovalidator/AutoValidator.java trunk/src/app/net/sf/gridarta/gui/connectionview/CellRenderer.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/connectionview/View.java trunk/src/app/net/sf/gridarta/gui/copybuffer/CopyBuffer.java trunk/src/app/net/sf/gridarta/gui/copybuffer/CopyMode.java trunk/src/app/net/sf/gridarta/gui/data/NamedNodeTreeCellRenderer.java trunk/src/app/net/sf/gridarta/gui/data/NamedObjectsUtils.java trunk/src/app/net/sf/gridarta/gui/errorview/ConsoleErrorView.java trunk/src/app/net/sf/gridarta/gui/errorview/DefaultErrorView.java trunk/src/app/net/sf/gridarta/gui/filter/DefaultFilterControl.java trunk/src/app/net/sf/gridarta/gui/filter/FilterMenuEntry.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/FindArchetypesDialogManager.java trunk/src/app/net/sf/gridarta/gui/findarchetypes/TableModel.java trunk/src/app/net/sf/gridarta/gui/gameobjectattributesdialog/ConfirmErrorsAL.java trunk/src/app/net/sf/gridarta/gui/gameobjectattributesdialog/DialogAttrib.java trunk/src/app/net/sf/gridarta/gui/gameobjectattributesdialog/DialogAttribAnimName.java trunk/src/app/net/sf/gridarta/gui/gameobjectattributesdialog/DialogAttribBitmask.java trunk/src/app/net/sf/gridarta/gui/gameobjectattributesdialog/DialogAttribBool.java trunk/src/app/net/sf/gridarta/gui/gameobjectattributesdialog/DialogAttribBoolSpec.java trunk/src/app/net/sf/gridarta/gui/gameobjectattributesdialog/DialogAttribFaceName.java trunk/src/app/net/sf/gridarta/gui/gameobjectattributesdialog/DialogAttribFloat.java trunk/src/app/net/sf/gridarta/gui/gameobjectattributesdialog/DialogAttribInt.java trunk/src/app/net/sf/gridarta/gui/gameobjectattributesdialog/DialogAttribInvSpell.java trunk/src/app/net/sf/gridarta/gui/gameobjectattributesdialog/DialogAttribList.java trunk/src/app/net/sf/gridarta/gui/gameobjectattributesdialog/DialogAttribLong.java trunk/src/app/net/sf/gridarta/gui/gameobjectattributesdialog/DialogAttribMapPath.java trunk/src/app/net/sf/gridarta/gui/gameobjectattributesdialog/DialogAttribScriptFile.java trunk/src/app/net/sf/gridarta/gui/gameobjectattributesdialog/DialogAttribSpell.java trunk/src/app/net/sf/gridarta/gui/gameobjectattributesdialog/DialogAttribString.java trunk/src/app/net/sf/gridarta/gui/gameobjectattributesdialog/DialogAttribText.java trunk/src/app/net/sf/gridarta/gui/gameobjectattributesdialog/DialogAttribTreasure.java trunk/src/app/net/sf/gridarta/gui/gameobjectattributesdialog/DialogAttribZSpell.java trunk/src/app/net/sf/gridarta/gui/gameobjectattributesdialog/GameObjectAttributesDialog.java trunk/src/app/net/sf/gridarta/gui/gameobjectattributesdialog/GameObjectAttributesDialogFactory.java trunk/src/app/net/sf/gridarta/gui/gameobjectattributesdialog/GuiInfo.java trunk/src/app/net/sf/gridarta/gui/gameobjectattributesdialog/HelpActionListener.java trunk/src/app/net/sf/gridarta/gui/gameobjectattributesdialog/MaskChangeAL.java trunk/src/app/net/sf/gridarta/gui/gameobjectattributesdialog/ScrollToVisibleFocusListener.java trunk/src/app/net/sf/gridarta/gui/gameobjectattributesdialog/StringKeyManager.java trunk/src/app/net/sf/gridarta/gui/gameobjectattributesdialog/ViewTreasurelistAL.java trunk/src/app/net/sf/gridarta/gui/gameobjectattributespanel/AbstractGameObjectAttributesTab.java trunk/src/app/net/sf/gridarta/gui/gameobjectattributespanel/ArchTab.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/FaceTab.java trunk/src/app/net/sf/gridarta/gui/gameobjectattributespanel/GameObjectAttributesControl.java trunk/src/app/net/sf/gridarta/gui/gameobjectattributespanel/GameObjectAttributesTab.java trunk/src/app/net/sf/gridarta/gui/gameobjectattributespanel/GameObjectAttributesTabListener.java trunk/src/app/net/sf/gridarta/gui/gameobjectattributespanel/MsgTextTab.java trunk/src/app/net/sf/gridarta/gui/gameobjectattributespanel/TextEditorTab.java trunk/src/app/net/sf/gridarta/gui/gameobjecttexteditor/ScrollingTextPane.java trunk/src/app/net/sf/gridarta/gui/golocationdialog/GoLocationDialog.java trunk/src/app/net/sf/gridarta/gui/golocationdialog/GoLocationDialogManager.java trunk/src/app/net/sf/gridarta/gui/help/Help.java trunk/src/app/net/sf/gridarta/gui/help/HtmlPane.java trunk/src/app/net/sf/gridarta/gui/io/FileFilters.java trunk/src/app/net/sf/gridarta/gui/map/AbstractPerMapDialogManager.java trunk/src/app/net/sf/gridarta/gui/map/MapFileActions.java trunk/src/app/net/sf/gridarta/gui/map/MapPreviewAccessory.java trunk/src/app/net/sf/gridarta/gui/map/cursor/MapCursor.java trunk/src/app/net/sf/gridarta/gui/map/cursor/MapCursorActions.java trunk/src/app/net/sf/gridarta/gui/map/cursor/MapCursorEvent.java trunk/src/app/net/sf/gridarta/gui/map/event/MouseOpAdapter.java trunk/src/app/net/sf/gridarta/gui/map/event/MouseOpEvent.java trunk/src/app/net/sf/gridarta/gui/map/mapactions/DefaultMapActions.java trunk/src/app/net/sf/gridarta/gui/map/mapactions/MapLocation.java trunk/src/app/net/sf/gridarta/gui/map/maptilepane/AbstractMapTilePane.java trunk/src/app/net/sf/gridarta/gui/map/maptilepane/FlatMapTilePane.java trunk/src/app/net/sf/gridarta/gui/map/maptilepane/IsoMapTilePane.java trunk/src/app/net/sf/gridarta/gui/map/maptilepane/MapTilePanel.java trunk/src/app/net/sf/gridarta/gui/map/maptilepane/TileLink.java trunk/src/app/net/sf/gridarta/gui/map/maptilepane/TilePanel.java trunk/src/app/net/sf/gridarta/gui/map/mapview/DefaultMapViewFactory.java trunk/src/app/net/sf/gridarta/gui/map/mapview/MapView.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/MapViewsListener.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/GridMapSquarePainter.java trunk/src/app/net/sf/gridarta/gui/map/renderer/ImageCreator.java trunk/src/app/net/sf/gridarta/gui/map/renderer/ImageCreator2.java trunk/src/app/net/sf/gridarta/gui/map/renderer/IsoMapRenderer.java trunk/src/app/net/sf/gridarta/gui/map/renderer/IsoPickmapRenderer.java trunk/src/app/net/sf/gridarta/gui/map/renderer/MapRenderer.java trunk/src/app/net/sf/gridarta/gui/map/renderer/SimpleIsoMapRenderer.java trunk/src/app/net/sf/gridarta/gui/map/tools/AbstractTool.java trunk/src/app/net/sf/gridarta/gui/map/tools/BasicAbstractTool.java trunk/src/app/net/sf/gridarta/gui/map/tools/DeletionTool.java trunk/src/app/net/sf/gridarta/gui/map/tools/InsertionTool.java trunk/src/app/net/sf/gridarta/gui/map/tools/SelectionTool.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/map/tools/VoidTool.java trunk/src/app/net/sf/gridarta/gui/map/viewaction/ViewAction.java trunk/src/app/net/sf/gridarta/gui/map/viewaction/ViewActions.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/mapdesktop/WindowMenuManager.java trunk/src/app/net/sf/gridarta/gui/mapfiles/MapFolderTreeAction.java trunk/src/app/net/sf/gridarta/gui/mapfiles/MapFolderTreeActions.java trunk/src/app/net/sf/gridarta/gui/mapimagecache/ImageType.java trunk/src/app/net/sf/gridarta/gui/mapimagecache/MapImageCache.java trunk/src/app/net/sf/gridarta/gui/mapimagecache/MapImageCacheEntry.java trunk/src/app/net/sf/gridarta/gui/mapuserlistener/MapUserListener.java trunk/src/app/net/sf/gridarta/gui/misc/About.java trunk/src/app/net/sf/gridarta/gui/misc/MainToolbar.java trunk/src/app/net/sf/gridarta/gui/misc/MainView.java trunk/src/app/net/sf/gridarta/gui/misc/MapPreview.java trunk/src/app/net/sf/gridarta/gui/misc/RecentManager.java trunk/src/app/net/sf/gridarta/gui/misc/ShiftProcessor.java trunk/src/app/net/sf/gridarta/gui/misc/SplashScreen.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/NewMapDialogFactory.java trunk/src/app/net/sf/gridarta/gui/newmap/NewPickmapDialog.java trunk/src/app/net/sf/gridarta/gui/newmap/NewPickmapFolderDialog.java trunk/src/app/net/sf/gridarta/gui/objectchoicedisplay/ObjectChoiceDisplay.java trunk/src/app/net/sf/gridarta/gui/objectchooser/DefaultObjectChooser.java trunk/src/app/net/sf/gridarta/gui/objectchooser/ObjectChooser.java trunk/src/app/net/sf/gridarta/gui/objectchooser/ObjectChooserTab.java trunk/src/app/net/sf/gridarta/gui/pickmapchooser/PickmapChooserControl.java trunk/src/app/net/sf/gridarta/gui/pickmapchooser/PickmapChooserModel.java trunk/src/app/net/sf/gridarta/gui/pickmapchooser/PickmapChooserView.java trunk/src/app/net/sf/gridarta/gui/prefs/AppPrefs.java trunk/src/app/net/sf/gridarta/gui/prefs/AppPrefsModel.java trunk/src/app/net/sf/gridarta/gui/prefs/DevPrefs.java trunk/src/app/net/sf/gridarta/gui/prefs/GUIPrefs.java trunk/src/app/net/sf/gridarta/gui/prefs/MapValidatorPrefs.java trunk/src/app/net/sf/gridarta/gui/prefs/MiscPrefs.java trunk/src/app/net/sf/gridarta/gui/prefs/NetPrefs.java trunk/src/app/net/sf/gridarta/gui/prefs/ResPrefs.java trunk/src/app/net/sf/gridarta/gui/prefs/UpdatePrefs.java trunk/src/app/net/sf/gridarta/gui/replacedialog/ArchetypeNameMatchCriteria.java trunk/src/app/net/sf/gridarta/gui/replacedialog/ObjectNameMatchCriteria.java trunk/src/app/net/sf/gridarta/gui/replacedialog/ReplaceDialog.java trunk/src/app/net/sf/gridarta/gui/replacedialog/ReplaceDialogManager.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/ScriptEditor.java trunk/src/app/net/sf/gridarta/gui/script/ScriptManagerFactory.java trunk/src/app/net/sf/gridarta/gui/script/ScriptView.java trunk/src/app/net/sf/gridarta/gui/script/ScriptViewPane.java trunk/src/app/net/sf/gridarta/gui/script/StackLayout.java trunk/src/app/net/sf/gridarta/gui/script/parameter/ArchComboBox.java trunk/src/app/net/sf/gridarta/gui/script/parameter/FilterParameterView.java trunk/src/app/net/sf/gridarta/gui/script/parameter/MapParameterCellRenderer.java trunk/src/app/net/sf/gridarta/gui/script/parameter/MapParameterComboBoxModel.java trunk/src/app/net/sf/gridarta/gui/script/parameter/MapParameterView.java trunk/src/app/net/sf/gridarta/gui/script/parameter/ParameterTypeEditor.java trunk/src/app/net/sf/gridarta/gui/scripts/AbstractScriptArchUtils.java trunk/src/app/net/sf/gridarta/gui/scripts/DefaultScriptArchEditor.java trunk/src/app/net/sf/gridarta/gui/scripts/PathButtonListener.java trunk/src/app/net/sf/gridarta/gui/scripts/ScriptedEventEditor.java trunk/src/app/net/sf/gridarta/gui/selectedsquare/CellRenderer.java trunk/src/app/net/sf/gridarta/gui/selectedsquare/MapSquareSelection.java trunk/src/app/net/sf/gridarta/gui/selectedsquare/MapSquareSelectionCache.java trunk/src/app/net/sf/gridarta/gui/selectedsquare/SelectedSquareControl.java trunk/src/app/net/sf/gridarta/gui/selectedsquare/SelectedSquareModel.java trunk/src/app/net/sf/gridarta/gui/selectedsquare/SelectedSquareView.java trunk/src/app/net/sf/gridarta/gui/shrinkmapsizedialog/ShrinkMapSizeDialog.java trunk/src/app/net/sf/gridarta/gui/shrinkmapsizedialog/ShrinkMapSizeDialogManager.java trunk/src/app/net/sf/gridarta/gui/shrinkmapsizedialog/ShrinkMapSizeUtils.java trunk/src/app/net/sf/gridarta/gui/spells/SpellsUtils.java trunk/src/app/net/sf/gridarta/gui/treasurelist/CFTreasureListTree.java trunk/src/app/net/sf/gridarta/gui/treasurelist/TreasureCellRenderer.java trunk/src/app/net/sf/gridarta/gui/undo/UndoControl.java trunk/src/app/net/sf/gridarta/gui/utils/AbstractDialogManager.java trunk/src/app/net/sf/gridarta/gui/utils/AnimComponent.java trunk/src/app/net/sf/gridarta/gui/utils/AnimTreeChooseAction.java trunk/src/app/net/sf/gridarta/gui/utils/ArchetypeToolTipProvider.java trunk/src/app/net/sf/gridarta/gui/utils/AsynchonousProgress.java trunk/src/app/net/sf/gridarta/gui/utils/DirectionComponent.java trunk/src/app/net/sf/gridarta/gui/utils/DirectionLayout.java trunk/src/app/net/sf/gridarta/gui/utils/FaceComponent.java trunk/src/app/net/sf/gridarta/gui/utils/FaceTreeChooseAction.java trunk/src/app/net/sf/gridarta/gui/utils/GList.java trunk/src/app/net/sf/gridarta/gui/utils/GSplitPane.java trunk/src/app/net/sf/gridarta/gui/utils/GUIConstants.java trunk/src/app/net/sf/gridarta/gui/utils/HideFileFilterProxy.java trunk/src/app/net/sf/gridarta/gui/utils/MapFileFilter.java trunk/src/app/net/sf/gridarta/gui/utils/MenuUtils.java trunk/src/app/net/sf/gridarta/gui/utils/SwingUtils.java trunk/src/app/net/sf/gridarta/gui/utils/ToggleTristateCheckBox.java trunk/src/app/net/sf/gridarta/gui/utils/TreeChooseAction.java trunk/src/app/net/sf/gridarta/gui/utils/borderpanel/BorderPanel.java trunk/src/app/net/sf/gridarta/gui/utils/borderpanel/BorderSplitPane.java trunk/src/app/net/sf/gridarta/gui/utils/borderpanel/VerticalToggleButton.java trunk/src/app/net/sf/gridarta/gui/utils/tabbedpanel/ButtonListListener.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/gui/utils/tristate/package-info.java trunk/src/app/net/sf/gridarta/mainactions/MainActions.java trunk/src/app/net/sf/gridarta/maincontrol/DefaultMainControl.java trunk/src/app/net/sf/gridarta/maincontrol/EditorFactory.java trunk/src/app/net/sf/gridarta/maincontrol/GUIMainControl.java trunk/src/app/net/sf/gridarta/maincontrol/GridartaEditor.java trunk/src/app/net/sf/gridarta/mapfiles/DuplicateMapFolderException.java trunk/src/app/net/sf/gridarta/mapfiles/DuplicatePickmapException.java trunk/src/app/net/sf/gridarta/mapfiles/InvalidNameException.java trunk/src/app/net/sf/gridarta/mapfiles/Loader.java trunk/src/app/net/sf/gridarta/mapfiles/MapFile.java trunk/src/app/net/sf/gridarta/mapfiles/MapFileNameComparator.java trunk/src/app/net/sf/gridarta/mapfiles/MapFolder.java trunk/src/app/net/sf/gridarta/mapfiles/MapFolderNotEmptyException.java trunk/src/app/net/sf/gridarta/mapfiles/MapFolderTree.java trunk/src/app/net/sf/gridarta/mapfiles/MapFolderTreeListener.java trunk/src/app/net/sf/gridarta/mapmanager/AbstractMapManager.java trunk/src/app/net/sf/gridarta/mapmanager/DefaultFileControl.java trunk/src/app/net/sf/gridarta/mapmanager/DefaultMapManager.java trunk/src/app/net/sf/gridarta/mapmanager/DefaultPickmapManager.java trunk/src/app/net/sf/gridarta/mapmanager/FileControl.java trunk/src/app/net/sf/gridarta/mapmanager/MapManagerActions.java trunk/src/app/net/sf/gridarta/mapmanager/MapManagerListener.java trunk/src/app/net/sf/gridarta/model/anim/AnimationParseException.java trunk/src/app/net/sf/gridarta/model/anim/DefaultAnimationObject.java trunk/src/app/net/sf/gridarta/model/anim/DefaultAnimationObjects.java trunk/src/app/net/sf/gridarta/model/anim/DuplicateAnimationException.java trunk/src/app/net/sf/gridarta/model/archetype/AbstractArchetypeParser.java trunk/src/app/net/sf/gridarta/model/archetype/AbstractArchetypeSet.java trunk/src/app/net/sf/gridarta/model/archetype/ArchetypeParser.java trunk/src/app/net/sf/gridarta/model/archetype/ArchetypeSet.java trunk/src/app/net/sf/gridarta/model/archetype/AttributeListUtils.java trunk/src/app/net/sf/gridarta/model/archetypechooser/ArchetypeChooserFolder.java trunk/src/app/net/sf/gridarta/model/archetypechooser/ArchetypeChooserPanel.java trunk/src/app/net/sf/gridarta/model/archetypetype/ArchetypeAttribute.java trunk/src/app/net/sf/gridarta/model/archetypetype/ArchetypeAttributeAnimName.java trunk/src/app/net/sf/gridarta/model/archetypetype/ArchetypeAttributeBitmask.java trunk/src/app/net/sf/gridarta/model/archetypetype/ArchetypeAttributeBool.java trunk/src/app/net/sf/gridarta/model/archetypetype/ArchetypeAttributeBoolSpec.java trunk/src/app/net/sf/gridarta/model/archetypetype/ArchetypeAttributeDefinition.java trunk/src/app/net/sf/gridarta/model/archetypetype/ArchetypeAttributeFaceName.java trunk/src/app/net/sf/gridarta/model/archetypetype/ArchetypeAttributeFixed.java trunk/src/app/net/sf/gridarta/model/archetypetype/ArchetypeAttributeFloat.java trunk/src/app/net/sf/gridarta/model/archetypetype/ArchetypeAttributeInt.java trunk/src/app/net/sf/gridarta/model/archetypetype/ArchetypeAttributeInvSpell.java trunk/src/app/net/sf/gridarta/model/archetypetype/ArchetypeAttributeList.java trunk/src/app/net/sf/gridarta/model/archetypetype/ArchetypeAttributeLong.java trunk/src/app/net/sf/gridarta/model/archetypetype/ArchetypeAttributeMapPath.java trunk/src/app/net/sf/gridarta/model/archetypetype/ArchetypeAttributeParser.java trunk/src/app/net/sf/gridarta/model/archetypetype/ArchetypeAttributeScriptFile.java trunk/src/app/net/sf/gridarta/model/archetypetype/ArchetypeAttributeSpell.java trunk/src/app/net/sf/gridarta/model/archetypetype/ArchetypeAttributeString.java trunk/src/app/net/sf/gridarta/model/archetypetype/ArchetypeAttributeText.java trunk/src/app/net/sf/gridarta/model/archetypetype/ArchetypeAttributeTreasure.java trunk/src/app/net/sf/gridarta/model/archetypetype/ArchetypeAttributeZSpell.java trunk/src/app/net/sf/gridarta/model/archetypetype/ArchetypeType.java trunk/src/app/net/sf/gridarta/model/archetypetype/ArchetypeTypeList.java trunk/src/app/net/sf/gridarta/model/archetypetype/ArchetypeTypeParser.java trunk/src/app/net/sf/gridarta/model/archetypetype/ArchetypeTypeSet.java trunk/src/app/net/sf/gridarta/model/archetypetype/ArchetypeTypeSetParser.java trunk/src/app/net/sf/gridarta/model/archetypetype/CAttribBitmask.java trunk/src/app/net/sf/gridarta/model/archetypetype/DefaultArchetypeAttributeFactory.java trunk/src/app/net/sf/gridarta/model/artifact/ArtifactParser.java trunk/src/app/net/sf/gridarta/model/autojoin/AutojoinList.java trunk/src/app/net/sf/gridarta/model/autojoin/AutojoinLists.java trunk/src/app/net/sf/gridarta/model/baseobject/AbstractBaseObject.java trunk/src/app/net/sf/gridarta/model/baseobject/BaseObject.java trunk/src/app/net/sf/gridarta/model/baseobject/GameObjectContainer.java trunk/src/app/net/sf/gridarta/model/baseobject/GameObjectText.java trunk/src/app/net/sf/gridarta/model/baseobject/RecursiveGameObjectIterator.java trunk/src/app/net/sf/gridarta/model/connectionview/Connections.java trunk/src/app/net/sf/gridarta/model/data/AbstractNamedObject.java trunk/src/app/net/sf/gridarta/model/data/AbstractNamedObjects.java trunk/src/app/net/sf/gridarta/model/data/NamedObject.java trunk/src/app/net/sf/gridarta/model/data/NamedTreeNode.java trunk/src/app/net/sf/gridarta/model/errorview/ErrorViewCategory.java trunk/src/app/net/sf/gridarta/model/errorview/ErrorViewCollector.java trunk/src/app/net/sf/gridarta/model/exitconnector/ExitConnectorModel.java trunk/src/app/net/sf/gridarta/model/exitconnector/ExitLocation.java trunk/src/app/net/sf/gridarta/model/exitconnector/ExitMatcher.java trunk/src/app/net/sf/gridarta/model/face/AbstractFaceProvider.java trunk/src/app/net/sf/gridarta/model/face/ArchFaceProvider.java trunk/src/app/net/sf/gridarta/model/face/CollectedFaceProvider.java trunk/src/app/net/sf/gridarta/model/face/ColourFilter.java trunk/src/app/net/sf/gridarta/model/face/DefaultFaceObject.java trunk/src/app/net/sf/gridarta/model/face/DefaultFaceObjects.java trunk/src/app/net/sf/gridarta/model/face/DoubleImageFilter.java trunk/src/app/net/sf/gridarta/model/face/EmptyFaceProvider.java trunk/src/app/net/sf/gridarta/model/face/FaceObjectProviders.java trunk/src/app/net/sf/gridarta/model/face/FilterFaceProvider.java trunk/src/app/net/sf/gridarta/model/filter/BasicFilterConfig.java trunk/src/app/net/sf/gridarta/model/filter/Filter.java trunk/src/app/net/sf/gridarta/model/filter/NamedFilterConfig.java trunk/src/app/net/sf/gridarta/model/filter/NamedFilterList.java trunk/src/app/net/sf/gridarta/model/filter/NamedGameObjectMatcherFilter.java trunk/src/app/net/sf/gridarta/model/floodfill/Floodfill.java trunk/src/app/net/sf/gridarta/model/gameobject/AbstractGameObject.java trunk/src/app/net/sf/gridarta/model/gameobject/AbstractGameObjectFactory.java trunk/src/app/net/sf/gridarta/model/gameobject/AbstractIsoGameObjectFactory.java trunk/src/app/net/sf/gridarta/model/gameobject/DefaultIsoGameObject.java trunk/src/app/net/sf/gridarta/model/gameobject/FaceSource.java trunk/src/app/net/sf/gridarta/model/gameobject/GameObject.java trunk/src/app/net/sf/gridarta/model/gameobject/GameObjectFactory.java trunk/src/app/net/sf/gridarta/model/gameobject/GameObjectUtils.java trunk/src/app/net/sf/gridarta/model/gameobject/IsArchetypeException.java trunk/src/app/net/sf/gridarta/model/gameobject/MultiArchData.java trunk/src/app/net/sf/gridarta/model/gameobject/MultiPositionData.java trunk/src/app/net/sf/gridarta/model/gameobject/NotInsideContainerException.java trunk/src/app/net/sf/gridarta/model/io/AbstractGameObjectParser.java trunk/src/app/net/sf/gridarta/model/io/AbstractMapArchObjectParser.java trunk/src/app/net/sf/gridarta/model/io/DefaultMapReader.java trunk/src/app/net/sf/gridarta/model/io/DefaultMapReaderFactory.java trunk/src/app/net/sf/gridarta/model/io/DefaultMapWriter.java trunk/src/app/net/sf/gridarta/model/io/DirectoryCacheFiles.java trunk/src/app/net/sf/gridarta/model/io/FlatFileIterator.java trunk/src/app/net/sf/gridarta/model/io/InvalidMapFormatException.java trunk/src/app/net/sf/gridarta/model/io/PathManager.java trunk/src/app/net/sf/gridarta/model/io/RecursiveFileIterator.java trunk/src/app/net/sf/gridarta/model/map/grid/MapGrid.java trunk/src/app/net/sf/gridarta/model/map/grid/MapGridEvent.java trunk/src/app/net/sf/gridarta/model/map/grid/SelectionMode.java trunk/src/app/net/sf/gridarta/model/map/maparchobject/AbstractMapArchObject.java trunk/src/app/net/sf/gridarta/model/map/maparchobject/MapArchObject.java trunk/src/app/net/sf/gridarta/model/map/mapcontrol/DefaultMapControl.java trunk/src/app/net/sf/gridarta/model/map/mapcontrol/MapControl.java trunk/src/app/net/sf/gridarta/model/map/mapmodel/AboveFloorInsertionMode.java trunk/src/app/net/sf/gridarta/model/map/mapmodel/AutoInsertionMode.java trunk/src/app/net/sf/gridarta/model/map/mapmodel/BelowFloorInsertionMode.java trunk/src/app/net/sf/gridarta/model/map/mapmodel/BottommostInsertionMode.java trunk/src/app/net/sf/gridarta/model/map/mapmodel/DefaultMapModel.java trunk/src/app/net/sf/gridarta/model/map/mapmodel/InsertionMode.java trunk/src/app/net/sf/gridarta/model/map/mapmodel/InsertionModeSet.java trunk/src/app/net/sf/gridarta/model/map/mapmodel/MapModel.java trunk/src/app/net/sf/gridarta/model/map/mapmodel/MapModelListener.java trunk/src/app/net/sf/gridarta/model/map/mapmodel/MapSquare.java trunk/src/app/net/sf/gridarta/model/map/mapmodel/SavedSquares.java trunk/src/app/net/sf/gridarta/model/map/mapmodel/TopmostInsertionMode.java trunk/src/app/net/sf/gridarta/model/map/normalizer/MapPathNormalizer.java trunk/src/app/net/sf/gridarta/model/map/validation/DefaultErrorCollector.java trunk/src/app/net/sf/gridarta/model/map/validation/errors/AttributeRangeError.java trunk/src/app/net/sf/gridarta/model/map/validation/errors/BlockedMobOrSpawnPointError.java trunk/src/app/net/sf/gridarta/model/map/validation/errors/BlockedSquareError.java trunk/src/app/net/sf/gridarta/model/map/validation/errors/ConnectedInsideContainerError.java trunk/src/app/net/sf/gridarta/model/map/validation/errors/ConnectedPickableError.java trunk/src/app/net/sf/gridarta/model/map/validation/errors/ConnectionError.java trunk/src/app/net/sf/gridarta/model/map/validation/errors/CustomTypeError.java trunk/src/app/net/sf/gridarta/model/map/validation/errors/DoubleLayerError.java trunk/src/app/net/sf/gridarta/model/map/validation/errors/DoubleTypeError.java trunk/src/app/net/sf/gridarta/model/map/validation/errors/EmptySpawnPointError.java trunk/src/app/net/sf/gridarta/model/map/validation/errors/EnvironmentSensorSlayingError.java trunk/src/app/net/sf/gridarta/model/map/validation/errors/ExitError.java trunk/src/app/net/sf/gridarta/model/map/validation/errors/MapDifficultyError.java trunk/src/app/net/sf/gridarta/model/map/validation/errors/MobOutsideSpawnPointError.java trunk/src/app/net/sf/gridarta/model/map/validation/errors/ShopSquareError.java trunk/src/app/net/sf/gridarta/model/map/validation/errors/SlayingError.java trunk/src/app/net/sf/gridarta/model/map/validation/errors/SquareWithoutFloorError.java trunk/src/app/net/sf/gridarta/model/map/validation/errors/SysObjectNotOnLayerZeroError.java trunk/src/app/net/sf/gridarta/model/map/validation/errors/TilePathsError.java trunk/src/app/net/sf/gridarta/model/map/validation/errors/UndefinedAnimError.java trunk/src/app/net/sf/gridarta/model/map/validation/errors/UndefinedFaceError.java trunk/src/app/net/sf/gridarta/model/map/validation/errors/ValidationError.java trunk/src/app/net/sf/gridarta/model/mapviewsettings/MapViewSettings.java trunk/src/app/net/sf/gridarta/model/mapviewsettings/MapViewSettingsListener.java trunk/src/app/net/sf/gridarta/model/match/AndGameObjectMatcher.java trunk/src/app/net/sf/gridarta/model/match/AttribGameObjectMatcher.java trunk/src/app/net/sf/gridarta/model/match/GameObjectMatcherParser.java trunk/src/app/net/sf/gridarta/model/match/GameObjectMatchers.java trunk/src/app/net/sf/gridarta/model/match/GameObjectMatchersParser.java trunk/src/app/net/sf/gridarta/model/match/MutableNameGameObjectMatcher.java trunk/src/app/net/sf/gridarta/model/match/MutableOrGameObjectMatcher.java trunk/src/app/net/sf/gridarta/model/match/NamedGameObjectMatcher.java trunk/src/app/net/sf/gridarta/model/match/NotGameObjectMatcher.java trunk/src/app/net/sf/gridarta/model/match/OrGameObjectMatcher.java trunk/src/app/net/sf/gridarta/model/match/SetEnabledAction.java trunk/src/app/net/sf/gridarta/model/match/TypeNrsGameObjectMatcher.java trunk/src/app/net/sf/gridarta/model/match/ViewGameObjectMatcherManager.java trunk/src/app/net/sf/gridarta/model/scripts/AbstractScriptedEvent.java trunk/src/app/net/sf/gridarta/model/scripts/AbstractScriptedEventFactory.java trunk/src/app/net/sf/gridarta/model/scripts/DefaultScriptArchData.java trunk/src/app/net/sf/gridarta/model/scripts/ScriptUtils.java trunk/src/app/net/sf/gridarta/model/scripts/UndefinedEventArchetypeException.java trunk/src/app/net/sf/gridarta/model/scripts/UndefinedEventArchetypeTypeException.java trunk/src/app/net/sf/gridarta/model/settings/AbstractConfigSource.java trunk/src/app/net/sf/gridarta/model/settings/ConfigSourceFactory.java trunk/src/app/net/sf/gridarta/model/settings/DefaultGlobalSettings.java trunk/src/app/net/sf/gridarta/model/spells/ArchetypeSetSpellLoader.java trunk/src/app/net/sf/gridarta/model/spells/GameObjectSpell.java trunk/src/app/net/sf/gridarta/model/spells/NumberSpell.java trunk/src/app/net/sf/gridarta/model/spells/Spell.java trunk/src/app/net/sf/gridarta/model/spells/Spells.java trunk/src/app/net/sf/gridarta/model/spells/XMLSpellLoader.java trunk/src/app/net/sf/gridarta/model/treasurelist/ArchTreasureObj.java trunk/src/app/net/sf/gridarta/model/treasurelist/FolderTreasureObj.java trunk/src/app/net/sf/gridarta/model/treasurelist/NoTreasureObj.java trunk/src/app/net/sf/gridarta/model/treasurelist/TreasureListTreasureObj.java trunk/src/app/net/sf/gridarta/model/treasurelist/TreasureListsParser.java trunk/src/app/net/sf/gridarta/model/treasurelist/TreasureLoader.java trunk/src/app/net/sf/gridarta/model/treasurelist/TreasureObj.java trunk/src/app/net/sf/gridarta/model/treasurelist/TreasureTreeNode.java trunk/src/app/net/sf/gridarta/model/treasurelist/YesTreasureObj.java trunk/src/app/net/sf/gridarta/model/undo/UndoModel.java trunk/src/app/net/sf/gridarta/model/undo/UndoState.java trunk/src/app/net/sf/gridarta/preferences/Codec.java trunk/src/app/net/sf/gridarta/preferences/FilePreferences.java trunk/src/app/net/sf/gridarta/preferences/FilePreferencesFactory.java trunk/src/app/net/sf/gridarta/preferences/NodeType.java trunk/src/app/net/sf/gridarta/preferences/Storage.java trunk/src/app/net/sf/gridarta/resource/AbstractResources.java trunk/src/app/net/sf/gridarta/resource/AbstractResourcesReader.java trunk/src/app/net/sf/gridarta/script/BshThread.java trunk/src/app/net/sf/gridarta/script/Script.java trunk/src/app/net/sf/gridarta/script/ScriptModel.java trunk/src/app/net/sf/gridarta/script/ScriptModelLoader.java trunk/src/app/net/sf/gridarta/script/ScriptModelParser.java trunk/src/app/net/sf/gridarta/script/parameter/ArchParameter.java trunk/src/app/net/sf/gridarta/script/parameter/BooleanParameter.java trunk/src/app/net/sf/gridarta/script/parameter/DoubleParameter.java trunk/src/app/net/sf/gridarta/script/parameter/FilterParameter.java trunk/src/app/net/sf/gridarta/script/parameter/IntegerParameter.java trunk/src/app/net/sf/gridarta/script/parameter/MapParameter.java trunk/src/app/net/sf/gridarta/script/parameter/NoSuchParameterException.java trunk/src/app/net/sf/gridarta/script/parameter/PluginParameterFactory.java trunk/src/app/net/sf/gridarta/script/parameter/StringParameter.java trunk/src/app/net/sf/gridarta/textedit/scripteditor/Actions.java trunk/src/app/net/sf/gridarta/textedit/scripteditor/CFPythonPopup.java trunk/src/app/net/sf/gridarta/textedit/scripteditor/ScriptEditControl.java trunk/src/app/net/sf/gridarta/textedit/scripteditor/ScriptEditUndoActions.java trunk/src/app/net/sf/gridarta/textedit/scripteditor/ScriptEditView.java trunk/src/app/net/sf/gridarta/textedit/textarea/DefaultInputHandler.java trunk/src/app/net/sf/gridarta/textedit/textarea/InputHandler.java trunk/src/app/net/sf/gridarta/textedit/textarea/JEditTextArea.java trunk/src/app/net/sf/gridarta/textedit/textarea/ScrollLayout.java trunk/src/app/net/sf/gridarta/textedit/textarea/SyntaxDocument.java trunk/src/app/net/sf/gridarta/textedit/textarea/SyntaxStyle.java trunk/src/app/net/sf/gridarta/textedit/textarea/TextAreaDefaults.java trunk/src/app/net/sf/gridarta/textedit/textarea/TextAreaPainter.java trunk/src/app/net/sf/gridarta/textedit/textarea/TextUtilities.java trunk/src/app/net/sf/gridarta/textedit/textarea/Token.java trunk/src/app/net/sf/gridarta/textedit/textarea/actions/Backspace.java trunk/src/app/net/sf/gridarta/textedit/textarea/actions/BackspaceWord.java trunk/src/app/net/sf/gridarta/textedit/textarea/actions/Copy.java trunk/src/app/net/sf/gridarta/textedit/textarea/actions/Delete.java trunk/src/app/net/sf/gridarta/textedit/textarea/actions/DeleteWord.java trunk/src/app/net/sf/gridarta/textedit/textarea/actions/DocumentEnd.java trunk/src/app/net/sf/gridarta/textedit/textarea/actions/DocumentHome.java trunk/src/app/net/sf/gridarta/textedit/textarea/actions/End.java trunk/src/app/net/sf/gridarta/textedit/textarea/actions/Find.java trunk/src/app/net/sf/gridarta/textedit/textarea/actions/FindAgain.java trunk/src/app/net/sf/gridarta/textedit/textarea/actions/Home.java trunk/src/app/net/sf/gridarta/textedit/textarea/actions/InsertChar.java trunk/src/app/net/sf/gridarta/textedit/textarea/actions/InsertTab.java trunk/src/app/net/sf/gridarta/textedit/textarea/actions/NextChar.java trunk/src/app/net/sf/gridarta/textedit/textarea/actions/NextLine.java trunk/src/app/net/sf/gridarta/textedit/textarea/actions/NextPage.java trunk/src/app/net/sf/gridarta/textedit/textarea/actions/NextWord.java trunk/src/app/net/sf/gridarta/textedit/textarea/actions/Overwrite.java trunk/src/app/net/sf/gridarta/textedit/textarea/actions/Paste.java trunk/src/app/net/sf/gridarta/textedit/textarea/actions/PrevChar.java trunk/src/app/net/sf/gridarta/textedit/textarea/actions/PrevLine.java trunk/src/app/net/sf/gridarta/textedit/textarea/actions/PrevPage.java trunk/src/app/net/sf/gridarta/textedit/textarea/actions/PrevWord.java trunk/src/app/net/sf/gridarta/textedit/textarea/actions/Repeat.java trunk/src/app/net/sf/gridarta/textedit/textarea/actions/Replace.java trunk/src/app/net/sf/gridarta/textedit/textarea/actions/Save.java trunk/src/app/net/sf/gridarta/textedit/textarea/actions/ToggleRect.java trunk/src/app/net/sf/gridarta/textedit/textarea/tokenmarker/CTokenMarker.java trunk/src/app/net/sf/gridarta/textedit/textarea/tokenmarker/CrossfireDialogTokenMarker.java trunk/src/app/net/sf/gridarta/textedit/textarea/tokenmarker/DaimoninAITokenMarker.java trunk/src/app/net/sf/gridarta/textedit/textarea/tokenmarker/EmptyTokenMarker.java trunk/src/app/net/sf/gridarta/textedit/textarea/tokenmarker/HTMLTokenMarker.java trunk/src/app/net/sf/gridarta/textedit/textarea/tokenmarker/KeywordMap.java trunk/src/app/net/sf/gridarta/textedit/textarea/tokenmarker/LuaTokenMarker.java trunk/src/app/net/sf/gridarta/textedit/textarea/tokenmarker/PythonTokenMarker.java trunk/src/app/net/sf/gridarta/textedit/textarea/tokenmarker/TokenMarker.java trunk/src/app/net/sf/gridarta/updater/Updater.java trunk/src/app/net/sf/gridarta/updater/UpdaterManager.java trunk/src/app/net/sf/gridarta/utils/ActionBuilderUtils.java trunk/src/app/net/sf/gridarta/utils/AlphaImageFilter.java trunk/src/app/net/sf/gridarta/utils/ArrayUtils.java trunk/src/app/net/sf/gridarta/utils/CommonConstants.java trunk/src/app/net/sf/gridarta/utils/ConfigFileUtils.java trunk/src/app/net/sf/gridarta/utils/EventListenerList2.java trunk/src/app/net/sf/gridarta/utils/FileChooserUtils.java trunk/src/app/net/sf/gridarta/utils/GUIUtils.java trunk/src/app/net/sf/gridarta/utils/IOUtils.java trunk/src/app/net/sf/gridarta/utils/ProcessRunner.java trunk/src/app/net/sf/gridarta/utils/RandomUtils.java trunk/src/app/net/sf/gridarta/utils/Size2D.java trunk/src/app/net/sf/gridarta/utils/StringUtils.java trunk/src/app/net/sf/gridarta/utils/SystemIcons.java trunk/src/app/net/sf/gridarta/utils/WrappingStringBuilder.java trunk/src/app/net/sf/gridarta/utils/XmlHelper.java trunk/src/app/net/sf/gridarta/validation/AbstractValidator.java trunk/src/app/net/sf/gridarta/validation/DelegatingMapValidator.java trunk/src/app/net/sf/gridarta/validation/checks/AttributeRangeChecker.java trunk/src/app/net/sf/gridarta/validation/checks/BlockedMatrix.java trunk/src/app/net/sf/gridarta/validation/checks/BlockedMobOrSpawnPointChecker.java trunk/src/app/net/sf/gridarta/validation/checks/BlockedSpawnPointChecker.java trunk/src/app/net/sf/gridarta/validation/checks/BlockedSquareChecker.java trunk/src/app/net/sf/gridarta/validation/checks/ConnectedInsideContainerChecker.java trunk/src/app/net/sf/gridarta/validation/checks/ConnectedPickableChecker.java trunk/src/app/net/sf/gridarta/validation/checks/ConnectionChecker.java trunk/src/app/net/sf/gridarta/validation/checks/CustomTypeChecker.java trunk/src/app/net/sf/gridarta/validation/checks/DoubleLayerChecker.java trunk/src/app/net/sf/gridarta/validation/checks/DoubleTypeChecker.java trunk/src/app/net/sf/gridarta/validation/checks/EmptySpawnPointChecker.java trunk/src/app/net/sf/gridarta/validation/checks/ExitChecker.java trunk/src/app/net/sf/gridarta/validation/checks/MapDifficultyChecker.java trunk/src/app/net/sf/gridarta/validation/checks/MobOutsideSpawnPointChecker.java trunk/src/app/net/sf/gridarta/validation/checks/ShopSquareChecker.java trunk/src/app/net/sf/gridarta/validation/checks/SlayingChecker.java trunk/src/app/net/sf/gridarta/validation/checks/SquareWithoutFloorChecker.java trunk/src/app/net/sf/gridarta/validation/checks/SysObjectNotOnLayerZeroChecker.java trunk/src/app/net/sf/gridarta/validation/checks/TilePathsChecker.java trunk/src/app/net/sf/gridarta/validation/checks/UndefinedArchetypeChecker.java trunk/src/app/net/sf/gridarta/validation/checks/UndefinedFaceChecker.java trunk/src/app/net/sf/gridarta/validation/checks/UnsetSlayingChecker.java trunk/src/doc/sitestyle.css trunk/src/test/net/sf/gridarta/exitconnector/ExitConnectorActionsTest.java trunk/src/test/net/sf/gridarta/gui/filter/TestFilterControl.java trunk/src/test/net/sf/gridarta/gui/map/mapview/TestMapViewFactory.java trunk/src/test/net/sf/gridarta/gui/map/renderer/TestMapRenderer.java trunk/src/test/net/sf/gridarta/gui/map/renderer/TestRendererFactory.java trunk/src/test/net/sf/gridarta/gui/utils/GSplitPaneTestApplication.java trunk/src/test/net/sf/gridarta/gui/utils/HideFileFilterProxyTest.java trunk/src/test/net/sf/gridarta/mapmanager/TestFileControl.java trunk/src/test/net/sf/gridarta/model/archetype/AttributeListUtilsTest.java trunk/src/test/net/sf/gridarta/model/archetype/TestArchetype.java trunk/src/test/net/sf/gridarta/model/archetype/TestArchetypeFactory.java trunk/src/test/net/sf/gridarta/model/archetype/TestArchetypeParser.java trunk/src/test/net/sf/gridarta/model/archetype/TestArchetypeSet.java trunk/src/test/net/sf/gridarta/model/archetypetype/ArchetypeTypeSetParserTest.java trunk/src/test/net/sf/gridarta/model/baseobject/AbstractBaseObjectTest.java trunk/src/test/net/sf/gridarta/model/errorview/TestErrorView.java trunk/src/test/net/sf/gridarta/model/gameobject/TestGameObject.java trunk/src/test/net/sf/gridarta/model/gameobject/TestGameObjectFactory.java trunk/src/test/net/sf/gridarta/model/io/PathManagerTest.java trunk/src/test/net/sf/gridarta/model/io/TestMapReaderFactory.java trunk/src/test/net/sf/gridarta/model/io/TestMapWriter.java trunk/src/test/net/sf/gridarta/model/map/grid/MapGridTest.java trunk/src/test/net/sf/gridarta/model/map/maparchobject/TestMapArchObject.java trunk/src/test/net/sf/gridarta/model/map/mapcontrol/TestMapControlFactory.java trunk/src/test/net/sf/gridarta/model/map/mapmodel/DefaultMapModelTest.java trunk/src/test/net/sf/gridarta/model/match/NamedGameObjectMatcherTest.java trunk/src/test/net/sf/gridarta/model/scripts/TestScriptArchData.java trunk/src/test/net/sf/gridarta/utils/Size2DTest.java trunk/src/test/net/sf/gridarta/utils/StringUtilsTest.java trunk/src/test/net/sf/gridarta/utils/WrappingStringBuilderTest.java trunk/src/test/net/sf/gridarta/validation/AbstractValidatorTest.java Modified: trunk/atrinik/src/app/net/sf/gridarta/var/atrinik/IGUIConstants.java =================================================================== --- trunk/atrinik/src/app/net/sf/gridarta/var/atrinik/IGUIConstants.java 2010-05-08 13:24:24 UTC (rev 7705) +++ trunk/atrinik/src/app/net/sf/gridarta/var/atrinik/IGUIConstants.java 2010-05-08 17:24:55 UTC (rev 7706) @@ -30,7 +30,9 @@ */ public interface IGUIConstants extends GUIConstants { - /** Default difficulty for newly created maps. */ + /** + * Default difficulty for newly created maps. + */ int DEF_MAPDIFFICULTY = 1; /** @@ -38,21 +40,31 @@ * at first sight, but this way iterating code is independent of the * definition of the tile path values. */ - int[] ALL_TILE_PATHS = {CommonConstants.NORTH, CommonConstants.EAST, CommonConstants.SOUTH, CommonConstants.WEST, CommonConstants.NORTH_EAST, CommonConstants.SOUTH_EAST, CommonConstants.SOUTH_WEST, CommonConstants.NORTH_WEST}; + int[] ALL_TILE_PATHS = { CommonConstants.NORTH, CommonConstants.EAST, CommonConstants.SOUTH, CommonConstants.WEST, CommonConstants.NORTH_EAST, CommonConstants.SOUTH_EAST, CommonConstants.SOUTH_WEST, CommonConstants.NORTH_WEST }; - /** Default map size (both height and width). */ + /** + * Default map size (both height and width). + */ int DEF_MAPSIZE = 24; - /** Default width for pickmaps. */ + /** + * Default width for pickmaps. + */ int DEF_PICKMAP_WIDTH = 7; - /** Default height for pickmaps. */ + /** + * Default height for pickmaps. + */ int DEF_PICKMAP_HEIGHT = 7; - /** The directory that contains all scripts. */ + /** + * The directory that contains all scripts. + */ String SCRIPTS_DIR = "dev/editor/scripts"; - /** The directory that contains all pickmaps. */ + /** + * The directory that contains all pickmaps. + */ String PICKMAP_DIR = "dev/editor/pickmaps"; String ARCHDEF_FILE = "archdef.dat"; // position-data of multiparts @@ -62,17 +74,23 @@ String PNG_FILE = "atrinik.0"; // file with all pngs - /** File to store the face tree information after arch collection. */ + /** + * File to store the face tree information after arch collection. + */ String FACETREE_FILE = "facetree"; - /** File to store the animation tree information after arch collection. */ + /** + * File to store the animation tree information after arch collection. + */ String ANIMTREE_FILE = "animtree"; String ARTIFACTS_FILE = "artifacts"; // file with artifact definitions String TILE_NORTH = "north.png"; - /** Name of the files the spell information (names and numbers). */ + /** + * Name of the files the spell information (names and numbers). + */ String SPELL_FILE = "spells.xml"; } // interface IGUIConstants Modified: trunk/atrinik/src/app/net/sf/gridarta/var/atrinik/gui/map/renderer/DefaultRendererFactory.java =================================================================== --- trunk/atrinik/src/app/net/sf/gridarta/var/atrinik/gui/map/renderer/DefaultRendererFactory.java 2010-05-08 13:24:24 UTC (rev 7705) +++ trunk/atrinik/src/app/net/sf/gridarta/var/atrinik/gui/map/renderer/DefaultRendererFactory.java 2010-05-08 17:24:55 UTC (rev 7706) @@ -108,21 +108,27 @@ this.systemIcons = systemIcons; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @NotNull @Override public SimpleIsoMapRenderer<GameObject, MapArchObject, Archetype> newSimpleMapRenderer(@NotNull final MapModel<GameObject, MapArchObject, Archetype> mapModel) { return new SimpleIsoMapRenderer<GameObject, MapArchObject, Archetype>(Archetype.TYPE_SPAWN_POINT, mapModel, multiPositionData, isoMapSquareInfo, systemIcons.getUnknownSquareIcon()); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @NotNull @Override public IsoMapRenderer<GameObject, MapArchObject, Archetype> newMapRenderer(@NotNull final MapModel<GameObject, MapArchObject, Archetype> mapModel, @NotNull final MapGrid mapGrid) { return new IsoMapRenderer<GameObject, MapArchObject, Archetype>(Archetype.TYPE_SPAWN_POINT, mapViewSettings, filterControl, mapModel, mapGrid, multiPositionData, isoMapSquareInfo, gridMapSquarePainter, gameObjectParser, systemIcons); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @NotNull @Override public IsoPickmapRenderer<GameObject, MapArchObject, Archetype> newPickmapRenderer(@NotNull final MapModel<GameObject, MapArchObject, Archetype> mapModel, @NotNull final MapGrid mapGrid) { 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 2010-05-08 13:24:24 UTC (rev 7705) +++ trunk/atrinik/src/app/net/sf/gridarta/var/atrinik/gui/mappropertiesdialog/DefaultMapPropertiesDialogFactory.java 2010-05-08 17:24:55 UTC (rev 7706) @@ -42,7 +42,9 @@ */ public class DefaultMapPropertiesDialogFactory implements MapPropertiesDialogFactory<GameObject, MapArchObject, Archetype> { - /** Action Builder. */ + /** + * Action Builder. + */ private static final ActionBuilder ACTION_BUILDER = ActionBuilderFactory.getInstance().getActionBuilder("net.sf.gridarta"); /** @@ -74,8 +76,8 @@ * Creates a new instance. * @param mapManager the map manager to use * @param globalSettings the global settings instance - * @param mapPathNormalizer the map path normalize for converting map - * paths to files + * @param mapPathNormalizer the map path normalize for converting map paths + * to files * @param mapViewsManager the map views */ public DefaultMapPropertiesDialogFactory(@NotNull final MapManager<GameObject, MapArchObject, Archetype> mapManager, @NotNull final GlobalSettings globalSettings, @NotNull final MapPathNormalizer mapPathNormalizer, @NotNull final MapViewsManager<GameObject, MapArchObject, Archetype> mapViewsManager) { @@ -85,7 +87,9 @@ this.mapViewsManager = mapViewsManager; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public void showDialog(@NotNull final Component parent, @NotNull final JFrame helpParent, @NotNull final MapModel<GameObject, MapArchObject, Archetype> mapModel, @NotNull final FileFilter mapFileFilter) { final MapPropertiesDialog pane = new MapPropertiesDialog(helpParent, mapManager, globalSettings, mapModel, mapFileFilter, mapPathNormalizer, mapViewsManager); 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 2010-05-08 13:24:24 UTC (rev 7705) +++ trunk/atrinik/src/app/net/sf/gridarta/var/atrinik/gui/mappropertiesdialog/MapPropertiesDialog.java 2010-05-08 17:24:55 UTC (rev 7706) @@ -75,10 +75,14 @@ */ public class MapPropertiesDialog extends JOptionPane { - /** Serial version UID. */ + /** + * Serial version UID. + */ private static final long serialVersionUID = 1L; - /** Action Builder. */ + /** + * Action Builder. + */ private static final ActionBuilder ACTION_BUILDER = ActionBuilderFactory.getInstance().getActionBuilder("net.sf.gridarta"); /** @@ -141,16 +145,24 @@ private final AbstractButton checkboxPlugins = new JCheckBox(); - /** JButton for ok. */ + /** + * JButton for ok. + */ private final JButton okButton = new JButton(ACTION_BUILDER.createAction(false, "mapOkay", this)); - /** JButton for cancel. */ + /** + * JButton for cancel. + */ private final JButton cancelButton = new JButton(ACTION_BUILDER.createAction(false, "mapCancel", this)); - /** The MapTilePane. */ + /** + * The MapTilePane. + */ private final AbstractMapTilePane<GameObject, MapArchObject, Archetype> mapTilePane; - /** Whether the map tile pane was enabled. */ + /** + * Whether the map tile pane was enabled. + */ private final boolean mapTilePaneEnabled; /** @@ -160,15 +172,15 @@ * @param globalSettings the global settings instance * @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 + * @param mapPathNormalizer the map path normalizer for converting map paths + * to files * @param mapViewsManager the map views */ public MapPropertiesDialog(@NotNull final JFrame helpParent, @NotNull final MapManager<GameObject, MapArchObject, Archetype> mapManager, @NotNull final GlobalSettings globalSettings, final MapModel<GameObject, MapArchObject, Archetype> mapModel, final FileFilter mapFileFilter, @NotNull final MapPathNormalizer mapPathNormalizer, @NotNull final MapViewsManager<GameObject, MapArchObject, Archetype> mapViewsManager) { okButton.setDefaultCapable(true); final JButton helpButton = new JButton(ACTION_BUILDER.createAction(false, "mapHelp", this)); final JButton restoreButton = new JButton(ACTION_BUILDER.createAction(false, "mapRestore", this)); - setOptions(new Object[] { helpButton, okButton, restoreButton, cancelButton}); + setOptions(new Object[] { helpButton, okButton, restoreButton, cancelButton }); this.helpParent = helpParent; this.mapModel = mapModel; @@ -348,29 +360,39 @@ return panel; } - /** Action method for help. */ + /** + * Action method for help. + */ public void mapHelp() { new Help(helpParent, "tut_mapattr.html").setVisible(true); } - /** Action method for okay. */ + /** + * Action method for oka... [truncated message content] |
From: <aki...@us...> - 2010-05-08 13:24:31
|
Revision: 7705 http://gridarta.svn.sourceforge.net/gridarta/?rev=7705&view=rev Author: akirschbaum Date: 2010-05-08 13:24:24 +0000 (Sat, 08 May 2010) Log Message: ----------- CTRL-ALT-E now toggles the game object text editor: activate it if inactive; restore previous state otherwise. 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/mainwindow/GameObjectTab.java trunk/src/app/net/sf/gridarta/gui/misc/MainView.java trunk/src/app/net/sf/gridarta/gui/utils/tabbedpanel/ButtonList.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 Added Paths: ----------- trunk/src/app/net/sf/gridarta/gui/misc/MainViewActions.java Modified: trunk/atrinik/ChangeLog =================================================================== --- trunk/atrinik/ChangeLog 2010-05-08 12:32:10 UTC (rev 7704) +++ trunk/atrinik/ChangeLog 2010-05-08 13:24:24 UTC (rev 7705) @@ -1,3 +1,8 @@ +2010-05-08 Andreas Kirschbaum + + * CTRL-ALT-E now toggles the game object text editor: activate it + if inactive; restore previous state otherwise. + 2010-05-07 Andreas Kirschbaum * Add keyboard shortcut (CTRL-ALT-E) to activate the game object Modified: trunk/crossfire/ChangeLog =================================================================== --- trunk/crossfire/ChangeLog 2010-05-08 12:32:10 UTC (rev 7704) +++ trunk/crossfire/ChangeLog 2010-05-08 13:24:24 UTC (rev 7705) @@ -1,3 +1,8 @@ +2010-05-08 Andreas Kirschbaum + + * CTRL-ALT-E now toggles the game object text editor: activate it + if inactive; restore previous state otherwise. + 2010-05-07 Andreas Kirschbaum * Add keyboard shortcut (CTRL-ALT-E) to activate the game object Modified: trunk/daimonin/ChangeLog =================================================================== --- trunk/daimonin/ChangeLog 2010-05-08 12:32:10 UTC (rev 7704) +++ trunk/daimonin/ChangeLog 2010-05-08 13:24:24 UTC (rev 7705) @@ -1,3 +1,8 @@ +2010-05-08 Andreas Kirschbaum + + * CTRL-ALT-E now toggles the game object text editor: activate it + if inactive; restore previous state otherwise. + 2010-05-07 Andreas Kirschbaum * Add keyboard shortcut (CTRL-ALT-E) to activate the game object Modified: trunk/src/app/net/sf/gridarta/gui/gameobjectattributespanel/GameObjectAttributesControl.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/gameobjectattributespanel/GameObjectAttributesControl.java 2010-05-08 12:32:10 UTC (rev 7704) +++ trunk/src/app/net/sf/gridarta/gui/gameobjectattributespanel/GameObjectAttributesControl.java 2010-05-08 13:24:24 UTC (rev 7705) @@ -20,6 +20,7 @@ package net.sf.gridarta.gui.gameobjectattributespanel; import java.awt.BorderLayout; +import java.awt.Component; import java.awt.Container; import java.awt.GridLayout; import java.awt.Point; @@ -149,8 +150,7 @@ private final Action aMapArchAttrib = ACTION_BUILDER.createAction(false, "mapArchAttrib", this); /** - * All active tabs. Tabs not currently visible are missing. The game object - * text editor tab is included. + * All active tabs. Tabs not currently visible are missing. */ private final Collection<GameObjectAttributesTab<G, A, R>> tabs = new HashSet<GameObjectAttributesTab<G, A, R>>(); @@ -160,6 +160,11 @@ private final Map<GameObjectAttributesTab<G, A, R>, Integer> tabIndex = new IdentityHashMap<GameObjectAttributesTab<G, A, R>, Integer>(); /** + * Maps tab's component to tab. + */ + private final Map<Component, GameObjectAttributesTab<G, A, R>> componentTabs = new IdentityHashMap<Component, GameObjectAttributesTab<G, A, R>>(); + + /** * The currently selected game object. */ @Nullable @@ -447,6 +452,7 @@ */ private void addTabInt(final GameObjectAttributesTab<G, A, R> tab) { tabs.add(tab); + componentTabs.put(tab.getPanel(), tab); tab.addGameObjectAttributesTabListener(gameObjectAttributesTabListener); } @@ -463,6 +469,18 @@ } /** + * Returns the selected tab. + * @return tab the selected tab + */ + @NotNull + public GameObjectAttributesTab<G, A, R> getSelectedTab() { + final Component component = panelDesktop.getSelectedComponent(); + final GameObjectAttributesTab<G, A, R> tab = componentTabs.get(component); + assert tab != null; + return tab; + } + + /** * Sets the tab color of a tab. * @param tab the tab * @param tabSeverity the tab severity Modified: trunk/src/app/net/sf/gridarta/gui/mainwindow/GameObjectTab.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/mainwindow/GameObjectTab.java 2010-05-08 12:32:10 UTC (rev 7704) +++ trunk/src/app/net/sf/gridarta/gui/mainwindow/GameObjectTab.java 2010-05-08 13:24:24 UTC (rev 7705) @@ -21,14 +21,12 @@ import net.sf.gridarta.gui.gameobjectattributespanel.GameObjectAttributesControl; import net.sf.gridarta.gui.gameobjectattributespanel.GameObjectAttributesControlListener; -import net.sf.gridarta.gui.gameobjectattributespanel.GameObjectAttributesTab; import net.sf.gridarta.gui.utils.Severity; 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.map.maparchobject.MapArchObject; -import net.sf.japi.swing.action.ActionMethod; import org.jetbrains.annotations.NotNull; /** @@ -38,19 +36,6 @@ public class GameObjectTab<G extends GameObject<G, A, R>, A extends MapArchObject<A>, R extends Archetype<G, A, R>> extends Tab { /** - * The {@link GameObjectAttributesControl} to display. - */ - @NotNull - private final GameObjectAttributesControl<G, A, R> gameObjectAttributesControl; - - /** - * The {@link GameObjectAttributesTab} that displays the game object text - * editor. - */ - @NotNull - private final GameObjectAttributesTab<G, A, R> textEditorTab; - - /** * Creates a new instance. * @param ident the tab's identication string * @param gameObjectAttributesControl the game object attributes control to @@ -58,13 +43,9 @@ * @param location the tab's location * @param index the tab's index for ordering * @param defaultOpen the tab's default opened status - * @param textEditorTab the game object attributes tab that displays the - * game object text editor */ - public GameObjectTab(@NotNull final String ident, @NotNull final GameObjectAttributesControl<G, A, R> gameObjectAttributesControl, @NotNull final Location location, final int index, final boolean defaultOpen, @NotNull final GameObjectAttributesTab<G, A, R> textEditorTab) { + 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); - this.gameObjectAttributesControl = gameObjectAttributesControl; - this.textEditorTab = textEditorTab; final GameObjectAttributesControlListener gameObjectAttributesControlListener = new GameObjectAttributesControlListener() { /** @@ -80,14 +61,4 @@ setSeverity(gameObjectAttributesControl.getSeverity()); } - /** - * Action method to open the game object text editor. - */ - @ActionMethod - public void gameObjectTextEditor() { - getButton().setSelected(true); - gameObjectAttributesControl.selectTab(textEditorTab); - textEditorTab.requestFocus(); - } - } // class WarningsTab Modified: trunk/src/app/net/sf/gridarta/gui/misc/MainView.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/misc/MainView.java 2010-05-08 12:32:10 UTC (rev 7704) +++ trunk/src/app/net/sf/gridarta/gui/misc/MainView.java 2010-05-08 13:24:24 UTC (rev 7705) @@ -35,6 +35,7 @@ import javax.swing.WindowConstants; import net.sf.gridarta.MainControl; import net.sf.gridarta.gui.utils.Severity; +import net.sf.gridarta.gui.utils.borderpanel.Location; import net.sf.gridarta.gui.utils.tabbedpanel.Tab; import net.sf.gridarta.gui.utils.tabbedpanel.TabListener; import net.sf.gridarta.gui.utils.tabbedpanel.TabbedPanel; @@ -173,6 +174,17 @@ } /** + * Returns the active {@link Tab} on a given {@link Location} of the main + * view. + * @param location the location + * @return the tab or <code>null</code> if no active tab exists + */ + @Nullable + public Tab getActiveTab(@NotNull final Location location) { + return tabbedPanel.getActiveTab(location); + } + + /** * Sets a {@link Tab}'s {@link Severity}. The severity affects the tab's * button's color. * @param tab the tab Added: trunk/src/app/net/sf/gridarta/gui/misc/MainViewActions.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/misc/MainViewActions.java (rev 0) +++ trunk/src/app/net/sf/gridarta/gui/misc/MainViewActions.java 2010-05-08 13:24:24 UTC (rev 7705) @@ -0,0 +1,125 @@ +/* + * 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.misc; + +import net.sf.gridarta.gui.gameobjectattributespanel.GameObjectAttributesControl; +import net.sf.gridarta.gui.gameobjectattributespanel.GameObjectAttributesTab; +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.map.maparchobject.MapArchObject; +import net.sf.japi.swing.action.ActionMethod; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; + +/** + * Implements actions related to the {@link MainView}. + * @author Andreas Kirschbaum + */ +public class MainViewActions<G extends GameObject<G, A, R>, A extends MapArchObject<A>, R extends Archetype<G, A, R>> { + + /** + * The {@link MainView} instance. + */ + @NotNull + private final MainView mainView; + + /** + * The {@link GameObjectAttributesControl} to display. + */ + @NotNull + private final GameObjectAttributesControl<G, A, R> gameObjectAttributesControl; + + /** + * The game object {@link Tab} to display. + */ + @NotNull + private final Tab gameObjectTab; + + /** + * The {@link GameObjectAttributesTab} that displays the game object text + * editor. + */ + @NotNull + private final GameObjectAttributesTab<G, A, R> textEditorTab; + + /** + * The previously active {@link Tab} before the last switch to {@link + * #gameObjectTab}. Set to <code>null</code> if not yet switched or if no + * other tab was active. + */ + @Nullable + private Tab prevTab = null; + + /** + * The previously active {@link GameObjectAttributesTab} in {@link + * #gameObjectTab} before the last switch to {@link #textEditorTab}. Set to + * <code>null</code> if not yet switched or if no other ta was active. + */ + @Nullable + private GameObjectAttributesTab<G, A, R> prevTab2 = null; + + /** + * Creates a new instance. + * @param mainView the main view instance + * @param gameObjectAttributesControl the game object attributes control to + * display + * @param gameObjectTab the game object tab to display + * @param textEditorTab the game object attributes tab that displays the + * game object text editor + */ + public MainViewActions(@NotNull final MainView mainView, @NotNull final GameObjectAttributesControl<G, A, R> gameObjectAttributesControl, @NotNull final Tab gameObjectTab, @NotNull final GameObjectAttributesTab<G, A, R> textEditorTab) { + this.mainView = mainView; + this.gameObjectAttributesControl = gameObjectAttributesControl; + this.gameObjectTab = gameObjectTab; + this.textEditorTab = textEditorTab; + } + + /** + * Action method to open the game object text editor. + */ + @ActionMethod + public void gameObjectTextEditor() { + final Tab activeTab = mainView.getActiveTab(gameObjectTab.getLocation()); + final GameObjectAttributesTab<G, A, R> activeTab2 = gameObjectAttributesControl.getSelectedTab(); + if (activeTab != null && activeTab == gameObjectTab && activeTab2 == textEditorTab) { + // game object text editor is active ==> restore saved state + if (prevTab != null) { + prevTab.getButton().setSelected(true); + prevTab = null; + } else { + gameObjectTab.getButton().setSelected(false); + } + if (prevTab2 != null) { + gameObjectAttributesControl.selectTab(prevTab2); + prevTab2 = null; + } + } else { + // game object text editor is inactive ==> save state and activate it + prevTab = activeTab; + prevTab2 = activeTab2; + + gameObjectTab.getButton().setSelected(true); + gameObjectAttributesControl.selectTab(textEditorTab); + textEditorTab.requestFocus(); + } + } + +} // class MainViewActions Property changes on: trunk/src/app/net/sf/gridarta/gui/misc/MainViewActions.java ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:eol-style + LF Modified: trunk/src/app/net/sf/gridarta/gui/utils/tabbedpanel/ButtonList.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/utils/tabbedpanel/ButtonList.java 2010-05-08 12:32:10 UTC (rev 7704) +++ trunk/src/app/net/sf/gridarta/gui/utils/tabbedpanel/ButtonList.java 2010-05-08 13:24:24 UTC (rev 7705) @@ -183,7 +183,7 @@ * @return the selected button or <code>null</code> if no button exists */ @Nullable - private AbstractButton getSelectedButton() { + public AbstractButton getSelectedButton() { return selectedButtons.isEmpty() ? null : selectedButtons.get(0); } Modified: trunk/src/app/net/sf/gridarta/gui/utils/tabbedpanel/TabbedPanel.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/utils/tabbedpanel/TabbedPanel.java 2010-05-08 12:32:10 UTC (rev 7704) +++ trunk/src/app/net/sf/gridarta/gui/utils/tabbedpanel/TabbedPanel.java 2010-05-08 13:24:24 UTC (rev 7705) @@ -155,6 +155,25 @@ } /** + * Returns the active {@link Tab} on a given {@link Location} of the main + * view. + * @param location the location + * @return the tab or <code>null</code> if no active tab exists + */ + @Nullable + public Tab getActiveTab(@NotNull final Location location) { + final ButtonList buttonList = buttonLists[location.ordinal()]; + final AbstractButton selectedButton = buttonList.getSelectedButton(); + if (selectedButton == null) { + return null; + } + + final Tab tab = tabs.get(selectedButton); + assert tab != null; + return tab; + } + + /** * Moves the tab to the given location. * @param tab the tab * @param location the location Modified: trunk/src/app/net/sf/gridarta/maincontrol/GUIMainControl.java =================================================================== --- trunk/src/app/net/sf/gridarta/maincontrol/GUIMainControl.java 2010-05-08 12:32:10 UTC (rev 7704) +++ trunk/src/app/net/sf/gridarta/maincontrol/GUIMainControl.java 2010-05-08 13:24:24 UTC (rev 7705) @@ -84,6 +84,7 @@ import net.sf.gridarta.gui.misc.HelpActions; import net.sf.gridarta.gui.misc.MainToolbar; import net.sf.gridarta.gui.misc.MainView; +import net.sf.gridarta.gui.misc.MainViewActions; import net.sf.gridarta.gui.misc.MapPreview; import net.sf.gridarta.gui.misc.RecentManager; import net.sf.gridarta.gui.misc.StatusBar; @@ -447,12 +448,14 @@ updaterManager.startup(); final GameObjectAttributesTab<G, A, R> textEditorTab = new TextEditorTab<G, A, R>(gameObjectAttributesModel); - final Tab gameObjectTab = new GameObjectTab<G, A, R>("gameObject", gameObjectAttributesControl, Location.BOTTOM, 0, true, textEditorTab); - ACTION_BUILDER.createAction(true, "gameObjectTextEditor", gameObjectTab); + final GameObjectTab<G, A, R> gameObjectTab = new GameObjectTab<G, A, R>("gameObject", gameObjectAttributesControl, Location.BOTTOM, 0, true); + mainView = new MainView(mainViewFrame, exitAction, mapDesktop, icon, exiter); + final Object mainViewActions = new MainViewActions<G, A, R>(mainView, gameObjectAttributesControl, gameObjectTab, textEditorTab); + ACTION_BUILDER.createAction(true, "gameObjectTextEditor", mainViewActions); + final JMenuBar menuBar = ACTION_BUILDER.createMenuBar(true, "main"); final MainToolbar mainToolbar = new MainToolbar(globalSettings); - mainView = new MainView(mainViewFrame, exitAction, mapDesktop, icon, exiter); mainViewFrame.setJMenuBar(menuBar); mainViewFrame.add(mainToolbar.getComponent(), BorderLayout.NORTH); mainViewFrame.add(statusBar, BorderLayout.SOUTH); Modified: trunk/src/app/net/sf/gridarta/messages.properties =================================================================== --- trunk/src/app/net/sf/gridarta/messages.properties 2010-05-08 12:32:10 UTC (rev 7704) +++ trunk/src/app/net/sf/gridarta/messages.properties 2010-05-08 13:24:24 UTC (rev 7705) @@ -175,7 +175,7 @@ deleteUnknownObjects.text=Delete unknown objects -gameObjectTextEditor.text=Open Game Object Text Editor +gameObjectTextEditor.text=Toggle Game Object Text Editor gameObjectTextEditor.accel=ctrl alt pressed E Modified: trunk/src/app/net/sf/gridarta/messages_de.properties =================================================================== --- trunk/src/app/net/sf/gridarta/messages_de.properties 2010-05-08 12:32:10 UTC (rev 7704) +++ trunk/src/app/net/sf/gridarta/messages_de.properties 2010-05-08 13:24:24 UTC (rev 7705) @@ -157,7 +157,7 @@ deleteUnknownObjects.text=Undefinierte Objekte l\xF6schen -gameObjectTextEditor.text=\xD6ffne Objekttext-Editor +gameObjectTextEditor.text=Objekttext-Editor umschalten # Plugins This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2010-05-08 12:32:17
|
Revision: 7704 http://gridarta.svn.sourceforge.net/gridarta/?rev=7704&view=rev Author: akirschbaum Date: 2010-05-08 12:32:10 +0000 (Sat, 08 May 2010) Log Message: ----------- Remove code to set the status bar from MainView. Modified Paths: -------------- trunk/src/app/net/sf/gridarta/gui/misc/MainView.java trunk/src/app/net/sf/gridarta/maincontrol/GUIMainControl.java Modified: trunk/src/app/net/sf/gridarta/gui/misc/MainView.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/misc/MainView.java 2010-05-08 12:08:50 UTC (rev 7703) +++ trunk/src/app/net/sf/gridarta/gui/misc/MainView.java 2010-05-08 12:32:10 UTC (rev 7704) @@ -85,14 +85,12 @@ * Constructs the main view and registers the given main controller. * @param frame the main window of the editor * @param exitAction the action to execute when the window is closed - * @param statusBar the status bar instance * @param mapDesktop the map desktop to show * @param icon the application's icon or <code>null</code> for default * @param exiter the exiter instance */ - public MainView(@NotNull final JFrame frame, @NotNull final ActionListener exitAction, @NotNull final Component statusBar, @NotNull final Component mapDesktop, @Nullable final ImageIcon icon, @NotNull final Exiter exiter) { + public MainView(@NotNull final JFrame frame, @NotNull final ActionListener exitAction, @NotNull final Component mapDesktop, @Nullable final ImageIcon icon, @NotNull final Exiter exiter) { this.frame = frame; - frame.add(statusBar, BorderLayout.SOUTH); frame.setDefaultCloseOperation(WindowConstants.DO_NOTHING_ON_CLOSE); frame.addWindowListener(new WindowAdapter() { @Override Modified: trunk/src/app/net/sf/gridarta/maincontrol/GUIMainControl.java =================================================================== --- trunk/src/app/net/sf/gridarta/maincontrol/GUIMainControl.java 2010-05-08 12:08:50 UTC (rev 7703) +++ trunk/src/app/net/sf/gridarta/maincontrol/GUIMainControl.java 2010-05-08 12:32:10 UTC (rev 7704) @@ -452,9 +452,10 @@ final JMenuBar menuBar = ACTION_BUILDER.createMenuBar(true, "main"); final MainToolbar mainToolbar = new MainToolbar(globalSettings); - mainView = new MainView(mainViewFrame, exitAction, statusBar, mapDesktop, icon, exiter); + mainView = new MainView(mainViewFrame, exitAction, mapDesktop, icon, exiter); mainViewFrame.setJMenuBar(menuBar); mainViewFrame.add(mainToolbar.getComponent(), BorderLayout.NORTH); + mainViewFrame.add(statusBar, BorderLayout.SOUTH); mainView.addTab(gameObjectTab); mainView.addTab(new Tab("selectedSquare", selectedSquareView, Location.RIGHT, 1, true)); mainView.addTab(new Tab("tools", toolPalette, Location.LEFT, 2, false)); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2010-05-08 12:08:57
|
Revision: 7703 http://gridarta.svn.sourceforge.net/gridarta/?rev=7703&view=rev Author: akirschbaum Date: 2010-05-08 12:08:50 +0000 (Sat, 08 May 2010) Log Message: ----------- Remove code to set the main tool bar from MainView. Modified Paths: -------------- trunk/src/app/net/sf/gridarta/gui/misc/MainView.java trunk/src/app/net/sf/gridarta/maincontrol/GUIMainControl.java Modified: trunk/src/app/net/sf/gridarta/gui/misc/MainView.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/misc/MainView.java 2010-05-08 12:02:42 UTC (rev 7702) +++ trunk/src/app/net/sf/gridarta/gui/misc/MainView.java 2010-05-08 12:08:50 UTC (rev 7703) @@ -89,9 +89,8 @@ * @param mapDesktop the map desktop to show * @param icon the application's icon or <code>null</code> for default * @param exiter the exiter instance - * @param mainToolbar the main toolbar component */ - public MainView(@NotNull final JFrame frame, @NotNull final ActionListener exitAction, @NotNull final Component statusBar, @NotNull final Component mapDesktop, @Nullable final ImageIcon icon, @NotNull final Exiter exiter, @NotNull final Component mainToolbar) { + public MainView(@NotNull final JFrame frame, @NotNull final ActionListener exitAction, @NotNull final Component statusBar, @NotNull final Component mapDesktop, @Nullable final ImageIcon icon, @NotNull final Exiter exiter) { this.frame = frame; frame.add(statusBar, BorderLayout.SOUTH); frame.setDefaultCloseOperation(WindowConstants.DO_NOTHING_ON_CLOSE); @@ -144,7 +143,6 @@ final int defwidth = (int) (0.9 * screen.getWidth()); final int defheight = (int) (0.9 * screen.getHeight()); - frame.add(mainToolbar, BorderLayout.NORTH); tabbedPanel = new TabbedPanel(mapDesktop); frame.add(tabbedPanel, BorderLayout.CENTER); Modified: trunk/src/app/net/sf/gridarta/maincontrol/GUIMainControl.java =================================================================== --- trunk/src/app/net/sf/gridarta/maincontrol/GUIMainControl.java 2010-05-08 12:02:42 UTC (rev 7702) +++ trunk/src/app/net/sf/gridarta/maincontrol/GUIMainControl.java 2010-05-08 12:08:50 UTC (rev 7703) @@ -19,6 +19,7 @@ package net.sf.gridarta.maincontrol; +import java.awt.BorderLayout; import java.awt.Container; import java.io.BufferedReader; import java.io.File; @@ -451,8 +452,9 @@ final JMenuBar menuBar = ACTION_BUILDER.createMenuBar(true, "main"); final MainToolbar mainToolbar = new MainToolbar(globalSettings); - mainView = new MainView(mainViewFrame, exitAction, statusBar, mapDesktop, icon, exiter, mainToolbar.getComponent()); + mainView = new MainView(mainViewFrame, exitAction, statusBar, mapDesktop, icon, exiter); mainViewFrame.setJMenuBar(menuBar); + mainViewFrame.add(mainToolbar.getComponent(), BorderLayout.NORTH); mainView.addTab(gameObjectTab); mainView.addTab(new Tab("selectedSquare", selectedSquareView, Location.RIGHT, 1, true)); mainView.addTab(new Tab("tools", toolPalette, Location.LEFT, 2, false)); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2010-05-08 12:02:48
|
Revision: 7702 http://gridarta.svn.sourceforge.net/gridarta/?rev=7702&view=rev Author: akirschbaum Date: 2010-05-08 12:02:42 +0000 (Sat, 08 May 2010) Log Message: ----------- Remove code to set the main menu bar from MainView. Modified Paths: -------------- trunk/src/app/net/sf/gridarta/gui/misc/MainView.java trunk/src/app/net/sf/gridarta/maincontrol/GUIMainControl.java Modified: trunk/src/app/net/sf/gridarta/gui/misc/MainView.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/misc/MainView.java 2010-05-07 21:46:14 UTC (rev 7701) +++ trunk/src/app/net/sf/gridarta/gui/misc/MainView.java 2010-05-08 12:02:42 UTC (rev 7702) @@ -31,7 +31,6 @@ import java.util.prefs.Preferences; import javax.swing.ImageIcon; import javax.swing.JFrame; -import javax.swing.JMenuBar; import javax.swing.JOptionPane; import javax.swing.WindowConstants; import net.sf.gridarta.MainControl; @@ -90,10 +89,9 @@ * @param mapDesktop the map desktop to show * @param icon the application's icon or <code>null</code> for default * @param exiter the exiter instance - * @param menuBar the main menu bar * @param mainToolbar the main toolbar component */ - public MainView(@NotNull final JFrame frame, @NotNull final ActionListener exitAction, @NotNull final Component statusBar, @NotNull final Component mapDesktop, @Nullable final ImageIcon icon, @NotNull final Exiter exiter, @NotNull final JMenuBar menuBar, @NotNull final Component mainToolbar) { + public MainView(@NotNull final JFrame frame, @NotNull final ActionListener exitAction, @NotNull final Component statusBar, @NotNull final Component mapDesktop, @Nullable final ImageIcon icon, @NotNull final Exiter exiter, @NotNull final Component mainToolbar) { this.frame = frame; frame.add(statusBar, BorderLayout.SOUTH); frame.setDefaultCloseOperation(WindowConstants.DO_NOTHING_ON_CLOSE); @@ -150,8 +148,6 @@ tabbedPanel = new TabbedPanel(mapDesktop); frame.add(tabbedPanel, BorderLayout.CENTER); - frame.setJMenuBar(menuBar); - // set bounds (location and size) of the main frame frame.setBounds( prefs.getInt(WINDOW_X, (int) (screen.getX() + (screen.getWidth() - defwidth) / 2.0)), Modified: trunk/src/app/net/sf/gridarta/maincontrol/GUIMainControl.java =================================================================== --- trunk/src/app/net/sf/gridarta/maincontrol/GUIMainControl.java 2010-05-07 21:46:14 UTC (rev 7701) +++ trunk/src/app/net/sf/gridarta/maincontrol/GUIMainControl.java 2010-05-08 12:02:42 UTC (rev 7702) @@ -451,7 +451,8 @@ final JMenuBar menuBar = ACTION_BUILDER.createMenuBar(true, "main"); final MainToolbar mainToolbar = new MainToolbar(globalSettings); - mainView = new MainView(mainViewFrame, exitAction, statusBar, mapDesktop, icon, exiter, menuBar, mainToolbar.getComponent()); + mainView = new MainView(mainViewFrame, exitAction, statusBar, mapDesktop, icon, exiter, mainToolbar.getComponent()); + mainViewFrame.setJMenuBar(menuBar); mainView.addTab(gameObjectTab); mainView.addTab(new Tab("selectedSquare", selectedSquareView, Location.RIGHT, 1, true)); mainView.addTab(new Tab("tools", toolPalette, Location.LEFT, 2, false)); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2010-05-07 21:46:20
|
Revision: 7701 http://gridarta.svn.sourceforge.net/gridarta/?rev=7701&view=rev Author: akirschbaum Date: 2010-05-07 21:46:14 +0000 (Fri, 07 May 2010) Log Message: ----------- Rename variable names. Modified Paths: -------------- trunk/src/app/net/sf/gridarta/gui/map/maptilepane/AbstractMapTilePane.java Modified: trunk/src/app/net/sf/gridarta/gui/map/maptilepane/AbstractMapTilePane.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/map/maptilepane/AbstractMapTilePane.java 2010-05-07 21:45:28 UTC (rev 7700) +++ trunk/src/app/net/sf/gridarta/gui/map/maptilepane/AbstractMapTilePane.java 2010-05-07 21:46:14 UTC (rev 7701) @@ -201,17 +201,17 @@ /** * Builds the tile panel. - * @param tilePaths the tile panels + * @param tilePanels the tile panels * @return the newly built tile panel */ @NotNull - private static Component buildTilePanels(@NotNull final TilePanel[] tilePaths) { - final JComponent tilePanels = new JPanel(new DirectionLayout()); - tilePanels.setBorder(new CompoundBorder(BorderFactory.createTitledBorder(ACTION_BUILDER.getString("mapTiles")), GUIConstants.DIALOG_BORDER)); - for (final TilePanel tilePath : tilePaths) { - tilePanels.add(tilePath, tilePath.getDirection()); + private static Component buildTilePanels(@NotNull final TilePanel[] tilePanels) { + final JComponent panel = new JPanel(new DirectionLayout()); + panel.setBorder(new CompoundBorder(BorderFactory.createTitledBorder(ACTION_BUILDER.getString("mapTiles")), GUIConstants.DIALOG_BORDER)); + for (final TilePanel tilePanel : tilePanels) { + panel.add(tilePanel, tilePanel.getDirection()); } - return tilePanels; + return panel; } /** This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2010-05-07 21:45:34
|
Revision: 7700 http://gridarta.svn.sourceforge.net/gridarta/?rev=7700&view=rev Author: akirschbaum Date: 2010-05-07 21:45:28 +0000 (Fri, 07 May 2010) Log Message: ----------- Rewrite MapArchObject.clone(). Modified Paths: -------------- trunk/atrinik/src/app/net/sf/gridarta/var/atrinik/model/maparchobject/MapArchObject.java trunk/crossfire/src/app/net/sf/gridarta/var/crossfire/model/maparchobject/MapArchObject.java trunk/daimonin/src/app/net/sf/gridarta/var/daimonin/model/maparchobject/MapArchObject.java trunk/src/app/net/sf/gridarta/gui/undo/UndoControl.java trunk/src/app/net/sf/gridarta/model/map/maparchobject/AbstractMapArchObject.java trunk/src/app/net/sf/gridarta/model/map/maparchobject/MapArchObject.java trunk/src/test/net/sf/gridarta/model/map/maparchobject/TestMapArchObject.java Modified: trunk/atrinik/src/app/net/sf/gridarta/var/atrinik/model/maparchobject/MapArchObject.java =================================================================== --- trunk/atrinik/src/app/net/sf/gridarta/var/atrinik/model/maparchobject/MapArchObject.java 2010-05-07 21:38:28 UTC (rev 7699) +++ trunk/atrinik/src/app/net/sf/gridarta/var/atrinik/model/maparchobject/MapArchObject.java 2010-05-07 21:45:28 UTC (rev 7700) @@ -393,7 +393,7 @@ /** {@inheritDoc} */ @NotNull @Override - public MapArchObject clone() { + public Object clone() { return super.clone(); } 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 2010-05-07 21:38:28 UTC (rev 7699) +++ trunk/crossfire/src/app/net/sf/gridarta/var/crossfire/model/maparchobject/MapArchObject.java 2010-05-07 21:45:28 UTC (rev 7700) @@ -445,8 +445,8 @@ /** {@inheritDoc} */ @NotNull @Override - public MapArchObject clone() { - final MapArchObject clone = super.clone(); + public Object clone() { + final MapArchObject clone = (MapArchObject) super.clone(); clone.loreText = new StringBuilder(loreText.toString()); return clone; } Modified: trunk/daimonin/src/app/net/sf/gridarta/var/daimonin/model/maparchobject/MapArchObject.java =================================================================== --- trunk/daimonin/src/app/net/sf/gridarta/var/daimonin/model/maparchobject/MapArchObject.java 2010-05-07 21:38:28 UTC (rev 7699) +++ trunk/daimonin/src/app/net/sf/gridarta/var/daimonin/model/maparchobject/MapArchObject.java 2010-05-07 21:45:28 UTC (rev 7700) @@ -355,7 +355,7 @@ /** {@inheritDoc} */ @NotNull @Override - public MapArchObject clone() { + public Object clone() { return super.clone(); } Modified: trunk/src/app/net/sf/gridarta/gui/undo/UndoControl.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/undo/UndoControl.java 2010-05-07 21:38:28 UTC (rev 7699) +++ trunk/src/app/net/sf/gridarta/gui/undo/UndoControl.java 2010-05-07 21:45:28 UTC (rev 7700) @@ -108,7 +108,7 @@ @Override public void beginTransaction(@NotNull final MapModel<G, A, R> mapModel, @NotNull final String name) { undoModel = undoModels.get(mapModel); - undoState = new UndoState<G, A, R>(name, mapModel.getMapArchObject().clone()); + undoState = new UndoState<G, A, R>(name, (A) mapModel.getMapArchObject().clone()); } /** {@inheritDoc} */ Modified: trunk/src/app/net/sf/gridarta/model/map/maparchobject/AbstractMapArchObject.java =================================================================== --- trunk/src/app/net/sf/gridarta/model/map/maparchobject/AbstractMapArchObject.java 2010-05-07 21:38:28 UTC (rev 7699) +++ trunk/src/app/net/sf/gridarta/model/map/maparchobject/AbstractMapArchObject.java 2010-05-07 21:45:28 UTC (rev 7700) @@ -629,16 +629,16 @@ */ @NotNull @Override - public A clone() { - final AbstractMapArchObject<A> clone; + public Object clone() { + final AbstractMapArchObject<?> clone; try { - clone = (AbstractMapArchObject<A>) super.clone(); + clone = (AbstractMapArchObject<?>) super.clone(); } catch (final CloneNotSupportedException ex) { throw new AssertionError(); } clone.msgText = new StringBuilder(msgText.toString()); clone.tilePaths = tilePaths.clone(); - return (A) clone; + return clone; } } // class AbstractMapArchObject Modified: trunk/src/app/net/sf/gridarta/model/map/maparchobject/MapArchObject.java =================================================================== --- trunk/src/app/net/sf/gridarta/model/map/maparchobject/MapArchObject.java 2010-05-07 21:38:28 UTC (rev 7699) +++ trunk/src/app/net/sf/gridarta/model/map/maparchobject/MapArchObject.java 2010-05-07 21:45:28 UTC (rev 7700) @@ -32,7 +32,7 @@ * @author <a href="mailto:ch...@ri...">Christian Hujer</a> * @author Andreas Kirschbaum */ -public interface MapArchObject<A extends MapArchObject<A>> extends Serializable { +public interface MapArchObject<A extends MapArchObject<A>> extends Cloneable, Serializable { /** * Reset the state of this object to the state of the given map arch @@ -198,7 +198,7 @@ * @return Newly created clone of this object. */ @NotNull - A clone(); + Object clone(); /** * Register an event listener. Modified: trunk/src/test/net/sf/gridarta/model/map/maparchobject/TestMapArchObject.java =================================================================== --- trunk/src/test/net/sf/gridarta/model/map/maparchobject/TestMapArchObject.java 2010-05-07 21:38:28 UTC (rev 7699) +++ trunk/src/test/net/sf/gridarta/model/map/maparchobject/TestMapArchObject.java 2010-05-07 21:45:28 UTC (rev 7700) @@ -27,7 +27,7 @@ * A {@link MapArchObject} implementation for testing purposes. * @author Andreas Kirschbaum */ -public class TestMapArchObject implements Cloneable, MapArchObject<TestMapArchObject> { +public class TestMapArchObject implements MapArchObject<TestMapArchObject> { /** * The serial version UID. @@ -201,9 +201,9 @@ /** {@inheritDoc} */ @NotNull @Override - public TestMapArchObject clone() { + public Object clone() { try { - return (TestMapArchObject) super.clone(); + return super.clone(); } catch (final CloneNotSupportedException ex) { throw new AssertionError(); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2010-05-07 21:38:34
|
Revision: 7699 http://gridarta.svn.sourceforge.net/gridarta/?rev=7699&view=rev Author: akirschbaum Date: 2010-05-07 21:38:28 +0000 (Fri, 07 May 2010) Log Message: ----------- Do not create the same objects multiple times. Modified Paths: -------------- trunk/src/app/net/sf/gridarta/gui/map/renderer/AbstractIsoMapRenderer.java Modified: trunk/src/app/net/sf/gridarta/gui/map/renderer/AbstractIsoMapRenderer.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/map/renderer/AbstractIsoMapRenderer.java 2010-05-07 21:35:22 UTC (rev 7698) +++ trunk/src/app/net/sf/gridarta/gui/map/renderer/AbstractIsoMapRenderer.java 2010-05-07 21:38:28 UTC (rev 7699) @@ -66,6 +66,12 @@ private static final long serialVersionUID = 1L; /** + * The background color for created images. + */ + @NotNull + private static final Color BACKGROUND_COLOR = new Color(255, 255, 255, 0); + + /** * The game object type number of spawn points. */ private final int spawnPointTypeNo; @@ -383,7 +389,7 @@ // first create a storing place for the image final BufferedImage image = new BufferedImage(viewWidth, viewHeight, BufferedImage.TYPE_INT_ARGB); final Graphics2D bufGrfx = image.createGraphics(); - bufGrfx.setColor(new Color(255, 255, 255, 0)); + bufGrfx.setColor(BACKGROUND_COLOR); bufGrfx.fillRect(0, 0, viewWidth, viewHeight); // paint the mapview into the image This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2010-05-07 21:35:28
|
Revision: 7698 http://gridarta.svn.sourceforge.net/gridarta/?rev=7698&view=rev Author: akirschbaum Date: 2010-05-07 21:35:22 +0000 (Fri, 07 May 2010) Log Message: ----------- Move field to top of class. Modified Paths: -------------- trunk/src/app/net/sf/gridarta/gui/map/renderer/AbstractIsoMapRenderer.java Modified: trunk/src/app/net/sf/gridarta/gui/map/renderer/AbstractIsoMapRenderer.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/map/renderer/AbstractIsoMapRenderer.java 2010-05-07 21:30:03 UTC (rev 7697) +++ trunk/src/app/net/sf/gridarta/gui/map/renderer/AbstractIsoMapRenderer.java 2010-05-07 21:35:22 UTC (rev 7698) @@ -114,6 +114,11 @@ private final Point tmpPoint = new Point(); /** + * Temporary rectangle. Used to avoid creating millions of rectangles. + */ + private final Rectangle tmpRec = new Rectangle(); + + /** * The {@link MapViewSettings} instance to use. */ @NotNull @@ -421,11 +426,6 @@ } /** - * Temporary rectangle. Used to avoid creating millions of rectangles. - */ - private final Rectangle tmpRec = new Rectangle(); - - /** * {@inheritDoc} */ @NotNull This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2010-05-07 21:30:10
|
Revision: 7697 http://gridarta.svn.sourceforge.net/gridarta/?rev=7697&view=rev Author: akirschbaum Date: 2010-05-07 21:30:03 +0000 (Fri, 07 May 2010) Log Message: ----------- Update comments. Modified Paths: -------------- trunk/crossfire/src/app/net/sf/gridarta/var/crossfire/gui/map/renderer/AbstractFlatMapRenderer.java trunk/src/app/net/sf/gridarta/gui/map/maptilepane/AbstractMapTilePane.java trunk/src/app/net/sf/gridarta/gui/map/renderer/AbstractIsoMapRenderer.java trunk/src/app/net/sf/gridarta/model/archetype/AbstractArchetype.java trunk/src/app/net/sf/gridarta/model/archetype/AbstractArchetypeParser.java trunk/src/app/net/sf/gridarta/model/archetype/AbstractArchetypeSet.java trunk/src/app/net/sf/gridarta/model/baseobject/AbstractBaseObject.java trunk/src/app/net/sf/gridarta/model/gameobject/AbstractGameObject.java trunk/src/app/net/sf/gridarta/model/map/maparchobject/AbstractMapArchObject.java Modified: trunk/crossfire/src/app/net/sf/gridarta/var/crossfire/gui/map/renderer/AbstractFlatMapRenderer.java =================================================================== --- trunk/crossfire/src/app/net/sf/gridarta/var/crossfire/gui/map/renderer/AbstractFlatMapRenderer.java 2010-05-07 19:24:03 UTC (rev 7696) +++ trunk/crossfire/src/app/net/sf/gridarta/var/crossfire/gui/map/renderer/AbstractFlatMapRenderer.java 2010-05-07 21:30:03 UTC (rev 7697) @@ -60,10 +60,14 @@ */ public abstract class AbstractFlatMapRenderer extends AbstractMapRenderer<GameObject, MapArchObject, Archetype> { - /** Serial Version UID. */ + /** + * The serial version UID. + */ private static final long serialVersionUID = 1L; - /** offset to map borders (32 for std. rect. maps, 0 for pickmaps). */ + /** + * The offset to map borders (32 for std. rect. maps, 0 for pickmaps). + */ @NotNull protected final Point borderOffset = new Point(); @@ -79,13 +83,21 @@ @NotNull private final GridMapSquarePainter gridMapSquarePainter; + /** + * The map size in squares. + */ @NotNull private Size2D mapSize; + /** + * The {@link MapGrid} to render. + */ @NotNull private final MapGrid mapGrid; - /** Used to avoid creation millions of points. */ + /** + * Temporary point. Used to avoid creating millions of points. + */ @NotNull private final Point tmpPoint = new Point(); @@ -95,11 +107,15 @@ @NotNull private final MapViewSettings mapViewSettings; + /** + * Temporary rectangle. Used to avoid creating millions of rectangles. + */ @NotNull private final Rectangle tmpRec = new Rectangle(); /** - * The {@link MapViewSettingsListener} attached to {@link #mapViewSettings}. + * The {@link MapViewSettingsListener} attached to {@link + * #mapViewSettings}. */ @NotNull private final MapViewSettingsListener mapViewSettingsListener = new MapViewSettingsListener() { @@ -142,7 +158,9 @@ }; - /** The map model listener to track changes in {@link #mapModel}. */ + /** + * The {@link MapModelListener} to track changes in {@link #mapModel}. + */ @NotNull private final MapModelListener<GameObject, MapArchObject, Archetype> mapModelListener = new MapModelListener<GameObject, MapArchObject, Archetype>() { @@ -164,7 +182,9 @@ } } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public void mapObjectsChanged(@NotNull final Set<GameObject> gameObjects, @NotNull final Set<GameObject> transientGameObjects) { final Collection<MapSquare<GameObject, MapArchObject, Archetype>> toRepaint = new HashSet<MapSquare<GameObject, MapArchObject, Archetype>>(); @@ -210,31 +230,41 @@ } } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public void mapMetaChanged() { // ignore } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public void errorsChanged(@NotNull final ErrorCollector<GameObject, MapArchObject, Archetype> errors) { // ignore } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public void mapFileChanged(@Nullable final File oldMapFile) { // ignore } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public void modifiedChanged(@NotNull final MapModel<GameObject, MapArchObject, Archetype> mapModel) { // ignore } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public void mapClosed() { // ignore @@ -242,11 +272,15 @@ }; - /** The map grid listener to track changes in {@link #mapGrid}. */ + /** + * The {@link MapGridListener} to track changes in {@link #mapGrid}. + */ @NotNull private final MapGridListener mapGridListener = new MapGridListener() { - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public void mapGridChanged(@NotNull final MapGridEvent e) { final Rectangle recChange = mapGrid.getRecChange(); @@ -254,7 +288,9 @@ repaint(0L, borderOffset.x + recChange.x * IGUIConstants.SQUARE_WIDTH, borderOffset.y + recChange.y * IGUIConstants.SQUARE_HEIGHT, recChange.width * IGUIConstants.SQUARE_WIDTH, recChange.height * IGUIConstants.SQUARE_HEIGHT); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public void mapGridResized(@NotNull final MapGridEvent e) { resizeMapGrid(); @@ -287,14 +323,18 @@ borderOffset.setLocation(borderSize, borderSize); } - /** Finish initialization of this instance. */ + /** + * Finishes initialization of this instance. + */ protected void init() { resizeMapGrid(); mapModel.addMapModelListener(mapModelListener); mapGrid.addMapGridListener(mapGridListener); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public void closeNotify() { mapModel.removeMapModelListener(mapModelListener); @@ -302,7 +342,9 @@ mapViewSettings.removeMapViewSettingsListener(mapViewSettingsListener); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @NotNull @Override public BufferedImage getFullImage() { @@ -326,18 +368,24 @@ return bufImage; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public abstract void paintComponent(@NotNull final Graphics g); - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public void forceRepaint() { updateAll(); repaint(); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @NotNull @Override public Rectangle getSquareBounds(@NotNull final Point p) { @@ -349,8 +397,8 @@ } /** - * Paint one square. - * @param square The square to paint. + * Paints one square. + * @param square the square to paint */ private void paintSquare(@NotNull final MapSquare<GameObject, MapArchObject, Archetype> square) { final int x = square.getMapX(); @@ -378,7 +426,7 @@ } /** - * Paint the grid for one square. The grid is not painted if it is + * Paints the grid for one square. The grid is not painted if it is * disabled. * @param grfx the graphics context to draw in * @param point the map coordinates of the square to draw @@ -391,7 +439,7 @@ } /** - * Paint the selection for one square. + * Paints the selection for one square. * @param grfx the graphics context to draw in * @param point map coordinates of the square to highlight */ @@ -401,7 +449,7 @@ } /** - * Paint the whole map. + * Paints the whole map. * @param grfx the graphics context to draw in * @param checkClip if set, omit squares outside <code>grfx</code>'s clip * area @@ -419,7 +467,7 @@ } /** - * Paint the selection for the whole map. It's recommended to paint the + * Paints the selection for the whole map. It's recommended to paint the * complete selection after the map itself, otherwise map elements actually * might hide selections. * @param grfx Graphics for painting @@ -437,10 +485,10 @@ } /** - * Paint the grid of the whole map. The grid is not painted if it is + * Paints the grid of the whole map. The grid is not painted if it is * disabled. It's recommended to paint the complete grid after the map * itself, otherwise map elements actually might hide parts of the grid. - * @param grfx Graphics for painting + * @param grfx the graphics for painting */ private void paintMapGrid(@NotNull final Graphics grfx) { if (mapViewSettings.isGridVisible()) { @@ -456,7 +504,9 @@ } } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Nullable @Override public Point getSquareLocationAt(@NotNull final Point point, @Nullable final Point retPoint) { @@ -484,22 +534,24 @@ } /** - * Resize the backing buffer to the new grid size. It will only be resized + * Resizes the backing buffer to the new grid size. It will only be resized * if the map is not a pickmap. * @param size the new map size */ protected abstract void resizeBackBuffer(@NotNull final Dimension size); /** - * Paint one square. + * Paints one square. * @param grfx the graphics context to draw to - * @param x The square coordinate to paint to. - * @param y The square coordinate to paint to. - * @param square The square to paint. + * @param x the square coordinate to paint to + * @param y the square coordinate to paint to + * @param square the square to paint */ protected abstract void paintSquare(@NotNull final Graphics grfx, final int x, final int y, @NotNull final MapSquare<GameObject, MapArchObject, Archetype> square); - /** Update cached information to new map grid size. */ + /** + * Updats cached information to new map grid size. + */ private void resizeMapGrid() { // define how much drawing space we need for the map mapSize = mapGrid.getSize(); @@ -523,10 +575,14 @@ */ protected abstract void updateSquares(@NotNull final Rectangle rectangle); - /** Callback function that is called when any square may have changed. */ + /** + * Callback function that is called when any square may have changed. + */ protected abstract void updateAll(); - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public void setErroneousArchObjects(@NotNull final Map<GameObject, ValidationError<GameObject, MapArchObject, Archetype>> erroneousArchObjects) { //XXX: save erroneousArchObjects Modified: trunk/src/app/net/sf/gridarta/gui/map/maptilepane/AbstractMapTilePane.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/map/maptilepane/AbstractMapTilePane.java 2010-05-07 19:24:03 UTC (rev 7696) +++ trunk/src/app/net/sf/gridarta/gui/map/maptilepane/AbstractMapTilePane.java 2010-05-07 21:30:03 UTC (rev 7697) @@ -185,6 +185,11 @@ return tilePanels; } + /** + * Builds all {@link TilePanel TilePanels} for all directions. + * @param directionMapping the directions + * @return the tile panels + */ @NotNull private TilePanel[] createTilePanels(@NotNull final DirectionLayout.Direction[] directionMapping) { final TilePanel[] tilePanels = new TilePanel[directionMapping.length]; @@ -196,7 +201,8 @@ /** * Builds the tile panel. - * @return The newly built tile panel. + * @param tilePaths the tile panels + * @return the newly built tile panel */ @NotNull private static Component buildTilePanels(@NotNull final TilePanel[] tilePaths) { @@ -209,9 +215,9 @@ } /** - * Creates the subPanel that holds the buttons to attach maps or clear all + * Creates the sub-panel that holds the buttons to attach maps or clear all * paths. - * @return The newly built subPanel. + * @return the newly built sub-panel */ @NotNull private Component buildSubPanel() { @@ -231,12 +237,16 @@ return subPanel; } - /** Action method for tiles attaching automatically. */ + /** + * Action method for tiles attaching automatically. + */ public void mapTilesAttach() { attachTiledMap(); } - /** Action method for tiles clearing paths. */ + /** + * Action method for tiles clearing paths. + */ public void mapTilesClear() { for (final TilePanel tilePath : tilePaths) { tilePath.setText("", true); @@ -244,8 +254,8 @@ } /** - * This method looks for all maps surrounding the current map and tries to - * perform the reverse attachment. + * Looks for all maps surrounding the current map and tries to perform the + * reverse attachment. * @fixme If you think this method sucks for it's complexity, you're right. * This method needs refactoring badly. * @fixme I think this method might fail in case one of the other maps this @@ -401,6 +411,13 @@ return mapManager.openMapFile(file, false); } + /** + * Returns the map path for a tile of a map and a tile path. + * @param base the map path of the map + * @param link the tile path of the map; may be relative to + * <code>base</code> + * @return the map path + */ @Nullable private String getTilePath(@NotNull final String base, @NotNull final String link) { final int pos = getLastSlashIndex(base); @@ -436,6 +453,12 @@ return link.substring(mapdir.length()).trim().replaceAll(sep, "/"); } + /** + * Returns the index of the last '/' or {@link File#separator} within a + * string. + * @param base the string + * @return the index or <code>-1</code> if not found + */ private static int getLastSlashIndex(@NotNull final String base) { final int slashIndex1 = base.lastIndexOf('/'); final int separatorIndex1 = base.lastIndexOf(File.separator); @@ -456,11 +479,13 @@ } } - /** Restore settings from the map. */ + /** + * Restores the settings from the map. + */ public void restoreMapProperties() { for (final TilePanel tilePath : tilePaths) { tilePath.mapTileRevert(); } } -} // class MapTilePane +} // class AbstractMapTilePane Modified: trunk/src/app/net/sf/gridarta/gui/map/renderer/AbstractIsoMapRenderer.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/map/renderer/AbstractIsoMapRenderer.java 2010-05-07 19:24:03 UTC (rev 7696) +++ trunk/src/app/net/sf/gridarta/gui/map/renderer/AbstractIsoMapRenderer.java 2010-05-07 21:30:03 UTC (rev 7697) @@ -60,7 +60,9 @@ */ public abstract class AbstractIsoMapRenderer<G extends GameObject<G, A, R>, A extends MapArchObject<A>, R extends Archetype<G, A, R>> extends AbstractMapRenderer<G, A, R> { - /** Serial Version UID. */ + /** + * The serial version UID. + */ private static final long serialVersionUID = 1L; /** @@ -68,27 +70,46 @@ */ private final int spawnPointTypeNo; - /** offset to map borders (32 for std. rect. maps, 0 for pickmaps). */ + /** + * The offset to map borders (32 for std. rect. maps, 0 for pickmaps). + */ @NotNull private final Point borderOffset; - /** The origin is the point in the north-west corner. */ + /** + * The origin is the point in the north-west corner. + */ @NotNull private final Point origin = new Point(); + /** + * The {@link MapModel} to render. + */ @NotNull private final MapModel<G, A, R> mapModel; + /** + * The size of the map to render. + */ @NotNull private Size2D mapSize; + /** + * The {@link MapGrid} to render. + */ @NotNull private final MapGrid mapGrid; + /** + * The {@link Icon} drawn into squares without {@link GameObject + * GameObjects}. + */ @NotNull private final Icon unknownSquareIcon; - /** Used to avoid creation millions of points. */ + /** + * Temporary point. Used to avoid creating millions of points. + */ @NotNull private final Point tmpPoint = new Point(); @@ -117,42 +138,55 @@ private final GridMapSquarePainter gridMapSquarePainter; /** - * The {@link MapViewSettingsListener} attached to {@link #mapViewSettings}. + * The {@link MapViewSettingsListener} attached to {@link + * #mapViewSettings}. */ @NotNull private final MapViewSettingsListener mapViewSettingsListener = new MapViewSettingsListener() { - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public void gridVisibleChanged(final boolean gridVisible) { forceRepaint(); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public void smoothingChanged(final boolean smoothing) { // does not render smoothed faces } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public void doubleFacesChanged(final boolean doubleFaces) { forceRepaint(); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public void alphaTypeChanged(final int alphaType) { forceRepaint(); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public void editTypeChanged(final int editType) { // changed game objects will be rendered } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public void autojoinChanged(final boolean autojoin) { // ignore @@ -160,53 +194,71 @@ }; - /** The map model listener to track changes in {@link #mapModel}. */ + /** + * The {@link MapModelListener} to track changes in {@link #mapModel}. + */ @NotNull private final MapModelListener<G, A, R> mapModelListener = new MapModelListener<G, A, R>() { - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public void mapSizeChanged(@NotNull final MapModel<G, A, R> mapModel, @NotNull final Size2D newSize) { // ignore: will trigger an mapGridChanged() callback } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public void mapSquaresChanged(@NotNull final Set<MapSquare<G, A, R>> mapSquares) { repaint(); // TODO: only repaint a specific region } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public void mapObjectsChanged(@NotNull final Set<G> gameObjects, @NotNull final Set<G> transientGameObjects) { repaint(); // TODO: only repaint a specific region } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public void mapMetaChanged() { // ignore } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public void errorsChanged(@NotNull final ErrorCollector<G, A, R> errors) { // ignore } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public void mapFileChanged(@Nullable final File oldMapFile) { // ignore } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public void modifiedChanged(@NotNull final MapModel<G, A, R> mapModel) { // ignore } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public void mapClosed() { // ignore @@ -214,17 +266,23 @@ }; - /** The map grid listener to track changes in {@link #mapGrid}. */ + /** + * The {@link MapGridListener} to track changes in {@link #mapGrid}. + */ @NotNull private final MapGridListener mapGridListener = new MapGridListener() { - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public void mapGridChanged(@NotNull final MapGridEvent e) { repaint(); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public void mapGridResized(@NotNull final MapGridEvent e) { mapSize = e.getSource().getSize(); @@ -274,7 +332,9 @@ mapGrid.addMapGridListener(mapGridListener); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public void closeNotify() { mapModel.removeMapModelListener(mapModelListener); @@ -283,15 +343,15 @@ } /** - * The origin which is located in the NORTH_WEST-corner of the map is - * calculated. On non-pickmaps there is an extra border. + * Calculates the origin which is located in the NORTH_WEST-corner of the + * map. On non-pickmaps there is an extra border. */ private void calculateOrigin() { origin.setLocation(borderOffset.x + mapSize.getHeight() * isoMapSquareInfo.getXlen2(), borderOffset.y); } /** - * Sets offset to map borders (32 for std. rect. maps, 0 for pickmaps). + * Sets the offset to map borders (32 for std. rect. maps, 0 for pickmaps). * @param x x offset to map borders (32 for std. rect. maps, 0 for * pickmaps) * @param y y offset to map borders (32 for std. rect. maps, 0 for @@ -302,7 +362,9 @@ calculateOrigin(); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @NotNull @Override public BufferedImage getFullImage() { @@ -342,21 +404,30 @@ return image; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public void paintComponent(@NotNull final Graphics g) { paintComponent2((Graphics2D) g); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public void forceRepaint() { repaint(); } + /** + * Temporary rectangle. Used to avoid creating millions of rectangles. + */ private final Rectangle tmpRec = new Rectangle(); - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @NotNull @Override public Rectangle getSquareBounds(@NotNull final Point p) { @@ -368,17 +439,17 @@ } /** - * Clear the window to background color if necessary. + * Clears the window to background color if necessary. * @param grfx Graphics to use for clearing. */ protected abstract void clearBackground(@NotNull final Graphics grfx); /** - * Paint one square. - * @param grfx The graphics context to paint to. - * @param x The square coordinate to paint to. - * @param y The square coordinate to paint to. - * @param square The square to paint. + * Paints one square. + * @param grfx the graphics context to paint to + * @param x the square coordinate to paint to + * @param y the square coordinate to paint to + * @param square the square to paint */ protected abstract void paintSquare(@NotNull final Graphics2D grfx, final int x, final int y, @NotNull final MapSquare<G, A, R> square); @@ -411,9 +482,9 @@ } /** - * Get smallest Rectangle on map that needs to be repaint. - * @param visRec visible Rectangle - * @return rectangle on the map. + * Returns smallest {@link Rectangle} on the map that needs to be repaint. + * @param visRec the visible rectangle + * @return the rectangle to repaint */ private Rectangle getRepaintRec(@NotNull final Rectangle visRec) { // This Rectangle will be returned @@ -441,10 +512,10 @@ protected abstract boolean isGameObjectVisible(@NotNull final G gameObject); /** - * Paints a single GameObject. - * @param grfx Graphics to paint to - * @param xstart x offset for painting - * @param ystart y offset for painting + * Paints a single {@link GameObject}. + * @param grfx the graphics to paint to + * @param xstart the x offset for painting + * @param ystart the y offset for painting * @param gameObject the game object to paint */ protected void paintGameObject(@NotNull final Graphics2D grfx, final int xstart, final int ystart, @NotNull final G gameObject) { @@ -491,10 +562,10 @@ } /** - * Paint the selection for the whole map. It's recommended to paint the + * Paints the selection for the whole map. It's recommended to paint the * complete selection after the map itself, otherwise map elements actually * might hide selections. - * @param grfx Graphics for painting + * @param grfx the graphics for painting */ private void paintMapSelection(@NotNull final Graphics grfx) { for (int y = 0; y < mapSize.getHeight(); y++) { @@ -516,10 +587,10 @@ } /** - * Paint the grid of the whole map. The grid is not painted if it is + * Paints the grid of the whole map. The grid is not painted if it is * disabled. It's recommended to paint the complete grid after the map * itself, otherwise map elements actually might hide parts of the grid. - * @param grfx Graphics for painting + * @param grfx the graphics for painting */ private void paintMapGrid(@NotNull final Graphics grfx) { if (mapViewSettings.isGridVisible()) { @@ -543,7 +614,9 @@ } } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Nullable @Override public Point getSquareLocationAt(@NotNull final Point point, @Nullable final Point retPoint) { @@ -564,13 +637,17 @@ return new Point(xm, ym); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public void setErroneousArchObjects(@NotNull final Map<G, ValidationError<G, A, R>> erroneousArchObjects) { //XXX: save erroneousArchObjects } - /** Refreshes the data in the view from the model. */ + /** + * Refreshes the data in the view from the model. + */ private void resizeFromModel() { // define how much drawing space we need for the map final int sum = mapSize.getWidth() + mapSize.getHeight(); Modified: trunk/src/app/net/sf/gridarta/model/archetype/AbstractArchetype.java =================================================================== --- trunk/src/app/net/sf/gridarta/model/archetype/AbstractArchetype.java 2010-05-07 19:24:03 UTC (rev 7696) +++ trunk/src/app/net/sf/gridarta/model/archetype/AbstractArchetype.java 2010-05-07 21:30:03 UTC (rev 7697) @@ -30,16 +30,26 @@ import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; +/** + * Abstract base class for {@link Archetype} implementations. + * @author Andreas Kirschbaum + */ public abstract class AbstractArchetype<G extends GameObject<G, A, R>, A extends MapArchObject<A>, R extends Archetype<G, A, R>> extends AbstractBaseObject<G, A, R, R> implements Archetype<G, A, R> { /** - * The name of the Archetype associated with this GameObject or the - * Archetypes name itself if this GameObject is an Archetype. + * The name of this archetype. * @serial */ @NotNull private String archetypeName; + /** + * Creates a new instance. + * @param archetypeName the name of the archetype + * @param faceObjectProviders the face object providers for looking up + * faces + * @param animationObjects the animation objects for looking up animations + */ protected AbstractArchetype(@NotNull final String archetypeName, @NotNull final FaceObjectProviders faceObjectProviders, @NotNull final AnimationObjects animationObjects) { super(faceObjectProviders, animationObjects); this.archetypeName = archetypeName.intern(); Modified: trunk/src/app/net/sf/gridarta/model/archetype/AbstractArchetypeParser.java =================================================================== --- trunk/src/app/net/sf/gridarta/model/archetype/AbstractArchetypeParser.java 2010-05-07 19:24:03 UTC (rev 7696) +++ trunk/src/app/net/sf/gridarta/model/archetype/AbstractArchetypeParser.java 2010-05-07 21:30:03 UTC (rev 7697) @@ -249,16 +249,55 @@ } } + /** + * Called whan a new archetype starts. + */ protected abstract void initParseArchetype(); + /** + * Returns whether a give input line denotes the start of a new archetype. + * @param line the input line + * @return whether the line is a start line + */ protected abstract boolean isStartLine(@NotNull final String line); + /** + * Called for each processed line. + * @param in the reader reading the archetype definition + * @param line the input line + * @param line2 the tripped input line + * @param archetypeBuilder the archetype builder for the current archetype + * @param errorViewCollector the error view collector for reporting errors + * @param invObjects the inventory objects of the current archetype + * @return whether the line has been consumed + * @throws IOException if an I/O error occurs + */ protected abstract boolean processLine(@NotNull final BufferedReader in, @NotNull final String line, @NotNull final String line2, @NotNull final B archetypeBuilder, @NotNull final ErrorViewCollector errorViewCollector, @NotNull final List<G> invObjects) throws IOException; + /** + * Called after the "end" line of a tail part has been read. + * @param firstArch the head part + * @param archetype the tail part + * @param errorViewCollector the error view collector for reporting errors + */ protected abstract void finishParseArchetypePart(@NotNull final R firstArch, @NotNull final R archetype, @NotNull final ErrorViewCollector errorViewCollector); + /** + * Called after the "end" line. For tail parts {@link + * #finishParseArchetypePart(Archetype, Archetype, ErrorViewCollector)} is + * called first. + * @param archetype the archetype + * @param archmore whether another part follows + */ protected abstract void finishParseArchetype(@NotNull final R archetype, final boolean archmore); + /** + * Returns whether an archetype should be added to the archetype chooser. + * @param isInternPath whether the archetype's path contains "/intern/" + * @param editorFolder the editor_folder attribute + * @param archetype the archetype to add + * @return whether the archetype should be added + */ protected abstract boolean addToPanel(final boolean isInternPath, @Nullable final String editorFolder, @NotNull final R archetype); } // class AbstractArchetypeParser Modified: trunk/src/app/net/sf/gridarta/model/archetype/AbstractArchetypeSet.java =================================================================== --- trunk/src/app/net/sf/gridarta/model/archetype/AbstractArchetypeSet.java 2010-05-07 19:24:03 UTC (rev 7696) +++ trunk/src/app/net/sf/gridarta/model/archetype/AbstractArchetypeSet.java 2010-05-07 21:30:03 UTC (rev 7697) @@ -188,6 +188,9 @@ listenerList.remove(listener); } + /** + * Notifies all listeners that {@link #isLoadedFromArchive()} has changed. + */ private void fireLoadedFromArchiveChangedEvent() { for (final ArchetypeSetListener<G, A, R> listener : listenerList.getListeners()) { listener.loadedFromArchiveChanged(); @@ -259,6 +262,12 @@ } } + /** + * Processes the special archetype {@link ArchetypeParser#STARTARCH_NAME}. + * @param arch the archetype + * @param out the writer collecting into + * @throws IOException if an I/O error occurs + */ private static void collectStartArch(@NotNull final BaseObject<?, ?, ?, ?> arch, @NotNull final Writer out) throws IOException { out.append("Object ").append(arch.getArchetypeName()).append('\n'); @@ -275,6 +284,13 @@ out.append("end\n"); } + /** + * Collects an {@link Archetype}: writes its definition into a writer. + * @param arch the archetype + * @param out the writer + * @return the number of archetype parts written + * @throws IOException if an I/O error occurs + */ protected abstract int collectArch(@NotNull final R arch, @NotNull final Writer out) throws IOException; } // class AbstractArchetypeSet Modified: trunk/src/app/net/sf/gridarta/model/baseobject/AbstractBaseObject.java =================================================================== --- trunk/src/app/net/sf/gridarta/model/baseobject/AbstractBaseObject.java 2010-05-07 19:24:03 UTC (rev 7696) +++ trunk/src/app/net/sf/gridarta/model/baseobject/AbstractBaseObject.java 2010-05-07 21:30:03 UTC (rev 7697) @@ -1086,7 +1086,10 @@ this.multi = multi; } - // face name + /** + * Sets the effective face name. + * @param faceObjName the face name + */ private void setFaceObjName(@Nullable final String faceObjName) { final String newFaceObjName = faceObjName != null ? faceObjName.intern() : null; // Using == on these Strings is okay, they are both interned. Modified: trunk/src/app/net/sf/gridarta/model/gameobject/AbstractGameObject.java =================================================================== --- trunk/src/app/net/sf/gridarta/model/gameobject/AbstractGameObject.java 2010-05-07 19:24:03 UTC (rev 7696) +++ trunk/src/app/net/sf/gridarta/model/gameobject/AbstractGameObject.java 2010-05-07 21:30:03 UTC (rev 7697) @@ -30,38 +30,50 @@ import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; +/** + * Abstract base class of {@link GameObject} implementations. + * @author <a href="mailto:ch...@ri...">Christian Hujer</a> + * @author Andreas Kirschbaum + */ public abstract class AbstractGameObject<G extends GameObject<G, A, R>, A extends MapArchObject<A>, R extends Archetype<G, A, R>> extends AbstractBaseObject<G, A, R, G> implements GameObject<G, A, R> { /** - * The name of the Archetype associated with this GameObject or the - * Archetypes name itself if this GameObject is an Archetype. + * The name of the {@link Archetype} associated with this game object. * @serial */ @NotNull private String archetypeName; /** - * The {@link Archetype} of this game object. Set to <code>null</code> for - * archetypes. + * The {@link Archetype} of this game object. Set to <code>null</code> if + * not yet known. * @serial */ @Nullable private R archetype; /** - * Container of this GameObject. There are two possibilities for the - * container: + * Container of this {@link GameObject}. There are two possibilities for + * the container: * <ul> - * <li>Another GameObject, which means this object is in the inventory of - * that GameObject.</li> - * <li>A MapSquare, which means that this GameObject is top level on that - * MapSquare.</li> + * <li>Another game object, which means this object is in the inventory of + * that game object.</li> + * <li>A {@link MapSquare}, which means that this game object is top level + * on that map square.</li> * </ul> * @serial */ @Nullable private GameObjectContainer<G, A, R> container = null; + /** + * Creates a new instance. + * @param archetypeName the name of the archetype associated with this game + * object + * @param faceObjectProviders the face object providers for looking up + * faces + * @param animationObjects the animation objects for looking up animations + */ protected AbstractGameObject(@NotNull final String archetypeName, @NotNull final FaceObjectProviders faceObjectProviders, @NotNull final AnimationObjects animationObjects) { super(faceObjectProviders, animationObjects); this.archetypeName = archetypeName.intern(); @@ -69,6 +81,13 @@ updateArchetype(); } + /** + * Creates a new instance. + * @param archetype the archetype associated with with game object + * @param faceObjectProviders the face object providers for looking up + * faces + * @param animationObjects the animation objects for looking up animations + */ protected AbstractGameObject(@NotNull final R archetype, @NotNull final FaceObjectProviders faceObjectProviders, @NotNull final AnimationObjects animationObjects) { super(faceObjectProviders, animationObjects); archetypeName = archetype.getArchetypeName(); Modified: trunk/src/app/net/sf/gridarta/model/map/maparchobject/AbstractMapArchObject.java =================================================================== --- trunk/src/app/net/sf/gridarta/model/map/maparchobject/AbstractMapArchObject.java 2010-05-07 19:24:03 UTC (rev 7696) +++ trunk/src/app/net/sf/gridarta/model/map/maparchobject/AbstractMapArchObject.java 2010-05-07 21:30:03 UTC (rev 7697) @@ -44,45 +44,69 @@ */ private static final long serialVersionUID = 1; - /** Name of an unnamed map. */ + /** + * The name of an unnamed map. + */ @NotNull public static final String MAP_NAME_UNNAMED = "<unnamed>"; + /** + * The prefix for the map attribute that is updated with the last + * modification timestamp. + */ private static final String MODIFIED_ATTRIBUTE = "Modified:"; - /** The pattern to find the "Modified:" attribute in the message text. */ + /** + * The pattern to find the {@link #MODIFIED_ATTRIBUTE} in the message text. + */ private static final Pattern MODIFIED_ATTRIBUTE_PATTERN = Pattern.compile("^" + MODIFIED_ATTRIBUTE + " *(.*)$", Pattern.MULTILINE); - /** The map text. */ + /** + * The map text. + */ private StringBuilder msgText = new StringBuilder(); - /** The size of the map reflected by this MapArchObject. */ + /** + * The size of the map reflected by this map arch object. + */ @NotNull private Size2D mapSize = Size2D.ONE; - /** The name of this map. */ + /** + * The name of this map. + */ @NotNull private String mapName = MAP_NAME_UNNAMED; - /** The x coordinate for entering the map. */ + /** + * The x coordinate for entering the map. + */ private int enterX; - /** The y coordinate for entering the map. */ + /** + * The y coordinate for entering the map. + */ private int enterY; - /** If set, this is an outdoor map. */ + /** + * If set, this is an outdoor map. + */ private boolean outdoor = false; - /** Number of seconds that need to elapse before this map will be reset. */ + /** + * The number of ticks that need to elapse before this map will be reset. + */ private int resetTimeout; /** - * Number of ticks that must elapse after tha map has not been used before - * it gets swapped out. + * The number of ticks that must elapse after tha map has not been used + * before it gets swapped out. */ private int swapTime; - /** Map difficulty. If zero, server calculates something. */ + /** + * The map difficulty. If zero, server calculates something. + */ private int difficulty; /** @@ -91,16 +115,20 @@ */ private boolean fixedReset; - /** Light / darkness of map (overall). Zero means fully bright. */ + /** + * The light / darkness of map (overall). Zero means fully bright. + */ private int darkness; /** - * The map tile paths used for map tiling. 0 = north, 1 = east, 2 = south, 3 - * = west. 4 = northeast, 5 = southeast, 6 = southwest, 7 = northwest + * The map tile paths used for map tiling. 0 = north, 1 = east, 2 = south, + * 3 = west. 4 = northeast, 5 = southeast, 6 = southwest, 7 = northwest */ private String[] tilePaths = new String[8]; - /** The registered event listeners. */ + /** + * The registered event listeners. + */ private final EventListenerList2<MapArchObjectListener<A>> listenerList = new EventListenerList2<MapArchObjectListener<A>>(MapArchObjectListener.class); /** @@ -118,7 +146,9 @@ @Nullable private transient Thread transactionThread; - /** Set if any attribute has changed inside the current transaction. */ + /** + * Set if any attribute has changed inside the current transaction. + */ private boolean attributeHasChanged = false; /** @@ -128,14 +158,18 @@ Arrays.fill(tilePaths, ""); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @NotNull @Override public Size2D getMapSize() { return mapSize; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public void setMapSize(@NotNull final Size2D mapSize) { if (this.mapSize.equals(mapSize)) { @@ -146,14 +180,18 @@ setModified(); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @NotNull @Override public String getMapName() { return mapName; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public void setMapName(@NotNull final String name) { final String trimmedName = name.trim(); @@ -165,13 +203,17 @@ setModified(); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public int getEnterX() { return enterX; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public void setEnterX(final int enterX) { if (this.enterX == enterX) { @@ -182,13 +224,17 @@ setModified(); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public int getEnterY() { return enterY; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public void setEnterY(final int enterY) { if (this.enterY == enterY) { @@ -199,20 +245,26 @@ setModified(); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @NotNull @Override public Point getEnter() { return new Point(enterX, enterY); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public boolean isOutdoor() { return outdoor; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public void setOutdoor(final boolean outdoor) { if (this.outdoor == outdoor) { @@ -223,13 +275,17 @@ setModified(); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public int getResetTimeout() { return resetTimeout; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public void setResetTimeout(final int resetTimeout) { if (this.resetTimeout == resetTimeout) { @@ -240,13 +296,17 @@ setModified(); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public int getSwapTime() { return swapTime; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public void setSwapTime(final int swapTime) { if (this.swapTime == swapTime) { @@ -257,13 +317,17 @@ setModified(); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public int getDifficulty() { return difficulty; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public void setDifficulty(final int difficulty) { if (this.difficulty == difficulty) { @@ -274,13 +338,17 @@ setModified(); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public boolean isFixedReset() { return fixedReset; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public void setFixedReset(final boolean fixedReset) { if (this.fixedReset == fixedReset) { @@ -291,13 +359,17 @@ setModified(); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public int getDarkness() { return darkness; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public void setDarkness(final int darkness) { if (this.darkness == darkness) { @@ -308,20 +380,26 @@ setModified(); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public int getTilePaths() { return tilePaths.length; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @NotNull @Override public String getTilePath(final int direction) { return tilePaths[direction]; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public void setTilePath(final int direction, @NotNull final String tilePath) { if (tilePaths[direction].equals(tilePath)) { @@ -332,7 +410,9 @@ setModified(); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public void setState(@NotNull final A mapArchObject) { final AbstractMapArchObject<A> abstractMapArchObject = (AbstractMapArchObject<A>) mapArchObject; @@ -352,7 +432,9 @@ } } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public boolean equals(@Nullable final Object obj) { if (obj == this) { @@ -376,7 +458,9 @@ && Arrays.equals(mapArchObject.tilePaths, tilePaths); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public int hashCode() { return msgText.hashCode() @@ -393,28 +477,33 @@ + Arrays.hashCode(tilePaths); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public void addMapArchObjectListener(@NotNull final MapArchObjectListener<A> listener) { listenerList.add(listener); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public void removeMapArchObjectListener(@NotNull final MapArchObjectListener<A> listener) { listenerList.remove(listener); } /** - * Method to notify the map arch object that it has changed. The map arch - * object then notifies the registered listeners of the change at the end of - * the transaction. + * Marks this map arch object as changed. The map arch object then notifies + * the registered listeners of the change at the end of the transaction. */ protected void setModified() { attributeHasChanged = true; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public void beginTransaction() { if (transactionDepth == 0) { @@ -430,13 +519,17 @@ transactionDepth++; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public void endTransaction() { endTransaction(false); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public void endTransaction(final boolean fireEvent) { if (transactionDepth <= 0) { @@ -454,8 +547,8 @@ } /** - * Performs ending a transaction. Resets all transaction states and fires an - * event. + * Performs ending a transaction. Resets all transaction states and fires + * an event. */ private void commitTransaction() { transactionDepth = 0; @@ -466,14 +559,18 @@ } } - /** Fire a MapMetaChangedEvent. */ + /** + * Fires a MapMetaChangedEvent. + */ private void fireMetaChangedEvent() { for (final MapArchObjectListener<A> listener : listenerList.getListeners()) { listener.mapMetaChanged(); } } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public void addText(@NotNull final String text) { if (text.length() == 0) { @@ -484,7 +581,9 @@ setModified(); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public void setText(final String text) { if (msgText.toString().equals(text)) { @@ -496,14 +595,18 @@ setModified(); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @NotNull @Override public String getText() { return msgText.toString(); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public void updateModifiedAttribute(@NotNull final String username) { final String modifiedAttribute = MODIFIED_ATTRIBUTE + " " + String.format("%tF", System.currentTimeMillis()) + " " + username; @@ -521,7 +624,9 @@ } } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @NotNull @Override public A clone() { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2010-05-07 19:24:10
|
Revision: 7696 http://gridarta.svn.sourceforge.net/gridarta/?rev=7696&view=rev Author: akirschbaum Date: 2010-05-07 19:24:03 +0000 (Fri, 07 May 2010) Log Message: ----------- Add keyboard shortcut (CTRL-ALT-E) to activate the game object text editor. Modified Paths: -------------- trunk/atrinik/ChangeLog trunk/atrinik/src/app/net/sf/gridarta/var/atrinik/action.properties trunk/crossfire/ChangeLog trunk/crossfire/src/app/net/sf/gridarta/var/crossfire/action.properties trunk/daimonin/ChangeLog trunk/daimonin/src/app/net/sf/gridarta/var/daimonin/action.properties trunk/src/app/net/sf/gridarta/gui/gameobjectattributespanel/ArchTab.java trunk/src/app/net/sf/gridarta/gui/gameobjectattributespanel/EventsTab.java trunk/src/app/net/sf/gridarta/gui/gameobjectattributespanel/FaceTab.java trunk/src/app/net/sf/gridarta/gui/gameobjectattributespanel/GameObjectAttributesControl.java trunk/src/app/net/sf/gridarta/gui/gameobjectattributespanel/GameObjectAttributesTab.java trunk/src/app/net/sf/gridarta/gui/gameobjectattributespanel/MsgTextTab.java trunk/src/app/net/sf/gridarta/gui/gameobjectattributespanel/TextEditorTab.java trunk/src/app/net/sf/gridarta/gui/mainwindow/GameObjectTab.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 Modified: trunk/atrinik/ChangeLog =================================================================== --- trunk/atrinik/ChangeLog 2010-05-07 19:09:59 UTC (rev 7695) +++ trunk/atrinik/ChangeLog 2010-05-07 19:24:03 UTC (rev 7696) @@ -1,3 +1,8 @@ +2010-05-07 Andreas Kirschbaum + + * Add keyboard shortcut (CTRL-ALT-E) to activate the game object + text editor. + 2010-05-06 Andreas Kirschbaum * Change GUI of main window. Modified: trunk/atrinik/src/app/net/sf/gridarta/var/atrinik/action.properties =================================================================== --- trunk/atrinik/src/app/net/sf/gridarta/var/atrinik/action.properties 2010-05-07 19:09:59 UTC (rev 7695) +++ trunk/atrinik/src/app/net/sf/gridarta/var/atrinik/action.properties 2010-05-07 19:24:03 UTC (rev 7696) @@ -27,7 +27,7 @@ main.menubar=file edit map archetypes pickmaps resources tools analyze view plugins window help file.menu=createNew open recent close - save saveAs saveAll revert createImage - options - exit edit.menu=undo redo - clear cut copy paste - shift - replace fillAuto fillAbove fillBelow randFillAuto randFillAbove randFillBelow floodfill - selectAll -map.menu=autoJoin - enterExit nextExit prevExit enterNorthMap enterEastMap enterSouthMap enterWestMap enterNorthEastMap enterSouthEastMap enterSouthWestMap enterNorthWestMap - mapCreateView mapProperties shrinkMapSize deleteUnknownObjects +map.menu=autoJoin - enterExit nextExit prevExit enterNorthMap enterEastMap enterSouthMap enterWestMap enterNorthEastMap enterSouthEastMap enterSouthWestMap enterNorthWestMap - mapCreateView mapProperties shrinkMapSize deleteUnknownObjects - gameObjectTextEditor archetypes.menu=displayGameObjectNames displayArchetypeNames displayIconsOnly - findArchetypes #pickmaps.menu: See gridarta resources.menu=collectArches collectSpells - reloadFaces - viewTreasurelists Modified: trunk/crossfire/ChangeLog =================================================================== --- trunk/crossfire/ChangeLog 2010-05-07 19:09:59 UTC (rev 7695) +++ trunk/crossfire/ChangeLog 2010-05-07 19:24:03 UTC (rev 7696) @@ -1,3 +1,8 @@ +2010-05-07 Andreas Kirschbaum + + * Add keyboard shortcut (CTRL-ALT-E) to activate the game object + text editor. + 2010-05-06 Andreas Kirschbaum * Change GUI of main window. Modified: trunk/crossfire/src/app/net/sf/gridarta/var/crossfire/action.properties =================================================================== --- trunk/crossfire/src/app/net/sf/gridarta/var/crossfire/action.properties 2010-05-07 19:09:59 UTC (rev 7695) +++ trunk/crossfire/src/app/net/sf/gridarta/var/crossfire/action.properties 2010-05-07 19:24:03 UTC (rev 7696) @@ -27,7 +27,7 @@ main.menubar=file edit map archetypes pickmaps resources tools analyze view plugins window help file.menu=createNew open recent close - save saveAs saveAll revert createImage - options - exit edit.menu=undo redo - clear cut copy paste - shift - replace fillAuto fillAbove fillBelow randFillAuto randFillAbove randFillBelow floodfill - selectAll -map.menu=autoJoin - enterExit nextExit prevExit enterNorthMap enterEastMap enterSouthMap enterWestMap tileShow - mapCreateView mapProperties shrinkMapSize deleteUnknownObjects +map.menu=autoJoin - enterExit nextExit prevExit enterNorthMap enterEastMap enterSouthMap enterWestMap tileShow - mapCreateView mapProperties shrinkMapSize deleteUnknownObjects - gameObjectTextEditor archetypes.menu=displayGameObjectNames displayArchetypeNames displayIconsOnly - findArchetypes #pickmaps.menu: See gridarta resources.menu=collectArches - reloadFaces - viewTreasurelists Modified: trunk/daimonin/ChangeLog =================================================================== --- trunk/daimonin/ChangeLog 2010-05-07 19:09:59 UTC (rev 7695) +++ trunk/daimonin/ChangeLog 2010-05-07 19:24:03 UTC (rev 7696) @@ -1,3 +1,8 @@ +2010-05-07 Andreas Kirschbaum + + * Add keyboard shortcut (CTRL-ALT-E) to activate the game object + text editor. + 2010-05-06 Andreas Kirschbaum * Change GUI of main window. Modified: trunk/daimonin/src/app/net/sf/gridarta/var/daimonin/action.properties =================================================================== --- trunk/daimonin/src/app/net/sf/gridarta/var/daimonin/action.properties 2010-05-07 19:09:59 UTC (rev 7695) +++ trunk/daimonin/src/app/net/sf/gridarta/var/daimonin/action.properties 2010-05-07 19:24:03 UTC (rev 7696) @@ -27,7 +27,7 @@ main.menubar=file edit map archetypes pickmaps resources tools analyze view plugins window help file.menu=createNew open recent close - save saveAs saveAll revert createImage - options - exit edit.menu=undo redo - clear cut copy paste - shift - replace fillAuto fillAbove fillBelow randFillAuto randFillAbove randFillBelow floodfill - selectAll -map.menu=autoJoin - enterExit nextExit prevExit enterNorthMap enterEastMap enterSouthMap enterWestMap enterNorthEastMap enterSouthEastMap enterSouthWestMap enterNorthWestMap - mapCreateView mapProperties shrinkMapSize deleteUnknownObjects +map.menu=autoJoin - enterExit nextExit prevExit enterNorthMap enterEastMap enterSouthMap enterWestMap enterNorthEastMap enterSouthEastMap enterSouthWestMap enterNorthWestMap - mapCreateView mapProperties shrinkMapSize deleteUnknownObjects - gameObjectTextEditor archetypes.menu=displayGameObjectNames displayArchetypeNames displayIconsOnly - findArchetypes #pickmaps.menu: See gridarta resources.menu=collectArches collectSpells - reloadFaces - viewTreasurelists Modified: trunk/src/app/net/sf/gridarta/gui/gameobjectattributespanel/ArchTab.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/gameobjectattributespanel/ArchTab.java 2010-05-07 19:09:59 UTC (rev 7695) +++ trunk/src/app/net/sf/gridarta/gui/gameobjectattributespanel/ArchTab.java 2010-05-07 19:24:03 UTC (rev 7696) @@ -242,6 +242,12 @@ /** {@inheritDoc} */ @Override + public void requestFocus() { + archNameField.requestFocusInWindow(); + } + + /** {@inheritDoc} */ + @Override protected void apply(@NotNull final G gameObject) { gameObject.setAttributeString(Archetype.NAME, archNameField.getText()); } Modified: trunk/src/app/net/sf/gridarta/gui/gameobjectattributespanel/EventsTab.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/gameobjectattributespanel/EventsTab.java 2010-05-07 19:09:59 UTC (rev 7695) +++ trunk/src/app/net/sf/gridarta/gui/gameobjectattributespanel/EventsTab.java 2010-05-07 19:24:03 UTC (rev 7696) @@ -108,6 +108,12 @@ @NotNull private final JPanel panel = new JPanel(); + /** + * The {@link JScrollPane} displaying all event.s + */ + @NotNull + private final JScrollPane ssa; + private final Action aEventAddNew = ACTION_BUILDER.createAction(false, "eventAddNew", this); private final Action aEventEditData = ACTION_BUILDER.createAction(false, "eventEditData", this); @@ -144,7 +150,7 @@ this.scriptArchUtils = scriptArchUtils; // create ScrollPane for jlist scrolling - final JScrollPane ssa = new JScrollPane(eventList); + ssa = new JScrollPane(eventList); ssa.setBorder(new EtchedBorder()); ssa.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED); ssa.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER); @@ -187,6 +193,12 @@ /** {@inheritDoc} */ @Override + public void requestFocus() { + ssa.requestFocusInWindow(); + } + + /** {@inheritDoc} */ + @Override protected void refresh(@Nullable final G gameObject) { selectedGameObject = gameObject; if (gameObject == null || !gameObject.isScripted()) { Modified: trunk/src/app/net/sf/gridarta/gui/gameobjectattributespanel/FaceTab.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/gameobjectattributespanel/FaceTab.java 2010-05-07 19:09:59 UTC (rev 7695) +++ trunk/src/app/net/sf/gridarta/gui/gameobjectattributespanel/FaceTab.java 2010-05-07 19:24:03 UTC (rev 7696) @@ -309,6 +309,12 @@ /** {@inheritDoc} */ @Override + public void requestFocus() { + faceComponent.requestFocusInWindow(); + } + + /** {@inheritDoc} */ + @Override protected void apply(@NotNull final G gameObject) { final String faceName = normalizeFace(faceComponent.getFaceName()); @Nullable final String faceName2; Modified: trunk/src/app/net/sf/gridarta/gui/gameobjectattributespanel/GameObjectAttributesControl.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/gameobjectattributespanel/GameObjectAttributesControl.java 2010-05-07 19:09:59 UTC (rev 7695) +++ trunk/src/app/net/sf/gridarta/gui/gameobjectattributespanel/GameObjectAttributesControl.java 2010-05-07 19:24:03 UTC (rev 7696) @@ -451,6 +451,18 @@ } /** + * Selects a tab. The tab must exist. + * @param tab the tab + */ + public void selectTab(@NotNull final GameObjectAttributesTab<G, A, R> tab) { + if (!tabs.contains(tab)) { + throw new IllegalArgumentException(); + } + + panelDesktop.setSelectedComponent(tab.getPanel()); + } + + /** * Sets the tab color of a tab. * @param tab the tab * @param tabSeverity the tab severity Modified: trunk/src/app/net/sf/gridarta/gui/gameobjectattributespanel/GameObjectAttributesTab.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/gameobjectattributespanel/GameObjectAttributesTab.java 2010-05-07 19:09:59 UTC (rev 7695) +++ trunk/src/app/net/sf/gridarta/gui/gameobjectattributespanel/GameObjectAttributesTab.java 2010-05-07 19:24:03 UTC (rev 7696) @@ -79,4 +79,9 @@ @NotNull Severity getTabSeverity(); + /** + * Sets the focus to this component. + */ + void requestFocus(); + } // interface GameObjectAttributesTab Modified: trunk/src/app/net/sf/gridarta/gui/gameobjectattributespanel/MsgTextTab.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/gameobjectattributespanel/MsgTextTab.java 2010-05-07 19:09:59 UTC (rev 7695) +++ trunk/src/app/net/sf/gridarta/gui/gameobjectattributespanel/MsgTextTab.java 2010-05-07 19:24:03 UTC (rev 7696) @@ -128,6 +128,12 @@ /** {@inheritDoc} */ @Override + public void requestFocus() { + archTextArea.requestFocusInWindow(); + } + + /** {@inheritDoc} */ + @Override protected void apply(@NotNull final G gameObject) { gameObject.setMsgText(getMsgText(gameObject)); } Modified: trunk/src/app/net/sf/gridarta/gui/gameobjectattributespanel/TextEditorTab.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/gameobjectattributespanel/TextEditorTab.java 2010-05-07 19:09:59 UTC (rev 7695) +++ trunk/src/app/net/sf/gridarta/gui/gameobjectattributespanel/TextEditorTab.java 2010-05-07 19:24:03 UTC (rev 7696) @@ -78,6 +78,12 @@ /** {@inheritDoc} */ @Override + public void requestFocus() { + gameObjectTextEditor.getTextPane().requestFocusInWindow(); + } + + /** {@inheritDoc} */ + @Override protected void apply(@NotNull final G gameObject) { gameObjectTextEditor.applyChanges(gameObject); } Modified: trunk/src/app/net/sf/gridarta/gui/mainwindow/GameObjectTab.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/mainwindow/GameObjectTab.java 2010-05-07 19:09:59 UTC (rev 7695) +++ trunk/src/app/net/sf/gridarta/gui/mainwindow/GameObjectTab.java 2010-05-07 19:24:03 UTC (rev 7696) @@ -21,12 +21,14 @@ import net.sf.gridarta.gui.gameobjectattributespanel.GameObjectAttributesControl; import net.sf.gridarta.gui.gameobjectattributespanel.GameObjectAttributesControlListener; +import net.sf.gridarta.gui.gameobjectattributespanel.GameObjectAttributesTab; import net.sf.gridarta.gui.utils.Severity; 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.map.maparchobject.MapArchObject; +import net.sf.japi.swing.action.ActionMethod; import org.jetbrains.annotations.NotNull; /** @@ -36,6 +38,19 @@ public class GameObjectTab<G extends GameObject<G, A, R>, A extends MapArchObject<A>, R extends Archetype<G, A, R>> extends Tab { /** + * The {@link GameObjectAttributesControl} to display. + */ + @NotNull + private final GameObjectAttributesControl<G, A, R> gameObjectAttributesControl; + + /** + * The {@link GameObjectAttributesTab} that displays the game object text + * editor. + */ + @NotNull + private final GameObjectAttributesTab<G, A, R> textEditorTab; + + /** * Creates a new instance. * @param ident the tab's identication string * @param gameObjectAttributesControl the game object attributes control to @@ -43,9 +58,13 @@ * @param location the tab's location * @param index the tab's index for ordering * @param defaultOpen the tab's default opened status + * @param textEditorTab the game object attributes tab that displays the + * game object text editor */ - public GameObjectTab(@NotNull final String ident, @NotNull final GameObjectAttributesControl<G, A, R> gameObjectAttributesControl, @NotNull final Location location, final int index, final boolean defaultOpen) { + public GameObjectTab(@NotNull final String ident, @NotNull final GameObjectAttributesControl<G, A, R> gameObjectAttributesControl, @NotNull final Location location, final int index, final boolean defaultOpen, @NotNull final GameObjectAttributesTab<G, A, R> textEditorTab) { super(ident, gameObjectAttributesControl, location, index, defaultOpen); + this.gameObjectAttributesControl = gameObjectAttributesControl; + this.textEditorTab = textEditorTab; final GameObjectAttributesControlListener gameObjectAttributesControlListener = new GameObjectAttributesControlListener() { /** @@ -61,4 +80,14 @@ setSeverity(gameObjectAttributesControl.getSeverity()); } + /** + * Action method to open the game object text editor. + */ + @ActionMethod + public void gameObjectTextEditor() { + getButton().setSelected(true); + gameObjectAttributesControl.selectTab(textEditorTab); + textEditorTab.requestFocus(); + } + } // class WarningsTab Modified: trunk/src/app/net/sf/gridarta/maincontrol/GUIMainControl.java =================================================================== --- trunk/src/app/net/sf/gridarta/maincontrol/GUIMainControl.java 2010-05-07 19:09:59 UTC (rev 7695) +++ trunk/src/app/net/sf/gridarta/maincontrol/GUIMainControl.java 2010-05-07 19:24:03 UTC (rev 7696) @@ -55,6 +55,7 @@ import net.sf.gridarta.gui.gameobjectattributespanel.FaceTab; import net.sf.gridarta.gui.gameobjectattributespanel.GameObjectAttributesControl; import net.sf.gridarta.gui.gameobjectattributespanel.GameObjectAttributesModel; +import net.sf.gridarta.gui.gameobjectattributespanel.GameObjectAttributesTab; import net.sf.gridarta.gui.gameobjectattributespanel.MsgTextTab; import net.sf.gridarta.gui.gameobjectattributespanel.TextEditorTab; import net.sf.gridarta.gui.io.FileFilters; @@ -443,10 +444,15 @@ new UndoControl<G, A, R>(mapManager, gameObjectFactory, gameObjectMatchers); final UpdaterManager updaterManager = new UpdaterManager(exiter, mapManager, mainViewFrame, gridartaJarFilename); updaterManager.startup(); + + final GameObjectAttributesTab<G, A, R> textEditorTab = new TextEditorTab<G, A, R>(gameObjectAttributesModel); + final Tab gameObjectTab = new GameObjectTab<G, A, R>("gameObject", gameObjectAttributesControl, Location.BOTTOM, 0, true, textEditorTab); + ACTION_BUILDER.createAction(true, "gameObjectTextEditor", gameObjectTab); + final JMenuBar menuBar = ACTION_BUILDER.createMenuBar(true, "main"); final MainToolbar mainToolbar = new MainToolbar(globalSettings); mainView = new MainView(mainViewFrame, exitAction, statusBar, mapDesktop, icon, exiter, menuBar, mainToolbar.getComponent()); - mainView.addTab(new GameObjectTab<G, A, R>("gameObject", gameObjectAttributesControl, Location.BOTTOM, 0, true)); + mainView.addTab(gameObjectTab); mainView.addTab(new Tab("selectedSquare", selectedSquareView, Location.RIGHT, 1, true)); mainView.addTab(new Tab("tools", toolPalette, Location.LEFT, 2, false)); mainView.addTab(new Tab("objects", objectChooser, Location.LEFT, 3, true)); @@ -483,7 +489,7 @@ gameObjectAttributesControl.addTab(new MsgTextTab<G, A, R>(gameObjectAttributesModel)); gameObjectAttributesControl.addTab(new EventsTab<G, A, R>(mainViewFrame, mapManager, gameObjectAttributesModel, scriptArchEditor, scriptArchData, scriptArchDataUtils, scriptArchUtils)); gameObjectAttributesControl.addTab(new FaceTab<G, A, R>(gameObjectAttributesModel, faceObjects, faceObjectProviders, animationObjects, systemIcons)); - gameObjectAttributesControl.addTab(new TextEditorTab<G, A, R>(gameObjectAttributesModel)); + gameObjectAttributesControl.addTab(textEditorTab); mainView.addTab(new Tab("monsters", new MonsterControl<G, A, R>(mapViewManager, delayedMapModelListenerManager, monsterMatcher).getView(), Location.BOTTOM, 4, false)); 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)); Modified: trunk/src/app/net/sf/gridarta/messages.properties =================================================================== --- trunk/src/app/net/sf/gridarta/messages.properties 2010-05-07 19:09:59 UTC (rev 7695) +++ trunk/src/app/net/sf/gridarta/messages.properties 2010-05-07 19:24:03 UTC (rev 7696) @@ -175,7 +175,10 @@ deleteUnknownObjects.text=Delete unknown objects +gameObjectTextEditor.text=Open Game Object Text Editor +gameObjectTextEditor.accel=ctrl alt pressed E + # Plugins plugins.text=Plugins Modified: trunk/src/app/net/sf/gridarta/messages_de.properties =================================================================== --- trunk/src/app/net/sf/gridarta/messages_de.properties 2010-05-07 19:09:59 UTC (rev 7695) +++ trunk/src/app/net/sf/gridarta/messages_de.properties 2010-05-07 19:24:03 UTC (rev 7696) @@ -157,7 +157,9 @@ deleteUnknownObjects.text=Undefinierte Objekte l\xF6schen +gameObjectTextEditor.text=\xD6ffne Objekttext-Editor + # Plugins plugins.text=Plugins Modified: trunk/src/app/net/sf/gridarta/messages_fr.properties =================================================================== --- trunk/src/app/net/sf/gridarta/messages_fr.properties 2010-05-07 19:09:59 UTC (rev 7695) +++ trunk/src/app/net/sf/gridarta/messages_fr.properties 2010-05-07 19:24:03 UTC (rev 7696) @@ -152,7 +152,9 @@ #deleteUnknownObjects.text= +#gameObjectTextEditor.text= + # Plugins #plugins.text= Modified: trunk/src/app/net/sf/gridarta/messages_sv.properties =================================================================== --- trunk/src/app/net/sf/gridarta/messages_sv.properties 2010-05-07 19:09:59 UTC (rev 7695) +++ trunk/src/app/net/sf/gridarta/messages_sv.properties 2010-05-07 19:24:03 UTC (rev 7696) @@ -152,7 +152,9 @@ #deleteUnknownObjects.text= +#gameObjectTextEditor.text= + # Plugins #plugins.text= This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2010-05-07 19:10:05
|
Revision: 7695 http://gridarta.svn.sourceforge.net/gridarta/?rev=7695&view=rev Author: akirschbaum Date: 2010-05-07 19:09:59 +0000 (Fri, 07 May 2010) Log Message: ----------- Remove unused code. Modified Paths: -------------- trunk/src/app/net/sf/gridarta/gui/gameobjectattributespanel/FaceTab.java Modified: trunk/src/app/net/sf/gridarta/gui/gameobjectattributespanel/FaceTab.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/gameobjectattributespanel/FaceTab.java 2010-05-07 19:09:00 UTC (rev 7694) +++ trunk/src/app/net/sf/gridarta/gui/gameobjectattributespanel/FaceTab.java 2010-05-07 19:09:59 UTC (rev 7695) @@ -45,8 +45,6 @@ import net.sf.gridarta.model.map.mapmodel.MapModel; import net.sf.gridarta.model.map.mapmodel.MapSquare; import net.sf.gridarta.utils.SystemIcons; -import net.sf.japi.swing.action.ActionBuilder; -import net.sf.japi.swing.action.ActionBuilderFactory; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; @@ -58,12 +56,6 @@ public class FaceTab<G extends GameObject<G, A, R>, A extends MapArchObject<A>, R extends Archetype<G, A, R>> extends AbstractGameObjectAttributesTab<G, A, R> { /** - * The action builder. - */ - @NotNull - private static final ActionBuilder ACTION_BUILDER = ActionBuilderFactory.getInstance().getActionBuilder("net.sf.gridarta"); - - /** * The {@link FaceObjects} for looking up faces. */ @NotNull This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2010-05-07 19:09:06
|
Revision: 7694 http://gridarta.svn.sourceforge.net/gridarta/?rev=7694&view=rev Author: akirschbaum Date: 2010-05-07 19:09:00 +0000 (Fri, 07 May 2010) Log Message: ----------- Rename GameObjectAttributesTab.createPanel() to getPanel(); construct GUI in constructors. Modified Paths: -------------- trunk/src/app/net/sf/gridarta/gui/gameobjectattributespanel/ArchTab.java trunk/src/app/net/sf/gridarta/gui/gameobjectattributespanel/EventsTab.java trunk/src/app/net/sf/gridarta/gui/gameobjectattributespanel/FaceTab.java trunk/src/app/net/sf/gridarta/gui/gameobjectattributespanel/GameObjectAttributesControl.java trunk/src/app/net/sf/gridarta/gui/gameobjectattributespanel/GameObjectAttributesTab.java trunk/src/app/net/sf/gridarta/gui/gameobjectattributespanel/MsgTextTab.java trunk/src/app/net/sf/gridarta/gui/gameobjectattributespanel/TextEditorTab.java Modified: trunk/src/app/net/sf/gridarta/gui/gameobjectattributespanel/ArchTab.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/gameobjectattributespanel/ArchTab.java 2010-05-07 16:47:07 UTC (rev 7693) +++ trunk/src/app/net/sf/gridarta/gui/gameobjectattributespanel/ArchTab.java 2010-05-07 19:09:00 UTC (rev 7694) @@ -102,9 +102,10 @@ private final JToggleButton[] directionButtons = new JToggleButton[9]; /** - * The panel consisting of the direction buttons. + * The content panel. */ - private final Component dirPanel = createDirPanel(); + @NotNull + private final JPanel panel = new JPanel(); /** * The initial value of the {@link #archNameField}. @@ -121,22 +122,7 @@ super(gameObjectAttributesModel); this.archetypeTypeSet = archetypeTypeSet; this.gameObjectAttributesModel = gameObjectAttributesModel; - addAutoApply(archNameField); - refresh(gameObjectAttributesModel.getSelectedGameObject()); - } - /** {@inheritDoc} */ - @NotNull - @Override - public String getName() { - return "Arch"; - } - - /** {@inheritDoc} */ - @NotNull - @Override - public JPanel createPanel() { - final JPanel panel = new JPanel(); final GridBagLayout gridbag = new GridBagLayout(); final GridBagConstraints gbc = new GridBagConstraints(); @@ -184,8 +170,24 @@ gbc.gridwidth = 1; gbc.gridheight = 5; gbc.weightx = 0.0; + final Component dirPanel = createDirPanel(); panel.add(dirPanel, gbc); + addAutoApply(archNameField); + refresh(gameObjectAttributesModel.getSelectedGameObject()); + } + + /** {@inheritDoc} */ + @NotNull + @Override + public String getName() { + return "Arch"; + } + + /** {@inheritDoc} */ + @NotNull + @Override + public JPanel getPanel() { return panel; } @@ -194,23 +196,23 @@ * @return the panel */ private Component createDirPanel() { - final Container panel = new JPanel(new GridBagLayout()); + final Container dirPanel = new JPanel(new GridBagLayout()); final GridBagConstraints gbc = new GridBagConstraints(); gbc.fill = GridBagConstraints.BOTH; gbc.anchor = GridBagConstraints.CENTER; gbc.insets = new Insets(2, 2, 2, 2); - createButton(7, panel, gbc, 0, 0); - createButton(8, panel, gbc, 1, 0); - createButton(1, panel, gbc, 2, 0); - createButton(6, panel, gbc, 0, 1); - createButton(0, panel, gbc, 1, 1); - createButton(2, panel, gbc, 2, 1); - createButton(5, panel, gbc, 0, 2); - createButton(4, panel, gbc, 1, 2); - createButton(3, panel, gbc, 2, 2); + createButton(7, dirPanel, gbc, 0, 0); + createButton(8, dirPanel, gbc, 1, 0); + createButton(1, dirPanel, gbc, 2, 0); + createButton(6, dirPanel, gbc, 0, 1); + createButton(0, dirPanel, gbc, 1, 1); + createButton(2, dirPanel, gbc, 2, 1); + createButton(5, dirPanel, gbc, 0, 2); + createButton(4, dirPanel, gbc, 1, 2); + createButton(3, dirPanel, gbc, 2, 2); - return panel; + return dirPanel; } /** Modified: trunk/src/app/net/sf/gridarta/gui/gameobjectattributespanel/EventsTab.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/gameobjectattributespanel/EventsTab.java 2010-05-07 16:47:07 UTC (rev 7693) +++ trunk/src/app/net/sf/gridarta/gui/gameobjectattributespanel/EventsTab.java 2010-05-07 19:09:00 UTC (rev 7694) @@ -102,6 +102,12 @@ @NotNull private final ScriptArchDataUtils<G, A, R> scriptArchDataUtils; + /** + * The content panel. + */ + @NotNull + private final JPanel panel = new JPanel(); + private final Action aEventAddNew = ACTION_BUILDER.createAction(false, "eventAddNew", this); private final Action aEventEditData = ACTION_BUILDER.createAction(false, "eventEditData", this); @@ -136,20 +142,7 @@ this.scriptArchData = scriptArchData; this.scriptArchDataUtils = scriptArchDataUtils; this.scriptArchUtils = scriptArchUtils; - refresh(gameObjectAttributesModel.getSelectedGameObject()); - } - /** {@inheritDoc} */ - @NotNull - @Override - public String getName() { - return "Events"; - } - - /** {@inheritDoc} */ - @NotNull - @Override - public JPanel createPanel() { // create ScrollPane for jlist scrolling final JScrollPane ssa = new JScrollPane(eventList); ssa.setBorder(new EtchedBorder()); @@ -170,11 +163,25 @@ aEventEdit.setEnabled(false); aEventRemove.setEnabled(false); - final JPanel panel = new JPanel(); // new panel panel.setLayout(new BorderLayout()); panel.add(ssa, BorderLayout.CENTER); panel.add(grid, BorderLayout.EAST); panel.setPreferredSize(new Dimension(100, 40)); + + refresh(gameObjectAttributesModel.getSelectedGameObject()); + } + + /** {@inheritDoc} */ + @NotNull + @Override + public String getName() { + return "Events"; + } + + /** {@inheritDoc} */ + @NotNull + @Override + public JPanel getPanel() { return panel; } Modified: trunk/src/app/net/sf/gridarta/gui/gameobjectattributespanel/FaceTab.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/gameobjectattributespanel/FaceTab.java 2010-05-07 16:47:07 UTC (rev 7693) +++ trunk/src/app/net/sf/gridarta/gui/gameobjectattributespanel/FaceTab.java 2010-05-07 19:09:00 UTC (rev 7694) @@ -100,6 +100,12 @@ private final JTextComponent animSpeedTextField = new JTextField(); /** + * The content panel. + */ + @NotNull + private final JPanel panel = new JPanel(); + + /** * The {@link DirectionComponent} for selecting the game object's * direction. */ @@ -169,6 +175,41 @@ this.animationObjects = animationObjects; faceComponent = new FaceComponent("", faceObjects, faceObjectProviders, systemIcons); animComponent = new AnimComponent("", animationObjects, faceObjectProviders, systemIcons); + + final GridBagLayout gridbag = new GridBagLayout(); + final GridBagConstraints gbc = new GridBagConstraints(); + + panel.setLayout(gridbag); + gbc.fill = GridBagConstraints.BOTH; + gbc.weightx = 1.0; + gbc.weighty = 1.0; + gbc.anchor = GridBagConstraints.NORTHWEST; + + gbc.gridx = 0; + gbc.gridy = 0; + gbc.gridwidth = 1; + gbc.gridheight = 1; + final Component facePanel = createFacePanel(); + gridbag.setConstraints(facePanel, gbc); + panel.add(facePanel); + + gbc.gridx = 1; + gbc.gridy = 0; + gbc.gridwidth = 1; + gbc.gridheight = 1; + final Component animationPanel = createAnimationPanel(); + gridbag.setConstraints(animationPanel, gbc); + panel.add(animationPanel); + + gbc.gridx = 2; + gbc.gridy = 0; + gbc.weightx = 0.0; + gbc.gridwidth = 1; + gbc.gridheight = 1; + final Component directionPanel = createDirectionPanel(); + gridbag.setConstraints(directionPanel, gbc); + panel.add(directionPanel); + addAutoApply(faceComponent.getInputComponent()); addAutoApply(animComponent.getInputComponent()); addAutoApply(animatedCheckBox); @@ -331,42 +372,7 @@ /** {@inheritDoc} */ @NotNull @Override - public JPanel createPanel() { - final JPanel panel = new JPanel(); - final GridBagLayout gridbag = new GridBagLayout(); - final GridBagConstraints gbc = new GridBagConstraints(); - - panel.setLayout(gridbag); - gbc.fill = GridBagConstraints.BOTH; - gbc.weightx = 1.0; - gbc.weighty = 1.0; - gbc.anchor = GridBagConstraints.NORTHWEST; - - gbc.gridx = 0; - gbc.gridy = 0; - gbc.gridwidth = 1; - gbc.gridheight = 1; - final Component facePanel = createFacePanel(); - gridbag.setConstraints(facePanel, gbc); - panel.add(facePanel); - - gbc.gridx = 1; - gbc.gridy = 0; - gbc.gridwidth = 1; - gbc.gridheight = 1; - final Component animationPanel = createAnimationPanel(); - gridbag.setConstraints(animationPanel, gbc); - panel.add(animationPanel); - - gbc.gridx = 2; - gbc.gridy = 0; - gbc.weightx = 0.0; - gbc.gridwidth = 1; - gbc.gridheight = 1; - final Component directionPanel = createDirectionPanel(); - gridbag.setConstraints(directionPanel, gbc); - panel.add(directionPanel); - + public JPanel getPanel() { return panel; } Modified: trunk/src/app/net/sf/gridarta/gui/gameobjectattributespanel/GameObjectAttributesControl.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/gameobjectattributespanel/GameObjectAttributesControl.java 2010-05-07 16:47:07 UTC (rev 7693) +++ trunk/src/app/net/sf/gridarta/gui/gameobjectattributespanel/GameObjectAttributesControl.java 2010-05-07 19:09:00 UTC (rev 7694) @@ -437,7 +437,7 @@ public void addTab(@NotNull final GameObjectAttributesTab<G, A, R> tab) { tabIndex.put(tab, panelDesktop.getTabCount()); addTabInt(tab); - panelDesktop.add(tab.createPanel(), tab.getName()); + panelDesktop.add(tab.getPanel(), tab.getName()); setTabSeverity(tab, tab.getTabSeverity()); } Modified: trunk/src/app/net/sf/gridarta/gui/gameobjectattributespanel/GameObjectAttributesTab.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/gameobjectattributespanel/GameObjectAttributesTab.java 2010-05-07 16:47:07 UTC (rev 7693) +++ trunk/src/app/net/sf/gridarta/gui/gameobjectattributespanel/GameObjectAttributesTab.java 2010-05-07 19:09:00 UTC (rev 7694) @@ -44,7 +44,7 @@ * @return the contents panel */ @NotNull - JPanel createPanel(); + JPanel getPanel(); /** * Returns whether a selected game object exists and the current value Modified: trunk/src/app/net/sf/gridarta/gui/gameobjectattributespanel/MsgTextTab.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/gameobjectattributespanel/MsgTextTab.java 2010-05-07 16:47:07 UTC (rev 7693) +++ trunk/src/app/net/sf/gridarta/gui/gameobjectattributespanel/MsgTextTab.java 2010-05-07 19:09:00 UTC (rev 7694) @@ -48,6 +48,12 @@ private final JTextArea archTextArea = new JTextArea(4, 25); /** + * The content panel. + */ + @NotNull + private final JPanel textPanel = new JPanel(new GridLayout(1, 1)); + + /** * The initial value of the {@link #archTextArea}. */ @NotNull @@ -60,6 +66,16 @@ public MsgTextTab(@NotNull final GameObjectAttributesModel<G, A, R> gameObjectAttributesModel) { super(gameObjectAttributesModel); archTextArea.setLineWrap(true); + + // create ScrollPane for text scrolling + final JScrollPane sta = new JScrollPane(archTextArea); + sta.setBorder(new EtchedBorder()); + sta.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED); + sta.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER); + + //textPanel.setBorder(new EtchedBorder(EtchedBorder.LOWERED)); + textPanel.add(sta); + addAutoApply(archTextArea); refresh(gameObjectAttributesModel.getSelectedGameObject()); } @@ -74,17 +90,7 @@ /** {@inheritDoc} */ @NotNull @Override - public JPanel createPanel() { - final JPanel textPanel = new JPanel(new GridLayout(1, 1)); - - // create ScrollPane for text scrolling - final JScrollPane sta = new JScrollPane(archTextArea); - sta.setBorder(new EtchedBorder()); - sta.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED); - sta.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER); - - //textPanel.setBorder(new EtchedBorder(EtchedBorder.LOWERED)); - textPanel.add(sta); + public JPanel getPanel() { return textPanel; } Modified: trunk/src/app/net/sf/gridarta/gui/gameobjectattributespanel/TextEditorTab.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/gameobjectattributespanel/TextEditorTab.java 2010-05-07 16:47:07 UTC (rev 7693) +++ trunk/src/app/net/sf/gridarta/gui/gameobjectattributespanel/TextEditorTab.java 2010-05-07 19:09:00 UTC (rev 7694) @@ -59,7 +59,7 @@ /** {@inheritDoc} */ @NotNull @Override - public JPanel createPanel() { + public JPanel getPanel() { return gameObjectTextEditor; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2010-05-07 16:47:13
|
Revision: 7693 http://gridarta.svn.sourceforge.net/gridarta/?rev=7693&view=rev Author: akirschbaum Date: 2010-05-07 16:47:07 +0000 (Fri, 07 May 2010) Log Message: ----------- Update comments. Modified Paths: -------------- trunk/src/app/net/sf/gridarta/gui/gameobjecttexteditor/GameObjectTextEditor.java Modified: trunk/src/app/net/sf/gridarta/gui/gameobjecttexteditor/GameObjectTextEditor.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/gameobjecttexteditor/GameObjectTextEditor.java 2010-05-07 16:44:23 UTC (rev 7692) +++ trunk/src/app/net/sf/gridarta/gui/gameobjecttexteditor/GameObjectTextEditor.java 2010-05-07 16:47:07 UTC (rev 7693) @@ -44,9 +44,14 @@ */ public class GameObjectTextEditor extends JPanel { - /** Serial Version UID. */ + /** + * The serial version UID. + */ private static final long serialVersionUID = 1L; + /** + * The {@link JTextPane} that contains the attributes of the game object. + */ private final JTextPane archEdit = new ScrollingTextPane(); /** @@ -55,7 +60,9 @@ @NotNull private String defaultArchEditValue = ""; - /** Create a new instance. */ + /** + * Creates a new instance. + */ public GameObjectTextEditor() { super(new BorderLayout()); final JScrollPane scrollPane = new JScrollPane(); @@ -76,16 +83,18 @@ return !archEdit.getText().equals(defaultArchEditValue); } - // read from archEdit (bottom right textwin) only the attributes - // that differ from the default gameObject. These get stored into - // the arche's archText (and finally in the map). + /** + * Updates a {@link GameObject}'s attributes from the input field. + * @param gameObject the game object to update + */ public void applyChanges(@NotNull final GameObject<?, ?, ?> gameObject) { gameObject.setObjectText(AttributeListUtils.diffArchTextValues(gameObject.getArchetype(), archEdit.getText())); } /** - * Refresh the Game Object Attributes Editor contents. - * @param gameObject The game object to set the contents from. + * Refreshes the input field to show the attributes of a {@link + * GameObject}. + * @param gameObject the game object to set the contents from */ public void refreshDisplay(@Nullable final GameObject<?, ?, ?> gameObject) { archEdit.setEnabled(gameObject != null); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2010-05-07 16:44:30
|
Revision: 7692 http://gridarta.svn.sourceforge.net/gridarta/?rev=7692&view=rev Author: akirschbaum Date: 2010-05-07 16:44:23 +0000 (Fri, 07 May 2010) Log Message: ----------- Move code from TextEditorTab to GameObjectTextEditor. Modified Paths: -------------- trunk/src/app/net/sf/gridarta/gui/gameobjectattributespanel/TextEditorTab.java trunk/src/app/net/sf/gridarta/gui/gameobjecttexteditor/GameObjectTextEditor.java Modified: trunk/src/app/net/sf/gridarta/gui/gameobjectattributespanel/TextEditorTab.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/gameobjectattributespanel/TextEditorTab.java 2010-05-06 18:27:10 UTC (rev 7691) +++ trunk/src/app/net/sf/gridarta/gui/gameobjectattributespanel/TextEditorTab.java 2010-05-07 16:44:23 UTC (rev 7692) @@ -19,7 +19,6 @@ package net.sf.gridarta.gui.gameobjectattributespanel; -import java.awt.BorderLayout; import javax.swing.JPanel; import net.sf.gridarta.gui.gameobjecttexteditor.GameObjectTextEditor; import net.sf.gridarta.gui.utils.Severity; @@ -61,9 +60,7 @@ @NotNull @Override public JPanel createPanel() { - final JPanel panel = new JPanel(new BorderLayout()); - panel.add(gameObjectTextEditor, BorderLayout.CENTER); - return panel; + return gameObjectTextEditor; } /** {@inheritDoc} */ Modified: trunk/src/app/net/sf/gridarta/gui/gameobjecttexteditor/GameObjectTextEditor.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/gameobjecttexteditor/GameObjectTextEditor.java 2010-05-06 18:27:10 UTC (rev 7691) +++ trunk/src/app/net/sf/gridarta/gui/gameobjecttexteditor/GameObjectTextEditor.java 2010-05-07 16:44:23 UTC (rev 7692) @@ -19,11 +19,14 @@ package net.sf.gridarta.gui.gameobjecttexteditor; +import java.awt.BorderLayout; import java.awt.Color; import java.awt.Component; +import javax.swing.JPanel; import javax.swing.JScrollPane; import javax.swing.JTextPane; import javax.swing.JViewport; +import javax.swing.ScrollPaneConstants; import javax.swing.text.BadLocationException; import javax.swing.text.Document; import javax.swing.text.MutableAttributeSet; @@ -39,7 +42,7 @@ * currently selected game object as a text document. * @author Andreas Kirschbaum */ -public class GameObjectTextEditor extends JScrollPane { +public class GameObjectTextEditor extends JPanel { /** Serial Version UID. */ private static final long serialVersionUID = 1L; @@ -54,12 +57,15 @@ /** Create a new instance. */ public GameObjectTextEditor() { - setViewportView(archEdit); - setBackground(archEdit.getBackground()); - getViewport().add(archEdit); - setHorizontalScrollBarPolicy(HORIZONTAL_SCROLLBAR_AS_NEEDED); - setVerticalScrollBarPolicy(VERTICAL_SCROLLBAR_ALWAYS); - getViewport().setScrollMode(JViewport.SIMPLE_SCROLL_MODE); + super(new BorderLayout()); + final JScrollPane scrollPane = new JScrollPane(); + add(scrollPane, BorderLayout.CENTER); + scrollPane.setViewportView(archEdit); + scrollPane.setBackground(archEdit.getBackground()); + scrollPane.getViewport().add(archEdit); + scrollPane.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED); + scrollPane.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS); + scrollPane.getViewport().setScrollMode(JViewport.SIMPLE_SCROLL_MODE); } /** This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2010-05-05 10:43:38
|
Revision: 7681 http://gridarta.svn.sourceforge.net/gridarta/?rev=7681&view=rev Author: akirschbaum Date: 2010-05-05 10:43:30 +0000 (Wed, 05 May 2010) Log Message: ----------- Change location of game object attributes editor: it is now a tab in the game object attributes panel. 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/gameobjectattributespanel/TextEditorTab.java trunk/src/app/net/sf/gridarta/maincontrol/GUIMainControl.java Modified: trunk/atrinik/ChangeLog =================================================================== --- trunk/atrinik/ChangeLog 2010-05-05 10:13:26 UTC (rev 7680) +++ trunk/atrinik/ChangeLog 2010-05-05 10:43:30 UTC (rev 7681) @@ -1,3 +1,8 @@ +2010-05-05 Andreas Kirschbaum + + * Change location of game object attributes editor: it is now a + tab in the game object attributes panel. + 2010-04-29 Andreas Kirschbaum * Close game object attributes dialogs when the associated game Modified: trunk/crossfire/ChangeLog =================================================================== --- trunk/crossfire/ChangeLog 2010-05-05 10:13:26 UTC (rev 7680) +++ trunk/crossfire/ChangeLog 2010-05-05 10:43:30 UTC (rev 7681) @@ -1,3 +1,8 @@ +2010-05-05 Andreas Kirschbaum + + * Change location of game object attributes editor: it is now a + tab in the game object attributes panel. + 2010-04-29 Andreas Kirschbaum * Close game object attributes dialogs when the associated game Modified: trunk/daimonin/ChangeLog =================================================================== --- trunk/daimonin/ChangeLog 2010-05-05 10:13:26 UTC (rev 7680) +++ trunk/daimonin/ChangeLog 2010-05-05 10:43:30 UTC (rev 7681) @@ -1,3 +1,8 @@ +2010-05-05 Andreas Kirschbaum + + * Change location of game object attributes editor: it is now a + tab in the game object attributes panel. + 2010-04-29 Andreas Kirschbaum * Close game object attributes dialogs when the associated game Modified: trunk/src/app/net/sf/gridarta/gui/gameobjectattributespanel/GameObjectAttributesControl.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/gameobjectattributespanel/GameObjectAttributesControl.java 2010-05-05 10:13:26 UTC (rev 7680) +++ trunk/src/app/net/sf/gridarta/gui/gameobjectattributespanel/GameObjectAttributesControl.java 2010-05-05 10:43:30 UTC (rev 7681) @@ -24,8 +24,6 @@ import java.awt.Frame; import java.awt.GridLayout; import java.awt.Point; -import java.awt.Toolkit; -import java.awt.geom.Dimension2D; import java.io.File; import java.util.Collection; import java.util.HashSet; @@ -35,7 +33,6 @@ import javax.swing.Action; import javax.swing.JButton; import javax.swing.JPanel; -import javax.swing.JSplitPane; import javax.swing.JTabbedPane; import javax.swing.SwingConstants; import net.sf.gridarta.delayedmapmodel.DelayedMapModelListenerManager; @@ -50,7 +47,6 @@ import net.sf.gridarta.gui.selectedsquare.SelectedSquareModel; import net.sf.gridarta.gui.selectedsquare.SelectedSquareModelListener; import net.sf.gridarta.gui.selectedsquare.SelectedSquareView; -import net.sf.gridarta.gui.utils.GSplitPane; import net.sf.gridarta.mapmanager.MapManager; import net.sf.gridarta.mapmanager.MapManagerListener; import net.sf.gridarta.model.anim.AnimationObjects; @@ -73,8 +69,6 @@ import net.sf.gridarta.model.match.GameObjectMatchers; import net.sf.gridarta.model.scripts.ScriptArchData; import net.sf.gridarta.model.scripts.ScriptArchUtils; -import net.sf.gridarta.utils.Exiter; -import net.sf.gridarta.utils.ExiterListener; import net.sf.gridarta.utils.Pair; import net.sf.gridarta.utils.Size2D; import net.sf.gridarta.utils.SystemIcons; @@ -172,17 +166,6 @@ */ private boolean isInAutoApplyArchPanelChanges = false; - /** - * The preferences key for stroing the location of the {@link #splitPane}. - */ - private static final String MAPARCHPANEL_LOCATION_KEY = "MainWindowMapArchPanel.dividerLocation"; - - /** - * The split pane separating the game object attributes panel and the - * game object attributes editor. - */ - private final GSplitPane splitPane; - /** Action for "apply changes". */ private final Action aMapArchApply = ACTION_BUILDER.createAction(false, "mapArchApply", this); @@ -429,9 +412,8 @@ * @param gameObjectFactory the game object factory for creating new game * objects * @param gameObjectMatchers the game object matchers to use - * @param exiter the exiter instance */ - 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, @NotNull final Exiter exiter) { + 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) { super(new BorderLayout()); this.gameObjectAttributesModel = gameObjectAttributesModel; this.gameObjectAttributesDialogFactory = gameObjectAttributesDialogFactory; @@ -443,12 +425,9 @@ tabbedPane = new JTabbedPane(SwingConstants.LEFT); add(tabbedPane, BorderLayout.CENTER); - final JPanel mapArchPanel = new JPanel(); + final Container mapArchPanel = new JPanel(); mapArchPanel.setLayout(new BorderLayout()); - splitPane = new GSplitPane(JSplitPane.HORIZONTAL_SPLIT, mapArchPanel, gameObjectTextEditor, MAPARCHPANEL_LOCATION_KEY, getMapArchPanelLocation()); - splitPane.setContinuousLayout(true); - splitPane.setResizeWeight(1.0); - tabbedPane.add(splitPane, "Game Object"); + tabbedPane.add(mapArchPanel, "Game Object"); final Container buttonPanel = createButtonPanel(); buttonPanel.setLayout(new GridLayout(0, 1)); @@ -472,35 +451,6 @@ mapPanel.setLayout(new BorderLayout()); mapPanel.add(panelDesktop[MAP_PANEL], BorderLayout.CENTER); tabbedPane.add(mapPanel, "Map"); - - final ExiterListener exiterListener = new ExiterListener() { - - /** - * {@inheritDoc} - */ - @Override - public void preExitNotify() { - // ignore - } - - /** - * {@inheritDoc} - */ - @Override - public void appExitNotify() { - splitPane.saveLocation(); - } - - /** - * {@inheritDoc} - */ - @Override - public void waitExitNotify() { - // ignore - } - - }; - exiter.addExiterListener(exiterListener); } /** @@ -524,11 +474,11 @@ * @param errorListView the error list view */ public void createTabs(@NotNull final MapViewManager<G, A, R> mapViewManager, @NotNull final DelayedMapModelListenerManager<G, A, R> delayedMapModelListenerManager, @NotNull final FaceObjects faceObjects, @NotNull final AnimationObjects animationObjects, final LockedItemsControl<G, A, R> lockedItemsControl, @NotNull final GameObjectMatcher monsterMatcher, @NotNull final Frame parent, @NotNull final ScriptArchEditor<G, A, R> scriptArchEditor, @NotNull final ScriptArchData<G, A, R> scriptArchData, @NotNull final ScriptArchDataUtils<G, A, R> scriptArchDataUtils, @NotNull final ScriptArchUtils scriptArchUtils, @NotNull final ArchetypeTypeSet<G, A, R> archetypeTypeSet, @NotNull final MapManager<G, A, R> mapManager, @NotNull final FaceObjectProviders faceObjectProviders, @NotNull final SystemIcons systemIcons, @NotNull final ErrorListView<G, A, R> errorListView) { - addTabInt(new TextEditorTab<G, A, R>(gameObjectAttributesModel, gameObjectTextEditor)); addTab(new ArchTab<G, A, R>(archetypeTypeSet, gameObjectAttributesModel), 0); addTab(new MsgTextTab<G, A, R>(gameObjectAttributesModel), 0); addTab(new EventsTab<G, A, R>(parent, mapManager, gameObjectAttributesModel, scriptArchEditor, scriptArchData, scriptArchDataUtils, scriptArchUtils), 0); addTab(new FaceTab<G, A, R>(gameObjectAttributesModel, faceObjects, faceObjectProviders, animationObjects, systemIcons), 0); + addTab(new TextEditorTab<G, A, R>(gameObjectAttributesModel, gameObjectTextEditor), 0); addTab(new ConnectionsTab<G, A, R>(mapViewManager, delayedMapModelListenerManager, gameObjectAttributesModel), 1); addTab(new LockedItemsTab<G, A, R>(lockedItemsControl, gameObjectAttributesModel), 1); addTab(new MonstersTab<G, A, R>(mapViewManager, delayedMapModelListenerManager, monsterMatcher, gameObjectAttributesModel), 1); @@ -747,13 +697,4 @@ return buttonPanel; } - /** - * Calculates the default value for {@link #MAPARCHPANEL_LOCATION_KEY}. - * @return the default split pane location - */ - private static int getMapArchPanelLocation() { - final Dimension2D screen = Toolkit.getDefaultToolkit().getScreenSize(); - return (int) (0.49 * screen.getWidth()); - } - } // class GameObjectAttributesControl Modified: trunk/src/app/net/sf/gridarta/gui/gameobjectattributespanel/TextEditorTab.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/gameobjectattributespanel/TextEditorTab.java 2010-05-05 10:13:26 UTC (rev 7680) +++ trunk/src/app/net/sf/gridarta/gui/gameobjectattributespanel/TextEditorTab.java 2010-05-05 10:43:30 UTC (rev 7681) @@ -19,6 +19,7 @@ package net.sf.gridarta.gui.gameobjectattributespanel; +import java.awt.BorderLayout; import javax.swing.JPanel; import net.sf.gridarta.gui.gameobjecttexteditor.GameObjectTextEditor; import net.sf.gridarta.model.archetype.Archetype; @@ -61,8 +62,8 @@ @NotNull @Override public JPanel createPanel() { - final JPanel panel = new JPanel(); - panel.add(gameObjectTextEditor); + final JPanel panel = new JPanel(new BorderLayout()); + panel.add(gameObjectTextEditor, BorderLayout.CENTER); return panel; } @@ -70,6 +71,7 @@ @Override protected void refresh(@Nullable final G gameObject) { gameObjectTextEditor.refreshDisplay(gameObject); + setTabSeverity(gameObject == null || gameObject.getObjectText().isEmpty() ? Severity.DEFAULT : Severity.MODIFIED); } /** {@inheritDoc} */ Modified: trunk/src/app/net/sf/gridarta/maincontrol/GUIMainControl.java =================================================================== --- trunk/src/app/net/sf/gridarta/maincontrol/GUIMainControl.java 2010-05-05 10:13:26 UTC (rev 7680) +++ trunk/src/app/net/sf/gridarta/maincontrol/GUIMainControl.java 2010-05-05 10:43:30 UTC (rev 7681) @@ -424,7 +424,7 @@ final LockedItemsControl<G, A, R> lockedItemsControl = new LockedItemsControl<G, A, R>(mapViewManager, delayedMapModelListenerManager, lockedItemsTypeNumbers); final GameObjectAttributesModel<G, A, R> gameObjectAttributesModel = new GameObjectAttributesModel<G, A, R>(); final SelectedSquareView<G, A, R> selectedSquareView = selectedSquareControl.getSelectedSquareView(); - final GameObjectAttributesControl<G, A, R> gameObjectAttributesControl = new GameObjectAttributesControl<G, A, R>(gameObjectAttributesModel, gameObjectAttributesDialogFactory, objectChooser, mapManager, selectedSquareModel, selectedSquareView, gameObjectFactory, gameObjectMatchers, exiter); + final GameObjectAttributesControl<G, A, R> gameObjectAttributesControl = new GameObjectAttributesControl<G, A, R>(gameObjectAttributesModel, gameObjectAttributesDialogFactory, objectChooser, mapManager, selectedSquareModel, selectedSquareView, gameObjectFactory, gameObjectMatchers); final PluginParameterViewFactory<G, A, R> pluginParameterViewFactory = new PluginParameterViewFactory<G, A, R>(archetypeSet, gameObjectAttributesModel, objectChooser, defaultFilterList, 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. |
From: <aki...@us...> - 2010-05-05 10:13:33
|
Revision: 7680 http://gridarta.svn.sourceforge.net/gridarta/?rev=7680&view=rev Author: akirschbaum Date: 2010-05-05 10:13:26 +0000 (Wed, 05 May 2010) Log Message: ----------- Move code from WarningsTab to ErrorListView. Modified Paths: -------------- trunk/src/app/net/sf/gridarta/gui/gameobjectattributespanel/ErrorListView.java trunk/src/app/net/sf/gridarta/gui/gameobjectattributespanel/GameObjectAttributesControl.java trunk/src/app/net/sf/gridarta/gui/gameobjectattributespanel/WarningsTab.java trunk/src/app/net/sf/gridarta/maincontrol/GUIMainControl.java Added Paths: ----------- trunk/src/app/net/sf/gridarta/gui/gameobjectattributespanel/ErrorListViewListener.java Modified: trunk/src/app/net/sf/gridarta/gui/gameobjectattributespanel/ErrorListView.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/gameobjectattributespanel/ErrorListView.java 2010-05-05 06:37:59 UTC (rev 7679) +++ trunk/src/app/net/sf/gridarta/gui/gameobjectattributespanel/ErrorListView.java 2010-05-05 10:13:26 UTC (rev 7680) @@ -23,9 +23,11 @@ import java.awt.Point; import java.awt.event.MouseAdapter; import java.awt.event.MouseEvent; +import java.io.File; import java.util.ArrayList; import java.util.Iterator; import java.util.List; +import java.util.Set; import java.util.Vector; import javax.swing.DefaultListModel; import javax.swing.JEditorPane; @@ -36,14 +38,23 @@ import javax.swing.event.ListSelectionEvent; import javax.swing.event.ListSelectionListener; import net.sf.gridarta.gui.map.cursor.MapCursor; +import net.sf.gridarta.gui.map.mapview.MapView; +import net.sf.gridarta.gui.map.mapview.MapViewsManager; import net.sf.gridarta.gui.selectedsquare.SelectedSquareView; +import net.sf.gridarta.mapmanager.MapManager; +import net.sf.gridarta.mapmanager.MapManagerListener; import net.sf.gridarta.model.archetype.Archetype; import net.sf.gridarta.model.baseobject.BaseObject; import net.sf.gridarta.model.gameobject.GameObject; import net.sf.gridarta.model.map.maparchobject.MapArchObject; +import net.sf.gridarta.model.map.mapcontrol.MapControl; +import net.sf.gridarta.model.map.mapmodel.MapModel; +import net.sf.gridarta.model.map.mapmodel.MapModelListener; import net.sf.gridarta.model.map.mapmodel.MapSquare; import net.sf.gridarta.model.map.validation.ErrorCollector; import net.sf.gridarta.model.map.validation.errors.ValidationError; +import net.sf.gridarta.utils.EventListenerList2; +import net.sf.gridarta.utils.Size2D; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; @@ -68,6 +79,19 @@ */ private final JEditorPane errorMsg = new JEditorPane("text/html", ""); + /** + * The registered listeners to notify. + */ + @NotNull + private final EventListenerList2<ErrorListViewListener> listeners = new EventListenerList2<ErrorListViewListener>(ErrorListViewListener.class); + + /** + * Last known active map. This map has {@link #mapModelListener} attached. + * Set to <code>null</code> if no map is active. + */ + @Nullable + private MapModel<G, A, R> currentMapModel; + /** The currently displayed errors. */ @Nullable private Vector<ValidationError<G, A, R>> errors = null; @@ -77,6 +101,12 @@ private final SelectedSquareView<G, A, R> selectedSquareView; /** + * The {@link MapViewsManager}. + */ + @NotNull + private final MapViewsManager<G, A, R> mapViewsManager; + + /** * The {@link MapCursor} for displaying map errors. Set to * <code>null</code> if no map is active. */ @@ -98,12 +128,111 @@ }; /** + * The {@link MapManagerListener} for tracking the current map. + */ + @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 (currentMapModel != null) { + currentMapModel.removeMapModelListener(mapModelListener); + } + currentMapModel = mapControl == null ? null : mapControl.getMapModel(); + if (currentMapModel != null) { + currentMapModel.addMapModelListener(mapModelListener); + } + + setErrors(mapControl); + } + + /** {@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 {@link MapModelListener} which is attached to {@link + * #currentMapModel}. + */ + private final MapModelListener<G, A, R> mapModelListener = new MapModelListener<G, A, R>() { + + /** {@inheritDoc} */ + @Override + public void mapMetaChanged() { + // ignore + } + + /** {@inheritDoc} */ + @Override + public void mapSizeChanged(@NotNull final MapModel<G, A, R> mapModel, @NotNull final Size2D newSize) { + // ignore + } + + /** {@inheritDoc} */ + @Override + public void mapSquaresChanged(@NotNull final Set<MapSquare<G, A, R>> mapSquares) { + // ignore + } + + /** {@inheritDoc} */ + @Override + public void mapObjectsChanged(@NotNull final Set<G> gameObjects, @NotNull final Set<G> transientGameObjects) { + // ignore + } + + /** {@inheritDoc} */ + @Override + public void errorsChanged(@NotNull final ErrorCollector<G, A, R> errors) { + updateErrors(errors); + } + + /** {@inheritDoc} */ + @Override + public void mapFileChanged(@Nullable final File oldMapFile) { + // ignore + } + + /** {@inheritDoc} */ + @Override + public void modifiedChanged(@NotNull final MapModel<G, A, R> mapModel) { + // ignore + } + + /** {@inheritDoc} */ + @Override + public void mapClosed() { + // ignore + } + + }; + + /** * Create a ConnectionPanel. * @param selectedSquareView the selected square view to update + * @param mapViewsManager the map views manager + * @param mapManager the map manager to use */ - public ErrorListView(@NotNull final SelectedSquareView<G, A, R> selectedSquareView) { + public ErrorListView(@NotNull final SelectedSquareView<G, A, R> selectedSquareView, @NotNull final MapViewsManager<G, A, R> mapViewsManager, @NotNull final MapManager<G, A, R> mapManager) { setLayout(new BorderLayout()); this.selectedSquareView = selectedSquareView; + this.mapViewsManager = mapViewsManager; final JSplitPane splitPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, new JScrollPane(errorList), new JScrollPane(errorMsg)); splitPane.setOneTouchExpandable(true); add(splitPane, BorderLayout.CENTER); @@ -116,9 +245,32 @@ highlightEntries(errorList.getSelectedIndex()); } }); + final MapControl<G, A, R> mapControl = mapManager.getCurrentMap(); + currentMapModel = mapControl == null ? null : mapControl.getMapModel(); + if (currentMapModel != null) { + currentMapModel.addMapModelListener(mapModelListener); + } + mapManager.addMapManagerListener(mapManagerListener); + setErrors(mapControl); } /** + * Adds an {@link ErrorListViewListener} to be notified about changes. + * @param listener the error list view listener + */ + public void addErrorListViewListener(@NotNull final ErrorListViewListener listener) { + listeners.add(listener); + } + + /** + * Removes an {@link ErrorListViewListener} to be notified about changes. + * @param listener the error list view listener + */ + public void removeErrorListViewListener(@NotNull final ErrorListViewListener listener) { + listeners.remove(listener); + } + + /** * Set the error for a map. * @param mapCursor the map cursor or <code>null</code> * @param errors the errors @@ -135,6 +287,7 @@ mapCursor = null; errors = null; errorList.setModel(new DefaultListModel()); + fireErrorsUpdated(false); } /** @@ -148,6 +301,9 @@ } this.errors = new Vector<ValidationError<G, A, R>>(errorVector); errorList.setListData(this.errors); + + assert this.errors != null; + fireErrorsUpdated(!this.errors.isEmpty()); } /** @@ -199,4 +355,31 @@ } } + /** + * Notifies all listeners that the warnings may have changed. + * @param hasWarnings whether any warnings are shown + */ + private void fireErrorsUpdated(final boolean hasWarnings) { + for (final ErrorListViewListener listener : listeners.getListeners()) { + listener.warningsChanged(hasWarnings); + } + } + + /** + * Updates the displayed errors. + * @param mapControl the map control of which the errors have changed + */ + private void setErrors(@Nullable final MapControl<G, A, R> mapControl) { + if (mapControl != null) { + final MapView<G, A, R> mapView = mapViewsManager.getMapViewFrame(mapControl); + if (mapView != null) { + final ErrorCollector<G, A, R> errorCollector = mapControl.getMapModel().getErrors(); + setErrors(mapView.getMapViewBasic().getMapCursor(), errorCollector); + return; + } + } + + unsetErrors(); + } + } // class ErrorPanel Added: trunk/src/app/net/sf/gridarta/gui/gameobjectattributespanel/ErrorListViewListener.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/gameobjectattributespanel/ErrorListViewListener.java (rev 0) +++ trunk/src/app/net/sf/gridarta/gui/gameobjectattributespanel/ErrorListViewListener.java 2010-05-05 10:13:26 UTC (rev 7680) @@ -0,0 +1,36 @@ +/* + * 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.gameobjectattributespanel; + +import java.util.EventListener; + +/** + * Interface for listeners interested in {@link ErrorListView} related events. + * @author Andreas Kirschbaum + */ +public interface ErrorListViewListener extends EventListener { + + /** + * The displayed warnings may have changed. + * @param hasWarnings whether any warnings are shown + */ + void warningsChanged(boolean hasWarnings); + +} // interface ErrorListViewListener Property changes on: trunk/src/app/net/sf/gridarta/gui/gameobjectattributespanel/ErrorListViewListener.java ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:eol-style + LF Modified: trunk/src/app/net/sf/gridarta/gui/gameobjectattributespanel/GameObjectAttributesControl.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/gameobjectattributespanel/GameObjectAttributesControl.java 2010-05-05 06:37:59 UTC (rev 7679) +++ trunk/src/app/net/sf/gridarta/gui/gameobjectattributespanel/GameObjectAttributesControl.java 2010-05-05 10:13:26 UTC (rev 7680) @@ -43,7 +43,6 @@ import net.sf.gridarta.gui.gameobjectattributesdialog.GameObjectAttributesDialogFactory; import net.sf.gridarta.gui.gameobjecttexteditor.GameObjectTextEditor; import net.sf.gridarta.gui.map.mapview.MapViewManager; -import net.sf.gridarta.gui.map.mapview.MapViewsManager; import net.sf.gridarta.gui.objectchooser.ObjectChooser; import net.sf.gridarta.gui.scripts.ScriptArchDataUtils; import net.sf.gridarta.gui.scripts.ScriptArchEditor; @@ -513,7 +512,6 @@ * @param animationObjects the animation objects instance * @param lockedItemsControl the locked items control instance * @param monsterMatcher the monster matcher instance - * @param selectedSquareView the selected square view instance * @param parent the parent component for dialog windows * @param scriptArchEditor the script arch editor instance to use * @param scriptArchData the script arch data instance to use @@ -523,9 +521,9 @@ * @param mapManager the map manager instance * @param faceObjectProviders the face object providers to use * @param systemIcons the system icons for creating icons - * @param mapViewsManager the map views + * @param errorListView the error list view */ - public void createTabs(@NotNull final MapViewManager<G, A, R> mapViewManager, @NotNull final DelayedMapModelListenerManager<G, A, R> delayedMapModelListenerManager, @NotNull final FaceObjects faceObjects, @NotNull final AnimationObjects animationObjects, final LockedItemsControl<G, A, R> lockedItemsControl, @NotNull final GameObjectMatcher monsterMatcher, @NotNull final SelectedSquareView<G, A, R> selectedSquareView, @NotNull final Frame parent, @NotNull final ScriptArchEditor<G, A, R> scriptArchEditor, @NotNull final ScriptArchData<G, A, R> scriptArchData, @NotNull final ScriptArchDataUtils<G, A, R> scriptArchDataUtils, @NotNull final ScriptArchUtils scriptArchUtils, @NotNull final ArchetypeTypeSet<G, A, R> archetypeTypeSet, @NotNull final MapManager<G, A, R> mapManager, @NotNull final FaceObjectProviders faceObjectProviders, @NotNull final SystemIcons systemIcons, @NotNull final MapViewsManager<G, A, R> mapViewsManager) { + public void createTabs(@NotNull final MapViewManager<G, A, R> mapViewManager, @NotNull final DelayedMapModelListenerManager<G, A, R> delayedMapModelListenerManager, @NotNull final FaceObjects faceObjects, @NotNull final AnimationObjects animationObjects, final LockedItemsControl<G, A, R> lockedItemsControl, @NotNull final GameObjectMatcher monsterMatcher, @NotNull final Frame parent, @NotNull final ScriptArchEditor<G, A, R> scriptArchEditor, @NotNull final ScriptArchData<G, A, R> scriptArchData, @NotNull final ScriptArchDataUtils<G, A, R> scriptArchDataUtils, @NotNull final ScriptArchUtils scriptArchUtils, @NotNull final ArchetypeTypeSet<G, A, R> archetypeTypeSet, @NotNull final MapManager<G, A, R> mapManager, @NotNull final FaceObjectProviders faceObjectProviders, @NotNull final SystemIcons systemIcons, @NotNull final ErrorListView<G, A, R> errorListView) { addTabInt(new TextEditorTab<G, A, R>(gameObjectAttributesModel, gameObjectTextEditor)); addTab(new ArchTab<G, A, R>(archetypeTypeSet, gameObjectAttributesModel), 0); addTab(new MsgTextTab<G, A, R>(gameObjectAttributesModel), 0); @@ -534,7 +532,7 @@ addTab(new ConnectionsTab<G, A, R>(mapViewManager, delayedMapModelListenerManager, gameObjectAttributesModel), 1); addTab(new LockedItemsTab<G, A, R>(lockedItemsControl, gameObjectAttributesModel), 1); addTab(new MonstersTab<G, A, R>(mapViewManager, delayedMapModelListenerManager, monsterMatcher, gameObjectAttributesModel), 1); - addTab(new WarningsTab<G, A, R>(mapManager, selectedSquareView, gameObjectAttributesModel, mapViewsManager), 1); + addTab(new WarningsTab<G, A, R>(gameObjectAttributesModel, errorListView), 1); } /** Modified: trunk/src/app/net/sf/gridarta/gui/gameobjectattributespanel/WarningsTab.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/gameobjectattributespanel/WarningsTab.java 2010-05-05 06:37:59 UTC (rev 7679) +++ trunk/src/app/net/sf/gridarta/gui/gameobjectattributespanel/WarningsTab.java 2010-05-05 10:13:26 UTC (rev 7680) @@ -19,23 +19,10 @@ package net.sf.gridarta.gui.gameobjectattributespanel; -import java.io.File; -import java.util.Set; import javax.swing.JPanel; -import net.sf.gridarta.gui.map.mapview.MapView; -import net.sf.gridarta.gui.map.mapview.MapViewsManager; -import net.sf.gridarta.gui.selectedsquare.SelectedSquareView; -import net.sf.gridarta.mapmanager.MapManager; -import net.sf.gridarta.mapmanager.MapManagerListener; import net.sf.gridarta.model.archetype.Archetype; import net.sf.gridarta.model.gameobject.GameObject; import net.sf.gridarta.model.map.maparchobject.MapArchObject; -import net.sf.gridarta.model.map.mapcontrol.MapControl; -import net.sf.gridarta.model.map.mapmodel.MapModel; -import net.sf.gridarta.model.map.mapmodel.MapModelListener; -import net.sf.gridarta.model.map.mapmodel.MapSquare; -import net.sf.gridarta.model.map.validation.ErrorCollector; -import net.sf.gridarta.utils.Size2D; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; @@ -48,139 +35,32 @@ public class WarningsTab<G extends GameObject<G, A, R>, A extends MapArchObject<A>, R extends Archetype<G, A, R>> extends AbstractGameObjectAttributesTab<G, A, R> { /** - * The {@link MapViewsManager}. + * The error list view used to display the validation results. */ @NotNull - private final MapViewsManager<G, A, R> mapViewsManager; + private final JPanel errorListView; /** - * The {@link ErrorListView} used to display the validation results. - */ - @NotNull - private final ErrorListView<G, A, R> errorListView; - - /** - * Last known active map. This map has {@link #mapModelListener} attached. - * Set to <code>null</code> if no map is active. - */ - @Nullable - private MapModel<G, A, R> currentMapModel; - - /** - * The {@link MapManagerListener} for tracking the current map. - */ - 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 (currentMapModel != null) { - currentMapModel.removeMapModelListener(mapModelListener); - } - currentMapModel = mapControl == null ? null : mapControl.getMapModel(); - if (currentMapModel != null) { - currentMapModel.addMapModelListener(mapModelListener); - } - - setErrors(mapControl); - } - - /** {@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 {@link MapModelListener} which is attached to {@link - * #currentMapModel}. - */ - private final MapModelListener<G, A, R> mapModelListener = new MapModelListener<G, A, R>() { - - /** {@inheritDoc} */ - @Override - public void mapMetaChanged() { - // ignore - } - - /** {@inheritDoc} */ - @Override - public void mapSizeChanged(@NotNull final MapModel<G, A, R> mapModel, @NotNull final Size2D newSize) { - // ignore - } - - /** {@inheritDoc} */ - @Override - public void mapSquaresChanged(@NotNull final Set<MapSquare<G, A, R>> mapSquares) { - // ignore - } - - /** {@inheritDoc} */ - @Override - public void mapObjectsChanged(@NotNull final Set<G> gameObjects, @NotNull final Set<G> transientGameObjects) { - // ignore - } - - /** {@inheritDoc} */ - @Override - public void errorsChanged(@NotNull final ErrorCollector<G, A, R> errors) { - setTabSeverity(errors.getErrors().iterator().hasNext() ? Severity.ERROR : Severity.DEFAULT); - errorListView.updateErrors(errors); - } - - /** {@inheritDoc} */ - @Override - public void mapFileChanged(@Nullable final File oldMapFile) { - // ignore - } - - /** {@inheritDoc} */ - @Override - public void modifiedChanged(@NotNull final MapModel<G, A, R> mapModel) { - // ignore - } - - /** {@inheritDoc} */ - @Override - public void mapClosed() { - // ignore - } - - }; - - /** * Creates a new instance. - * @param mapManager the map manager to use - * @param selectedSquareView the selected square view to use * @param gameObjectAttributesModel the model to track - * @param mapViewsManager the map views + * @param errorListView the error list view to use */ - public WarningsTab(@NotNull final MapManager<G, A, R> mapManager, @NotNull final SelectedSquareView<G, A, R> selectedSquareView, @NotNull final GameObjectAttributesModel<G, A, R> gameObjectAttributesModel, @NotNull final MapViewsManager<G, A, R> mapViewsManager) { + public WarningsTab(@NotNull final GameObjectAttributesModel<G, A, R> gameObjectAttributesModel, @NotNull final ErrorListView<G, A, R> errorListView) { super(gameObjectAttributesModel); - this.mapViewsManager = mapViewsManager; - errorListView = new ErrorListView<G, A, R>(selectedSquareView); - final MapControl<G, A, R> mapControl = mapManager.getCurrentMap(); - currentMapModel = mapControl == null ? null : mapControl.getMapModel(); - if (currentMapModel != null) { - currentMapModel.addMapModelListener(mapModelListener); - } - setErrors(mapControl); - mapManager.addMapManagerListener(mapManagerListener); + this.errorListView = errorListView; refresh(gameObjectAttributesModel.getSelectedGameObject()); + final ErrorListViewListener errorListViewListener = new ErrorListViewListener() { + + /** + * {@inheritDoc} + */ + @Override + public void warningsChanged(final boolean hasWarnings) { + setTabSeverity(hasWarnings ? Severity.ERROR : Severity.DEFAULT); + } + + }; + errorListView.addErrorListViewListener(errorListViewListener); } /** {@inheritDoc} */ @@ -207,23 +87,4 @@ protected void apply(@NotNull final G gameObject) { } - /** - * Updates the displayed errors. - * @param mapControl the map control of which the errors have changed - */ - private void setErrors(@Nullable final MapControl<G, A, R> mapControl) { - if (mapControl != null) { - final MapView<G, A, R> mapView = mapViewsManager.getMapViewFrame(mapControl); - if (mapView != null) { - final ErrorCollector<G, A, R> errorCollector = mapControl.getMapModel().getErrors(); - setTabSeverity(errorCollector.getErrors().iterator().hasNext() ? Severity.ERROR : Severity.DEFAULT); - errorListView.setErrors(mapView.getMapViewBasic().getMapCursor(), errorCollector); - return; - } - } - - setTabSeverity(Severity.DEFAULT); - errorListView.unsetErrors(); - } - } // class WarningsTab Modified: trunk/src/app/net/sf/gridarta/maincontrol/GUIMainControl.java =================================================================== --- trunk/src/app/net/sf/gridarta/maincontrol/GUIMainControl.java 2010-05-05 06:37:59 UTC (rev 7679) +++ trunk/src/app/net/sf/gridarta/maincontrol/GUIMainControl.java 2010-05-05 10:13:26 UTC (rev 7680) @@ -48,6 +48,7 @@ import net.sf.gridarta.gui.filter.FilterControl; import net.sf.gridarta.gui.findarchetypes.FindArchetypesDialogManager; import net.sf.gridarta.gui.gameobjectattributesdialog.GameObjectAttributesDialogFactory; +import net.sf.gridarta.gui.gameobjectattributespanel.ErrorListView; import net.sf.gridarta.gui.gameobjectattributespanel.GameObjectAttributesControl; import net.sf.gridarta.gui.gameobjectattributespanel.GameObjectAttributesModel; import net.sf.gridarta.gui.io.FileFilters; @@ -464,7 +465,8 @@ } else { scriptControl.getView().setMenu(pluginsMenu); } - gameObjectAttributesControl.createTabs(mapViewManager, delayedMapModelListenerManager, faceObjects, animationObjects, lockedItemsControl, monsterMatcher, selectedSquareView, mainViewFrame, scriptArchEditor, scriptArchData, scriptArchDataUtils, scriptArchUtils, archetypeTypeSet, mapManager, faceObjectProviders, systemIcons, mapViewsManager); + final ErrorListView<G, A, R> errorListView = new ErrorListView<G, A, R>(selectedSquareView, mapViewsManager, mapManager); + gameObjectAttributesControl.createTabs(mapViewManager, delayedMapModelListenerManager, faceObjects, animationObjects, lockedItemsControl, monsterMatcher, mainViewFrame, scriptArchEditor, scriptArchData, scriptArchDataUtils, scriptArchUtils, archetypeTypeSet, mapManager, faceObjectProviders, systemIcons, errorListView); new ArchetypeValidator(animationObjects, faceObjects, errorView).validate(archetypeSet); new AnimationValidator(faceObjects, errorView).validate(animationObjects); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2010-05-05 06:38:06
|
Revision: 7679 http://gridarta.svn.sourceforge.net/gridarta/?rev=7679&view=rev Author: akirschbaum Date: 2010-05-05 06:37:59 +0000 (Wed, 05 May 2010) Log Message: ----------- Weaken types. Modified Paths: -------------- trunk/src/app/net/sf/gridarta/gui/gameobjectattributespanel/GameObjectAttributesControl.java trunk/src/app/net/sf/gridarta/maincontrol/GUIMainControl.java trunk/src/app/net/sf/gridarta/updater/Updater.java trunk/src/app/net/sf/gridarta/updater/UpdaterManager.java Modified: trunk/src/app/net/sf/gridarta/gui/gameobjectattributespanel/GameObjectAttributesControl.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/gameobjectattributespanel/GameObjectAttributesControl.java 2010-05-01 15:04:53 UTC (rev 7678) +++ trunk/src/app/net/sf/gridarta/gui/gameobjectattributespanel/GameObjectAttributesControl.java 2010-05-05 06:37:59 UTC (rev 7679) @@ -52,7 +52,6 @@ import net.sf.gridarta.gui.selectedsquare.SelectedSquareModelListener; import net.sf.gridarta.gui.selectedsquare.SelectedSquareView; import net.sf.gridarta.gui.utils.GSplitPane; -import net.sf.gridarta.mainactions.DefaultExiter; import net.sf.gridarta.mapmanager.MapManager; import net.sf.gridarta.mapmanager.MapManagerListener; import net.sf.gridarta.model.anim.AnimationObjects; @@ -75,6 +74,7 @@ import net.sf.gridarta.model.match.GameObjectMatchers; import net.sf.gridarta.model.scripts.ScriptArchData; import net.sf.gridarta.model.scripts.ScriptArchUtils; +import net.sf.gridarta.utils.Exiter; import net.sf.gridarta.utils.ExiterListener; import net.sf.gridarta.utils.Pair; import net.sf.gridarta.utils.Size2D; @@ -432,7 +432,7 @@ * @param gameObjectMatchers the game object matchers to use * @param exiter the exiter instance */ - 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, @NotNull final DefaultExiter exiter) { + 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, @NotNull final Exiter exiter) { super(new BorderLayout()); this.gameObjectAttributesModel = gameObjectAttributesModel; this.gameObjectAttributesDialogFactory = gameObjectAttributesDialogFactory; Modified: trunk/src/app/net/sf/gridarta/maincontrol/GUIMainControl.java =================================================================== --- trunk/src/app/net/sf/gridarta/maincontrol/GUIMainControl.java 2010-05-01 15:04:53 UTC (rev 7678) +++ trunk/src/app/net/sf/gridarta/maincontrol/GUIMainControl.java 2010-05-05 06:37:59 UTC (rev 7679) @@ -152,6 +152,7 @@ import net.sf.gridarta.textedit.scripteditor.ScriptEditControl; import net.sf.gridarta.textedit.textarea.TextAreaDefaults; import net.sf.gridarta.updater.UpdaterManager; +import net.sf.gridarta.utils.Exiter; import net.sf.gridarta.utils.ProcessRunner; import net.sf.gridarta.utils.SystemIcons; import net.sf.gridarta.validation.DelegatingMapValidator; @@ -289,10 +290,10 @@ private final ConfigSourceFactory configSourceFactory; /** - * The {@link DefaultExiter} for terminating the application. + * The {@link Exiter} for terminating the application. */ @NotNull - private final DefaultExiter exiter; + private final Exiter exiter; /** * Creates a new instance. @@ -750,7 +751,7 @@ @Deprecated @NotNull - public DefaultExiter getExiter() { + public Exiter getExiter() { return exiter; } Modified: trunk/src/app/net/sf/gridarta/updater/Updater.java =================================================================== --- trunk/src/app/net/sf/gridarta/updater/Updater.java 2010-05-01 15:04:53 UTC (rev 7678) +++ trunk/src/app/net/sf/gridarta/updater/Updater.java 2010-05-05 06:37:59 UTC (rev 7679) @@ -39,7 +39,7 @@ import javax.swing.ProgressMonitorInputStream; import net.sf.gridarta.MainControl; import net.sf.gridarta.gui.prefs.NetPrefs; -import net.sf.gridarta.mainactions.DefaultExiter; +import net.sf.gridarta.utils.Exiter; import net.sf.japi.swing.action.ActionBuilder; import net.sf.japi.swing.action.ActionBuilderFactory; import org.apache.log4j.Category; @@ -77,10 +77,10 @@ private final Component parentComponent; /** - * The {@link DefaultExiter} for terminating the application. + * The {@link Exiter} for terminating the application. */ @NotNull - private final DefaultExiter exiter; + private final Exiter exiter; /** The file to update. */ @NotNull @@ -95,7 +95,7 @@ * @param exiter the exiter for terminating the application * @param updateFileName the file to update */ - public Updater(@Nullable final Component parentComponent, @NotNull final DefaultExiter exiter, @NotNull final String updateFileName) { + public Updater(@Nullable final Component parentComponent, @NotNull final Exiter exiter, @NotNull final String updateFileName) { this.parentComponent = parentComponent; this.exiter = exiter; this.updateFileName = updateFileName; Modified: trunk/src/app/net/sf/gridarta/updater/UpdaterManager.java =================================================================== --- trunk/src/app/net/sf/gridarta/updater/UpdaterManager.java 2010-05-01 15:04:53 UTC (rev 7678) +++ trunk/src/app/net/sf/gridarta/updater/UpdaterManager.java 2010-05-05 06:37:59 UTC (rev 7679) @@ -23,8 +23,8 @@ import java.util.prefs.Preferences; import javax.swing.Action; import net.sf.gridarta.MainControl; -import net.sf.gridarta.mainactions.DefaultExiter; import net.sf.gridarta.mapmanager.MapManager; +import net.sf.gridarta.utils.Exiter; import net.sf.japi.swing.action.ActionBuilder; import net.sf.japi.swing.action.ActionBuilderFactory; import org.jetbrains.annotations.NotNull; @@ -62,10 +62,10 @@ }; /** - * The {@link DefaultExiter} for terminating the application. + * The {@link Exiter} for terminating the application. */ @NotNull - private final DefaultExiter exiter; + private final Exiter exiter; /** * The map manager to use. @@ -85,7 +85,7 @@ * @param parentComponent Component to show dialogs on * @param updateFileName the file to update */ - public UpdaterManager(@NotNull final DefaultExiter exiter, @NotNull final MapManager<?, ?, ?> mapManager, final Component parentComponent, final String updateFileName) { + public UpdaterManager(@NotNull final Exiter exiter, @NotNull final MapManager<?, ?, ?> mapManager, final Component parentComponent, final String updateFileName) { this.mapManager = mapManager; this.exiter = exiter; this.parentComponent = parentComponent; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2010-05-01 15:05:00
|
Revision: 7678 http://gridarta.svn.sourceforge.net/gridarta/?rev=7678&view=rev Author: akirschbaum Date: 2010-05-01 15:04:53 +0000 (Sat, 01 May 2010) Log Message: ----------- Mark loaded or reverted maps as unmodified. Modified Paths: -------------- trunk/atrinik/src/app/net/sf/gridarta/var/atrinik/model/mapcontrol/DefaultMapControlFactory.java trunk/crossfire/src/app/net/sf/gridarta/var/crossfire/model/mapcontrol/DefaultMapControlFactory.java trunk/daimonin/src/app/net/sf/gridarta/var/daimonin/model/mapcontrol/DefaultMapControlFactory.java trunk/src/app/net/sf/gridarta/mapmanager/AbstractMapManager.java trunk/src/test/net/sf/gridarta/model/map/mapcontrol/TestMapControlFactory.java Modified: trunk/atrinik/src/app/net/sf/gridarta/var/atrinik/model/mapcontrol/DefaultMapControlFactory.java =================================================================== --- trunk/atrinik/src/app/net/sf/gridarta/var/atrinik/model/mapcontrol/DefaultMapControlFactory.java 2010-05-01 13:17:17 UTC (rev 7677) +++ trunk/atrinik/src/app/net/sf/gridarta/var/atrinik/model/mapcontrol/DefaultMapControlFactory.java 2010-05-01 15:04:53 UTC (rev 7678) @@ -127,6 +127,7 @@ } finally { mapModel.endTransaction(); } + mapModel.resetModified(); } final MapControl<GameObject, MapArchObject, Archetype> mapControl = new DefaultMapControl<GameObject, MapArchObject, Archetype>(mapModel, false, mapWriter, globalSettings); mapControl.getMapModel().setMapFile(file); @@ -146,6 +147,7 @@ } finally { mapModel.endTransaction(); } + mapModel.resetModified(); } final MapControl<GameObject, MapArchObject, Archetype> mapControl = new DefaultMapControl<GameObject, MapArchObject, Archetype>(mapModel, true, mapWriter, globalSettings); mapControl.getMapModel().setMapFile(file); Modified: trunk/crossfire/src/app/net/sf/gridarta/var/crossfire/model/mapcontrol/DefaultMapControlFactory.java =================================================================== --- trunk/crossfire/src/app/net/sf/gridarta/var/crossfire/model/mapcontrol/DefaultMapControlFactory.java 2010-05-01 13:17:17 UTC (rev 7677) +++ trunk/crossfire/src/app/net/sf/gridarta/var/crossfire/model/mapcontrol/DefaultMapControlFactory.java 2010-05-01 15:04:53 UTC (rev 7678) @@ -127,6 +127,7 @@ } finally { mapModel.endTransaction(); } + mapModel.resetModified(); } final MapControl<GameObject, MapArchObject, Archetype> mapControl = new DefaultMapControl<GameObject, MapArchObject, Archetype>(mapModel, false, mapWriter, globalSettings); mapControl.getMapModel().setMapFile(file); @@ -145,6 +146,7 @@ } finally { mapModel.endTransaction(); } + mapModel.resetModified(); } final MapControl<GameObject, MapArchObject, Archetype> mapControl = new DefaultMapControl<GameObject, MapArchObject, Archetype>(mapModel, true, mapWriter, globalSettings); mapControl.getMapModel().setMapFile(file); Modified: trunk/daimonin/src/app/net/sf/gridarta/var/daimonin/model/mapcontrol/DefaultMapControlFactory.java =================================================================== --- trunk/daimonin/src/app/net/sf/gridarta/var/daimonin/model/mapcontrol/DefaultMapControlFactory.java 2010-05-01 13:17:17 UTC (rev 7677) +++ trunk/daimonin/src/app/net/sf/gridarta/var/daimonin/model/mapcontrol/DefaultMapControlFactory.java 2010-05-01 15:04:53 UTC (rev 7678) @@ -127,6 +127,7 @@ } finally { mapModel.endTransaction(); } + mapModel.resetModified(); } final MapControl<GameObject, MapArchObject, Archetype> mapControl = new DefaultMapControl<GameObject, MapArchObject, Archetype>(mapModel, false, mapWriter, globalSettings); mapControl.getMapModel().setMapFile(file); @@ -146,6 +147,7 @@ } finally { mapModel.endTransaction(); } + mapModel.resetModified(); } final MapControl<GameObject, MapArchObject, Archetype> mapControl = new DefaultMapControl<GameObject, MapArchObject, Archetype>(mapModel, true, mapWriter, globalSettings); mapControl.getMapModel().setMapFile(file); Modified: trunk/src/app/net/sf/gridarta/mapmanager/AbstractMapManager.java =================================================================== --- trunk/src/app/net/sf/gridarta/mapmanager/AbstractMapManager.java 2010-05-01 13:17:17 UTC (rev 7677) +++ trunk/src/app/net/sf/gridarta/mapmanager/AbstractMapManager.java 2010-05-01 15:04:53 UTC (rev 7678) @@ -350,6 +350,7 @@ } finally { mapModel.endTransaction(); } + mapModel.resetModified(); } /** {@inheritDoc} */ Modified: trunk/src/test/net/sf/gridarta/model/map/mapcontrol/TestMapControlFactory.java =================================================================== --- trunk/src/test/net/sf/gridarta/model/map/mapcontrol/TestMapControlFactory.java 2010-05-01 13:17:17 UTC (rev 7677) +++ trunk/src/test/net/sf/gridarta/model/map/mapcontrol/TestMapControlFactory.java 2010-05-01 15:04:53 UTC (rev 7678) @@ -117,6 +117,7 @@ } finally { mapModel.endTransaction(); } + mapModel.resetModified(); } final MapControl<TestGameObject, TestMapArchObject, TestArchetype> mapControl = new DefaultMapControl<TestGameObject, TestMapArchObject, TestArchetype>(mapModel, false, mapWriter, globalSettings); mapControl.getMapModel().setMapFile(file); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2010-05-01 13:17:23
|
Revision: 7677 http://gridarta.svn.sourceforge.net/gridarta/?rev=7677&view=rev Author: akirschbaum Date: 2010-05-01 13:17:17 +0000 (Sat, 01 May 2010) Log Message: ----------- Move RecentManager.Recent to top-level class. Modified Paths: -------------- trunk/src/app/net/sf/gridarta/gui/misc/RecentManager.java Added Paths: ----------- trunk/src/app/net/sf/gridarta/gui/misc/Recent.java Added: trunk/src/app/net/sf/gridarta/gui/misc/Recent.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/misc/Recent.java (rev 0) +++ trunk/src/app/net/sf/gridarta/gui/misc/Recent.java 2010-05-01 13:17:17 UTC (rev 7677) @@ -0,0 +1,231 @@ +/* + * 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.misc; + +import java.awt.event.ActionEvent; +import java.io.File; +import java.io.IOException; +import java.util.prefs.Preferences; +import javax.swing.AbstractAction; +import javax.swing.Icon; +import javax.swing.ImageIcon; +import javax.swing.KeyStroke; +import net.sf.gridarta.gui.map.mapview.MapViewsManager; +import net.sf.gridarta.gui.mapimagecache.MapImageCache; +import net.sf.gridarta.mapmanager.FileControl; +import net.sf.gridarta.model.archetype.Archetype; +import net.sf.gridarta.model.gameobject.GameObject; +import net.sf.gridarta.model.map.maparchobject.MapArchObject; +import net.sf.gridarta.model.settings.GlobalSettings; +import net.sf.japi.swing.action.ActionBuilder; +import net.sf.japi.swing.action.ActionBuilderFactory; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; + +/** + * An entry in a recent menu. It allows to re-open a recent map. + * @author Andreas Kirschbaum + */ +public class Recent<G extends GameObject<G, A, R>, A extends MapArchObject<A>, R extends Archetype<G, A, R>> extends AbstractAction { + + /** + * The serial version UID. + */ + private static final long serialVersionUID = 1; + + /** + * The {@link ActionBuilder}. + */ + private static final ActionBuilder ACTION_BUILDER = ActionBuilderFactory.getInstance().getActionBuilder("net.sf.gridarta"); + + /** + * The {@link Preferences}. + */ + private static final Preferences prefs = Preferences.userNodeForPackage(RecentManager.class); + + /** + * Title = map name. + */ + private final String title; + + /** + * The global settings instance. + */ + @NotNull + private final GlobalSettings globalSettings; + + /** + * The {@link MapViewsManager} instance. + */ + @NotNull + private final MapViewsManager<G, A, R> mapViewsManager; + + /** + * The map {@link MapImageCache} to use. + */ + @NotNull + private final MapImageCache<G, A, R> mapImageCache; + + /** + * The {@link FileControl}. + */ + @NotNull + private final FileControl<G, A, R> fileControl; + + /** + * The map file. + */ + @NotNull + private final File mapFile; + + /** + * Create a Recent. + * @param title title (map name) + * @param mapFile the map file + * @param globalSettings the global settings instance + * @param mapViewsManager the map views manager instance + * @param mapImageCache the map image cache instance + * @param fileControl the file control + */ + Recent(final String title, final File mapFile, @NotNull final GlobalSettings globalSettings, @NotNull final MapViewsManager<G, A, R> mapViewsManager, @NotNull final MapImageCache<G, A, R> mapImageCache, @NotNull final FileControl<G, A, R> fileControl) { + super(title); + this.mapFile = mapFile; + this.title = title; + this.globalSettings = globalSettings; + this.mapViewsManager = mapViewsManager; + this.mapImageCache = mapImageCache; + this.fileControl = fileControl; + putValue(SHORT_DESCRIPTION, ACTION_BUILDER.format("recentItem.shortdescriptionformat", title, getShortFileName())); + putValue(SMALL_ICON, getIcon()); + } + + /** + * Create a Recent from preferences. + * @param index index (starting with 1) + * @param globalSettings the global settings instance + * @param mapViewsManager the map views manager instance + * @param mapImageCache the map image cache instance + * @param fileControl the file control + */ + Recent(final int index, @NotNull final GlobalSettings globalSettings, @NotNull final MapViewsManager<G, A, R> mapViewsManager, @NotNull final MapImageCache<G, A, R> mapImageCache, @NotNull final FileControl<G, A, R> fileControl) { + this.globalSettings = globalSettings; + this.mapViewsManager = mapViewsManager; + this.mapImageCache = mapImageCache; + this.fileControl = fileControl; + title = prefs.get("recentTitle[" + Integer.toString(index - 1) + ']', null); + mapFile = new File(prefs.get("recentFilename[" + Integer.toString(index - 1) + ']', null)); + putValue(SHORT_DESCRIPTION, ACTION_BUILDER.format("recentItem.shortdescriptionformat", title, getShortFileName())); + putValue(SMALL_ICON, getIcon()); + setIndex(index); + } + + /** + * Get the short filename. + * @return short filename + */ + private String getShortFileName() { + try { + if (mapFile.getCanonicalPath().startsWith(globalSettings.getMapsDirectory().getCanonicalPath())) { + return mapFile.getCanonicalPath().substring(globalSettings.getMapsDirectory().getCanonicalPath().length()).replace('\\', '/'); + } else { + return mapFile.getCanonicalPath().replace('\\', '/'); + } + } catch (final IOException e) { + if (mapFile.getAbsolutePath().startsWith(globalSettings.getMapsDirectory().getAbsolutePath())) { + return mapFile.getAbsolutePath().substring(globalSettings.getMapsDirectory().getAbsolutePath().length()).replace('\\', '/'); + } else { + return mapFile.getAbsolutePath().replace('\\', '/'); + } + } + } + + /** + * Set the index used for title, key strokes and such. + * @param index index (starting with 1) + */ + public void setIndex(final int index) { + if (index <= 10) { + putValue(NAME, index + ": " + title); + putValue(MNEMONIC_KEY, KeyStroke.getKeyStroke(Integer.toString(index % 10)).getKeyCode()); + putValue(ACCELERATOR_KEY, KeyStroke.getKeyStroke("alt pressed " + index % 10)); + } else { + putValue(NAME, title); + putValue(MNEMONIC_KEY, null); + putValue(ACCELERATOR_KEY, null); + } + prefs.put("recentTitle[" + Integer.toString(index - 1) + ']', title); + prefs.put("recentFilename[" + Integer.toString(index - 1) + ']', mapFile.getPath()); + } + + /** + * {@inheritDoc} + */ + @Override + public void actionPerformed(final ActionEvent e) { + try { + mapViewsManager.openMapFileWithView(mapFile, null); + } catch (final IOException ex) { + fileControl.reportLoadError(mapFile, ex.getMessage()); + } + } + + /** + * Get the icon of this file. + * @return icon of this file + */ + @Nullable + private Icon getIcon() { + return new ImageIcon(mapImageCache.getOrCreateIcon(mapFile)); + } + + /** + * Returns the map file. + * @return the map file + */ + @NotNull + public File getMapFile() { + return mapFile; + } + + /** + * {@inheritDoc} + */ + @Override + public boolean equals(final Object obj) { + return obj != null && obj instanceof Recent && mapFile.equals(((Recent<?, ?, ?>) obj).mapFile); + } + + /** + * {@inheritDoc} + */ + @Override + public int hashCode() { + return mapFile.hashCode(); + } + + /** + * {@inheritDoc} + */ + @Override + protected Object clone() throws CloneNotSupportedException { + return super.clone(); + } + +} // class Recent Property changes on: trunk/src/app/net/sf/gridarta/gui/misc/Recent.java ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:eol-style + LF Modified: trunk/src/app/net/sf/gridarta/gui/misc/RecentManager.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/misc/RecentManager.java 2010-04-29 18:34:36 UTC (rev 7676) +++ trunk/src/app/net/sf/gridarta/gui/misc/RecentManager.java 2010-05-01 13:17:17 UTC (rev 7677) @@ -19,21 +19,15 @@ package net.sf.gridarta.gui.misc; -import java.awt.event.ActionEvent; import java.io.File; -import java.io.IOException; import java.util.IdentityHashMap; import java.util.LinkedList; import java.util.ListIterator; import java.util.Map; import java.util.Set; import java.util.prefs.Preferences; -import javax.swing.AbstractAction; import javax.swing.Action; -import javax.swing.Icon; -import javax.swing.ImageIcon; import javax.swing.JMenu; -import javax.swing.KeyStroke; import net.sf.gridarta.gui.map.mapview.MapViewsManager; import net.sf.gridarta.gui.mapimagecache.MapImageCache; import net.sf.gridarta.gui.utils.MenuUtils; @@ -52,8 +46,6 @@ import net.sf.gridarta.model.map.validation.ErrorCollector; import net.sf.gridarta.model.settings.GlobalSettings; import net.sf.gridarta.utils.Size2D; -import net.sf.japi.swing.action.ActionBuilder; -import net.sf.japi.swing.action.ActionBuilderFactory; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; @@ -63,9 +55,6 @@ */ public class RecentManager<G extends GameObject<G, A, R>, A extends MapArchObject<A>, R extends Archetype<G, A, R>> { - /** Action Builder. */ - private static final ActionBuilder ACTION_BUILDER = ActionBuilderFactory.getInstance().getActionBuilder("net.sf.gridarta"); - /** Preferences. */ private static final Preferences prefs = Preferences.userNodeForPackage(RecentManager.class); @@ -246,172 +235,6 @@ } } - /** Recent entry. */ - public static class Recent<G extends GameObject<G, A, R>, A extends MapArchObject<A>, R extends Archetype<G, A, R>> extends AbstractAction { - - /** The serial version UID. */ - private static final long serialVersionUID = 1; - - /** Title = map name. */ - private final String title; - - /** - * The global settings instance. - */ - @NotNull - private final GlobalSettings globalSettings; - - /** - * The {@link MapViewsManager} instance. - */ - @NotNull - private final MapViewsManager<G, A, R> mapViewsManager; - - /** - * The map {@link MapImageCache} to use. - */ - @NotNull - private final MapImageCache<G, A, R> mapImageCache; - - /** - * The {@link FileControl}. - */ - @NotNull - private final FileControl<G, A, R> fileControl; - - /** - * The map file. - */ - @NotNull - private final File mapFile; - - /** - * Create a Recent. - * @param title title (map name) - * @param mapFile the map file - * @param globalSettings the global settings instance - * @param mapViewsManager the map views manager instance - * @param mapImageCache the map image cache instance - * @param fileControl the file control - */ - Recent(final String title, final File mapFile, @NotNull final GlobalSettings globalSettings, @NotNull final MapViewsManager<G, A, R> mapViewsManager, @NotNull final MapImageCache<G, A, R> mapImageCache, @NotNull final FileControl<G, A, R> fileControl) { - super(title); - this.mapFile = mapFile; - this.title = title; - this.globalSettings = globalSettings; - this.mapViewsManager = mapViewsManager; - this.mapImageCache = mapImageCache; - this.fileControl = fileControl; - putValue(SHORT_DESCRIPTION, ACTION_BUILDER.format("recentItem.shortdescriptionformat", title, getShortFileName())); - putValue(SMALL_ICON, getIcon()); - } - - /** - * Create a Recent from preferences. - * @param index index (starting with 1) - * @param globalSettings the global settings instance - * @param mapViewsManager the map views manager instance - * @param mapImageCache the map image cache instance - * @param fileControl the file control - */ - Recent(final int index, @NotNull final GlobalSettings globalSettings, @NotNull final MapViewsManager<G, A, R> mapViewsManager, @NotNull final MapImageCache<G, A, R> mapImageCache, @NotNull final FileControl<G, A, R> fileControl) { - this.globalSettings = globalSettings; - this.mapViewsManager = mapViewsManager; - this.mapImageCache = mapImageCache; - this.fileControl = fileControl; - title = prefs.get("recentTitle[" + Integer.toString(index - 1) + ']', null); - mapFile = new File(prefs.get("recentFilename[" + Integer.toString(index - 1) + ']', null)); - putValue(SHORT_DESCRIPTION, ACTION_BUILDER.format("recentItem.shortdescriptionformat", title, getShortFileName())); - putValue(SMALL_ICON, getIcon()); - setIndex(index); - } - - /** - * Get the short filename. - * @return short filename - */ - private String getShortFileName() { - try { - if (mapFile.getCanonicalPath().startsWith(globalSettings.getMapsDirectory().getCanonicalPath())) { - return mapFile.getCanonicalPath().substring(globalSettings.getMapsDirectory().getCanonicalPath().length()).replace('\\', '/'); - } else { - return mapFile.getCanonicalPath().replace('\\', '/'); - } - } catch (final IOException e) { - if (mapFile.getAbsolutePath().startsWith(globalSettings.getMapsDirectory().getAbsolutePath())) { - return mapFile.getAbsolutePath().substring(globalSettings.getMapsDirectory().getAbsolutePath().length()).replace('\\', '/'); - } else { - return mapFile.getAbsolutePath().replace('\\', '/'); - } - } - } - - /** - * Set the index used for title, key strokes and such. - * @param index index (starting with 1) - */ - public void setIndex(final int index) { - if (index <= 10) { - putValue(NAME, index + ": " + title); - putValue(MNEMONIC_KEY, KeyStroke.getKeyStroke(Integer.toString(index % 10)).getKeyCode()); - putValue(ACCELERATOR_KEY, KeyStroke.getKeyStroke("alt pressed " + index % 10)); - } else { - putValue(NAME, title); - putValue(MNEMONIC_KEY, null); - putValue(ACCELERATOR_KEY, null); - } - prefs.put("recentTitle[" + Integer.toString(index - 1) + ']', title); - prefs.put("recentFilename[" + Integer.toString(index - 1) + ']', mapFile.getPath()); - } - - /** {@inheritDoc} */ - @Override - public void actionPerformed(final ActionEvent e) { - try { - mapViewsManager.openMapFileWithView(mapFile, null); - } catch (final IOException ex) { - fileControl.reportLoadError(mapFile, ex.getMessage()); - } - } - - /** - * Get the icon of this file. - * @return icon of this file - */ - @Nullable - private Icon getIcon() { - return new ImageIcon(mapImageCache.getOrCreateIcon(mapFile)); - } - - /** - * Returns the map file. - * @return the map file - */ - @NotNull - public File getMapFile() { - return mapFile; - } - - /** {@inheritDoc} */ - @Override - public boolean equals(final Object obj) { - return obj != null && obj instanceof Recent && mapFile.equals(((Recent<?, ?, ?>) obj).mapFile); - } - - /** {@inheritDoc} */ - @Override - public int hashCode() { - return mapFile.hashCode(); - } - - /** {@inheritDoc} */ - @Override - protected Object clone() throws CloneNotSupportedException { - return super.clone(); - } - - } // class Recent - /** * Watches a {@link MapModel} for map file changes. * @author Andreas Kirschbaum This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2010-04-29 18:34:42
|
Revision: 7676 http://gridarta.svn.sourceforge.net/gridarta/?rev=7676&view=rev Author: akirschbaum Date: 2010-04-29 18:34:36 +0000 (Thu, 29 Apr 2010) Log Message: ----------- Close game object attributes dialog when associated map is reverted. Modified Paths: -------------- trunk/src/app/net/sf/gridarta/gui/gameobjectattributesdialog/GameObjectAttributesDialog.java Modified: trunk/src/app/net/sf/gridarta/gui/gameobjectattributesdialog/GameObjectAttributesDialog.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/gameobjectattributesdialog/GameObjectAttributesDialog.java 2010-04-29 18:30:18 UTC (rev 7675) +++ trunk/src/app/net/sf/gridarta/gui/gameobjectattributesdialog/GameObjectAttributesDialog.java 2010-04-29 18:34:36 UTC (rev 7676) @@ -29,6 +29,7 @@ import java.awt.GridBagLayout; import java.awt.GridLayout; import java.awt.Insets; +import java.awt.Point; import java.awt.event.FocusListener; import java.awt.event.ItemEvent; import java.awt.event.ItemListener; @@ -285,6 +286,12 @@ private final MapModel<G, A, R> mapModel; /** + * The position of the game object. + */ + @NotNull + private final Point mapPos; + + /** * {@link #gameObject}'s archetype. */ @NotNull @@ -647,7 +654,7 @@ /** {@inheritDoc} */ @Override public void mapSquaresChanged(@NotNull final Set<MapSquare<G, A, R>> mapSquares) { - if (gameObject.getMapSquare() == null) { + if (gameObject.getMapSquare() != mapModel.getMapSquare(mapPos)) { setValue(cancelButton); } } @@ -742,6 +749,7 @@ throw new IllegalArgumentException(); } mapModel = mapSquare.getMapModel(); + mapPos = new Point(mapSquare.getMapX(), mapSquare.getMapY()); mapModel.addMapModelListener(mapModelListener); archetypeType = archetypeTypeSet.getArchetypeType(gameObject); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |