|
Method Summary |
|
static double |
angle(double x,
double y)
Returns the angle in degrees from the origin to the point
(x, y). |
|
static double |
cosD(double angle)
Returns the trigonometric sine of its argument where angle
is expressed in degrees. |
|
static double |
distance(double x,
double y)
Computes the distance between the origin and the point
(x, y). |
|
static double |
distance(double x0,
double y0,
double x1,
double y1)
Computes the distance between the points (x0, y0)
and (x1, y1). |
|
void |
drawLine(double dx,
double dy)
Draws a line segment with displacements dx and dy. |
|
void |
drawLineUsingPolarCoordinates(double r,
double theta)
Draws a line segment using displacements given in polar coordinates. |
|
void |
endFilledRegion()
Ends the definition of a region and fills it with the current color. |
|
void |
eraseAll()
Erases the entire path drawn by the pen and returns it to the origin. |
|
Rectangle |
getBounds()
Returns the bounding box for the entire figure traced by the pen. |
|
double |
getDelay()
Returns the current delay set by in milliseconds. |
|
double |
getHeight()
Returns the height of this bounding box covered by the pen trace. |
|
Image |
getPenImage()
Returns the image used to draw the pen when setPenVisible has been
called. |
|
Dimension |
getSize()
Returns the size of this bounding box covered by the pen trace. |
|
double |
getWidth()
Returns the width of this bounding box covered by the pen trace. |
|
boolean |
isPenVisible()
Returns whether the pen is visible. |
|
void |
paint(Graphics g)
Implements the paint operation for this graphical object. |
|
void |
scale(double sx,
double sy)
Sets the scale factors sx and sy. |
|
void |
setColor(Color color)
Sets the color of the pen. |
|
void |
setDelay(double delayTime)
Sets a delay factor for each motion of the pen, specified in milliseconds. |
|
void |
setFillColor(Color color)
Sets the color used to fill a region. |
|
void |
setLocation(double x,
double y)
Moves the pen to the point (x, y) without drawing a line. |
|
void |
setPenImage(Image image)
Sets the image of the pen to be the specified image. |
|
void |
setPenVisible(boolean visible)
Sets whether the pen itself is visible. |
|
static double |
sinD(double angle)
Returns the trigonometric sine of its argument where angle
is expressed in degrees. |
|
void |
startFilledRegion()
Starts defining a region that will be filled with the current color. |
|
static double |
tanD(double angle)
Returns the trigonometric sine of its argument where angle
is expressed in degrees. |
|
static double |
toDegrees(double radians)
Converts an angle from radians to degrees. |
|
static double |
toRadians(double degrees)
Converts an angle from degrees to radians. |
|
void |
translateUsingPolarCoordinates(double r,
double theta)
Moves the pen using displacements given in polar coordinates without drawing
a line. |
|
Inherited Method Summary |
|
Color |
getColor()
Returns the color used to display this object.
[Inherited from GObject]
|
|
Color |
getFillColor()
Returns the color used to display the filled region of this object.
[Inherited from GObject]
|
|
Point |
getLocation()
Returns the nearest Point corresponding to the location of this object.
[Inherited from GObject]
|
|
double |
getX()
Returns the x-coordinate of the object.
[Inherited from GObject]
|
|
double |
getY()
Returns the y-coordinate of the object.
[Inherited from GObject]
|
|
boolean |
isVisible()
Checks to see whether this object is visible.
[Inherited from GObject]
|
|
void |
moveToBack()
Moves this object to the back of the display in stacking order.
[Inherited from GObject]
|
|
void |
moveToFront()
Moves this object to the front of the display in stacking order.
[Inherited from GObject]
|
|
void |
scale(double sf)
Scales the object on the screen by the scale factor sf, which applies
in both dimensions.
[Inherited from GObject]
|
|
void |
setVisible(boolean visible)
Sets whether this object is visible.
[Inherited from GObject]
|
|
void |
translate(double dx,
double dy)
Moves the object on the screen using the displacements dx and dy.
[Inherited from GObject]
|