All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class objects.EuRadius

java.lang.Object
   |
   +----objects.EuObject
           |
           +----objects.EuRadius

public class EuRadius
extends EuObject
implements constants
An instance of this class represents a radius, i.e. a nonnegative integer which can be used to form circles.


Variable Index

 o radius

Constructor Index

 o EuRadius()
This alternative constructor instantiates the protoRadius, indicating an unset radius.
 o EuRadius(double)
The constructor checks that the radius is indeed a nonnegative integer.

Method Index

 o atParameter(double)
Call has no meaning, return (0,0)
 o castIdentical(EuObject)
 o closureContains(EuVector)
Determines whether or not a given point is contained in the closure of the present object (up to a small error,
 o draw(Graphics, mouseInfo)
Draw an oval with the radius centered at the top left corner.
 o interiorContains(EuVector)
Determines whether or not a given point is contained in the interior the present object (up to a small error,
 o mouseVicinity(mouseVector, mouseInfo)
The radius is not accessible by mouse, so return false.
 o myFullShadow()
 o overlaps(EuObject)
 o setShadow(int)
Sets the
 o subType()
 o type()

Variables

 o radius
 public EuReal radius

Constructors

 o EuRadius
 public EuRadius(double r) throws LeaRuntimeException, WarningTurnedException
The constructor checks that the radius is indeed a nonnegative integer. A zero radius leads to a warning.

Parameters:
r - the radius
Throws: LeaRuntimeException,
WarningTurnedException
 o EuRadius
 public EuRadius()
This alternative constructor instantiates the protoRadius, indicating an unset radius. It is distinguihed internally by having a negative radius.

Methods

 o atParameter
 public EuWorkVector atParameter(double t)
Call has no meaning, return (0,0)

Parameters:
t - ignored
Returns:
null vector
Overrides:
atParameter in class EuObject
 o draw
 public void draw(Graphics g,
                  mouseInfo info)
Draw an oval with the radius centered at the top left corner.

Parameters:
g - the Graphics handle on the window
info - information used in scaling and positioning the object
Overrides:
draw in class EuObject
 o mouseVicinity
 public boolean mouseVicinity(mouseVector mouseAt,
                              mouseInfo info)
The radius is not accessible by mouse, so return false.

Parameters:
mouseAt - The coordinates of the mouse position, ignored
info - information used in locating the object on screen, irrelevant
Returns:
false
Overrides:
mouseVicinity in class EuObject
 o castIdentical
 public boolean castIdentical(EuObject other)
Parameters:
other - the object being compared to the present one
Returns:
true if passed object is a @see EuRadius with the same @see radius parameter.
Overrides:
castIdentical in class EuObject
 o interiorContains
 public boolean interiorContains(EuVector point)
Determines whether or not a given point is contained in the interior the present object (up to a small error,

Overrides:
interiorContains in class EuObject
 o closureContains
 public boolean closureContains(EuVector point)
Determines whether or not a given point is contained in the closure of the present object (up to a small error,

Overrides:
closureContains in class EuObject
 o overlaps
 public boolean overlaps(EuObject other)
Parameters:
other - the object being compared to the present one
Returns:
true if passed object is a @see EuRadius
Overrides:
overlaps in class EuObject
 o type
 public int type()
Returns:
@see RADIUS
Overrides:
type in class EuObject
 o subType
 public int subType()
Returns:
@see A_RADIUS
Overrides:
subType in class EuObject
 o myFullShadow
 public int myFullShadow()
Returns:
0, the @see EuLab index of the protoRadius.
Overrides:
myFullShadow in class EuObject
 o setShadow
 public void setShadow(int i)
Sets the @see EuLab number of the full object behind the present one.

Returns:
i the EuLab index (ignored)
Overrides:
setShadow in class EuObject

All Packages  Class Hierarchy  This Package  Previous  Next  Index