jview
Interface DeltaFormattedTransforming

All Superinterfaces:
CoordinateTransforming, DeltaTransforming
All Known Implementing Classes:
AbstractFormattingTransform, BasicTransform, CylindricalEqualAreaProjection, CylindricalEquidistantProjection, CylindricalProjection, JFitsCanvas.PixelCoordinate, MercatorProjection, OrthographicTransformation, SelectTransform

public interface DeltaFormattedTransforming
extends DeltaTransforming

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 = #toSecondary(p1) and s2 = #toSecondary(p2). Now, format the x-distance with #deltaFormatSecondaryX}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 deltaFormatUserSpaceX(Rectangle2D dxsec)
          Formats the x-coordinate difference of a secondary x-distance.
 String deltaFormatUserSpaceY(Rectangle2D dysec)
          Formats the y-coordinate difference of a secondary y-distance.
 
Methods inherited from interface jview.DeltaTransforming
toNormalizedDistance, toUserDistance
 
Methods inherited from interface jview.CoordinateTransforming
toNormalizedSpace, toUserSpace
 

Method Detail

deltaFormatUserSpaceX

String deltaFormatUserSpaceX(Rectangle2D dxsec)
Formats the x-coordinate difference of a secondary x-distance. Should be called with the Point2D#getX difference from two #toSecondary calls.

Returns:
A formatted version of the argument.

deltaFormatUserSpaceY

String deltaFormatUserSpaceY(Rectangle2D dysec)
Formats the y-coordinate difference of a secondary y-distance. Should be called with the Point2D#getY difference from two #toPrimary calls.

Returns:
A formatted version of the argument.