|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjview.AbstractFormattingTransform
public abstract class AbstractFormattingTransform
This class is a basic morpher in the way that it comprises a linear
mapping in x and y to pixel space starting at 0,0 with an extend of 1x1.
It can be constructed either giving the extend of
the true coordinate space or the true coordinate space with an offset.
The default formatting is done with the default number format instances,
as returned by NumberFormat.getNumberInstance(). It may be changed
with a call to the appropriate set...Format methods.
| Field Summary | |
|---|---|
private Format |
dxprim
A formatter for primary x distances. |
private Format |
dyprim
A formatter for primary y distances. |
private Format |
xprim
A formatter for primary x coordinates. |
private Format |
yprim
A formatter for primary y coordinates. |
| Constructor Summary | |
|---|---|
protected |
AbstractFormattingTransform()
Constructs a new abstract format. |
| Method Summary | |
|---|---|
String |
deltaFormatUserSpaceX(Rectangle2D delta)
Formats the x-coordinate difference of a secondary x-distance. |
String |
deltaFormatUserSpaceY(Rectangle2D delta)
Formats the y-coordinate difference of a secondary y-distance. |
private static String |
formatDouble(Format f,
double x)
Takes the specified format and proceeds into converting the double in the following way: If the format is a number format, use it directly on the double. If the format is a date format, interpret x as a JD and convert it to a time stamp. |
List |
formatUserCoordinates(Point2D pixel)
Formats the x-coordinate of a primary x-coordinate. |
String |
formatUserSpaceX(Point2D pixel)
Formats the x-coordinate of a secondary x-coordinate. |
String |
formatUserSpaceY(Point2D pixel)
Formats the y-coordinate of a secondary y-coordinate. |
Format |
getFormatUserX()
Gets the formatter assigned to the primary x coordinate. |
Format |
getFormatUserY()
Changes the default formatting for the primary y coordinate. |
void |
setDeltaFormatUserX(Format nf)
Changes the default formatting for the primary x distance. |
void |
setDeltaFormatUserY(Format nf)
Changes the default formatting for the primary y distance. |
void |
setFormatUserX(Format nf)
Changes the default formatting for the primary x coordinate. |
void |
setFormatUserY(Format nf)
Changes the default formatting for the primary y coordinate. |
void |
useEstimatedFormats(Rectangle2D view,
int xp,
int yp)
Estimates the decimal formatter to use on the axis. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface jview.FormattedTransforming |
|---|
estimateX, estimateY |
| Methods inherited from interface jview.DeltaTransforming |
|---|
toNormalizedDistance, toUserDistance |
| Methods inherited from interface jview.CoordinateTransforming |
|---|
toNormalizedSpace, toUserSpace |
| Field Detail |
|---|
private Format xprim
private Format yprim
private Format dxprim
private Format dyprim
| Constructor Detail |
|---|
protected AbstractFormattingTransform()
| Method Detail |
|---|
public String formatUserSpaceX(Point2D pixel)
Point2D.getX() from the #toSecondary
return.
formatUserSpaceX in interface FormattedTransformingpixel - The screen coordinate in normalized form.
public String formatUserSpaceY(Point2D pixel)
Point2D.getY() from the #toSecondary
return.
formatUserSpaceY in interface FormattedTransformingpixel - The screen coordinate in normalized form.
public List formatUserCoordinates(Point2D pixel)
Point2D.getX() from the #toPrimary
return.
formatUserCoordinates in interface FormattedTransformingpixel - The screen coordinate in normalized form.
public String deltaFormatUserSpaceX(Rectangle2D delta)
Point2D.getX() difference from
two #toSecondary calls.
deltaFormatUserSpaceX in interface DeltaFormattedTransformingpublic String deltaFormatUserSpaceY(Rectangle2D delta)
Point2D.getY() difference from
two #toPrimary calls.
deltaFormatUserSpaceY in interface DeltaFormattedTransformingpublic void setFormatUserX(Format nf)
public Format getFormatUserX()
getFormatUserX in interface FormattedTransformingpublic void setFormatUserY(Format nf)
public Format getFormatUserY()
getFormatUserY in interface FormattedTransformingpublic void setDeltaFormatUserX(Format nf)
public void setDeltaFormatUserY(Format nf)
public void useEstimatedFormats(Rectangle2D view,
int xp,
int yp)
useEstimatedFormats in interface FormattedTransforming
private static String formatDouble(Format f,
double x)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||