Revision 851
org.gvsig.lrs/trunk/org.gvsig.lrs/org.gvsig.lrs.app/org.gvsig.lrs.app.mainplugin/src/main/resources-plugin/i18n/text_en.properties | ||
---|---|---|
135 | 135 |
_Km=Km |
136 | 136 |
_Unknown_slash_other=Unknown / other |
137 | 137 |
_Units_of_measure_of_the_M_coordinate_of_the_layer=Units of measure of the M coordinate of the layer |
138 |
|
|
139 |
_Stretch_{0}=Stretch {0} |
org.gvsig.lrs/trunk/org.gvsig.lrs/org.gvsig.lrs.app/org.gvsig.lrs.app.mainplugin/src/main/resources-plugin/i18n/text.properties | ||
---|---|---|
135 | 135 |
_Km=Km |
136 | 136 |
_Unknown_slash_other=Desconocida / otras |
137 | 137 |
_Units_of_measure_of_the_M_coordinate_of_the_layer=Unidades de medida de la coordenada M de la capa |
138 |
|
|
139 |
_Stretch_{0}=Tramo {0} |
org.gvsig.lrs/trunk/org.gvsig.lrs/org.gvsig.lrs.swing/org.gvsig.lrs.swing.api/src/main/java/org/gvsig/lrs/swing/api/LrsAlgorithmsSwingManager.java | ||
---|---|---|
55 | 55 |
|
56 | 56 |
public JLrsAlgorithmParams createJLrsCalibrateRouteAlgorithmParameters(FLayers layers, LrsCalibrateRouteAlgorithmParams parameters) throws LrsNeededParameterException; |
57 | 57 |
|
58 |
public JLrsAlgorithmParams createJLrsEditRouteCalibrationSelectIdRouteAlgorithmParameters(FLayer layer, LrsEditRouteCalibrationSelectIdRouteAlgorithmParams parameters) throws LrsNeededParameterException;
|
|
58 |
public JLrsAlgorithmParams createJLrsEditRouteCalibrationSelectIdRouteAlgorithmParameters(FLyrVect layer, LrsEditRouteCalibrationSelectIdRouteAlgorithmParams parameters) throws LrsNeededParameterException;
|
|
59 | 59 |
|
60 |
public JLrsAlgorithmParams createJLrsEditRouteCalibrationAlgorithmParameters(FLayer layer, MapContext mapContext, FeatureAttributeDescriptor selectedIdRoute, LrsEditRouteCalibrationAlgorithmParams parameters) throws LrsNeededParameterException, LrsGettingParametersException;
|
|
60 |
public JLrsAlgorithmParams createJLrsEditRouteCalibrationAlgorithmParameters(FLyrVect layer, MapContext mapContext, FeatureAttributeDescriptor selectedIdRoute, LrsEditRouteCalibrationAlgorithmParams parameters) throws LrsNeededParameterException, LrsGettingParametersException;
|
|
61 | 61 |
|
62 | 62 |
public JLrsAlgorithmParams createJLrsShowMeasuresAlgorithmParameters(FLayer layer, LrsShowMeasuresAlgorithmParams parameters) throws LrsNeededParameterException; |
63 | 63 |
|
org.gvsig.lrs/trunk/org.gvsig.lrs/org.gvsig.lrs.swing/org.gvsig.lrs.swing.impl/src/main/java/org/gvsig/lrs/swing/impl/JLrsEditRouteCalibrationParamsView.xml | ||
---|---|---|
26 | 26 |
</super> |
27 | 27 |
<at name="id">/home/fdiaz/projects/gvSIG/org.gvsig.lrs/org.gvsig.lrs.swing/org.gvsig.lrs.swing.impl/src/main/java/org/gvsig/lrs/swing/impl/JLrsEditRouteCalibrationParamsView.xml</at> |
28 | 28 |
<at name="rowspecs">CENTER:DEFAULT:NONE,CENTER:MAX(12DLU;DEFAULT):GROW(1.0),CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:4DLU:NONE,CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE</at> |
29 |
<at name="colspecs">FILL:DEFAULT:NONE,FILL:MAX(12DLU;DEFAULT):NONE,FILL:4DLU:NONE,FILL:120PX:NONE,FILL:4DLU:NONE,FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:MAX(73PX;DEFAULT):GROW(1.0),FILL:4DLU:NONE,FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:MAX(74PX;DEFAULT):GROW(1.0),FILL:DEFAULT:NONE</at> |
|
29 |
<at name="colspecs">FILL:DEFAULT:NONE,FILL:MAX(12DLU;DEFAULT):NONE,FILL:4DLU:NONE,FILL:120PX:NONE,FILL:4DLU:NONE,FILL:120PX:NONE,FILL:4DLU:NONE,FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:MAX(73PX;DEFAULT):GROW(1.0),FILL:4DLU:NONE,FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:MAX(74PX;DEFAULT):GROW(1.0),FILL:DEFAULT:NONE</at>
|
|
30 | 30 |
<at name="components"> |
31 | 31 |
<object classname="java.util.LinkedList"> |
32 | 32 |
<item > |
... | ... | |
95 | 95 |
<super classname="com.jeta.forms.store.memento.ComponentMemento"> |
96 | 96 |
<at name="cellconstraints"> |
97 | 97 |
<object classname="com.jeta.forms.store.memento.CellConstraintsMemento"> |
98 |
<at name="column">6</at>
|
|
98 |
<at name="column">8</at>
|
|
99 | 99 |
<at name="row">4</at> |
100 | 100 |
<at name="colspan">1</at> |
101 | 101 |
<at name="rowspan">1</at> |
... | ... | |
155 | 155 |
<super classname="com.jeta.forms.store.memento.ComponentMemento"> |
156 | 156 |
<at name="cellconstraints"> |
157 | 157 |
<object classname="com.jeta.forms.store.memento.CellConstraintsMemento"> |
158 |
<at name="column">10</at>
|
|
158 |
<at name="column">12</at>
|
|
159 | 159 |
<at name="row">4</at> |
160 | 160 |
<at name="colspan">1</at> |
161 | 161 |
<at name="rowspan">1</at> |
... | ... | |
217 | 217 |
<object classname="com.jeta.forms.store.memento.CellConstraintsMemento"> |
218 | 218 |
<at name="column">2</at> |
219 | 219 |
<at name="row">2</at> |
220 |
<at name="colspan">11</at>
|
|
220 |
<at name="colspan">13</at>
|
|
221 | 221 |
<at name="rowspan">1</at> |
222 | 222 |
<at name="halign">default</at> |
223 | 223 |
<at name="valign">fill</at> |
... | ... | |
298 | 298 |
<object classname="com.jeta.forms.store.memento.CellConstraintsMemento"> |
299 | 299 |
<at name="column">2</at> |
300 | 300 |
<at name="row">6</at> |
301 |
<at name="colspan">11</at>
|
|
301 |
<at name="colspan">13</at>
|
|
302 | 302 |
<at name="rowspan">1</at> |
303 | 303 |
<at name="halign">right</at> |
304 | 304 |
<at name="valign">default</at> |
... | ... | |
307 | 307 |
</at> |
308 | 308 |
<at name="componentclass">com.jeta.forms.gui.form.FormComponent</at> |
309 | 309 |
</super> |
310 |
<at name="id">embedded.2077454645</at>
|
|
310 |
<at name="id">embedded.340519727</at>
|
|
311 | 311 |
<at name="rowspecs">CENTER:DEFAULT:NONE</at> |
312 | 312 |
<at name="colspecs">FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:DEFAULT:NONE</at> |
313 | 313 |
<at name="components"> |
... | ... | |
514 | 514 |
<object classname="com.jeta.forms.store.memento.CellConstraintsMemento"> |
515 | 515 |
<at name="column">2</at> |
516 | 516 |
<at name="row">8</at> |
517 |
<at name="colspan">11</at>
|
|
517 |
<at name="colspan">13</at>
|
|
518 | 518 |
<at name="rowspan">1</at> |
519 | 519 |
<at name="halign">right</at> |
520 | 520 |
<at name="valign">default</at> |
... | ... | |
523 | 523 |
</at> |
524 | 524 |
<at name="componentclass">com.jeta.forms.gui.form.FormComponent</at> |
525 | 525 |
</super> |
526 |
<at name="id">embedded.817309910</at>
|
|
526 |
<at name="id">embedded.1264977937</at>
|
|
527 | 527 |
<at name="rowspecs">CENTER:DEFAULT:NONE</at> |
528 | 528 |
<at name="colspecs">FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:DEFAULT:NONE</at> |
529 | 529 |
<at name="components"> |
... | ... | |
787 | 787 |
<super classname="com.jeta.forms.store.memento.ComponentMemento"> |
788 | 788 |
<at name="cellconstraints"> |
789 | 789 |
<object classname="com.jeta.forms.store.memento.CellConstraintsMemento"> |
790 |
<at name="column">12</at>
|
|
790 |
<at name="column">14</at>
|
|
791 | 791 |
<at name="row">4</at> |
792 | 792 |
<at name="colspan">1</at> |
793 | 793 |
<at name="rowspan">1</at> |
... | ... | |
826 | 826 |
</object> |
827 | 827 |
</at> |
828 | 828 |
<at name="name">txtMaximum</at> |
829 |
<at name="width">438</at>
|
|
829 |
<at name="width">374</at>
|
|
830 | 830 |
<at name="height">21</at> |
831 | 831 |
</object> |
832 | 832 |
</at> |
... | ... | |
841 | 841 |
<super classname="com.jeta.forms.store.memento.ComponentMemento"> |
842 | 842 |
<at name="cellconstraints"> |
843 | 843 |
<object classname="com.jeta.forms.store.memento.CellConstraintsMemento"> |
844 |
<at name="column">8</at>
|
|
844 |
<at name="column">10</at>
|
|
845 | 845 |
<at name="row">4</at> |
846 | 846 |
<at name="colspan">1</at> |
847 | 847 |
<at name="rowspan">1</at> |
... | ... | |
880 | 880 |
</object> |
881 | 881 |
</at> |
882 | 882 |
<at name="name">txtMinimum</at> |
883 |
<at name="width">438</at>
|
|
883 |
<at name="width">374</at>
|
|
884 | 884 |
<at name="height">21</at> |
885 | 885 |
</object> |
886 | 886 |
</at> |
... | ... | |
889 | 889 |
</object> |
890 | 890 |
</at> |
891 | 891 |
</item> |
892 |
<item > |
|
893 |
<at name="value"> |
|
894 |
<object classname="com.jeta.forms.store.memento.BeanMemento"> |
|
895 |
<super classname="com.jeta.forms.store.memento.ComponentMemento"> |
|
896 |
<at name="cellconstraints"> |
|
897 |
<object classname="com.jeta.forms.store.memento.CellConstraintsMemento"> |
|
898 |
<at name="column">6</at> |
|
899 |
<at name="row">4</at> |
|
900 |
<at name="colspan">1</at> |
|
901 |
<at name="rowspan">1</at> |
|
902 |
<at name="halign">default</at> |
|
903 |
<at name="valign">default</at> |
|
904 |
<at name="insets" object="insets">0,0,0,0</at> |
|
905 |
</object> |
|
906 |
</at> |
|
907 |
<at name="componentclass">com.jeta.forms.gui.form.StandardComponent</at> |
|
908 |
</super> |
|
909 |
<at name="jetabeanclass">com.jeta.forms.gui.beans.JETABean</at> |
|
910 |
<at name="beanclass">javax.swing.JComboBox</at> |
|
911 |
<at name="beanproperties"> |
|
912 |
<object classname="com.jeta.forms.store.memento.PropertiesMemento"> |
|
913 |
<at name="classname">javax.swing.JComboBox</at> |
|
914 |
<at name="properties"> |
|
915 |
<object classname="com.jeta.forms.store.support.PropertyMap"> |
|
916 |
<at name="border"> |
|
917 |
<object classname="com.jeta.forms.store.properties.CompoundBorderProperty"> |
|
918 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
919 |
<at name="name">border</at> |
|
920 |
</super> |
|
921 |
<at name="borders"> |
|
922 |
<object classname="java.util.LinkedList"> |
|
923 |
<item > |
|
924 |
<at name="value"> |
|
925 |
<object classname="com.jeta.forms.store.properties.DefaultBorderProperty"> |
|
926 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
927 |
<at name="name">border</at> |
|
928 |
</super> |
|
929 |
</object> |
|
930 |
</at> |
|
931 |
</item> |
|
932 |
</object> |
|
933 |
</at> |
|
934 |
</object> |
|
935 |
</at> |
|
936 |
<at name="name">cmbStretch</at> |
|
937 |
<at name="width">116</at> |
|
938 |
<at name="items"> |
|
939 |
<object classname="com.jeta.forms.store.properties.ItemsProperty"> |
|
940 |
<at name="name">items</at> |
|
941 |
</object> |
|
942 |
</at> |
|
943 |
<at name="height">23</at> |
|
944 |
</object> |
|
945 |
</at> |
|
946 |
</object> |
|
947 |
</at> |
|
948 |
</object> |
|
949 |
</at> |
|
950 |
</item> |
|
892 | 951 |
</object> |
893 | 952 |
</at> |
894 | 953 |
<at name="properties"> |
... | ... | |
948 | 1007 |
<at name="rows"> |
949 | 1008 |
<object classname="[Ljava.lang.Object;" size="9"> |
950 | 1009 |
<at name="item" index="0"> |
951 |
<object classname="[Ljava.lang.Object;" size="13"/>
|
|
1010 |
<object classname="[Ljava.lang.Object;" size="15"/>
|
|
952 | 1011 |
</at> |
953 | 1012 |
<at name="item" index="1"> |
954 |
<object classname="[Ljava.lang.Object;" size="13"/>
|
|
1013 |
<object classname="[Ljava.lang.Object;" size="15"/>
|
|
955 | 1014 |
</at> |
956 | 1015 |
<at name="item" index="2"> |
957 |
<object classname="[Ljava.lang.Object;" size="13"/>
|
|
1016 |
<object classname="[Ljava.lang.Object;" size="15"/>
|
|
958 | 1017 |
</at> |
959 | 1018 |
<at name="item" index="3"> |
960 |
<object classname="[Ljava.lang.Object;" size="13"/>
|
|
1019 |
<object classname="[Ljava.lang.Object;" size="15"/>
|
|
961 | 1020 |
</at> |
962 | 1021 |
<at name="item" index="4"> |
963 |
<object classname="[Ljava.lang.Object;" size="13"/>
|
|
1022 |
<object classname="[Ljava.lang.Object;" size="15"/>
|
|
964 | 1023 |
</at> |
965 | 1024 |
<at name="item" index="5"> |
966 |
<object classname="[Ljava.lang.Object;" size="13"/>
|
|
1025 |
<object classname="[Ljava.lang.Object;" size="15"/>
|
|
967 | 1026 |
</at> |
968 | 1027 |
<at name="item" index="6"> |
969 |
<object classname="[Ljava.lang.Object;" size="13"/>
|
|
1028 |
<object classname="[Ljava.lang.Object;" size="15"/>
|
|
970 | 1029 |
</at> |
971 | 1030 |
<at name="item" index="7"> |
972 |
<object classname="[Ljava.lang.Object;" size="13"/>
|
|
1031 |
<object classname="[Ljava.lang.Object;" size="15"/>
|
|
973 | 1032 |
</at> |
974 | 1033 |
<at name="item" index="8"> |
975 |
<object classname="[Ljava.lang.Object;" size="13"/>
|
|
1034 |
<object classname="[Ljava.lang.Object;" size="15"/>
|
|
976 | 1035 |
</at> |
977 | 1036 |
</object> |
978 | 1037 |
</at> |
org.gvsig.lrs/trunk/org.gvsig.lrs/org.gvsig.lrs.swing/org.gvsig.lrs.swing.impl/src/main/java/org/gvsig/lrs/swing/impl/DefaultLrsAlgorithmsSwingManager.java | ||
---|---|---|
107 | 107 |
/* (non-Javadoc) |
108 | 108 |
* @see org.gvsig.lrs.swing.api.LrsAlgorithmsSwingManager#createJLrsEditRouteCalibrationSelectIdRouteAlgorithmParameters(org.gvsig.lrs.lib.api.LrsEditRouteCalibrationSelectIdRouteAlgorithmParams) |
109 | 109 |
*/ |
110 |
public JLrsAlgorithmParams createJLrsEditRouteCalibrationSelectIdRouteAlgorithmParameters(FLayer layer, LrsEditRouteCalibrationSelectIdRouteAlgorithmParams parameters) throws LrsNeededParameterException {
|
|
110 |
public JLrsAlgorithmParams createJLrsEditRouteCalibrationSelectIdRouteAlgorithmParameters(FLyrVect layer, LrsEditRouteCalibrationSelectIdRouteAlgorithmParams parameters) throws LrsNeededParameterException {
|
|
111 | 111 |
return new JLrsEditRouteCalibrationSelectIdRouteController(layer, parameters); |
112 | 112 |
} |
113 | 113 |
|
114 | 114 |
/* (non-Javadoc) |
115 | 115 |
* @see org.gvsig.lrs.swing.api.LrsAlgorithmsSwingManager#createJLrsEditRouteCalibrationAlgorithmParameters(org.gvsig.lrs.lib.api.LrsEditRouteCalibrationAlgorithmParameters) |
116 | 116 |
*/ |
117 |
public JLrsAlgorithmParams createJLrsEditRouteCalibrationAlgorithmParameters(FLayer layer, MapContext mapContext, FeatureAttributeDescriptor selectedIdRoute, LrsEditRouteCalibrationAlgorithmParams parameters) throws LrsNeededParameterException, LrsGettingParametersException {
|
|
117 |
public JLrsAlgorithmParams createJLrsEditRouteCalibrationAlgorithmParameters(FLyrVect layer, MapContext mapContext, FeatureAttributeDescriptor selectedIdRoute, LrsEditRouteCalibrationAlgorithmParams parameters) throws LrsNeededParameterException, LrsGettingParametersException {
|
|
118 | 118 |
return new JLrsEditRouteCalibrationController(layer, mapContext, selectedIdRoute, parameters); |
119 | 119 |
} |
120 | 120 |
|
org.gvsig.lrs/trunk/org.gvsig.lrs/org.gvsig.lrs.swing/org.gvsig.lrs.swing.impl/src/main/java/org/gvsig/lrs/swing/impl/JLrsEditRouteCalibrationParamsView.java | ||
---|---|---|
32 | 32 |
JComboBox cmbRoute = new JComboBox(); |
33 | 33 |
JTextField txtMaximum = new JTextField(); |
34 | 34 |
JTextField txtMinimum = new JTextField(); |
35 |
JComboBox cmbStretch = new JComboBox(); |
|
35 | 36 |
|
36 | 37 |
/** |
37 | 38 |
* Default constructor |
... | ... | |
123 | 124 |
public JPanel createPanel() |
124 | 125 |
{ |
125 | 126 |
JPanel jpanel1 = new JPanel(); |
126 |
FormLayout formlayout1 = new FormLayout("FILL:DEFAULT:NONE,FILL:MAX(12DLU;DEFAULT):NONE,FILL:4DLU:NONE,FILL:120PX:NONE,FILL:4DLU:NONE,FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:MAX(73PX;DEFAULT):GROW(1.0),FILL:4DLU:NONE,FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:MAX(74PX;DEFAULT):GROW(1.0),FILL:DEFAULT:NONE","CENTER:DEFAULT:NONE,CENTER:MAX(12DLU;DEFAULT):GROW(1.0),CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:4DLU:NONE,CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE"); |
|
127 |
FormLayout formlayout1 = new FormLayout("FILL:DEFAULT:NONE,FILL:MAX(12DLU;DEFAULT):NONE,FILL:4DLU:NONE,FILL:120PX:NONE,FILL:4DLU:NONE,FILL:120PX:NONE,FILL:4DLU:NONE,FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:MAX(73PX;DEFAULT):GROW(1.0),FILL:4DLU:NONE,FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:MAX(74PX;DEFAULT):GROW(1.0),FILL:DEFAULT:NONE","CENTER:DEFAULT:NONE,CENTER:MAX(12DLU;DEFAULT):GROW(1.0),CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:4DLU:NONE,CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE");
|
|
127 | 128 |
CellConstraints cc = new CellConstraints(); |
128 | 129 |
jpanel1.setLayout(formlayout1); |
129 | 130 |
|
... | ... | |
133 | 134 |
|
134 | 135 |
lblMinimum.setName("lblMinimum"); |
135 | 136 |
lblMinimum.setText("minimum"); |
136 |
jpanel1.add(lblMinimum,cc.xy(6,4));
|
|
137 |
jpanel1.add(lblMinimum,cc.xy(8,4));
|
|
137 | 138 |
|
138 | 139 |
lblMaximum.setName("lblMaximum"); |
139 | 140 |
lblMaximum.setText("maximum"); |
140 |
jpanel1.add(lblMaximum,cc.xy(10,4));
|
|
141 |
jpanel1.add(lblMaximum,cc.xy(12,4));
|
|
141 | 142 |
|
142 | 143 |
tblLayerInfo.setName("tblLayerInfo"); |
143 | 144 |
JScrollPane jscrollpane1 = new JScrollPane(); |
144 | 145 |
jscrollpane1.setViewportView(tblLayerInfo); |
145 | 146 |
jscrollpane1.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED); |
146 | 147 |
jscrollpane1.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED); |
147 |
jpanel1.add(jscrollpane1,new CellConstraints(2,2,11,1,CellConstraints.DEFAULT,CellConstraints.FILL));
|
|
148 |
jpanel1.add(jscrollpane1,new CellConstraints(2,2,13,1,CellConstraints.DEFAULT,CellConstraints.FILL));
|
|
148 | 149 |
|
149 |
jpanel1.add(createPanel1(),new CellConstraints(2,6,11,1,CellConstraints.RIGHT,CellConstraints.DEFAULT));
|
|
150 |
jpanel1.add(createPanel2(),new CellConstraints(2,8,11,1,CellConstraints.RIGHT,CellConstraints.DEFAULT));
|
|
150 |
jpanel1.add(createPanel1(),new CellConstraints(2,6,13,1,CellConstraints.RIGHT,CellConstraints.DEFAULT));
|
|
151 |
jpanel1.add(createPanel2(),new CellConstraints(2,8,13,1,CellConstraints.RIGHT,CellConstraints.DEFAULT));
|
|
151 | 152 |
cmbRoute.setName("cmbRoute"); |
152 | 153 |
jpanel1.add(cmbRoute,cc.xy(4,4)); |
153 | 154 |
|
154 | 155 |
txtMaximum.setName("txtMaximum"); |
155 |
jpanel1.add(txtMaximum,cc.xy(12,4));
|
|
156 |
jpanel1.add(txtMaximum,cc.xy(14,4));
|
|
156 | 157 |
|
157 | 158 |
txtMinimum.setName("txtMinimum"); |
158 |
jpanel1.add(txtMinimum,cc.xy(8,4));
|
|
159 |
jpanel1.add(txtMinimum,cc.xy(10,4));
|
|
159 | 160 |
|
160 |
addFillComponents(jpanel1,new int[]{ 1,2,3,4,5,6,7,8,9,10,11,12,13 },new int[]{ 1,2,3,4,5,6,7,8,9 }); |
|
161 |
cmbStretch.setName("cmbStretch"); |
|
162 |
jpanel1.add(cmbStretch,cc.xy(6,4)); |
|
163 |
|
|
164 |
addFillComponents(jpanel1,new int[]{ 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15 },new int[]{ 1,2,3,4,5,6,7,8,9 }); |
|
161 | 165 |
return jpanel1; |
162 | 166 |
} |
163 | 167 |
|
org.gvsig.lrs/trunk/org.gvsig.lrs/org.gvsig.lrs.swing/org.gvsig.lrs.swing.impl/src/main/java/org/gvsig/lrs/swing/impl/JLrsEditRouteCalibrationSelectIdRouteController.java | ||
---|---|---|
52 | 52 |
private ActionListenerSupport listeners = |
53 | 53 |
ToolsSwingLocator.getToolsSwingManager().createActionListenerSupport(); |
54 | 54 |
|
55 |
private FLayer layer;
|
|
55 |
private FLyrVect layer;
|
|
56 | 56 |
|
57 | 57 |
/** |
58 | 58 |
* @param layer |
59 | 59 |
* @throws LrsNeededParameterException |
60 | 60 |
* |
61 | 61 |
*/ |
62 |
public JLrsEditRouteCalibrationSelectIdRouteController(FLayer layer,
|
|
62 |
public JLrsEditRouteCalibrationSelectIdRouteController(FLyrVect layer,
|
|
63 | 63 |
LrsAlgorithmParams params) throws LrsNeededParameterException { |
64 | 64 |
super(); |
65 | 65 |
this.layer = layer; |
org.gvsig.lrs/trunk/org.gvsig.lrs/org.gvsig.lrs.swing/org.gvsig.lrs.swing.impl/src/main/java/org/gvsig/lrs/swing/impl/JLrsEditRouteCalibrationController.java | ||
---|---|---|
15 | 15 |
import java.util.ArrayList; |
16 | 16 |
import java.util.List; |
17 | 17 |
import java.util.Locale; |
18 |
import java.util.logging.Level; |
|
18 | 19 |
|
19 | 20 |
import javax.swing.ComboBoxModel; |
20 | 21 |
import javax.swing.DefaultComboBoxModel; |
21 | 22 |
import javax.swing.JComponent; |
23 |
import javax.swing.SwingUtilities; |
|
22 | 24 |
import javax.swing.event.DocumentEvent; |
23 | 25 |
import javax.swing.event.DocumentListener; |
24 | 26 |
import javax.swing.event.ListSelectionEvent; |
... | ... | |
34 | 36 |
import org.gvsig.fmap.dal.exception.ReadException; |
35 | 37 |
import org.gvsig.fmap.dal.feature.Feature; |
36 | 38 |
import org.gvsig.fmap.dal.feature.FeatureAttributeDescriptor; |
39 |
import org.gvsig.fmap.dal.feature.FeatureReference; |
|
37 | 40 |
import org.gvsig.fmap.dal.feature.FeatureSelection; |
38 | 41 |
import org.gvsig.fmap.dal.feature.FeatureSet; |
39 | 42 |
import org.gvsig.fmap.dal.feature.FeatureStore; |
... | ... | |
61 | 64 |
import org.gvsig.lrs.swing.api.JLrsAlgorithmParams; |
62 | 65 |
import org.gvsig.tools.ToolsLocator; |
63 | 66 |
import org.gvsig.tools.dispose.DisposableIterator; |
67 |
import org.gvsig.tools.dispose.DisposeUtils; |
|
64 | 68 |
import org.gvsig.tools.exception.BaseException; |
65 | 69 |
import org.gvsig.tools.i18n.I18nManager; |
66 | 70 |
import org.gvsig.tools.swing.api.ActionListenerSupport; |
67 | 71 |
import org.gvsig.tools.swing.api.ToolsSwingLocator; |
72 |
import org.gvsig.tools.util.LabeledValue; |
|
73 |
import org.gvsig.tools.util.LabeledValueImpl; |
|
68 | 74 |
import org.gvsig.tools.visitor.VisitCanceledException; |
69 | 75 |
import org.gvsig.tools.visitor.Visitor; |
70 | 76 |
|
... | ... | |
85 | 91 |
private ActionListenerSupport listeners = |
86 | 92 |
ToolsSwingLocator.getToolsSwingManager().createActionListenerSupport(); |
87 | 93 |
|
88 |
private FLayer layer;
|
|
94 |
private FLyrVect layer;
|
|
89 | 95 |
private FeatureAttributeDescriptor fieldIdRoute; |
90 | 96 |
private FeatureSet selectedFeatures; |
91 | 97 |
private Feature editedFeature; |
... | ... | |
104 | 110 |
* @throws LrsGettingParametersException |
105 | 111 |
* |
106 | 112 |
*/ |
107 |
public JLrsEditRouteCalibrationController(FLayer layer, MapContext mapContext, FeatureAttributeDescriptor fieldIdRoute,
|
|
113 |
public JLrsEditRouteCalibrationController(FLyrVect layer, MapContext mapContext, FeatureAttributeDescriptor fieldIdRoute,
|
|
108 | 114 |
LrsAlgorithmParams params) throws LrsNeededParameterException, LrsGettingParametersException { |
109 | 115 |
super(); |
110 | 116 |
this.layer = layer; |
... | ... | |
251 | 257 |
selectedFeatures=getSelectedFeatures(layer); |
252 | 258 |
validateSelectedFeatures(); |
253 | 259 |
|
254 |
String selectedRouteName=initCmbRoute();
|
|
260 |
String selectedRouteName = initCombosRouteAndStretch();
|
|
255 | 261 |
|
256 | 262 |
routeChanged(selectedRouteName); |
257 | 263 |
|
... | ... | |
438 | 444 |
this.tblLayerInfo.repaint(); |
439 | 445 |
} |
440 | 446 |
|
441 |
private String initCmbRoute() {
|
|
447 |
private String initCombosRouteAndStretch() {
|
|
442 | 448 |
final List<String> routeNames=new ArrayList<String>(); |
443 | 449 |
try { |
444 | 450 |
selectedFeatures.accept(new Visitor() { |
... | ... | |
459 | 465 |
logger.error("Impossible to obtain route names to fill ComboBox",e1); |
460 | 466 |
} |
461 | 467 |
|
462 |
String[] routeNamesArray=routeNames.toArray(new String[0]); |
|
468 |
cmbStretch.addItemListener((ItemEvent event) -> { |
|
469 |
if (event.getStateChange() == ItemEvent.SELECTED) { |
|
470 |
LabeledValue item = (LabeledValue) event.getItem(); |
|
471 |
SwingUtilities.invokeLater(() -> {stretchChanged((FeatureReference) item.getValue());}); |
|
472 |
} |
|
473 |
}); |
|
474 |
|
|
475 |
String[] routeNamesArray = routeNames.toArray(new String[0]); |
|
463 | 476 |
ComboBoxModel<String> routeModel = |
464 | 477 |
new DefaultComboBoxModel<String>(routeNamesArray); |
465 | 478 |
cmbRoute.setModel(routeModel); |
... | ... | |
469 | 482 |
public void itemStateChanged(ItemEvent event) { |
470 | 483 |
if (event.getStateChange() == ItemEvent.SELECTED) { |
471 | 484 |
String item = (String) event.getItem(); |
472 |
routeChanged((String)item);
|
|
485 |
SwingUtilities.invokeLater(() -> {routeChanged((String)item);});
|
|
473 | 486 |
} |
474 | 487 |
} |
475 | 488 |
}); |
489 |
|
|
490 |
|
|
476 | 491 |
return (String)cmbRoute.getSelectedItem(); |
477 | 492 |
} |
478 | 493 |
|
... | ... | |
481 | 496 |
|
482 | 497 |
final String routeName = selectedRouteName; |
483 | 498 |
|
499 |
DefaultComboBoxModel<LabeledValue> stretchComboModel = new DefaultComboBoxModel<>(); |
|
500 |
I18nManager i18n = ToolsLocator.getI18nManager(); |
|
484 | 501 |
DisposableIterator it = null; |
485 |
editedFeature = null; |
|
502 |
// editedFeature = null;
|
|
486 | 503 |
try { |
487 | 504 |
it = selectedFeatures.fastIterator(); |
488 |
while (it.hasNext() && editedFeature == null) { |
|
505 |
int i = 1; |
|
506 |
while (it.hasNext()) { |
|
489 | 507 |
Feature feature = (Feature) it.next(); |
490 | 508 |
if (feature.get(fieldIdRoute.getName()) instanceof String |
491 | 509 |
&& routeName.equals((String) feature.get(fieldIdRoute.getName()))) { |
492 |
editedFeature = feature.getCopy(); |
|
510 |
LabeledValue<FeatureReference> item = new LabeledValueImpl( |
|
511 |
i18n.getTranslation("_Stretch_{0}",new String[] {String.valueOf(i)}), |
|
512 |
feature.getReference() |
|
513 |
); |
|
514 |
stretchComboModel.addElement(item); |
|
515 |
i++; |
|
493 | 516 |
} |
494 | 517 |
} |
518 |
if (stretchComboModel.getSize() > 0) { |
|
519 |
cmbStretch.setEnabled(true); |
|
520 |
cmbStretch.setModel(stretchComboModel); |
|
521 |
cmbStretch.setSelectedIndex(0); |
|
522 |
stretchChanged( |
|
523 |
(FeatureReference) ((LabeledValue)(cmbStretch.getItemAt(0))).getValue() |
|
524 |
); |
|
525 |
|
|
526 |
} else { |
|
527 |
cmbStretch.setEnabled(false); |
|
528 |
} |
|
495 | 529 |
} catch (DataException e) { |
496 | 530 |
logger.error("Error getting table info", e); |
497 | 531 |
} finally { |
... | ... | |
499 | 533 |
it.dispose(); |
500 | 534 |
} |
501 | 535 |
} |
536 |
|
|
537 |
// reloadTableModel(); |
|
538 |
// reloadMaxMin((EditRouteCalibrationTableModel) tblLayerInfo.getModel()); |
|
539 |
// |
|
540 |
// graphics.removeGraphics(EDIT_ROUTECALIBRATION_GRAPHICS_ID); |
|
541 |
// showEditingRoute(); |
|
542 |
// mapContext.invalidate(); |
|
543 |
|
|
544 |
} |
|
545 |
|
|
546 |
private void stretchChanged(FeatureReference featRef) { |
|
547 |
|
|
548 |
|
|
549 |
try { |
|
550 |
editedFeature = featRef.getFeature().getCopy(); |
|
551 |
} catch (DataException ex) { |
|
552 |
logger.error("Error getting table info", ex); |
|
553 |
} |
|
554 |
|
|
555 |
FeatureStore store = null; |
|
556 |
FeatureSelection selection = null; |
|
557 |
try { |
|
558 |
store = layer.getFeatureStore(); |
|
559 |
selection = store.createFeatureSelection(); |
|
560 |
selection.select(editedFeature); |
|
561 |
store.setSelection(selection); |
|
562 |
} catch (DataException ex) { |
|
563 |
logger.warn("Error getting table info", ex); |
|
564 |
} finally { |
|
565 |
// DisposeUtils.disposeQuietly(selection); |
|
566 |
// DisposeUtils.disposeQuietly(store); |
|
567 |
} |
|
502 | 568 |
reloadTableModel(); |
503 | 569 |
reloadMaxMin((EditRouteCalibrationTableModel) tblLayerInfo.getModel()); |
504 | 570 |
|
... | ... | |
542 | 608 |
} |
543 | 609 |
|
544 | 610 |
private void doClose() { |
611 |
DisposeUtils.disposeQuietly(this.selectedFeatures); |
|
545 | 612 |
graphics.removeGraphics(EDIT_ROUTECALIBRATION_GRAPHICS_ID); |
546 | 613 |
mapContext.invalidate(); |
547 | 614 |
this.setVisible(false); |
... | ... | |
740 | 807 |
try { |
741 | 808 |
FeatureSelection selectedFeatures= featureStore.getFeatureSelection(); |
742 | 809 |
if (selectedFeatures!=null && !selectedFeatures.isEmpty()){ |
810 |
DisposeUtils.bind(selectedFeatures); |
|
743 | 811 |
return selectedFeatures; |
744 | 812 |
}else{ |
745 | 813 |
//If there is not selected features, all features are used |
Also available in: Unified diff