Revision 24885

View differences:

trunk/libraries/lib3DMap-share/src/main/java/com/iver/ai2/gvsig3d/legend/ExtrusionLegendPanel.java
82 82
	private JButton btnOpenSymbolLevelsEditor;
83 83
	private JTextField jtvariable;
84 84
	private JComboBoxColorScheme cmbColorScheme;
85
	private double extrusionValue;
85
	private double extrusionValue = 1;
86 86
	private JTextField jtfija;
87 87
	private JCheckBox fixedOption;
88
	private double extrusionFixedValue;
88
	private double extrusionFixedValue = 1;
89 89

  
90
	private Value aux; 
91

  
90 92
    /**
91 93
     *
92 94
     */
......
151 153

  
152 154
        pAux1 = new JPanel();
153 155
        pAux1.add(new JLabel(PluginServices.getText(this, "Nivel_de_extrusi?n")+":"));
154
        jtvariable = new JTextField(PluginServices.getText(this, "0"),3);
156
        jtvariable = new JTextField(PluginServices.getText(this, "1"),3);
155 157
        jtvariable.setColumns(3);
156 158
        jtvariable.setHorizontalAlignment(JTextField.RIGHT); 
157 159
        jtvariable.addKeyListener(this);
......
167 169
        pAux1.add(fixedOption);
168 170
        
169 171
       // pAux1.add(new JLabel(PluginServices.getText(this, "Altura fija")+":"));
170
        jtfija = new JTextField(PluginServices.getText(this, "0"),10);
172
        jtfija = new JTextField(PluginServices.getText(this, "1"),10);
171 173
        jtfija.setColumns(3);
172 174
        jtfija.setHorizontalAlignment(JTextField.RIGHT); 
173 175
        jtfija.addKeyListener(this);
......
255 257
                	theSymbol = SymbologyFactory.
256 258
                		createDefaultSymbolByShapeType(layer.getShapeType(),
257 259
                				colorScheme[rand.nextInt(colorScheme.length)].getColor());
258
                    theSymbol.setDescription(clave.toString());
260
                	aux = clave.producto(ValueFactory.createValue(extrusionValue));
261
                    theSymbol.setDescription(aux.toString());
259 262
                    auxLegend.addSymbol(clave, theSymbol);
260 263

  
261 264
                    numSymbols++;
......
282 285
            for (int i = 0; i < extrudedValue.length; i++) {
283 286
 			
284 287
	         	try {
285
	         		if(jtvariable.isEnabled())
288
	         		if(jtvariable.isEnabled()){
286 289
	         			extrudedValue[i] = ((Value)auxLegend.getValues()[i]).producto(ValueFactory.createValue(extrusionValue));
290
	         			theSymbol.setDescription(extrudedValue[i].toString());
291
	         			
292
	         		}
287 293
	         		else
288 294
	         			extrudedValue[i] = ValueFactory.createValue(extrusionFixedValue);
289 295
	 			}catch (IncompatibleTypesException e) {
......
301 307
            elRs.stop();
302 308
        } catch (ReadDriverException e) {
303 309
        	NotificationManager.addError(PluginServices.getText(this, "recovering_recordset"), e);
304
        }
310
        } catch (IncompatibleTypesException e) {
311
			// TODO Auto-generated catch block
312
			e.printStackTrace();
313
		}
305 314

  
306 315
        btnRemoveAll.setEnabled(true);
307 316
        btnRemove.setEnabled(true);
......
339 348
        }
340 349

  
341 350
        for (int row = 0; row < symbolTable.getRowCount(); row++) {
342
            clave = (Value) symbolTable.getFieldValue(row, 1);
351
            clave = (Value) symbolTable.getFieldValue(row, 0);
343 352
//            extrusymbol=new ()
344 353
//            extrusi.set(factor)
345 354
//            theSymbol = (ISymbol) symbolTable.getFieldValue(row, 0);

Also available in: Unified diff