Class CircleFootprint
java.lang.Object
org.opensourcephysics.cabrillo.tracker.CircleFootprint
A CircleFootprint returns a circle for a Point[] of length 1.
- 
Field SummaryFieldsModifier 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 SummaryConstructors
- 
Method SummaryModifier 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- 
plainStrokeSizeprotected static float plainStrokeSize
- 
boldStrokeSizeprotected static float boldStrokeSize
- 
name
- 
circle
- 
center
- 
highlight
- 
outline
- 
spot
- 
transform
- 
alphaprotected int alpha
- 
color
- 
highlightColor
- 
hitShapes
- 
baseHighlightStroke
- 
baseOutlineStroke
- 
highlightStroke
- 
outlineStroke
- 
outlinedprotected boolean outlined
- 
spottedprotected boolean spotted
- 
dialogprotected org.opensourcephysics.cabrillo.tracker.CircleFootprint.CircleDialog dialog
- 
rprotected int r
- 
prevRadiusprotected int prevRadius
- 
prevStrokeSizeprotected float prevStrokeSize
- 
prevSpotprotected boolean prevSpot
 
- 
- 
Constructor Details- 
CircleFootprintConstructs a CircleFootprint.- Parameters:
- name- the name
- radius- radius of the footprint
 
 
- 
- 
Method Details- 
cloneClones a CircleFootprint.- Overrides:
- clonein class- Object
- Returns:
- the clone
- Throws:
- CloneNotSupportedException
 
- 
getFootprintGets a named footprint.- Parameters:
- name- the name of the footprint
- Returns:
- the footprint
 
- 
getNameGets the name of this footprint.
- 
getDisplayNameGets the display name of the footprint.- Specified by:
- getDisplayNamein interface- Footprint
- Returns:
- the localized display name
 
- 
getLengthpublic int getLength()Gets the minimum point array length required by this footprint.
- 
getIconGets the icon.
- 
getMarkGets the footprint mark.
- 
getHitShapesGets the hit shapes.- Specified by:
- getHitShapesin interface- Footprint
- Returns:
- the hit shapes
 
- 
setStrokeSets the stroke.
- 
getStrokeGets the stroke. May return null;
- 
setColorSets the color.
- 
getColorGets the color.
- 
setRadiuspublic void setRadius(int radius) Sets the radius.- Parameters:
- radius- the radius
 
- 
setOutlinedpublic void setOutlined(boolean outline) Sets the outlined flag.- Parameters:
- outline- true to draw an outline around the circle
 
- 
setSpotShownpublic void setSpotShown(boolean drawSpot) Sets the spotted flag.- Parameters:
- drawSpot- true to draw a spot at the center of the circle
 
- 
setAlphapublic void setAlpha(int alpha) Sets the alpha of the fill.- Parameters:
- alpha- 0 for transparent, 255 for solid
 
- 
getPropertiesGets the properties for saving.- Returns:
- the properties "r outline spot bold"
 
- 
setPropertiesSets the properties when loading.- Parameters:
- props- the properties "r outline spot bold"
 
- 
showPropertiesShows the properties dialog.- Parameters:
- track- the track using this footprint
 
- 
showPropertiesShows the properties dialog.- Parameters:
- frame- a TFrame
- listener- an ActionListener
 
- 
getShapeGets the draw shape for a specified point.
 
-