|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--org.omegahat.Graphics.Primitives.UDouble
Double values with an associated unit, used
in specifying RegionDescriptionInts.
All the transformation methods map to Normalized Parent Coordinates NPC.
These are usually processed by RectRegionInt
to map to Normalized Device Coordinates (NDC) when plotting, etc.
See class Unit for the possible units.
| Constructor Summary | |
UDouble()
|
|
UDouble(double value)
Specification with no unit type. |
|
UDouble(double value,
int unit)
Specification of value and type. |
|
| Method Summary | |
java.lang.Object |
addValue(double val,
boolean inPlace)
|
java.lang.Object |
addValue(double val,
int unit,
boolean inPlace)
|
java.lang.Object |
addValue(java.lang.Object rhs,
boolean inPlace)
Add the specified object to this UDouble |
UDouble |
createInstance(double val,
int unit)
|
java.lang.Object |
subtractValue(java.lang.Object value,
boolean inPlace)
|
java.lang.String |
toString()
|
protected double |
transformDimension(ScaleInt s,
double thisCM,
double otherCM,
int fontSize)
Transform from the current units to Normalized Parent Coordinates (NPC) given the appropriate information from the parent. |
double |
transformHeight(ScaleInt s,
int origin,
double widthCM,
double heightCM,
int fontSize)
Maps the value of this object to NPC and adjusts for the position of the origin and the potentially different directions for the drawing coordinates. |
protected double |
transformLocation(ScaleInt s,
double thisCM,
double otherCM,
int fontSize)
Transform from the current units to Normalized Parent Coordinates (NPC) given the appropriate information from the parent. |
double |
transformWidth(ScaleInt s,
int origin,
double widthCM,
double heightCM,
int fontSize)
|
double |
transformX(ScaleInt s,
int origin,
double widthCM,
double heightCM,
int fontSize)
Map the value to parent coordinates and adjust for the location of the origin
in the horizontal dimension. |
double |
transformY(ScaleInt s,
int origin,
double widthCM,
double heightCM,
int fontSize)
Map the value to parent coordinates and adjust for the location of the origin
in the vertical dimension. |
int |
unit()
Accessor for getting the type of unit. |
int |
unit(int u)
Accessor for setting the type of unit. |
double |
value()
Accessor for getting the numeric value represented by this object. |
double |
value(double v)
Accessor for setting the numeric value represented by this object. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public UDouble(double value)
public UDouble(double value,
int unit)
public UDouble()
| Method Detail |
public int unit()
public int unit(int u)
public double value()
public double value(double v)
protected double transformLocation(ScaleInt s,
double thisCM,
double otherCM,
int fontSize)
s - the components's scale on which this value should be transformed.thisCM - the absolute size of the appropriate dimensions (i.e. width or height)
component in centimeters.otherCM - the absolute size of the other dimension for use in square coordinates (SNPC).fontSize - the size of the component's fonts, in absolute points.
public double transformX(ScaleInt s,
int origin,
double widthCM,
double heightCM,
int fontSize)
origin
in the horizontal dimension.s - the components's scale on which this value should be transformed.thisCM - the absolute size of the appropriate dimensions (i.e. width or height)
component in centimeters.otherCM - the absolute size of the other dimension for use in square coordinates (SNPC).fontSize - the size of the component's fonts, in absolute points.#transformLocation(ScaleInt, double, double, double)
public double transformY(ScaleInt s,
int origin,
double widthCM,
double heightCM,
int fontSize)
origin
in the vertical dimension.s - the components's scale on which this value should be transformed.thisCM - the absolute size of the appropriate dimensions (i.e. width or height)
component in centimeters.otherCM - the absolute size of the other dimension for use in square coordinates (SNPC).fontSize - the size of the component's fonts, in absolute points.#transformLocation(ScaleInt, double, double, double)
protected double transformDimension(ScaleInt s,
double thisCM,
double otherCM,
int fontSize)
s - the components's scale on which this value should be transformed.thisCM - the absolute size of the appropriate dimensions (i.e. width or height)
component in centimeters.otherCM - the absolute size of the other dimension for use in square coordinates (SNPC).fontSize - the size of the component's fonts, in absolute points.
public double transformWidth(ScaleInt s,
int origin,
double widthCM,
double heightCM,
int fontSize)
s - the components's scale on which this value should be transformed.thisCM - the absolute size of the appropriate dimensions (i.e. width or height)
component in centimeters.otherCM - the absolute size of the other dimension for use in square coordinates (SNPC).fontSize - the size of the component's fonts, in absolute points.
public double transformHeight(ScaleInt s,
int origin,
double widthCM,
double heightCM,
int fontSize)
s - the components's scale on which this value should be transformed.thisCM - the absolute size of the appropriate dimensions (i.e. width or height)
component in centimeters.otherCM - the absolute size of the other dimension for use in square coordinates (SNPC).fontSize - the size of the component's fonts, in absolute points.
public java.lang.Object addValue(java.lang.Object rhs,
boolean inPlace)
public java.lang.Object addValue(double val,
boolean inPlace)
public java.lang.Object addValue(double val,
int unit,
boolean inPlace)
public java.lang.Object subtractValue(java.lang.Object value,
boolean inPlace)
public UDouble createInstance(double val,
int unit)
public java.lang.String toString()
toString in class java.lang.Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||