Revision 25304

View differences:

trunk/libraries/lib3DMap-share/src/main/java/com/iver/ai2/gvsig3d/legend/ExtrusionLegend.java
21 21
	private double extrusionFactor;
22 22

  
23 23

  
24
	public ExtrusionLegend() {
25
	}
24 26
	public ExtrusionLegend(int shapeType) {
25 27
		super(shapeType);
26 28
	}
......
70 72
	
71 73

  
72 74
	public XMLEntity getXMLEntity() {
73
//		XMLEntity xml = super.getXMLEntity();
74
		XMLEntity xml = new XMLEntity();
75
		xml.putProperty("className", this.getClassName());
76
		xml.putProperty("fieldNames", getClassifyingFieldNames()[0]);
77
		xml.putProperty("fieldTypes", getClassifyingFieldTypes()[0]);
75
		XMLEntity xml = super.getXMLEntity();
78 76
		xml.putProperty("extrusionFactor", this.extrusionFactor);
79 77
		return xml;
80 78

  
......
82 80

  
83 81
	public void setXMLEntity(XMLEntity xml) {
84 82
		// TODO: It is necessary to insert here all the properties to load with the extrusion legend.
85
//		super.setXMLEntity(xml);
86
		clear();
87
		if (xml.contains("fieldName"))
88
			setClassifyingFieldNames(new String[] {xml.getStringProperty("fieldName")});
89
		else
90
			setClassifyingFieldNames(xml.getStringArrayProperty("fieldNames"));
91

  
92
		if (xml.contains("fieldTypes"))
93
			setClassifyingFieldTypes(new int[] {xml.getIntProperty("fieldTypes")});
83
		super.setXMLEntity(xml);		
94 84
		if (xml.contains("extrusionFactor"))
95
			extrusionFactor = xml.getDoubleProperty("extrusionFactor");
96
		
85
			extrusionFactor = xml.getDoubleProperty("extrusionFactor");	
97 86
	}
98 87

  
99 88
}
trunk/libraries/lib3DMap-share/src/main/java/com/iver/ai2/gvsig3d/legend/ExtrusionLegendPanel.java
96 96
     */
97 97
    public ExtrusionLegendPanel() {
98 98
        super();
99
        if (theLegend!=null)
100
        	this.extrusionValue = ((ExtrusionLegend)this.theLegend).getExtrusionFactor();
101 99
        initialize();
102 100
    }
103 101

  
......
440 438
        } else {
441 439
            theLegend = new ExtrusionLegend(shapeType);
442 440
        }
441
        if (theLegend != null) {
442
			this.extrusionValue = ((ExtrusionLegend) this.theLegend)
443
					.getExtrusionFactor();
444
			jtvariable.setText(Double.toString(this.extrusionValue));
445
		}
443 446
    }
444 447

  
445 448
    /* (non-Javadoc)
......
447 450
     */
448 451
    public ILegend getLegend() {
449 452
        fillSymbolListFromTable();
450

  
453
        fillTableValues();
451 454
        if (auxLegend != null) {
452 455
        	// your settings that are not the set of symbols must be located here
453 456
        	auxLegend.setClassifyingFieldNames(

Also available in: Unified diff