|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
The GraduatedScale interface provides a range of values that a scale may display, along with methods to map a value to a display point.
| Method Summary | |
boolean |
getIntersectionWithLine(java.awt.geom.Point2D.Float p1,
java.awt.geom.Point2D.Float p2,
DoubleRef outval)
Returns true if the infinite line defined by points p1 and p2 intersect with the path of the scale; outputs the associated value at that point with the out parameter outval. |
double |
getMaximum()
Gets the maximum value represented on the scale. |
double |
getMinimum()
Gets the minimum value represented on the scale. |
java.awt.geom.Point2D.Float |
getPointForValue(double value)
Returns a point that represents the given value. |
double |
getRange()
Gets the extent of the scale's range. |
double |
getValueAtPoint(java.awt.geom.Point2D.Float p)
Returns the value which would be represented at a given point. |
void |
setMaximum(double value)
Sets the maximum value represented on the scale. |
void |
setMinimum(double value)
Sets the minimum value represented on the scale. |
| Method Detail |
public double getMinimum()
public void setMinimum(double value)
value - Standard behavior dictates the scale be inclusive of the minimum and
maximum values.public double getMaximum()
public void setMaximum(double value)
value - Standard behavior dictates the scale be inclusive of the minimum and
maximum valuespublic double getRange()
Standard behavior returns the difference between the scale's Maximum and Minimum values.
public java.awt.geom.Point2D.Float getPointForValue(double value)
value - a double-precision floating point number
public double getValueAtPoint(java.awt.geom.Point2D.Float p)
p - a Point2D.Float in document coordinates
public boolean getIntersectionWithLine(java.awt.geom.Point2D.Float p1,
java.awt.geom.Point2D.Float p2,
DoubleRef outval)
p1 - a Point2D.Float in document coordinatesp2 - a Point2D.Float in document coordinatesoutval - a DoubleRef that is modified to hold the double value of the scale at the intersection point
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||