org.opensourcephysics.display
Class InteractiveCircle
java.lang.Object
org.opensourcephysics.display.Circle
org.opensourcephysics.display.MeasuredCircle
org.opensourcephysics.display.InteractiveCircle
- All Implemented Interfaces:
- Drawable, Interactive, Measurable
- Direct Known Subclasses:
- Protractor, Protractor.Tip
public class InteractiveCircle
- extends MeasuredCircle
- implements Interactive
A measured circle that implements Interactive.
The InteractiveCircle class also demonstrates how to implement a simple XML loader.
- Version:
- 1.0
- Author:
- Wolfgang Christian, Francisco Equembre
Constructor Summary |
InteractiveCircle()
Constructs an InteractiveCircle at the origin. |
InteractiveCircle(double x,
double y)
Constructs an InteractiveCircle with the given parameters. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.opensourcephysics.display.Drawable |
draw |
InteractiveCircle
public InteractiveCircle(double x,
double y)
- Constructs an InteractiveCircle with the given parameters.
- Parameters:
x
- y
-
InteractiveCircle
public InteractiveCircle()
- Constructs an InteractiveCircle at the origin.
setEnabled
public void setEnabled(boolean _enableInteraction)
- Enables mouse interactions.
- Specified by:
setEnabled
in interface Interactive
- Parameters:
_enableInteraction
-
isEnabled
public boolean isEnabled()
- Specified by:
isEnabled
in interface Interactive
isInside
public boolean isInside(DrawingPanel panel,
int xpix,
int ypix)
findInteractive
public Interactive findInteractive(DrawingPanel panel,
int xpix,
int ypix)
- Specified by:
findInteractive
in interface Interactive
getLoader
public static XML.ObjectLoader getLoader()