org.openstreetmap.josm.gui
Class NavigatableComponent.SystemOfMeasurement

java.lang.Object
  extended by org.openstreetmap.josm.gui.NavigatableComponent.SystemOfMeasurement
Enclosing class:
NavigatableComponent

public static class NavigatableComponent.SystemOfMeasurement
extends java.lang.Object

A system of units used to express length and area measurements.

Since:
3406

Field Summary
 java.lang.String aName
           
 double aValue
           
 java.lang.String bName
           
 double bValue
           
 
Constructor Summary
NavigatableComponent.SystemOfMeasurement(double aValue, java.lang.String aName, double bValue, java.lang.String bName)
          System of measurement.
 
Method Summary
 java.lang.String getAreaText(double area)
          Returns the text describing the given area in this system of measurement.
 java.lang.String getDistText(double dist)
          Returns the text describing the given distance in this system of measurement.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

aValue

public final double aValue

bValue

public final double bValue

aName

public final java.lang.String aName

bName

public final java.lang.String bName
Constructor Detail

NavigatableComponent.SystemOfMeasurement

public NavigatableComponent.SystemOfMeasurement(double aValue,
                                                java.lang.String aName,
                                                double bValue,
                                                java.lang.String bName)
System of measurement. Currently covers only length (and area) units. If a quantity x is given in m (x_m) and in unit a (x_a) then it translates as x_a == x_m / aValue

Method Detail

getDistText

public java.lang.String getDistText(double dist)
Returns the text describing the given distance in this system of measurement.

Parameters:
dist - The distance in metres
Returns:
The text describing the given distance in this system of measurement.

getAreaText

public java.lang.String getAreaText(double area)
Returns the text describing the given area in this system of measurement.

Parameters:
area - The area in square metres
Returns:
The text describing the given area in this system of measurement.
Since:
5560


JOSM