use of delta.games.lotro.maps.data.MapsManager in project lotro-companion by dmorcellet.
the class MainFrameController method doMap.
private void doMap() {
WindowController controller = _windowsManager.getWindow(MapWindowController.IDENTIFIER);
if (controller == null) {
File mapsDir = Config.getInstance().getMapsDir();
MapsManager mapsManager = new MapsManager(mapsDir);
mapsManager.load();
controller = new MapWindowController(mapsManager);
_windowsManager.registerWindow(controller);
controller.getWindow().setLocationRelativeTo(getFrame());
}
controller.bringToFront();
}
use of delta.games.lotro.maps.data.MapsManager in project lotro-tools by dmorcellet.
the class MainLinkEditor method main.
/**
* Main method for this test.
* @param args Not used.
*/
public static void main(String[] args) {
File rootDir = new File("../lotro-maps-db");
final MapsManager mapsManager = new MapsManager(rootDir);
mapsManager.load();
Filter<Marker> filter = new Filter<Marker>() {
public boolean accept(Marker item) {
return false;
}
};
MapBundle bundle = mapsManager.getMapByKey("breeland");
MapCanvas canvas = new MapCanvas(mapsManager);
final NavigationManager navigationManager = new NavigationManager(canvas);
NavigationListener listener = new NavigationListener() {
public void mapChangeRequest(String key) {
navigationManager.setMap(mapsManager.getMapByKey(key).getMap());
}
};
navigationManager.setNavigationListener(listener);
/*LinkCreationInterator interactor=*/
new LinkCreationInterator(mapsManager, canvas);
canvas.setFilter(filter);
String key = bundle.getKey();
canvas.setMap(key);
navigationManager.setMap(bundle.getMap());
JFrame f = new JFrame();
String title = bundle.getLabel();
f.setTitle(title);
f.getContentPane().add(canvas);
f.pack();
f.setVisible(true);
f.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
}
use of delta.games.lotro.maps.data.MapsManager in project lotro-tools by dmorcellet.
the class MainMapsCleaner method doIt.
private void doIt() {
File rootDir = new File("../lotro-maps-db");
MapsManager mapsManager = new MapsManager(rootDir);
mapsManager.load();
// Clean unused categories
cleanEmptyCategories(mapsManager);
MarkersMerge merge = new MarkersMerge();
merge.doIt(mapsManager);
// Write map files (for XML data migration, for instance extraction of links to separate files)
mapsManager.saveMaps();
}
Aggregations