Package org.opensourcephysics.display
Class MeasuredCircle
java.lang.Object
org.opensourcephysics.display.Circle
org.opensourcephysics.display.MeasuredCircle
- All Implemented Interfaces:
Drawable
,Measurable
- Direct Known Subclasses:
InteractiveCircle
,InteractiveLabel
A drawable circle that implements Measurable.
- Version:
- 1.0
- Author:
- Wolfgang Christian
-
Field Summary
-
Constructor Summary
ConstructorsConstructorDescriptionMeasuredCircle
(double x, double y) Constructs a MeasuredCircle with the given center. -
Method Summary
Modifier and TypeMethodDescriptionstatic XML.ObjectLoader
Gets a loader allows a Circle to be represented as XML data.double
getXMax()
Implements measurable by getting the x center of the circle.double
getXMin()
Implements measurable by getting the x center of the circle.double
getYMax()
Implements measurable by getting the y center of the circle.double
getYMin()
Implements measurable by getting the y center of the circle.boolean
Determines if this circle should effect the scale of a drawing panel.void
setMeasured
(boolean _enableMeasure) Enables the measured flag so that this circle effects the scale of a drawing panel.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.Drawable
draw, isInteractive
-
Constructor Details
-
MeasuredCircle
public MeasuredCircle(double x, double y) Constructs a MeasuredCircle with the given center.- Parameters:
x
- the x position of the centery
- the y position of the center
-
-
Method Details
-
setMeasured
public void setMeasured(boolean _enableMeasure) Enables the measured flag so that this circle effects the scale of a drawing panel. -
isMeasured
public boolean isMeasured()Determines if this circle should effect the scale of a drawing panel.- Specified by:
isMeasured
in interfaceMeasurable
- Returns:
- minimum
-
getXMin
public double getXMin()Implements measurable by getting the x center of the circle.- Specified by:
getXMin
in interfaceMeasurable
- Returns:
- minimum
-
getXMax
public double getXMax()Implements measurable by getting the x center of the circle.- Specified by:
getXMax
in interfaceMeasurable
- Returns:
- maximum
-
getYMin
public double getYMin()Implements measurable by getting the y center of the circle.- Specified by:
getYMin
in interfaceMeasurable
- Returns:
- minimum
-
getYMax
public double getYMax()Implements measurable by getting the y center of the circle.- Specified by:
getYMax
in interfaceMeasurable
- Returns:
- maximum
-
getLoader
Gets a loader allows a Circle to be represented as XML data. Objects without XML loaders cannot be saved and retrieved from an XML file.- Returns:
- ObjectLoader
-