Search in sources :

Example 1 with IMapViewChangeListener

use of org.freeplane.features.ui.IMapViewChangeListener in project freeplane by freeplane.

the class MapViewChangeObserverCompound method afterMapViewChange.

void afterMapViewChange(final MapView oldMap, final MapView newMap) {
    final MapModel oldModel = getModel(oldMap);
    final MapModel newModel = getModel(newMap);
    if (oldModel != newModel) {
        for (final IMapSelectionListener observer : mapListeners.toArray(new IMapSelectionListener[] {})) {
            observer.afterMapChange(oldModel, newModel);
        }
    }
    for (final IMapViewChangeListener observer : viewListeners.toArray(new IMapViewChangeListener[] {})) {
        observer.afterViewChange(oldMap, newMap);
    }
}
Also used : IMapSelectionListener(org.freeplane.features.map.IMapSelectionListener) IMapViewChangeListener(org.freeplane.features.ui.IMapViewChangeListener) MapModel(org.freeplane.features.map.MapModel)

Example 2 with IMapViewChangeListener

use of org.freeplane.features.ui.IMapViewChangeListener in project freeplane by freeplane.

the class MapViewChangeObserverCompound method beforeMapViewChange.

void beforeMapViewChange(final MapView oldMap, final MapView newMap) {
    final MapModel oldModel = getModel(oldMap);
    final MapModel newModel = getModel(newMap);
    if (oldModel != newModel) {
        for (final IMapSelectionListener observer : mapListeners.toArray(new IMapSelectionListener[] {})) {
            observer.beforeMapChange(getModel(oldMap), getModel(newMap));
        }
    }
    for (final IMapViewChangeListener observer : viewListeners.toArray(new IMapViewChangeListener[] {})) {
        observer.beforeViewChange(oldMap, newMap);
    }
}
Also used : IMapSelectionListener(org.freeplane.features.map.IMapSelectionListener) IMapViewChangeListener(org.freeplane.features.ui.IMapViewChangeListener) MapModel(org.freeplane.features.map.MapModel)

Aggregations

IMapSelectionListener (org.freeplane.features.map.IMapSelectionListener)2 MapModel (org.freeplane.features.map.MapModel)2 IMapViewChangeListener (org.freeplane.features.ui.IMapViewChangeListener)2