Class Point
- java.lang.Object
-
- org.eclipse.birt.chart.computation.Point
-
public class Point extends java.lang.Object
TheLocation
class defines a point specified indouble
precision.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description double
getX()
Returns the X coordinate of thisLocation
indouble
precision.double
getY()
Returns the Y coordinate of thisLocation
indouble
precision.void
setLocation(double x, double y)
Sets the location of thisLocation
to the specifieddouble
coordinates.void
setX(double x)
void
setY(double y)
java.lang.String
toString()
Returns aString
that represents the value of thisLocation
.void
translate(double dTranslateX, double dTranslateY)
-
-
-
Constructor Detail
-
Point
public Point()
Constructs and initializes aLocation
with coordinates (0, 0).
-
Point
public Point(Location lo)
-
Point
public Point(double x, double y)
Constructs and initializes aLocation
with the specified coordinates.- Parameters:
x
- , y the coordinates to which to set the newly constructedLocation
-
-
Method Detail
-
getX
public double getX()
Returns the X coordinate of thisLocation
indouble
precision.- Returns:
- the X coordinate of this
Location
.
-
getY
public double getY()
Returns the Y coordinate of thisLocation
indouble
precision.- Returns:
- the Y coordinate of this
Location
.
-
setLocation
public void setLocation(double x, double y)
Sets the location of thisLocation
to the specifieddouble
coordinates.- Parameters:
x
- , y the coordinates to which to set thisLocation
-
toString
public java.lang.String toString()
Returns aString
that represents the value of thisLocation
.- Overrides:
toString
in classjava.lang.Object
- Returns:
- a string representation of this
Location
.
-
setX
public void setX(double x)
-
setY
public void setY(double y)
-
translate
public void translate(double dTranslateX, double dTranslateY)
-
-