view
Interface DeltaFormattingMorphing

All Superinterfaces:
Morphing
All Known Implementing Classes:
BasicMorpher

public interface DeltaFormattingMorphing
extends Morphing

To extend the formatting further, one might think of a class that formats not the coordinates, but differences in the coordinates. If you start with two primary point p1 and p2 and want to format the distance in the secondary system, first convert you primary point to the secondary system, ala s1 = Morphing.toSecondary(java.awt.geom.Point2D)(p1) and s2 = Morphing.toSecondary(java.awt.geom.Point2D)(p2). Now, format the x-distance with deltaFormatSecondaryX(double)}Math.abs(s1.getX()-s2.getX()).

This interface extends only the Morphing interface, as in principle distances can be formatted even if the class does not know how to format coordinates. In reality, though, implementing classes will also implement the FormattingMorphing instance.


Method Summary
 String deltaFormatPrimaryX(double dxprim)
          Formats the x-coordinate difference of a primary x-distance.
 String deltaFormatPrimaryY(double dyprim)
          Formats the y-coordinate difference of a primary y-distance.
 String deltaFormatSecondaryX(double dxsec)
          Formats the x-coordinate difference of a secondary x-distance.
 String deltaFormatSecondaryY(double dysec)
          Formats the y-coordinate difference of a secondary y-distance.
 
Methods inherited from interface view.Morphing
toPrimary, toSecondary
 

Method Detail

deltaFormatSecondaryX

String deltaFormatSecondaryX(double dxsec)
Formats the x-coordinate difference of a secondary x-distance. Should be called with the Point2D#getX difference from two Morphing.toSecondary(java.awt.geom.Point2D) calls.

Returns:
A formatted version of the argument.

deltaFormatSecondaryY

String deltaFormatSecondaryY(double dysec)
Formats the y-coordinate difference of a secondary y-distance. Should be called with the Point2D#getY difference from two Morphing.toPrimary(java.awt.geom.Point2D) calls.

Returns:
A formatted version of the argument.

deltaFormatPrimaryX

String deltaFormatPrimaryX(double dxprim)
Formats the x-coordinate difference of a primary x-distance. Should be called with the Point2D#getX difference from two Morphing.toPrimary(java.awt.geom.Point2D) calls.

Returns:
A formatted version of the argument.

deltaFormatPrimaryY

String deltaFormatPrimaryY(double dyprim)
Formats the y-coordinate difference of a primary y-distance. Should be called with the Point2D#getY difference from two Morphing.toPrimary(java.awt.geom.Point2D) calls.

Returns:
A formatted version of the argument.