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 intprotected BasicStrokeprotected BasicStrokeprotected static floatprotected Ellipse2Dprotected Ellipse2Dprotected Colorprotected org.opensourcephysics.cabrillo.tracker.CircleFootprint.CircleDialogprotected Shapeprotected Colorprotected BasicStrokeprotected Shape[]protected Stringprotected Shapeprotected booleanprotected BasicStrokeprotected static floatprotected intprotected booleanprotected floatprotected intprotected Shapeprotected booleanprotected AffineTransform -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected Objectclone()Clones a CircleFootprint.getColor()Gets the color.Gets the display name of the footprint.static FootprintgetFootprint(String name) Gets a named footprint.Shape[]Gets the hit shapes.getIcon(int w, int h) Gets the icon.intGets 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.MultiShapeGets the draw shape for a specified point.Gets the stroke.voidsetAlpha(int alpha) Sets the alpha of the fill.voidSets the color.voidsetOutlined(boolean outline) Sets the outlined flag.voidsetProperties(String props) Sets the properties when loading.voidsetRadius(int radius) Sets the radius.voidsetSpotShown(boolean drawSpot) Sets the spotted flag.voidsetStroke(BasicStroke stroke) Sets the stroke.voidshowProperties(TFrame frame, ActionListener listener) Shows the properties dialog.voidshowProperties(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:
clonein 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:
getDisplayNamein 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:
getHitShapesin 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.
-