public class PrecisionPoint extends Point
| Modifier and Type | Field and Description |
|---|---|
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. |
| Constructor and Description |
|---|
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.
|
| Modifier and Type | Method and Description |
|---|---|
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(double dx,
double dy)
Shifts this Point by the values supplied along each axes, 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.
|
equals, getDistance, getDistance2, getDistanceOrthogonal, getNegated, getPosition, getScaled, getScaled, getSWTPoint, getTranslated, getTranslated, getTranslated, getTranslated, getTransposed, hashCode, max, min, negate, scale, toString, x, ypublic 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.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 takenpublic boolean equals(java.lang.Object o)
Pointequals in class Pointo - Object being tested for equalityPoint.equals(java.lang.Object)public Point getCopy()
getCopy in class PointPoint.getCopy()public Dimension getDifference(Point p)
PointgetDifference in class Pointp - The Point being subtracted from this PointPoint.getDifference(org.eclipse.draw2d.geometry.Point)public PrecisionPoint getPreciseCopy()
public void performScale(double factor)
TranslatableperformScale in interface TranslatableperformScale in class Pointfactor - The scale factorPoint.performScale(double)public void performTranslate(int dx,
int dy)
Translatabledx and vertically by
dy.performTranslate in interface TranslatableperformTranslate in class Pointdx - The amount to translate horizontallydy - The amount to translate verticallyPoint.performTranslate(int, int)public double preciseX()
Pointdouble x coordinatepreciseX in class Pointdouble x coordinatePoint.preciseX()public double preciseY()
Pointdouble y coordinatepreciseY in class Pointdouble y coordinatePoint.preciseY()public Point scale(double xFactor, double yFactor)
Pointscale in class PointxFactor - horizontal scale factoryFactor - vertical scale factorthis for conveniencePoint.scale(double, double)public Point setLocation(int x, int y)
PointsetLocation in class Pointx - the x locationy - the y locationthis for conveniencePoint.setLocation(int, int)public Point setLocation(Point pt)
PointsetLocation in class Pointpt - the Locationthis for conveniencePoint.setLocation(Point)public PrecisionPoint setPreciseLocation(double x, double y)
x - The new x valuey - The new y valuepublic PrecisionPoint setPreciseLocation(PrecisionPoint p)
p - The PrecisionPoint specifying the new x and y values.public PrecisionPoint setPreciseX(double x)
x - The new x valuepublic PrecisionPoint setPreciseY(double y)
y - The new y valuepublic Point setX(int x)
PointsetX in class Pointx - The new x valuePoint.setX(int)public Point setY(int y)
PointsetY in class Pointy - The new y valuePoint.setY(int)public Point translate(Dimension d)
Pointtranslate in class Pointd - Dimension by which the origin is being shifted.this for conveniencePoint.translate(org.eclipse.draw2d.geometry.Dimension)public Point translate(int dx, int dy)
Pointtranslate in class Pointdx - 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(double dx, double dy)
Pointtranslate in class Pointdx - Amount by which point is shifted along X axis.dy - Amount by which point is shifted along Y axis.this for conveniencePoint.translate(double, double)public Point translate(Point p)
Pointtranslate in class Pointp - Point to which the origin is being shifted.this for conveniencePoint.translate(org.eclipse.draw2d.geometry.Point)public Point transpose()
Pointtranspose in class Pointthis 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.Copyright (c) IBM Corp. and others 2000, 2011. All Rights Reserved.