private void addNewTilesets(Map map) throws IOException {
  for (  TileSet set : map.getTileSets()) {
    setByName.put(set.getTilebmpFile(),set);
  }
  for (  String name : mapping.getNewSets()) {
    if (name.equals("")) {
      continue;
    }
    if (!setByName.containsKey(name)) {
      TileSet set=new TileSet();
      set.setName(constructTilesetName(name));
      BasicTileCutter cutter=new BasicTileCutter(32,32,0,0);
      set.importTileBitmap(name,cutter);
      setByName.put(name,set);
      map.addTileset(set);
    }
  }
}

private void addNewTilesets ( Map map ) throws IOException { for ( TileSet set : map . getTileSets ( ) ) { setByName . put ( set . getTilebmpFile ( ) , set ) ; } for ( String name : mapping . getNewSets ( ) ) { if ( name . equals ( "" ) ) { continue ; } if ( ! setByName . containsKey ( name ) ) { TileSet set = new TileSet ( ) ; set . setName ( constructTilesetName ( name ) ) ; BasicTileCutter cutter = new BasicTileCutter ( 32 , 32 , 0 , 0 ) ; set . importTileBitmap ( name , cutter ) ; setByName . put ( name , set ) ; map . addTileset ( set ) ; } } }
add all the tilesets that the translation mapping uses to a map .
