Revision 30011 branches/v2_0_0_prep/applications/appgvSIG/src/org/gvsig/app/project/documents/view/legend/gui/SingleSymbol.java

View differences:

SingleSymbol.java
64 64
import org.gvsig.app.gui.styling.SymbolPreviewer;
65 65
import org.gvsig.app.gui.styling.SymbolSelector;
66 66
import org.gvsig.fmap.dal.exception.ReadException;
67
import org.gvsig.fmap.mapcontext.MapContextLocator;
67 68
import org.gvsig.fmap.mapcontext.layers.FLayer;
68 69
import org.gvsig.fmap.mapcontext.layers.vectorial.FLyrVect;
69 70
import org.gvsig.fmap.mapcontext.rendering.legend.ILegend;
70
import org.gvsig.fmap.mapcontext.rendering.legend.LegendFactory;
71
import org.gvsig.fmap.mapcontext.rendering.legend.SingleSymbolLegend;
72
import org.gvsig.fmap.mapcontext.rendering.legend.ZSort;
73 71
import org.gvsig.fmap.mapcontext.rendering.symbols.ISymbol;
74 72
import org.gvsig.gui.beans.swing.GridBagLayoutPanel;
75 73
import org.gvsig.gui.beans.swing.JButton;
74
import org.gvsig.symbology.fmap.mapcontext.rendering.legend.ZSort;
75
import org.gvsig.symbology.fmap.mapcontext.rendering.legend.impl.AbstractVectorialLegend;
76
import org.gvsig.symbology.fmap.mapcontext.rendering.legend.impl.SingleSymbolLegend;
76 77

  
77 78

  
78 79
/**
......
117 118
			this.legend = (SingleSymbolLegend) legend;
118 119

  
119 120
		} else {
120
			this.legend = (SingleSymbolLegend) LegendFactory.
121
					createSingleSymbolLegend(shapeType);
121
			this.legend = (SingleSymbolLegend) MapContextLocator
122
					.getMapContextManager().createLegend(
123
							SingleSymbolLegend.LEGEND_NAME);
124
			this.legend.setShapeType(shapeType);
125
//			LegendFactory.
126
//					createSingleSymbolLegend(shapeType);
122 127
		}
123 128
		getSymbolPreviewPanel().setSymbol(this.legend.getDefaultSymbol());
124 129
		getBtnOpenSymbolLevelsEditor().setEnabled(legend!=null);
......
131 136
	public ILegend getLegend() {
132 137
		ISymbol symbol = getSymbolPreviewPanel().getSymbol();
133 138
		symbol.setDescription(txtLabel.getText());
134
		SingleSymbolLegend leg = new SingleSymbolLegend(symbol);
139
		AbstractVectorialLegend leg = new SingleSymbolLegend(symbol);
135 140
		leg.setZSort(zSort);
136 141
		return leg;
137 142
	}

Also available in: Unified diff