Revision 25953 trunk/libraries/libFMap/src/com/iver/cit/gvsig/fmap/rendering/AbstractClassifiedVectorLegend.java

View differences:

AbstractClassifiedVectorLegend.java
44 44
/**
45 45
 * Abstract class that implements the interface for legends composed by
46 46
 * classified symbols.It will have two methods that will be executed
47
 * depending on the action that had been done with the legend (addition 
47
 * depending on the action that had been done with the legend (addition
48 48
 * of a new symbol or clear the legend).
49
 *  
49
 *
50 50
 * @author pepe vidal salvador - jose.vidal.salvador@iver.es
51 51
 */
52 52
public abstract class AbstractClassifiedVectorLegend extends AbstractLegend implements IClassifiedVectorLegend {
53 53
	private String[] fieldNames;
54 54
	private int[] fieldTypes;
55 55
	private ZSort zSort;
56
	
56

  
57 57
	/**
58 58
	 * Looks for a change in a classified symbol of a legend. To perform
59 59
	 * it, the Array of LegendListeners is scaned and when the corresponding
......
61 61
	 * @param event
62 62
	 */
63 63
	public void fireClassifiedSymbolChangeEvent(SymbolLegendEvent event) {
64
		for (int i = 0; i < getListeners().length; i++) {
65
			getListeners()[i].symbolChanged(event);
64
		LegendContentsChangedListener[] listeners = getListeners();
65
		for (int i = 0; i < listeners.length; i++) {
66
			listeners[i].symbolChanged(event);
66 67
		}
67 68
	}
68 69
	/**
......
92 93
	public void setClassifyingFieldTypes(int[] fieldTypes) {
93 94
		this.fieldTypes =  fieldTypes;
94 95
	}
95
	
96

  
96 97
	public ZSort getZSort() {
97 98
		return zSort;
98 99
	}
99
	
100

  
100 101
	public void setZSort(ZSort zSort) {
101 102
		if (zSort == null) {
102 103
			removeLegendListener(this.zSort);
......
104 105
		this.zSort = zSort;
105 106
		addLegendListener(zSort);
106 107
	}
107
	
108
	
108

  
109

  
109 110
	public boolean isSuitableForShapeType(int shapeType) {
110 111
		return getShapeType() == shapeType;
111 112
	}

Also available in: Unified diff