Revision 50
org.gvsig.lrs/trunk/org.gvsig.lrs/org.gvsig.lrs.lib/org.gvsig.lrs.lib.impl/src/main/java/org/gvsig/lrs/lib/impl/LrsAlgorithmUtils.java | ||
---|---|---|
473 | 473 |
} |
474 | 474 |
|
475 | 475 |
/** |
476 |
* Same as straightLineThroughTwoPointsEquation but with more human readable arguments |
|
477 |
* |
|
478 |
* @param oldMin |
|
479 |
* @param oldMax |
|
480 |
* @param newMin |
|
481 |
* @param newMax |
|
482 |
* @param m |
|
483 |
* @return double |
|
484 |
* |
|
485 |
* @deprecated Use {@link #straightLineThroughTwoPointsEquation()} instead. |
|
486 |
*/ |
|
487 |
@Deprecated |
|
488 |
static protected double calculateNewM(double oldMin, double oldMax, double newMin, double newMax, double m){ |
|
489 |
//TO REMOVE |
|
490 |
return straightLineThroughTwoPointsEquation(oldMin, oldMax, newMin, newMax, m); |
|
491 |
} |
|
492 |
|
|
493 |
|
|
494 |
/** |
|
495 | 476 |
* Straight line through two points equation. |
496 | 477 |
* |
497 | 478 |
* @param x1 |
org.gvsig.lrs/trunk/org.gvsig.lrs/org.gvsig.lrs.swing/org.gvsig.lrs.swing.impl/src/main/java/org/gvsig/lrs/swing/impl/JLrsCalibrateRouteParamsView.xml | ||
---|---|---|
1160 | 1160 |
</at> |
1161 | 1161 |
<at name="componentclass">com.jeta.forms.gui.form.FormComponent</at> |
1162 | 1162 |
</super> |
1163 |
<at name="id">embedded.1932726646</at>
|
|
1163 |
<at name="id">embedded.475704330</at>
|
|
1164 | 1164 |
<at name="rowspecs">CENTER:DEFAULT:NONE</at> |
1165 | 1165 |
<at name="colspecs">FILL:DEFAULT:GROW(1.0),FILL:36PX:NONE</at> |
1166 | 1166 |
<at name="components"> |
... | ... | |
1377 | 1377 |
</at> |
1378 | 1378 |
<at name="componentclass">com.jeta.forms.gui.form.FormComponent</at> |
1379 | 1379 |
</super> |
1380 |
<at name="id">embedded.952486635</at>
|
|
1380 |
<at name="id">embedded.148398888</at>
|
|
1381 | 1381 |
<at name="rowspecs">CENTER:DEFAULT:NONE</at> |
1382 | 1382 |
<at name="colspecs">FILL:20DLU:GROW(1.0),FILL:DEFAULT:NONE</at> |
1383 | 1383 |
<at name="components"> |
... | ... | |
1459 | 1459 |
<at name="componentclass">com.jeta.forms.gui.form.StandardComponent</at> |
1460 | 1460 |
</super> |
1461 | 1461 |
<at name="jetabeanclass">com.jeta.forms.gui.beans.JETABean</at> |
1462 |
<at name="beanclass">javax.swing.JFormattedTextField</at>
|
|
1462 |
<at name="beanclass">javax.swing.JTextField</at> |
|
1463 | 1463 |
<at name="beanproperties"> |
1464 | 1464 |
<object classname="com.jeta.forms.store.memento.PropertiesMemento"> |
1465 |
<at name="classname">javax.swing.JFormattedTextField</at>
|
|
1465 |
<at name="classname">javax.swing.JTextField</at> |
|
1466 | 1466 |
<at name="properties"> |
1467 | 1467 |
<object classname="com.jeta.forms.store.support.PropertyMap"> |
1468 | 1468 |
<at name="height">20</at> |
... | ... | |
1594 | 1594 |
</at> |
1595 | 1595 |
<at name="componentclass">com.jeta.forms.gui.form.FormComponent</at> |
1596 | 1596 |
</super> |
1597 |
<at name="id">embedded.2067442593</at>
|
|
1597 |
<at name="id">embedded.1819485502</at>
|
|
1598 | 1598 |
<at name="rowspecs">CENTER:DEFAULT:NONE</at> |
1599 | 1599 |
<at name="colspecs">FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:DEFAULT:NONE</at> |
1600 | 1600 |
<at name="components"> |
org.gvsig.lrs/trunk/org.gvsig.lrs/org.gvsig.lrs.swing/org.gvsig.lrs.swing.impl/src/main/java/org/gvsig/lrs/swing/impl/JLrsCalibrateRouteParamsView.java | ||
---|---|---|
11 | 11 |
import javax.swing.JButton; |
12 | 12 |
import javax.swing.JCheckBox; |
13 | 13 |
import javax.swing.JComboBox; |
14 |
import javax.swing.JFormattedTextField; |
|
15 | 14 |
import javax.swing.JFrame; |
16 | 15 |
import javax.swing.JLabel; |
17 | 16 |
import javax.swing.JPanel; |
... | ... | |
42 | 41 |
JTextField txtOutputFile = new JTextField(); |
43 | 42 |
JButton btnBrowser = new JButton(); |
44 | 43 |
JComboBox cmbMeasureUnits = new JComboBox(); |
45 |
JFormattedTextField txtSearchRadius = new JFormattedTextField();
|
|
44 |
JTextField txtSearchRadius = new JTextField();
|
|
46 | 45 |
JButton btnAccept = new JButton(); |
47 | 46 |
JButton btnCancel = new JButton(); |
48 | 47 |
|
org.gvsig.lrs/trunk/org.gvsig.lrs/org.gvsig.lrs.swing/org.gvsig.lrs.swing.impl/src/main/java/org/gvsig/lrs/swing/impl/JLrsCalibrateRouteParamsController.java | ||
---|---|---|
210 | 210 |
cmbMeasureUnits.setModel(measureUnitsModel); |
211 | 211 |
cmbMeasureUnits.setRenderer(new DistanceUnitsCellRenderer()); |
212 | 212 |
|
213 |
txtSearchRadius.setValue(new Double(0)); |
|
214 |
|
|
215 | 213 |
this.btnBrowser.addActionListener(new ActionListener() { |
216 | 214 |
|
217 | 215 |
public void actionPerformed(ActionEvent e) { |
... | ... | |
387 | 385 |
DistanceUnits measureUnits = (DistanceUnits) this.cmbMeasureUnits.getSelectedItem(); |
388 | 386 |
params.setMeasureUnits(measureUnits); |
389 | 387 |
|
390 |
Object searchRadius = this.txtSearchRadius.getValue(); |
|
391 |
if (searchRadius!=null && searchRadius instanceof Double){ |
|
392 |
params.setSearchRadius((Double)searchRadius); |
|
388 |
String searchRadius = this.txtSearchRadius.getText(); |
|
389 |
if (searchRadius!=null && !searchRadius.isEmpty()){ |
|
390 |
try{ |
|
391 |
params.setSearchRadius(Double.valueOf(searchRadius)); |
|
392 |
}catch (Exception e){ |
|
393 |
params.setSearchRadius(Double.valueOf(0)); |
|
394 |
} |
|
393 | 395 |
}else { |
394 | 396 |
params.setSearchRadius(0); |
395 | 397 |
} |
... | ... | |
433 | 435 |
this.cmbCalibrationPointIdRouteField.setSelectedItem(parameters.getCalibratePointIdRouteField()); |
434 | 436 |
this.cmbMeasureField.setSelectedItem(parameters.getFromMeasureField()); |
435 | 437 |
|
436 |
this.txtSearchRadius.setValue(parameters.getSearchRadius());
|
|
438 |
this.txtSearchRadius.setText(String.valueOf(parameters.getSearchRadius()));
|
|
437 | 439 |
this.chkInterpolateBetweenCalibrationPoints.setSelected(parameters.interpolateBetweenCalibrationPoints()); |
438 | 440 |
this.chkExtrapolateBeforeCalibrationPoints.setSelected(parameters.extrapolateBeforeCalibrationPoints()); |
439 | 441 |
this.chkExtrapolateAfterCalibrationPoints.setSelected(parameters.extrapolateAfterCalibrationPoints()); |
... | ... | |
444 | 446 |
|
445 | 447 |
public void clear() { |
446 | 448 |
this.txtOutputFile.setText(""); |
447 |
this.txtSearchRadius.setValue(0.0);
|
|
449 |
this.txtSearchRadius.setText("0.0");
|
|
448 | 450 |
|
449 | 451 |
this.cmbInputLayer.setSelectedIndex(0); |
450 | 452 |
Object inputLayerSelected = this.cmbInputLayer.getSelectedItem(); |
Also available in: Unified diff