Revision 47799

View differences:

trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.impl/src/main/java/org/gvsig/fmap/dal/feature/impl/DefaultFeatureStore.java
4117 4117
 
4118 4118
    private boolean doesTheNotificationHaveToBeSent(FeatureStoreNotification notfication) {
4119 4119
        if( this.notificacionsFilter==null ) {
4120
            return false;
4120
            return true;
4121 4121
        }
4122 4122
        return !this.notificacionsFilter.test(notfication);
4123 4123
    }
trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.mapcontext/org.gvsig.fmap.mapcontext.api/src/main/java/org/gvsig/fmap/mapcontext/ViewPort.java
57 57
import org.gvsig.fmap.mapcontext.events.ExtentEvent;
58 58
import org.gvsig.fmap.mapcontext.events.ProjectionEvent;
59 59
import org.gvsig.fmap.mapcontext.events.listeners.ViewPortListener;
60
import org.gvsig.fmap.mapcontext.events.listeners.ViewPortListenerEx1;
60 61
import org.gvsig.timesupport.Time;
61 62
import org.gvsig.tools.ToolsLocator;
62 63
import org.gvsig.tools.dynobject.DynStruct;
......
1088 1089

  
1089 1090
  /**
1090 1091
   * <p>
1092
   * Notifies to all view port listeners registered, that the background color
1093
   * of this view port has changed.
1094
   * </p>
1095
   *
1096
   * @param c the new background color
1097
   * @see #setBackColor(Color)
1098
   * @see ColorEvent
1099
   * @see ViewPortListener
1100
   */
1101
    private void callSelectionColorChanged(Color c) {
1102
        ColorEvent ce = ColorEvent.createColorEvent(c);
1103

  
1104
        for (ViewPortListener listener : this.getListeners()) {
1105
            if (listener != null) {
1106
                if(listener instanceof ViewPortListenerEx1){
1107
                    ((ViewPortListenerEx1)listener).selectionColorChanged(ce);
1108
                }
1109
            }
1110
        }
1111
    }
1112

  
1113
  /**
1114
   * <p>
1091 1115
   * Notifies to all view port listeners registered, that the projection of this
1092 1116
   * view port has changed.
1093 1117
   * </p>
......
1289 1313
    if (!c.equals(this.selectionColor)) {
1290 1314
      this.updateDrawVersion();
1291 1315
      selectionColor = c;
1292
      callColorChanged(selectionColor);
1316
      callSelectionColorChanged(selectionColor);
1293 1317
    }
1294 1318
  }
1295 1319

  
......
1839 1863
    }
1840 1864

  
1841 1865
    clonedViewPort.trans = (AffineTransform) this.trans.clone();
1866
    
1867
    if (this.selectionColor != null) {
1868
        clonedViewPort.setSelectionColor(this.selectionColor);
1869
    }
1842 1870

  
1871
    if (this.backColor != null) {
1872
        clonedViewPort.setBackColor(this.backColor);
1873
    }
1874

  
1843 1875
    return clonedViewPort;
1844 1876
  }
1845 1877

  
trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.mapcontext/org.gvsig.fmap.mapcontext.api/src/main/java/org/gvsig/fmap/mapcontext/events/listeners/EventBuffer.java
26 26
import java.util.ArrayList;
27 27
import java.util.Iterator;
28 28
import java.util.List;
29

  
30 29
import org.gvsig.fmap.mapcontext.events.AtomicEvent;
31 30
import org.gvsig.fmap.mapcontext.events.ColorEvent;
32 31
import org.gvsig.fmap.mapcontext.events.ExtentEvent;
......
67 66
 * @author gvSIG Team
68 67
 */
69 68
public class EventBuffer implements LegendListener, LayerCollectionListener,
70
        SelectionListener, ViewPortListener, LayerListener {
69
        SelectionListener, ViewPortListenerEx1, LayerListener {
71 70

  
72 71
    private static final Logger LOGGER = LoggerFactory.getLogger(EventBuffer.class);
73 72
    
......
323 322
    }
324 323

  
325 324
    @Override
325
    public void selectionColorChanged(ColorEvent e) {
326
        events.add(e);
327
        if (dispatching) {
328
            fireAtomicEventListener();
329
        }
330
    }
331

  
332
    @Override
326 333
    public void editionChanged(LayerEvent e) {
327 334
        events.add(e);
328 335
        if (dispatching) {
trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.mapcontext/org.gvsig.fmap.mapcontext.api/src/main/java/org/gvsig/fmap/mapcontext/events/listeners/ViewPortListenerEx1.java
1
/**
2
 * gvSIG. Desktop Geographic Information System.
3
 *
4
 * Copyright (C) 2007-2013 gvSIG Association.
5
 *
6
 * This program is free software; you can redistribute it and/or
7
 * modify it under the terms of the GNU General Public License
8
 * as published by the Free Software Foundation; either version 3
9
 * of the License, or (at your option) any later version.
10
 *
11
 * This program is distributed in the hope that it will be useful,
12
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
 * GNU General Public License for more details.
15
 *
16
 * You should have received a copy of the GNU General Public License
17
 * along with this program; if not, write to the Free Software
18
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19
 * MA  02110-1301, USA.
20
 *
21
 * For any additional information, do not hesitate to contact us
22
 * at info AT gvsig.com, or visit our website www.gvsig.com.
23
 */
24
package org.gvsig.fmap.mapcontext.events.listeners;
25

  
26
import org.gvsig.fmap.mapcontext.events.ColorEvent;
27

  
28

  
29
/**
30
 * <p>Defines the interface for an object that listens to changes in a view port.</p>
31
 */
32
public interface ViewPortListenerEx1 extends ViewPortListener {
33
	/**
34
	 * <p>Called when the selection color of the view port has changed.</p>
35
	 * 
36
	 * @param e a color event object
37
	 */
38
	void selectionColorChanged(ColorEvent e);
39
}
40

  
0 41

  
trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.app/org.gvsig.app.mainplugin/src/main/java/org/gvsig/app/project/documents/view/MapOverview.java
290 290
	 * (non-Javadoc)
291 291
	 * @see com.iver.cit.gvsig.fmap.ViewPortListener#backColorChanged(com.iver.cit.gvsig.fmap.ColorEvent)
292 292
	 */
293
    @Override
293 294
	public void backColorChanged(ColorEvent e) {
294 295
		// do nothing
295 296
	}
trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.app/org.gvsig.app.mainplugin/src/main/java/org/gvsig/app/project/documents/view/gui/DefaultViewPanel.java
248 248
                    }
249 249
                }
250 250

  
251
                @Override
251 252
                public void backColorChanged(ColorEvent e) {
252 253
                    // Do nothing
253 254
                }

Also available in: Unified diff