net.sf.freecol.client.control
Class MapEditorController

java.lang.Object
  extended by net.sf.freecol.client.control.MapEditorController

public final class MapEditorController
extends java.lang.Object

The map editor controller.


Constructor Summary
MapEditorController(FreeColClient freeColClient)
          Creates a new MapEditorController.
 
Method Summary
 MapEditorTransformPanel.MapTransform getMapTransform()
          Gets the current MapTransform.
 void loadGame()
          Opens a dialog where the user should specify the filename and loads the game.
 void loadGame(java.io.File file)
          Loads a game from the given file.
 void newMap()
          Creates a new map using a MapGenerator.
 void saveGame()
          Opens a dialog where the user should specify the filename and saves the game.
 void saveGame(java.io.File file)
          Saves the game to the given file.
 void setMapTransform(MapEditorTransformPanel.MapTransform mt)
          Sets the currently chosen MapTransform.
 void startMapEditor()
          Enters map editor modus.
 void transform(Tile t)
          Transforms the given Tile using the current MapTransform.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MapEditorController

public MapEditorController(FreeColClient freeColClient)
Creates a new MapEditorController.

Parameters:
freeColClient - The main controller.
Method Detail

startMapEditor

public void startMapEditor()
Enters map editor modus.


setMapTransform

public void setMapTransform(MapEditorTransformPanel.MapTransform mt)
Sets the currently chosen MapTransform.

Parameters:
mt - The transform that should be applied to a Tile that is clicked on the map.

getMapTransform

public MapEditorTransformPanel.MapTransform getMapTransform()
Gets the current MapTransform.

Returns:
The transform that should be applied to a Tile that is clicked on the map.

transform

public void transform(Tile t)
Transforms the given Tile using the current MapTransform.

Parameters:
t - The Tile to be modified.

newMap

public void newMap()
Creates a new map using a MapGenerator. A panel with the MapGeneratorOptions is first displayed.

See Also:
MapGenerator, MapGeneratorOptions

saveGame

public void saveGame()
Opens a dialog where the user should specify the filename and saves the game.


saveGame

public void saveGame(java.io.File file)
Saves the game to the given file.

Parameters:
file - The File.

loadGame

public void loadGame()
Opens a dialog where the user should specify the filename and loads the game.


loadGame

public void loadGame(java.io.File file)
Loads a game from the given file.

Parameters:
file - The File.