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.
-
radius
-
-
EuRadius()
- This alternative constructor instantiates the protoRadius, indicating an unset radius.
-
EuRadius(double)
- The constructor checks that the radius is indeed a nonnegative integer.
-
atParameter(double)
- Call has no meaning, return (0,0)
-
castIdentical(EuObject)
-
-
closureContains(EuVector)
- Determines whether or not a given point is contained
in the closure of the present object (up
to a small error,
-
draw(Graphics, mouseInfo)
- Draw an oval with the radius centered at the top left corner.
-
interiorContains(EuVector)
- Determines whether or not a given point is contained
in the interior the present object (up
to a small error,
-
mouseVicinity(mouseVector, mouseInfo)
- The radius is not accessible by mouse, so return false.
-
myFullShadow()
-
-
overlaps(EuObject)
-
-
setShadow(int)
- Sets the
-
subType()
-
-
type()
-
radius
public EuReal radius
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
EuRadius
public EuRadius()
- This alternative constructor instantiates the protoRadius, indicating an unset radius.
It is distinguihed internally by having a negative radius.
atParameter
public EuWorkVector atParameter(double t)
- Call has no meaning, return (0,0)
- Parameters:
- t - ignored
- Returns:
- null vector
- Overrides:
- atParameter in class EuObject
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
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
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
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
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
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
type
public int type()
- Returns:
- @see RADIUS
- Overrides:
- type in class EuObject
subType
public int subType()
- Returns:
- @see A_RADIUS
- Overrides:
- subType in class EuObject
myFullShadow
public int myFullShadow()
- Returns:
- 0, the @see EuLab index of the protoRadius.
- Overrides:
- myFullShadow in class EuObject
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