vmm.planecurve.parametric
Class ConicSection
java.lang.Object
vmm.core.Exhibit
vmm.planecurve.PlaneCurve
vmm.planecurve.parametric.PlaneCurveParametric
vmm.planecurve.parametric.ConicSection
- All Implemented Interfaces:
- java.util.EventListener, javax.swing.event.ChangeListener, Decorateable, Parameterizable
- Direct Known Subclasses:
- Ellipse, Hyperbola, Parabola
public abstract class ConicSection
- extends PlaneCurveParametric
A common base class for Elippse, Parabola, and Hyperbola, to show foci and "directrix" during morphing
and extra stuff during the creation animation. Note that Circle is not a subclass of ConicSection since
it does not have these extra decorations.
Methods inherited from class vmm.planecurve.parametric.PlaneCurveParametric |
doDraw, getActionsForView, getDefaultView, getT, getTResolution, makePoints, myCircle, x2ndDerivativeValue, xDerivativeValue, xValue, y2ndDerivativeValue, yDerivativeValue, yValue |
Methods inherited from class vmm.core.Exhibit |
addChangeListener, addDecoration, addExtraXML, addParameter, addView, clearDecorations, computeDrawDataHook, doDrawHook, fireExhibitChangeEvent, forceRedraw, getAdditionalAnimationsForView, getAlternativeViews, getBuildAnimation, getDecorations, getDefaultBackground, getDefaultForeground, getDefaultTransform, getDefaultWindow, getFramesForMorphing, getName, getParameterByName, getParameters, getSettingsCommandsForView, getTitle, getUseFilmstripForMorphing, getViews, parameterChanged, readExtraXML, removeChangeListener, removeDecoration, removeParameter, removeView, render, setDefaultBackground, setDefaultForeground, setDefaultWindow, setDefaultWindow, setFramesForMorphing, setName, setUseFilmstripForMorphing, stateChanged |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ConicSection
public ConicSection()
drawFociAndDirectrix
protected abstract void drawFociAndDirectrix(java.awt.Graphics2D g,
View view,
Transform limits,
double t)
- This is overridden in the sub-classes to do the actual drawing of the extra decorations.
getCreateAnimation
public Animation getCreateAnimation(View view)
- Returns a creation animation that adds foci, directrix, and othe stuff during the animation.
- Overrides:
getCreateAnimation
in class PlaneCurveParametric
- Parameters:
view
- The View where the animation will be installed. If this is null, then the return value is null.
- Returns:
- A creation animation for the given View of this Exhibit. The return value
can be null to indicate that no creation animation is to be run.
getMorphingAnimation
public BasicAnimator getMorphingAnimation(View view,
int looping)
- Returns a modified morphing animation that adds foci and directrix during the animation.
The decoration is added to view, if it is non-null, and otherwise is added directly to
this exhibit.
- Overrides:
getMorphingAnimation
in class Exhibit
- Parameters:
view
- The view that the animation will be shown in, if any. If the value is
null, then the animation will not be associated with any particular view. In that
case, the Morphing animation will animate the Exhibit in all Views in which it appears, since
it operates by changing parameters of the exhibit. If the View is non-null, then only the
specified View will receive changeEvents from the Exhibit while the morph is in progress.looping
- This must be one of the values BasicAnimator.ONCE
, BasicAnimator.LOOP
,
or BasicAnimator.OSCILLATE
. The value is passed, without any error checking, to
the animation's setLooping
method.- See Also:
TimerAnimation.setLooping(int)
,
Exhibit.setFramesForMorphing(int)