com.vividsolutions.jump.workbench.ui.cursortool
Class CoordinateListMetrics

java.lang.Object
  extended by com.vividsolutions.jump.workbench.ui.cursortool.CoordinateListMetrics

public class CoordinateListMetrics
extends java.lang.Object

Generates strings describing metrics for coordinate lists.

Version:
1.0
Author:
Martin Davis

Constructor Summary
CoordinateListMetrics()
           
 
Method Summary
static double angle(java.util.List coordinates)
          Computes the angle between the last 2 segments in the coordinates list
 void displayMetrics(java.util.List coordinates, LayerViewPanel panel)
           
static double distance(java.util.List coordinates)
           
 java.lang.String getMetricsString(java.util.List coordinates, LayerViewPanel panel)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CoordinateListMetrics

public CoordinateListMetrics()
Method Detail

displayMetrics

public void displayMetrics(java.util.List coordinates,
                           LayerViewPanel panel)

getMetricsString

public java.lang.String getMetricsString(java.util.List coordinates,
                                         LayerViewPanel panel)

distance

public static double distance(java.util.List coordinates)

angle

public static double angle(java.util.List coordinates)
Computes the angle between the last 2 segments in the coordinates list

Parameters:
coordinates -
Returns:
the angle in degrees