Revision 47790 trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.app/org.gvsig.app.mainplugin/src/main/java/org/gvsig/app/project/DefaultProject.java

View differences:

DefaultProject.java
78 78
import org.gvsig.app.project.documents.gui.ProjectWindow;
79 79
import org.gvsig.app.project.documents.view.DefaultViewDocument;
80 80
import org.gvsig.app.project.documents.view.ViewManager;
81
import org.gvsig.fmap.mapcontext.MapContext;
82 81
import org.gvsig.fmap.mapcontext.layers.ExtendedPropertiesHelper;
83 82
import org.gvsig.fmap.mapcontext.layers.FLayer;
84 83
import org.gvsig.fmap.mapcontext.layers.FLayers;
......
173 172
        this.creationDate = DateFormat.getDateInstance().format(new Date());
174 173
        this.modificationDate = this.creationDate;
175 174

  
176
        this.documents = new ArrayList<Document>();
177
        this.extents = new ArrayList<ProjectExtent>();
175
        this.documents = new ArrayList<>();
176
        this.extents = new ArrayList<>();
178 177

  
179 178
        this.setSelectionColor(getPreferences().getDefaultSelectionColor());
180 179

  
......
307 306
     */
308 307
    @Override
309 308
    public Color getSelectionColor() {
310
        if (selectionColor == null) {
311
            selectionColor = getPreferences().getDefaultSelectionColor();
312
        }
309
//        if (selectionColor == null) {
310
//            selectionColor = getPreferences().getDefaultSelectionColor();
311
//        }
313 312
        return selectionColor;
314 313
    }
315 314

  
......
320 319
     */
321 320
    @Override
322 321
    public void setSelectionColor(String selectionColor) {
322
        if(StringUtils.isBlank(selectionColor)){
323
            return;
324
        }
323 325
        this.setSelectionColor(StringUtilities.string2Color(selectionColor));
324 326
    }
325 327

  
......
330 332
     */
331 333
    @Override
332 334
    public void setSelectionColor(Color selectionColor) {
335
        if(selectionColor == null) {
336
            return;
337
        }
333 338
        this.selectionColor = selectionColor;
334
        MapContext.setSelectionColor(selectionColor);
339
//        MapContext.setSelectionColor(selectionColor);
335 340
        change.firePropertyChange("selectionColor", null, selectionColor);
336 341
    }
337 342

  
......
619 624

  
620 625
    private int getNextDocumentIndex(String type) {
621 626
        if (nextDocumentIndexByType.get(type) == null) {
622
            nextDocumentIndexByType.put(type, new Integer(1));
627
            nextDocumentIndexByType.put(type, 1);
623 628
            return 1;
624 629
        }
625
        return nextDocumentIndexByType.get(type).intValue();
630
        return nextDocumentIndexByType.get(type);
626 631
    }
627 632

  
628 633
    private void setNextDocumentIndex(String type, int newIndex) {
629 634
        if (nextDocumentIndexByType.get(type) == null) {
630
            nextDocumentIndexByType.put(type, new Integer(newIndex));
635
            nextDocumentIndexByType.put(type, newIndex);
631 636
        } else {
632
            nextDocumentIndexByType.put(type, new Integer(newIndex));
637
            nextDocumentIndexByType.put(type, newIndex);
633 638
        }
634 639
    }
635 640

  
......
1091 1096
            return documentName;
1092 1097
        }
1093 1098

  
1099
        @Override
1094 1100
        public void saveToState(PersistentState state)
1095 1101
                throws PersistenceException {
1096 1102
            state.set("windowInfo", this.windowInfo);
......
1098 1104
            state.set("documentName", this.documentName);
1099 1105
        }
1100 1106

  
1107
        @Override
1101 1108
        public void loadFromState(PersistentState state)
1102 1109
                throws PersistenceException {
1103 1110
            this.windowInfo = (WindowInfo) state.get("windowInfo");

Also available in: Unified diff