Class CircleFitterFootprint
java.lang.Object
org.opensourcephysics.cabrillo.tracker.CircleFitterFootprint
A CircleFitterFootprint returns a circle, center point and data point marks.
It requires a minimum Point array of length 2 {center, edge} but accommodates many data points.
- Author:
- Douglas Brown
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected BasicStroke
protected Ellipse2D
protected Color
protected Shape
protected boolean
protected int
protected Shape
protected int
protected static final int
protected String
protected double
protected Point
protected BasicStroke
-
Constructor Summary
ConstructorsConstructorDescriptionCircleFitterFootprint
(String name, int size) Constructs a CircleFitterFootprint. -
Method Summary
Modifier and TypeMethodDescriptiongetColor()
Gets the color.Gets the display name of the footprint.static Footprint
getFootprint
(String name) Gets a predefined Footprint.Shape[]
Gets the hit shapes {vertex, end1, end2, line1, line2, rotator}.getIcon
(int w, int h) Gets the icon.int
Gets the minimum point array length required by this footprint.Gets the footprint mark.getName()
Gets the name of this footprint.org.opensourcephysics.cabrillo.tracker.MultiShape
Gets the shape of this footprint for a Point array {center, edge, data0, data1, ...}.Gets the stroke.protected void
setCircleVisible
(boolean vis) Sets the visibility of the circle.void
Sets the color.protected void
setMarkedPointCount
(int n) Sets the marked point count.protected void
setPixelRadius
(double r) Sets the radius of the datapoint circle.protected void
Sets the selected screen point.void
setStroke
(BasicStroke stroke) Sets the stroke.
-
Field Details
-
MAX_RADIUS
protected static final int MAX_RADIUS- See Also:
-
name
-
baseStroke
-
stroke
-
color
-
hitShapes
-
circle
-
radius
protected double radius -
marker
-
crosshatch
-
markerSize
protected int markerSize -
selectedPoint
-
markedPointCount
protected int markedPointCount -
drawCircle
protected boolean drawCircle
-
-
Constructor Details
-
CircleFitterFootprint
Constructs a CircleFitterFootprint.- Parameters:
name
- the namesize
- the radius
-
-
Method Details
-
getName
Gets the name of this footprint. -
getDisplayName
Gets the display name of the footprint.- Specified by:
getDisplayName
in interfaceFootprint
- Returns:
- the localized display name
-
getLength
public int getLength()Gets the minimum point array length required by this footprint. -
getIcon
Gets the icon. -
getMark
Gets the footprint mark. -
getHitShapes
Gets the hit shapes {vertex, end1, end2, line1, line2, rotator}.- Specified by:
getHitShapes
in interfaceFootprint
- Returns:
- the hit shapes
-
setStroke
Sets the stroke. -
getStroke
Gets the stroke. -
setColor
Sets the color. -
getColor
Gets the color. -
setPixelRadius
protected void setPixelRadius(double r) Sets the radius of the datapoint circle.- Parameters:
r
- the radius
-
setCircleVisible
protected void setCircleVisible(boolean vis) Sets the visibility of the circle.- Parameters:
vis
- true to draw the circle
-
setSelectedPoint
Sets the selected screen point. The selected point is not drawn so CircleStep can draw a selection shape instead.- Parameters:
p
- the selected screen point (may be null)
-
setMarkedPointCount
protected void setMarkedPointCount(int n) Sets the marked point count. Marked points are drawn differently than attached points.- Parameters:
n
- the number of user-marked points in the step
-
getShape
Gets the shape of this footprint for a Point array {center, edge, data0, data1, ...}. Also sets up hit shapes {circle, center, data1, data2, ...} -
getFootprint
Gets a predefined Footprint.- Parameters:
name
- the name of the footprint- Returns:
- the footprint
-