Class CircleFootprint
java.lang.Object
org.opensourcephysics.cabrillo.tracker.CircleFootprint
A CircleFootprint returns a circle for a Point[] of length 1.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected int
protected BasicStroke
protected BasicStroke
protected static float
protected Ellipse2D
protected Ellipse2D
protected Color
protected org.opensourcephysics.cabrillo.tracker.CircleFootprint.CircleDialog
protected Shape
protected Color
protected BasicStroke
protected Shape[]
protected String
protected Shape
protected boolean
protected BasicStroke
protected static float
protected int
protected boolean
protected float
protected int
protected Shape
protected boolean
protected AffineTransform
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected Object
clone()
Clones a CircleFootprint.getColor()
Gets the color.Gets the display name of the footprint.static Footprint
getFootprint
(String name) Gets a named footprint.Shape[]
Gets the hit shapes.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.Gets the properties for saving.org.opensourcephysics.cabrillo.tracker.MultiShape
Gets the draw shape for a specified point.Gets the stroke.void
setAlpha
(int alpha) Sets the alpha of the fill.void
Sets the color.void
setOutlined
(boolean outline) Sets the outlined flag.void
setProperties
(String props) Sets the properties when loading.void
setRadius
(int radius) Sets the radius.void
setSpotShown
(boolean drawSpot) Sets the spotted flag.void
setStroke
(BasicStroke stroke) Sets the stroke.void
showProperties
(TFrame frame, ActionListener listener) Shows the properties dialog.void
showProperties
(TTrack track) Shows the properties dialog.
-
Field Details
-
plainStrokeSize
protected static float plainStrokeSize -
boldStrokeSize
protected static float boldStrokeSize -
name
-
circle
-
center
-
highlight
-
outline
-
spot
-
transform
-
alpha
protected int alpha -
color
-
highlightColor
-
hitShapes
-
baseHighlightStroke
-
baseOutlineStroke
-
highlightStroke
-
outlineStroke
-
outlined
protected boolean outlined -
spotted
protected boolean spotted -
dialog
protected org.opensourcephysics.cabrillo.tracker.CircleFootprint.CircleDialog dialog -
r
protected int r -
prevRadius
protected int prevRadius -
prevStrokeSize
protected float prevStrokeSize -
prevSpot
protected boolean prevSpot
-
-
Constructor Details
-
CircleFootprint
Constructs a CircleFootprint.- Parameters:
name
- the nameradius
- radius of the footprint
-
-
Method Details
-
clone
Clones a CircleFootprint.- Overrides:
clone
in classObject
- Returns:
- the clone
- Throws:
CloneNotSupportedException
-
getFootprint
Gets a named footprint.- Parameters:
name
- the name of the footprint- Returns:
- the footprint
-
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.- Specified by:
getHitShapes
in interfaceFootprint
- Returns:
- the hit shapes
-
setStroke
Sets the stroke. -
getStroke
Gets the stroke. May return null; -
setColor
Sets the color. -
getColor
Gets the color. -
setRadius
public void setRadius(int radius) Sets the radius.- Parameters:
radius
- the radius
-
setOutlined
public void setOutlined(boolean outline) Sets the outlined flag.- Parameters:
outline
- true to draw an outline around the circle
-
setSpotShown
public void setSpotShown(boolean drawSpot) Sets the spotted flag.- Parameters:
drawSpot
- true to draw a spot at the center of the circle
-
setAlpha
public void setAlpha(int alpha) Sets the alpha of the fill.- Parameters:
alpha
- 0 for transparent, 255 for solid
-
getProperties
Gets the properties for saving.- Returns:
- the properties "r outline spot bold"
-
setProperties
Sets the properties when loading.- Parameters:
props
- the properties "r outline spot bold"
-
showProperties
Shows the properties dialog.- Parameters:
track
- the track using this footprint
-
showProperties
Shows the properties dialog.- Parameters:
frame
- a TFramelistener
- an ActionListener
-
getShape
Gets the draw shape for a specified point.
-