protected void fireLayerAdded(Layer element, int fromIndex, int toIndex) { monitor.readLock().lock(); try { if (mapListeners == null) { return; } MapLayerListEvent event = new MapLayerListEvent(this, element, fromIndex, toIndex); for (MapLayerListListener mapLayerListListener : mapListeners) { try { mapLayerListListener.layerAdded(event); } catch (Throwable t) { if (LOGGER.isLoggable(Level.FINER)) { LOGGER.logp( Level.FINE, mapLayerListListener.getClass().getName(), "layerAdded", t.getLocalizedMessage(), t); } } } } finally { monitor.readLock().unlock(); } }
protected void fireLayerPreDispose(Layer element, int toIndex) { monitor.readLock().lock(); try { if (mapListeners == null) { return; } MapLayerListEvent event = new MapLayerListEvent(this, element, toIndex); for (MapLayerListListener mapLayerListListener : mapListeners) { try { mapLayerListListener.layerPreDispose(event); } catch (Throwable t) { if (LOGGER.isLoggable(Level.FINER)) { LOGGER.logp( Level.FINE, mapLayerListListener.getClass().getName(), "layerMoved", t.getLocalizedMessage(), t); } } } } finally { monitor.readLock().unlock(); } }
protected void fireLayerRemoved(Layer element, int fromIndex, int toIndex) { monitor.readLock().lock(); try { if (mapListeners == null) { return; } MapLayerListEvent event = new MapLayerListEvent(this, element, fromIndex, toIndex); for (MapLayerListListener mapLayerListListener : mapListeners) { try { mapLayerListListener.layerRemoved(event); } catch (Throwable t) { if (LOGGER.isLoggable(Level.FINER)) { LOGGER.logp( Level.FINE, mapLayerListListener.getClass().getName(), "layerAdded", t.getLocalizedMessage(), t); } } } } finally { monitor.readLock().unlock(); } }
protected void fireLayerMoved(Layer element, int toIndex) { monitor.readLock().lock(); try { if (mapListeners == null) { return; } MapLayerListEvent event = new MapLayerListEvent(this, element, toIndex); for (MapLayerListListener mapLayerListListener : mapListeners) { try { mapLayerListListener.layerMoved(event); } catch (Throwable t) { if (LOGGER.isLoggable(Level.FINER)) { LOGGER.logp( Level.FINE, mapLayerListListener.getClass().getName(), "layerMoved", t.getLocalizedMessage(), t); } } } } finally { monitor.readLock().unlock(); } }
return; MapLayerListEvent mapEvent = new MapLayerListEvent(this, element, index, layerEvent); for (MapLayerListListener mapLayerListListener : mapListeners) { try {