From: <aki...@us...> - 2007-04-04 18:52:38
|
Revision: 2145 http://svn.sourceforge.net/gridarta/?rev=2145&view=rev Author: akirschbaum Date: 2007-04-04 11:52:39 -0700 (Wed, 04 Apr 2007) Log Message: ----------- Unify method ordering. Modified Paths: -------------- trunk/daimonin/src/daieditor/CMainControl.java Modified: trunk/daimonin/src/daieditor/CMainControl.java =================================================================== --- trunk/daimonin/src/daieditor/CMainControl.java 2007-04-04 18:51:44 UTC (rev 2144) +++ trunk/daimonin/src/daieditor/CMainControl.java 2007-04-04 18:52:39 UTC (rev 2145) @@ -934,6 +934,11 @@ /** MapPreviewAccessory. */ private final MapPreviewAccessory mapPreviewAccessory = new MapPreviewAccessory(); + /** Invoked when user wants to open a file. */ + public void open() { + openFileWanted(true); + } + /** Create the JFileChooser for opening a file. */ private void createFileChooser() { fileChooser = new JFileChooser(); @@ -948,11 +953,6 @@ mapPreviewAccessory.attachTo(fileChooser); } - /** Invoked when user wants to open a file. */ - public void open() { - openFileWanted(true); - } - /** * The user wants to open a file. * The filefilters and preselected filefilter are set accordingly to <var>mapFilter</var>. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2007-04-09 19:03:53
|
Revision: 2210 http://svn.sourceforge.net/gridarta/?rev=2210&view=rev Author: akirschbaum Date: 2007-04-09 12:03:54 -0700 (Mon, 09 Apr 2007) Log Message: ----------- Do not export MapModelListener interface from CMainControl. Modified Paths: -------------- trunk/daimonin/src/daieditor/CMainControl.java Modified: trunk/daimonin/src/daieditor/CMainControl.java =================================================================== --- trunk/daimonin/src/daieditor/CMainControl.java 2007-04-09 18:56:29 UTC (rev 2209) +++ trunk/daimonin/src/daieditor/CMainControl.java 2007-04-09 19:03:54 UTC (rev 2210) @@ -122,7 +122,7 @@ * @author Andreas Kirschbaum * @fixme I'm 2200 lines long, therefor I suck. */ -public final class CMainControl extends AbstractMainControl<GameObject, MapArchObject, Archetype, MapControl, CMapViewBasic> implements ThrowableHandler, MapModelListener<GameObject, MapArchObject, Archetype> { +public final class CMainControl extends AbstractMainControl<GameObject, MapArchObject, Archetype, MapControl, CMapViewBasic> implements ThrowableHandler { /** Action Factory. */ private static final ActionFactory ACTION_FACTORY = ActionFactory.getFactory("daieditor"); @@ -331,6 +331,51 @@ } /** + * The map model listener attached to all maps. + */ + private final MapModelListener<GameObject, MapArchObject, Archetype> mapModelListener = new MapModelListener<GameObject, MapArchObject, Archetype>() { + /** {@inheritDoc} */ + public void mapMetaChanged(@NotNull final MapArchObject mapArchObject) { + // ignore + } + + /** {@inheritDoc} */ + public void mapSizeChanged(final MapModelEvent<GameObject, MapArchObject, Archetype> e) { + // This event is ignored here because MapGrid needs to be resized + // before #validateMap(MapModel) can set error flags on the grid. + // #mapSizeChanged(MapModel) will be called from CMapViewBasic#mapSizeChanged() + // after MapGrid was resized. + } + + /** {@inheritDoc} */ + public void mapSquaresChanged(final MapModelEvent<GameObject, MapArchObject, Archetype> e) { + if (prefs.getBoolean(PREFS_VALIDATOR_AUTO, PREFS_VALIDATOR_AUTO_DEFAULT)) { + final MapSquare<GameObject, MapArchObject, Archetype>[] squares = e.getSquares(); + if (squares != null) { + final ErrorCollector errorCollector = new DefaultErrorCollector(); + validators.validate(squares, errorCollector); + ((MapModel) e.getMapModel()).getMapControl().getMapViewFrame().getView().setErrors(errorCollector); + mainView.setErrors(errorCollector); + } + } + } + + /** {@inheritDoc} */ + public void mapObjectsChanged(final MapModelEvent<GameObject, MapArchObject, Archetype> e) { + if (prefs.getBoolean(PREFS_VALIDATOR_AUTO, PREFS_VALIDATOR_AUTO_DEFAULT)) { + final net.sf.gridarta.gameobject.GameObject[] arches = e.getGameObjects(); + if (arches != null) { + final ErrorCollector errorCollector = new DefaultErrorCollector(); + validators.validate(arches, errorCollector); + ((MapModel) e.getMapModel()).getMapControl().getMapViewFrame().getView().setErrors(errorCollector); + mainView.setErrors(errorCollector); + } + } + } + + }; + + /** * Cleans all completely blocked squares of a map. * @fixme this implementation does not take care of multi square objects. */ @@ -813,7 +858,7 @@ fireMapCreatedEvent(mapControl); setCurrentLevel(mapControl); - mapControl.getMapModel().addMapModelListener(this); + mapControl.getMapModel().addMapModelListener(mapModelListener); return mapCreateView(mapControl, viewPosition); } @@ -1609,45 +1654,6 @@ } } - /** {@inheritDoc} */ - public void mapSizeChanged(final MapModelEvent<GameObject, MapArchObject, Archetype> e) { - // This event is ignored here because MapGrid needs to be resized - // before #validateMap(MapModel) can set error flags on the grid. - // #mapSizeChanged(MapModel) will be called from CMapViewBasic#mapSizeChanged() - // after MapGrid was resized. - } - - /** {@inheritDoc} */ - public void mapSquaresChanged(final MapModelEvent<GameObject, MapArchObject, Archetype> e) { - if (prefs.getBoolean(PREFS_VALIDATOR_AUTO, PREFS_VALIDATOR_AUTO_DEFAULT)) { - final MapSquare<GameObject, MapArchObject, Archetype>[] squares = e.getSquares(); - if (squares != null) { - final ErrorCollector errorCollector = new DefaultErrorCollector(); - validators.validate(squares, errorCollector); - ((MapModel) e.getMapModel()).getMapControl().getMapViewFrame().getView().setErrors(errorCollector); - mainView.setErrors(errorCollector); - } - } - } - - /** {@inheritDoc} */ - public void mapObjectsChanged(final MapModelEvent<GameObject, MapArchObject, Archetype> e) { - if (prefs.getBoolean(PREFS_VALIDATOR_AUTO, PREFS_VALIDATOR_AUTO_DEFAULT)) { - final net.sf.gridarta.gameobject.GameObject[] arches = e.getGameObjects(); - if (arches != null) { - final ErrorCollector errorCollector = new DefaultErrorCollector(); - validators.validate(arches, errorCollector); - ((MapModel) e.getMapModel()).getMapControl().getMapViewFrame().getView().setErrors(errorCollector); - mainView.setErrors(errorCollector); - } - } - } - - /** {@inheritDoc} */ - public void mapMetaChanged(@NotNull final MapArchObject mapArchObject) { - // ignore - } - public static String getBuildNumberAsString() { try { return ResourceBundle.getBundle("build").getString("build.number"); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2007-05-16 10:43:43
|
Revision: 2506 http://svn.sourceforge.net/gridarta/?rev=2506&view=rev Author: christianhujer Date: 2007-05-16 03:43:40 -0700 (Wed, 16 May 2007) Log Message: ----------- Fixed bug in updater. The check about open files was wrong. Modified Paths: -------------- trunk/daimonin/src/daieditor/CMainControl.java Modified: trunk/daimonin/src/daieditor/CMainControl.java =================================================================== --- trunk/daimonin/src/daieditor/CMainControl.java 2007-05-16 09:46:32 UTC (rev 2505) +++ trunk/daimonin/src/daieditor/CMainControl.java 2007-05-16 10:43:40 UTC (rev 2506) @@ -1244,7 +1244,7 @@ /** Update wanted. */ public void update() { - if (!mapManager.hasOpenedMap()) { + if (mapManager.hasOpenedMap()) { ACTION_FACTORY.showMessageDialog(mainView, "updateCloseMaps"); } else { Updater.update(mainView); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2007-05-17 12:01:03
|
Revision: 2526 http://svn.sourceforge.net/gridarta/?rev=2526&view=rev Author: christianhujer Date: 2007-05-17 05:01:02 -0700 (Thu, 17 May 2007) Log Message: ----------- Delayed initialization of RecentManager after archetypes have been loaded to fix NPE bug with uncached recent icons. Modified Paths: -------------- trunk/daimonin/src/daieditor/CMainControl.java Modified: trunk/daimonin/src/daieditor/CMainControl.java =================================================================== --- trunk/daimonin/src/daieditor/CMainControl.java 2007-05-17 10:26:47 UTC (rev 2525) +++ trunk/daimonin/src/daieditor/CMainControl.java 2007-05-17 12:01:02 UTC (rev 2526) @@ -361,6 +361,7 @@ Updater.startup(mainView); init(); archetypeSet.loadArchetypes(archetypeParser); + recentManager.initRecent(); validators = createMapValidators(); } @@ -511,7 +512,6 @@ libs.delete(); } } - recentManager.initRecent(); } /** Control the server. */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2007-05-18 22:46:35
|
Revision: 2571 http://svn.sourceforge.net/gridarta/?rev=2571&view=rev Author: christianhujer Date: 2007-05-18 15:46:37 -0700 (Fri, 18 May 2007) Log Message: ----------- Removed unnecessary qualification of MainControl to itself. Modified Paths: -------------- trunk/daimonin/src/daieditor/CMainControl.java Modified: trunk/daimonin/src/daieditor/CMainControl.java =================================================================== --- trunk/daimonin/src/daieditor/CMainControl.java 2007-05-18 22:43:34 UTC (rev 2570) +++ trunk/daimonin/src/daieditor/CMainControl.java 2007-05-18 22:46:37 UTC (rev 2571) @@ -1355,7 +1355,7 @@ /** {@inheritDoc} */ public String getConfigurationDirectory() { - return CMainControl.getInstance().getArchDefaultFolder() + "/" + IGUIConstants.CONFIG_DIR; + return getArchDefaultFolder() + "/" + IGUIConstants.CONFIG_DIR; } } // class CMainControl This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2007-05-19 09:07:27
|
Revision: 2596 http://svn.sourceforge.net/gridarta/?rev=2596&view=rev Author: akirschbaum Date: 2007-05-19 02:07:29 -0700 (Sat, 19 May 2007) Log Message: ----------- Unify initialization order. Modified Paths: -------------- trunk/daimonin/src/daieditor/CMainControl.java Modified: trunk/daimonin/src/daieditor/CMainControl.java =================================================================== --- trunk/daimonin/src/daieditor/CMainControl.java 2007-05-19 09:05:47 UTC (rev 2595) +++ trunk/daimonin/src/daieditor/CMainControl.java 2007-05-19 09:07:29 UTC (rev 2596) @@ -467,6 +467,9 @@ // initialize the script-editor pad ScriptEditControl.init(strMapDir, this); + // load the list with archtype-data from "types.xml" + typeList = new CFArchTypeList(new Spells()); + // Initialise the main view mainView.init(); loadDefTiles(); @@ -483,9 +486,6 @@ animationObjects = new AnimationObjects(); faceObjects = new FaceObjects(); - // load the list with archtype-data from "types.xml" - typeList = new CFArchTypeList(new Spells()); - net.sf.gridarta.gameobject.GameObject.setTypeList(typeList); // set reference in GameObject copybuffer.init(new MapArchObject()); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2007-09-08 20:15:58
|
Revision: 2993 http://gridarta.svn.sourceforge.net/gridarta/?rev=2993&view=rev Author: akirschbaum Date: 2007-09-08 13:15:54 -0700 (Sat, 08 Sep 2007) Log Message: ----------- Remove some raw types. Modified Paths: -------------- trunk/daimonin/src/daieditor/CMainControl.java Modified: trunk/daimonin/src/daieditor/CMainControl.java =================================================================== --- trunk/daimonin/src/daieditor/CMainControl.java 2007-09-08 20:14:37 UTC (rev 2992) +++ trunk/daimonin/src/daieditor/CMainControl.java 2007-09-08 20:15:54 UTC (rev 2993) @@ -297,7 +297,7 @@ if (prefs.getBoolean(PREFS_VALIDATOR_AUTO, PREFS_VALIDATOR_AUTO_DEFAULT)) { final MapSquare<GameObject, MapArchObject, Archetype>[] squares = e.getSquares(); if (squares != null) { - final ErrorCollector errorCollector = new DefaultErrorCollector<GameObject, MapArchObject, Archetype>(); + final ErrorCollector<GameObject, MapArchObject, Archetype> errorCollector = new DefaultErrorCollector<GameObject, MapArchObject, Archetype>(); validators.validate(squares, errorCollector); ((MapControl) e.getMapModel().getMapControl()).getMapViewFrame().getView().setErrors(errorCollector); mainView.getGameObjectAttributesPanel().getErrorListView().setErrors(errorCollector); @@ -310,7 +310,7 @@ if (prefs.getBoolean(PREFS_VALIDATOR_AUTO, PREFS_VALIDATOR_AUTO_DEFAULT)) { final GameObject[] arches = e.getGameObjects(); if (arches != null) { - final ErrorCollector errorCollector = new DefaultErrorCollector<GameObject, MapArchObject, Archetype>(); + final ErrorCollector<GameObject, MapArchObject, Archetype> errorCollector = new DefaultErrorCollector<GameObject, MapArchObject, Archetype>(); validators.validate(arches, errorCollector); ((MapControl) e.getMapModel().getMapControl()).getMapViewFrame().getView().setErrors(errorCollector); mainView.getGameObjectAttributesPanel().getErrorListView().setErrors(errorCollector); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2007-10-08 23:18:40
|
Revision: 3185 http://gridarta.svn.sourceforge.net/gridarta/?rev=3185&view=rev Author: akirschbaum Date: 2007-10-08 16:18:44 -0700 (Mon, 08 Oct 2007) Log Message: ----------- Remove unused code. Modified Paths: -------------- trunk/daimonin/src/daieditor/CMainControl.java Modified: trunk/daimonin/src/daieditor/CMainControl.java =================================================================== --- trunk/daimonin/src/daieditor/CMainControl.java 2007-10-08 23:13:28 UTC (rev 3184) +++ trunk/daimonin/src/daieditor/CMainControl.java 2007-10-08 23:18:44 UTC (rev 3185) @@ -269,9 +269,6 @@ private final MapCursorControl<GameObject, MapArchObject, Archetype, MapControl, CMapViewBasic, NumberSpell> mapCursorControl; - /** The MainControlListeners to inform of changes. */ - private final EventListenerList listenerList = new EventListenerList(); - /** The map manager. */ private final MapManager mapManager = new MapManager(this); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2007-10-08 23:25:23
|
Revision: 3187 http://gridarta.svn.sourceforge.net/gridarta/?rev=3187&view=rev Author: akirschbaum Date: 2007-10-08 16:25:25 -0700 (Mon, 08 Oct 2007) Log Message: ----------- Remove raw type. Modified Paths: -------------- trunk/daimonin/src/daieditor/CMainControl.java Modified: trunk/daimonin/src/daieditor/CMainControl.java =================================================================== --- trunk/daimonin/src/daieditor/CMainControl.java 2007-10-08 23:23:55 UTC (rev 3186) +++ trunk/daimonin/src/daieditor/CMainControl.java 2007-10-08 23:25:25 UTC (rev 3187) @@ -407,7 +407,7 @@ final MapModel<GameObject, MapArchObject, Archetype> mapModel = currentMap.getMapModel(); mapModel.beginTransaction("cleanCompletelyBlockedSquares"); // TODO: I18N/L10N - for (final MapSquare completelyBlockedSquare : BlockedSquareChecker.findCompletelyBlockedSquares(mapModel)) { + for (final MapSquare<GameObject, MapArchObject, Archetype> completelyBlockedSquare : BlockedSquareChecker.findCompletelyBlockedSquares(mapModel)) { completelyBlockedSquare.removeAll(); } mapModel.endTransaction(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2007-12-04 20:37:50
|
Revision: 3482 http://gridarta.svn.sourceforge.net/gridarta/?rev=3482&view=rev Author: akirschbaum Date: 2007-12-04 12:37:54 -0800 (Tue, 04 Dec 2007) Log Message: ----------- Fix compilation issue with JDK 1.5. Modified Paths: -------------- trunk/daimonin/src/daieditor/CMainControl.java Modified: trunk/daimonin/src/daieditor/CMainControl.java =================================================================== --- trunk/daimonin/src/daieditor/CMainControl.java 2007-12-04 19:36:43 UTC (rev 3481) +++ trunk/daimonin/src/daieditor/CMainControl.java 2007-12-04 20:37:54 UTC (rev 3482) @@ -1141,7 +1141,7 @@ JOptionPane.showMessageDialog(mainView, "No map loaded! Please load a map!!", "Error", JOptionPane.ERROR_MESSAGE); return; } - final CMapViewBasic view = (CMapViewBasic) currentMap.getMapViewFrame().getView(); + final CMapViewBasic view = (CMapViewBasic) (net.sf.gridarta.gui.map.MapViewBasic) currentMap.getMapViewFrame().getView(); view.getRenderer().setPaintOnlyMap(true); new CPreview(view.getRenderer().getFullImage()); view.getRenderer().setPaintOnlyMap(false); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2008-02-04 16:23:03
|
Revision: 3507 http://gridarta.svn.sourceforge.net/gridarta/?rev=3507&view=rev Author: akirschbaum Date: 2008-02-04 08:22:54 -0800 (Mon, 04 Feb 2008) Log Message: ----------- Remove superfluous cast. Modified Paths: -------------- trunk/daimonin/src/daieditor/CMainControl.java Modified: trunk/daimonin/src/daieditor/CMainControl.java =================================================================== --- trunk/daimonin/src/daieditor/CMainControl.java 2008-02-04 16:19:23 UTC (rev 3506) +++ trunk/daimonin/src/daieditor/CMainControl.java 2008-02-04 16:22:54 UTC (rev 3507) @@ -1141,7 +1141,7 @@ JOptionPane.showMessageDialog(mainView, "No map loaded! Please load a map!!", "Error", JOptionPane.ERROR_MESSAGE); return; } - final CMapViewBasic view = (CMapViewBasic) (net.sf.gridarta.gui.map.MapViewBasic) currentMap.getMapViewFrame().getView(); + final CMapViewBasic view = (CMapViewBasic) currentMap.getMapViewFrame().getView(); view.getRenderer().setPaintOnlyMap(true); new CPreview(view.getRenderer().getFullImage()); view.getRenderer().setPaintOnlyMap(false); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2008-02-04 17:59:53
|
Revision: 3530 http://gridarta.svn.sourceforge.net/gridarta/?rev=3530&view=rev Author: akirschbaum Date: 2008-02-04 09:59:54 -0800 (Mon, 04 Feb 2008) Log Message: ----------- Remove superfluous cast. Modified Paths: -------------- trunk/daimonin/src/daieditor/CMainControl.java Modified: trunk/daimonin/src/daieditor/CMainControl.java =================================================================== --- trunk/daimonin/src/daieditor/CMainControl.java 2008-02-04 17:58:52 UTC (rev 3529) +++ trunk/daimonin/src/daieditor/CMainControl.java 2008-02-04 17:59:54 UTC (rev 3530) @@ -560,7 +560,7 @@ */ public void validateMap(final MapModel<GameObject, MapArchObject, Archetype> map) { final ErrorCollector<GameObject, MapArchObject, Archetype> errorCollector = runMapValidation(map); - for (final MapView<GameObject, MapArchObject, Archetype, ?, ?> mapView : ((MapControl) map.getMapControl()).getMapViewFrames()) { + for (final MapView<GameObject, MapArchObject, Archetype, ?, ?> mapView : map.getMapControl().getMapViewFrames()) { mapView.getView().setErrors(errorCollector); } mainView.getGameObjectAttributesPanel().setErrors(map, errorCollector); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2008-03-30 16:23:52
|
Revision: 3774 http://gridarta.svn.sourceforge.net/gridarta/?rev=3774&view=rev Author: christianhujer Date: 2008-03-30 09:23:56 -0700 (Sun, 30 Mar 2008) Log Message: ----------- Fixed bug: When the treasure list was not found, the editor did not start. Modified Paths: -------------- trunk/daimonin/src/daieditor/CMainControl.java Modified: trunk/daimonin/src/daieditor/CMainControl.java =================================================================== --- trunk/daimonin/src/daieditor/CMainControl.java 2008-03-29 21:15:13 UTC (rev 3773) +++ trunk/daimonin/src/daieditor/CMainControl.java 2008-03-30 16:23:56 UTC (rev 3774) @@ -437,6 +437,7 @@ mainView.getObjectChooser().getPickmapChooserControl().loadPickmaps(true); } final Document specialTreasureListsDocument; + CFTreasureListTree treasureListTree = null; try { specialTreasureListsDocument = xmlHelper.getDocumentBuilder().parse(IOUtils.getResourceURLAsString(getConfigurationDirectory(), "TreasureLists.xml")); treasureListTree = new CFTreasureListTree<GameObject, MapArchObject, Archetype>(archetypeSet, specialTreasureListsDocument, @@ -445,10 +446,10 @@ ); } catch (final IOException ex) { log.fatal("Cannot read TreasureLists.xml: " + ex.getMessage()); - throw new MissingResourceException("Cannot read TreasureLists.xml: " + ex.getMessage(), null, "TreasureLists.xml"); } catch (final SAXException ex) { log.fatal("Cannot read TreasureLists.xml: " + ex.getMessage()); - throw new MissingResourceException("Cannot read TreasureLists.xml: " + ex.getMessage(), null, "TreasureLists.xml"); + } finally { + this.treasureListTree = treasureListTree; } recentManager.initRecent(); validators = createMapValidators(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2008-03-31 21:13:35
|
Revision: 3787 http://gridarta.svn.sourceforge.net/gridarta/?rev=3787&view=rev Author: akirschbaum Date: 2008-03-31 14:13:33 -0700 (Mon, 31 Mar 2008) Log Message: ----------- Unify code. Modified Paths: -------------- trunk/daimonin/src/daieditor/CMainControl.java Modified: trunk/daimonin/src/daieditor/CMainControl.java =================================================================== --- trunk/daimonin/src/daieditor/CMainControl.java 2008-03-31 21:11:35 UTC (rev 3786) +++ trunk/daimonin/src/daieditor/CMainControl.java 2008-03-31 21:13:33 UTC (rev 3787) @@ -1081,10 +1081,6 @@ mainView.appExitNotify(); // notify main view } - public static ImageIcon getMapPreSelIcon() { - return mapPreSelIcon; - } - public static ImageIcon getMapCursorIcon() { return mapCursorIcon; } @@ -1125,17 +1121,21 @@ return mapSelIconWest; } + public static ImageIcon getMapPreSelIcon() { + return mapPreSelIcon; + } + /** * Load all system tile icons into temporary variables for more convenient * access. */ private static void loadDefTiles() { - mapPreSelIcon = GUIUtils.getSysIcon(IGUIConstants.TILE_PRESEL_TILE); mapSelIcon = GUIUtils.getSysIcon(IGUIConstants.TILE_SEL_TILE); mapSelIconNorth = GUIUtils.getSysIcon(IGUIConstants.TILE_SEL_TILE_NORTH); mapSelIconEast = GUIUtils.getSysIcon(IGUIConstants.TILE_SEL_TILE_EAST); mapSelIconSouth = GUIUtils.getSysIcon(IGUIConstants.TILE_SEL_TILE_SOUTH); mapSelIconWest = GUIUtils.getSysIcon(IGUIConstants.TILE_SEL_TILE_WEST); + mapPreSelIcon = GUIUtils.getSysIcon(IGUIConstants.TILE_PRESEL_TILE); mapCursorIcon = GUIUtils.getSysIcon(IGUIConstants.TILE_CURSOR); emptyTileIcon = GUIUtils.getSysIcon(IGUIConstants.TILE_EMPTY); unknownTileIcon = GUIUtils.getSysIcon(IGUIConstants.TILE_UNKNOWN); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2008-04-01 22:56:57
|
Revision: 3809 http://gridarta.svn.sourceforge.net/gridarta/?rev=3809&view=rev Author: akirschbaum Date: 2008-04-01 15:56:59 -0700 (Tue, 01 Apr 2008) Log Message: ----------- Make 'collect spells' work again. Modified Paths: -------------- trunk/daimonin/src/daieditor/CMainControl.java Modified: trunk/daimonin/src/daieditor/CMainControl.java =================================================================== --- trunk/daimonin/src/daieditor/CMainControl.java 2008-04-01 22:24:23 UTC (rev 3808) +++ trunk/daimonin/src/daieditor/CMainControl.java 2008-04-01 22:56:59 UTC (rev 3809) @@ -201,7 +201,7 @@ private final FaceObjects faceObjects; /** The Spells. */ - private final Spells<NumberSpell> numberSpells = new Spells<NumberSpell>(); + private final daieditor.spells.Spells numberSpells = new daieditor.spells.Spells(); /** The Spells. */ private final Spells<GameObjectSpell<GameObject, MapArchObject, Archetype>> gameObjectSpells = new Spells<GameObjectSpell<GameObject, MapArchObject, Archetype>>(); @@ -607,7 +607,7 @@ /** Collect Spells. */ @ActionMethod public void collectSpells() { - ((daieditor.spells.Spells) numberSpells).importSpellsWanted(this); + numberSpells.importSpellsWanted(this); } /** View Treasure Lists. */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2008-04-09 22:16:22
|
Revision: 3864 http://gridarta.svn.sourceforge.net/gridarta/?rev=3864&view=rev Author: akirschbaum Date: 2008-04-09 15:15:45 -0700 (Wed, 09 Apr 2008) Log Message: ----------- Remove call to AbstractMainControl.getInstance(). Modified Paths: -------------- trunk/daimonin/src/daieditor/CMainControl.java Modified: trunk/daimonin/src/daieditor/CMainControl.java =================================================================== --- trunk/daimonin/src/daieditor/CMainControl.java 2008-04-09 21:57:14 UTC (rev 3863) +++ trunk/daimonin/src/daieditor/CMainControl.java 2008-04-09 22:15:45 UTC (rev 3864) @@ -331,7 +331,7 @@ throw new MissingResourceException("Cannot create XML parser: " + ex.getMessage(), null, null); } typeList = new CFArchTypeList(xmlHelper.getDocumentBuilder(), xmlHelper.getXPath()); - new XMLSpellLoader().load(AbstractMainControl.getInstance().getConfigurationDirectory(), CommonConstants.SPELL_FILE, xmlHelper.getDocumentBuilder(), numberSpells); + new XMLSpellLoader().load(getConfigurationDirectory(), CommonConstants.SPELL_FILE, xmlHelper.getDocumentBuilder(), numberSpells); try { final String filename = IOUtils.getResourceURLAsString(getConfigurationDirectory(), "GameObjectMatchers.xml"); typeList.readGameObjectMatchers(filename); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2008-06-03 21:25:06
|
Revision: 4072 http://gridarta.svn.sourceforge.net/gridarta/?rev=4072&view=rev Author: akirschbaum Date: 2008-06-03 14:24:51 -0700 (Tue, 03 Jun 2008) Log Message: ----------- Remove unrelated code out of try...catch block. Modified Paths: -------------- trunk/daimonin/src/daieditor/CMainControl.java Modified: trunk/daimonin/src/daieditor/CMainControl.java =================================================================== --- trunk/daimonin/src/daieditor/CMainControl.java 2008-06-03 21:20:55 UTC (rev 4071) +++ trunk/daimonin/src/daieditor/CMainControl.java 2008-06-03 21:24:51 UTC (rev 4072) @@ -868,29 +868,29 @@ } File file = new File(globalSettings.getImageDir(), mapView.getMapControl().getMapFileName() + ".png"); - try { - final JFileChooser fileChooser = new JFileChooser(globalSettings.getImageDir()); - fileChooser.setDialogTitle("Save Image As"); - fileChooser.setFileSelectionMode(JFileChooser.FILES_ONLY); - fileChooser.setMultiSelectionEnabled(false); - fileChooser.setSelectedFile(file); - // set a file filter for "*.png" files - fileChooser.setFileFilter(pngFileFilter); + final JFileChooser fileChooser = new JFileChooser(globalSettings.getImageDir()); + fileChooser.setDialogTitle("Save Image As"); + fileChooser.setFileSelectionMode(JFileChooser.FILES_ONLY); + fileChooser.setMultiSelectionEnabled(false); + fileChooser.setSelectedFile(file); + // set a file filter for "*.png" files + fileChooser.setFileFilter(pngFileFilter); - final int returnVal = fileChooser.showSaveDialog(mainView); - if (returnVal == JFileChooser.APPROVE_OPTION) { - // got the filepath, now create image - file = fileChooser.getSelectedFile(); - if (!file.getName().endsWith(".png")) { - file = new File(file.getParentFile(), file.getName() + ".png"); - } - globalSettings.setImageDir(file.getParentFile().getAbsolutePath()); - if (!file.exists() || ACTION_FACTORY.showConfirmDialog(mainView, JOptionPane.YES_NO_OPTION, JOptionPane.WARNING_MESSAGE, "overwriteOtherFile", file) == JOptionPane.YES_OPTION) { + final int returnVal = fileChooser.showSaveDialog(mainView); + if (returnVal == JFileChooser.APPROVE_OPTION) { + // got the filepath, now create image + file = fileChooser.getSelectedFile(); + if (!file.getName().endsWith(".png")) { + file = new File(file.getParentFile(), file.getName() + ".png"); + } + globalSettings.setImageDir(file.getParentFile().getAbsolutePath()); + if (!file.exists() || ACTION_FACTORY.showConfirmDialog(mainView, JOptionPane.YES_NO_OPTION, JOptionPane.WARNING_MESSAGE, "overwriteOtherFile", file) == JOptionPane.YES_OPTION) { + try { mapView.getView().getRenderer().printFullImage(file); + } catch (final IOException e) { + ACTION_FACTORY.showMessageDialog(mainView, "createImageIOException", file, e.getMessage()); } } - } catch (final IOException e) { - ACTION_FACTORY.showMessageDialog(mainView, "createImageIOException", file, e.getMessage()); } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aki...@us...> - 2008-06-03 21:28:36
|
Revision: 4073 http://gridarta.svn.sourceforge.net/gridarta/?rev=4073&view=rev Author: akirschbaum Date: 2008-06-03 14:28:02 -0700 (Tue, 03 Jun 2008) Log Message: ----------- Do not reuse local variable. Modified Paths: -------------- trunk/daimonin/src/daieditor/CMainControl.java Modified: trunk/daimonin/src/daieditor/CMainControl.java =================================================================== --- trunk/daimonin/src/daieditor/CMainControl.java 2008-06-03 21:24:51 UTC (rev 4072) +++ trunk/daimonin/src/daieditor/CMainControl.java 2008-06-03 21:28:02 UTC (rev 4073) @@ -867,7 +867,7 @@ globalSettings.setImageDir(globalSettings.getMapDir().getAbsolutePath()); } - File file = new File(globalSettings.getImageDir(), mapView.getMapControl().getMapFileName() + ".png"); + final File file = new File(globalSettings.getImageDir(), mapView.getMapControl().getMapFileName() + ".png"); final JFileChooser fileChooser = new JFileChooser(globalSettings.getImageDir()); fileChooser.setDialogTitle("Save Image As"); fileChooser.setFileSelectionMode(JFileChooser.FILES_ONLY); @@ -879,16 +879,16 @@ final int returnVal = fileChooser.showSaveDialog(mainView); if (returnVal == JFileChooser.APPROVE_OPTION) { // got the filepath, now create image - file = fileChooser.getSelectedFile(); - if (!file.getName().endsWith(".png")) { - file = new File(file.getParentFile(), file.getName() + ".png"); + File imageFile = fileChooser.getSelectedFile(); + if (!imageFile.getName().endsWith(".png")) { + imageFile = new File(imageFile.getParentFile(), imageFile.getName() + ".png"); } - globalSettings.setImageDir(file.getParentFile().getAbsolutePath()); - if (!file.exists() || ACTION_FACTORY.showConfirmDialog(mainView, JOptionPane.YES_NO_OPTION, JOptionPane.WARNING_MESSAGE, "overwriteOtherFile", file) == JOptionPane.YES_OPTION) { + globalSettings.setImageDir(imageFile.getParentFile().getAbsolutePath()); + if (!imageFile.exists() || ACTION_FACTORY.showConfirmDialog(mainView, JOptionPane.YES_NO_OPTION, JOptionPane.WARNING_MESSAGE, "overwriteOtherFile", imageFile) == JOptionPane.YES_OPTION) { try { - mapView.getView().getRenderer().printFullImage(file); + mapView.getView().getRenderer().printFullImage(imageFile); } catch (final IOException e) { - ACTION_FACTORY.showMessageDialog(mainView, "createImageIOException", file, e.getMessage()); + ACTION_FACTORY.showMessageDialog(mainView, "createImageIOException", imageFile, e.getMessage()); } } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |