Changeset 28898 in osm for applications
- Timestamp:
- 2012-11-04T00:01:55+01:00 (12 years ago)
- Location:
- applications/editors/josm/plugins/measurement
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/measurement/build.xml
r27852 r28898 27 27 <project name="measurement" default="dist" basedir="."> 28 28 <property name="commit.message" value="recompile dure to core change"/> 29 <property name="plugin.main.version" value=" 4980"/>29 <property name="plugin.main.version" value="5560"/> 30 30 <property name="josm" location="../../core/dist/josm-custom.jar"/> 31 31 <property name="plugin.dist.dir" value="../../dist"/> 32 32 <property name="plugin.build.dir" value="build"/> 33 33 <property name="plugin.jar" value="${plugin.dist.dir}/${ant.project.name}.jar"/> 34 <property name="ant.build.javac.target" value="1. 5"/>34 <property name="ant.build.javac.target" value="1.6"/> 35 35 <target name="init"> 36 36 <mkdir dir="${plugin.build.dir}"/> -
applications/editors/josm/plugins/measurement/src/org/openstreetmap/josm/plugins/measurement/MeasurementDialog.java
r28804 r28898 1 1 package org.openstreetmap.josm.plugins.measurement; 2 2 3 import static org.openstreetmap.josm.tools.I18n.marktr;4 3 import static org.openstreetmap.josm.tools.I18n.tr; 5 4 … … 21 20 import org.openstreetmap.josm.data.osm.OsmPrimitive; 22 21 import org.openstreetmap.josm.data.osm.Way; 22 import org.openstreetmap.josm.gui.NavigatableComponent; 23 23 import org.openstreetmap.josm.gui.SideButton; 24 24 import org.openstreetmap.josm.gui.dialogs.ToggleDialog; … … 87 87 valuePanel.add(new JLabel(tr("Path Length"))); 88 88 89 pathLengthLabel = new JLabel( "0 m");89 pathLengthLabel = new JLabel(NavigatableComponent.getDistText(0)); 90 90 valuePanel.add(pathLengthLabel); 91 91 92 92 valuePanel.add(new JLabel(tr("Selection Length"))); 93 93 94 selectLengthLabel = new JLabel( "0 m");94 selectLengthLabel = new JLabel(NavigatableComponent.getDistText(0)); 95 95 valuePanel.add(selectLengthLabel); 96 96 97 97 valuePanel.add(new JLabel(tr("Selection Area"))); 98 98 99 selectAreaLabel = new JLabel( "0 m\u00b2");99 selectAreaLabel = new JLabel(NavigatableComponent.getAreaText(0)); 100 100 valuePanel.add(selectAreaLabel); 101 101 … … 159 159 } 160 160 } 161 selectLengthLabel.setText( new DecimalFormat("#0.00").format(length)+ " m");161 selectLengthLabel.setText(NavigatableComponent.getDistText(length)); 162 162 segAngleLabel.setText(new DecimalFormat("#0.0").format(segAngle) + " \u00b0"); 163 selectAreaLabel.setText( new DecimalFormat("#0.00").format(area)+ " m\u00b2");163 selectAreaLabel.setText(NavigatableComponent.getAreaText(area)); 164 164 } 165 165 -
applications/editors/josm/plugins/measurement/src/org/openstreetmap/josm/plugins/measurement/MeasurementLayer.java
r28624 r28898 10 10 import java.awt.event.ActionEvent; 11 11 import java.awt.event.MouseEvent; 12 import java.text.DecimalFormat;13 12 import java.util.ArrayList; 14 13 import java.util.Collection; … … 35 34 import org.openstreetmap.josm.data.osm.visitor.BoundingXYVisitor; 36 35 import org.openstreetmap.josm.gui.MapView; 36 import org.openstreetmap.josm.gui.NavigatableComponent; 37 37 import org.openstreetmap.josm.gui.dialogs.LayerListDialog; 38 38 import org.openstreetmap.josm.gui.dialogs.LayerListPopup; … … 139 139 last = p; 140 140 } 141 DecimalFormat nf = new DecimalFormat("#0.00");142 DecimalFormat nf2 = new DecimalFormat("#0.0");143 141 if (MeasurementPlugin.measurementDialog != null) { 144 MeasurementPlugin.measurementDialog.pathLengthLabel.setText( pathLength < 800?nf2.format(pathLength)+ " m":nf.format(pathLength/1000) + " km");142 MeasurementPlugin.measurementDialog.pathLengthLabel.setText(NavigatableComponent.getDistText(pathLength)); 145 143 } 146 144 }
Note:
See TracChangeset
for help on using the changeset viewer.