|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface DeltaFormattingMorphing
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 |
|---|
String deltaFormatSecondaryX(double dxsec)
Point2D#getX difference from
two Morphing.toSecondary(java.awt.geom.Point2D) calls.
String deltaFormatSecondaryY(double dysec)
Point2D#getY difference from
two Morphing.toPrimary(java.awt.geom.Point2D) calls.
String deltaFormatPrimaryX(double dxprim)
Point2D#getX difference from
two Morphing.toPrimary(java.awt.geom.Point2D) calls.
String deltaFormatPrimaryY(double dyprim)
Point2D#getY difference from
two Morphing.toPrimary(java.awt.geom.Point2D) calls.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||