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 class
A 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.ObjectLoader
boolean
boolean
isInside
(DrawingPanel panel, int xpix, int ypix) void
setEnabled
(boolean _enableInteraction) Enables mouse interactions.Methods inherited from class org.opensourcephysics.display.MeasuredCircle
getXMax, getXMin, getYMax, getYMin, isMeasured, setMeasured
Methods inherited from class org.opensourcephysics.display.Circle
draw, getX, getY, setX, setXY, setY, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.opensourcephysics.display.Interactive
getX, getY, isInteractive, setX, setXY, setY
Methods 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:
setEnabled
in interfaceInteractive
- Parameters:
_enableInteraction
-
-
isEnabled
public boolean isEnabled()- Specified by:
isEnabled
in interfaceInteractive
-
isInside
-
findInteractive
- Specified by:
findInteractive
in interfaceInteractive
-
getLoader
-