Package 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
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
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static classA class to save and load InteractiveCircle data in an XMLControl. -
Field Summary
-
Constructor Summary
ConstructorsConstructorDescriptionConstructs an InteractiveCircle at the origin.InteractiveCircle(double x, double y) Constructs an InteractiveCircle with the given parameters. -
Method Summary
Modifier and TypeMethodDescriptionfindInteractive(DrawingPanel panel, int xpix, int ypix) static XML.ObjectLoaderbooleanbooleanisInside(DrawingPanel panel, int xpix, int ypix) voidsetEnabled(boolean _enableInteraction) Enables mouse interactions.Methods inherited from class org.opensourcephysics.display.MeasuredCircle
getXMax, getXMin, getYMax, getYMin, isMeasured, setMeasuredMethods inherited from class org.opensourcephysics.display.Circle
draw, getX, getY, setX, setXY, setY, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.opensourcephysics.display.Interactive
getX, getY, isInteractive, setX, setXY, setYMethods inherited from interface org.opensourcephysics.display.Measurable
getXMax, getXMin, getYMax, getYMin, isMeasured
-
Constructor Details
-
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.
-
-
Method Details
-
setEnabled
public void setEnabled(boolean _enableInteraction) Enables mouse interactions.- Specified by:
setEnabledin interfaceInteractive- Parameters:
_enableInteraction-
-
isEnabled
public boolean isEnabled()- Specified by:
isEnabledin interfaceInteractive
-
isInside
-
findInteractive
- Specified by:
findInteractivein interfaceInteractive
-
getLoader
-