|
Eclipse Draw2d 3.3 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.draw2d.geometry.Point
org.eclipse.draw2d.geometry.PrecisionPoint
public class PrecisionPoint
Field Summary | |
---|---|
double |
preciseX
Deprecated. Use setPreciseX(double) and preciseX()
instead. This field will become private in future versions. |
double |
preciseY
Deprecated. Use setPreciseY(double) and preciseY()
instead. This field will become private in future versions. |
Fields inherited from class org.eclipse.draw2d.geometry.Point |
---|
SINGLETON, x, y |
Constructor Summary | |
---|---|
PrecisionPoint()
Constructor for PrecisionPoint. |
|
PrecisionPoint(double x,
double y)
Constructor for PrecisionPoint. |
|
PrecisionPoint(int x,
int y)
Constructor for PrecisionPoint. |
|
PrecisionPoint(Point p)
Constructor for PrecisionPoint. |
Method Summary | |
---|---|
boolean |
equals(java.lang.Object o)
Test for equality. |
Point |
getCopy()
|
Dimension |
getDifference(Point p)
Calculates the difference in between this Point and the one specified. |
PrecisionPoint |
getPreciseCopy()
Returns a precise copy of this. |
void |
performScale(double factor)
Scales this object by the scale factor. |
void |
performTranslate(int dx,
int dy)
Translates this object horizontally by dx and vertically by
dy . |
double |
preciseX()
Returns double x coordinate |
double |
preciseY()
Returns double y coordinate |
Point |
scale(double xFactor,
double yFactor)
Scales this Point by the specified values. |
Point |
setLocation(int x,
int y)
Sets the location of this Point to the provided x and y locations. |
Point |
setLocation(Point pt)
Sets the location of this Point to the specified Point. |
PrecisionPoint |
setPreciseLocation(double x,
double y)
Sets the precise location of this PrecisionPoint to the given x and y values. |
PrecisionPoint |
setPreciseLocation(PrecisionPoint p)
Sets the precise location of this PrecisionPoint to the x and y values of the given one. |
PrecisionPoint |
setPreciseX(double x)
Sets the precise x value of this PrecisionPoint to the given value. |
PrecisionPoint |
setPreciseY(double y)
Sets the precise y value of this PrecisionPoint to the given value. |
Point |
setX(int x)
Sets the x value of this Point to the given value. |
Point |
setY(int y)
Sets the y value of this Point to the given value; |
Point |
translate(Dimension d)
Shifts this Point by the values of the Dimension along each axis, and returns this for convenience. |
Point |
translate(int dx,
int dy)
Shifts this Point by the values supplied along each axes, and returns this for convenience. |
Point |
translate(Point p)
Shifts the location of this Point by the location of the input Point along each of the axes, and returns this for convenience. |
Point |
transpose()
Transposes this object. |
void |
updateInts()
Deprecated. This method should not be accessed by clients any more (it will be made private in future releases). The update of integer and precision fields is performed automatically if preciseX and preciseY field values are not
manipulated directly, but only via respective methods offered
by this class. |
Methods inherited from class org.eclipse.draw2d.geometry.Point |
---|
equals, getDistance, getDistance2, getDistanceOrthogonal, getNegated, getPosition, getScaled, getSWTPoint, getTranslated, getTranslated, getTranslated, getTransposed, hashCode, max, min, negate, scale, toString, x, y |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public double preciseX
setPreciseX(double)
and preciseX()
instead. This field will become private in future versions.
public double preciseY
setPreciseY(double)
and preciseY()
instead. This field will become private in future versions.
Constructor Detail |
---|
public PrecisionPoint()
public PrecisionPoint(double x, double y)
x
- X valuey
- Y valuepublic PrecisionPoint(int x, int y)
x
- X valuey
- Y valuepublic PrecisionPoint(Point p)
p
- Point from which the initial values are takenMethod Detail |
---|
public boolean equals(java.lang.Object o)
Point
equals
in class Point
o
- Object being tested for equality
Point.equals(java.lang.Object)
public Point getCopy()
getCopy
in class Point
Point.getCopy()
public Dimension getDifference(Point p)
Point
getDifference
in class Point
p
- The Point being subtracted from this Point
Point.getDifference(org.eclipse.draw2d.geometry.Point)
public PrecisionPoint getPreciseCopy()
public void performScale(double factor)
Translatable
performScale
in interface Translatable
performScale
in class Point
factor
- The scale factorPoint.performScale(double)
public void performTranslate(int dx, int dy)
Translatable
dx
and vertically by
dy
.
performTranslate
in interface Translatable
performTranslate
in class Point
dx
- The amount to translate horizontallydy
- The amount to translate verticallyPoint.performTranslate(int, int)
public double preciseX()
Point
double
x coordinate
preciseX
in class Point
double
x coordinatePoint.preciseX()
public double preciseY()
Point
double
y coordinate
preciseY
in class Point
double
y coordinatePoint.preciseY()
public Point scale(double xFactor, double yFactor)
Point
scale
in class Point
xFactor
- horizontal scale factoryFactor
- vertical scale factor
this
for conveniencePoint.scale(double, double)
public Point setLocation(int x, int y)
Point
setLocation
in class Point
x
- the x locationy
- the y location
this
for conveniencePoint.setLocation(int, int)
public Point setLocation(Point pt)
Point
setLocation
in class Point
pt
- the Location
this
for conveniencePoint.setLocation(Point)
public PrecisionPoint setPreciseLocation(double x, double y)
x
- The new x valuey
- The new y value
public PrecisionPoint setPreciseLocation(PrecisionPoint p)
p
- The PrecisionPoint specifying the new x and y values.
public PrecisionPoint setPreciseX(double x)
x
- The new x value
public PrecisionPoint setPreciseY(double y)
y
- The new y value
public Point setX(int x)
Point
setX
in class Point
x
- The new x value
Point.setX(int)
public Point setY(int y)
Point
setY
in class Point
y
- The new y value
Point.setY(int)
public Point translate(Dimension d)
Point
translate
in class Point
d
- Dimension by which the origin is being shifted.
this
for conveniencePoint.translate(org.eclipse.draw2d.geometry.Dimension)
public Point translate(int dx, int dy)
Point
translate
in class Point
dx
- Amount by which point is shifted along X axis.dy
- Amount by which point is shifted along Y axis.
this
for conveniencePoint.translate(int, int)
public Point translate(Point p)
Point
translate
in class Point
p
- Point to which the origin is being shifted.
this
for conveniencePoint.translate(org.eclipse.draw2d.geometry.Point)
public Point transpose()
Point
transpose
in class Point
this
for conveniencePoint.transpose()
public final void updateInts()
preciseX
and preciseY
field values are not
manipulated directly, but only via respective methods offered
by this class.
|
Eclipse Draw2d 3.3 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |