Revision 47799 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

View differences:

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

  

Also available in: Unified diff