Changeset 30104 in osm for applications/editors
- Timestamp:
- 2013-11-29T00:19:15+01:00 (11 years ago)
- Location:
- applications/editors/josm/plugins/measurement
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/measurement/build.xml
r29854 r30104 4 4 <property name="commit.message" value="recompile dure to core change"/> 5 5 <!-- enter the *lowest* JOSM version this plugin is currently compatible with --> 6 <property name="plugin.main.version" value="6 162"/>6 <property name="plugin.main.version" value="6422"/> 7 7 8 8 <!-- Configure these properties (replace "..." accordingly). -
applications/editors/josm/plugins/measurement/src/org/openstreetmap/josm/plugins/measurement/MeasurementDialog.java
r29750 r30104 105 105 valuePanel.add(new JLabel(tr("Path Length"))); 106 106 107 pathLengthLabel = new JLabel( NavigatableComponent.getDistText(0));107 pathLengthLabel = new JLabel(getDistText(0)); 108 108 valuePanel.add(pathLengthLabel); 109 109 110 110 valuePanel.add(new JLabel(tr("Selection Length"))); 111 111 112 selectLengthLabel = new JLabel( NavigatableComponent.getDistText(0));112 selectLengthLabel = new JLabel(getDistText(0)); 113 113 valuePanel.add(selectLengthLabel); 114 114 115 115 valuePanel.add(new JLabel(tr("Selection Area"))); 116 116 117 selectAreaLabel = new JLabel( NavigatableComponent.getAreaText(0));117 selectAreaLabel = new JLabel(getAreaText(0)); 118 118 valuePanel.add(selectAreaLabel); 119 119 … … 135 135 } 136 136 137 protected String getDistText(double v) { 138 return NavigatableComponent.getSystemOfMeasurement().getDistText(v, new DecimalFormat("#0.000"), 1e-3); 139 } 140 141 protected String getAreaText(double v) { 142 return NavigatableComponent.getSystemOfMeasurement().getAreaText(v, new DecimalFormat("#0.000"), 1e-3); 143 } 144 145 protected String getAngleText(double v) { 146 return new DecimalFormat("#0.0").format(v) + " \u00b0"; 147 } 148 137 149 /** 138 150 * Cleans the active Measurement Layer … … 142 154 } 143 155 144 145 156 @Override 157 public void selectionChanged(Collection<? extends OsmPrimitive> newSelection) { 146 158 double length = 0.0; 147 159 double segAngle = 0.0; … … 186 198 } 187 199 188 final String lengthLabel = NavigatableComponent.getDistText(length);189 final String angleLabel = new DecimalFormat("#0.0").format(segAngle) + " \u00b0";190 final String areaLabel = NavigatableComponent.getAreaText(area);200 final String lengthLabel = getDistText(length); 201 final String angleLabel = getAngleText(segAngle); 202 final String areaLabel = getAreaText(area); 191 203 192 204 GuiHelper.runInEDT(new Runnable() {
Note:
See TracChangeset
for help on using the changeset viewer.