Revision 16454 trunk/libraries/libFMap/src/com/iver/cit/gvsig/fmap/rendering/VectorialUniqueValueLegend.java

View differences:

VectorialUniqueValueLegend.java
148 148
    private int shapeType;
149 149
    private String valueType = NullValue.class.getName();
150 150
    private boolean useDefaultSymbol = false;
151
	private ZSort zSort;
152

  
153

  
154
    /**
151
	/**
155 152
     * Constructor method
156 153
     */
157 154
    public VectorialUniqueValueLegend() {
......
221 218
        keys.clear();
222 219
        ISymbol[] olds = symbols.values().toArray(new ISymbol[0]);
223 220
        symbols.clear();
224
        removeLegendListener(zSort);
225
        zSort = null;
221
        removeLegendListener(getZSort());
222
        setZSort(null);
226 223
        
227 224
        fireLegendClearEvent(new LegendClearEvent(olds));
228 225
    }
......
397 394
            xml.putProperty("typeValues",stv);
398 395
        }
399 396
        
400
        if (zSort!=null) {
401
        	XMLEntity xmlZSort = zSort.getXMLEntity();
397
        if (getZSort()!=null) {
398
        	XMLEntity xmlZSort = getZSort().getXMLEntity();
402 399
        	xmlZSort.putProperty("id", "zSort");
403 400
        	xml.addChild(xmlZSort);
404 401
        }
......
519 516
        
520 517
        XMLEntity zSortXML = xml.firstChild("id", "zSort");
521 518
		if (zSortXML != null) {
522
			zSort = new ZSort(this);
519
			ZSort zSort = new ZSort(this);
523 520
			zSort.setXMLEntity(zSortXML);
524 521
			addLegendListener(zSort);
522
			setZSort(zSort);
525 523
		}
526 524
    }
527 525

  
......
658 656
        				null));
659 657
    }
660 658

  
661
	public ZSort getZSort() {
662
		return zSort;
663
	}
664

  
665
	public void setZSort(ZSort zSort) {
666
		this.zSort = zSort;
667
		addLegendListener(zSort);
668
	}
669

  
670 659
	public String getClassName() {
671 660
		return getClass().getName();
672 661
	}

Also available in: Unified diff