Class ConicSection

  extended by vmm.core.Exhibit
      extended by vmm.planecurve.PlaneCurve
          extended by vmm.planecurve.parametric.PlaneCurveParametric
              extended by 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.

Nested Class Summary
Nested classes/interfaces inherited from class vmm.planecurve.parametric.PlaneCurveParametric
Field Summary
Fields inherited from class vmm.planecurve.parametric.PlaneCurveParametric
tmax, tmin, tResolution, tVals
Fields inherited from class vmm.planecurve.PlaneCurve
movingSquare, points, randomSquare
Fields inherited from class vmm.core.Exhibit
decorations, exhibitNeedsRedraw, isMorphing, morphingView, parameters, previousTransform
Constructor Summary
Method Summary
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.
 Animation getCreateAnimation(View view)
          Returns a creation animation that adds foci, directrix, and othe stuff during the animation.
 BasicAnimator getMorphingAnimation(View view, int looping)
          Returns a modified morphing animation that adds foci and directrix during the animation.
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.planecurve.PlaneCurve
computeDrawData, fillRandomSquare, getPoint, getPointCount, initializeMovingSquare, moveSquare
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

Constructor Detail


public ConicSection()
Method Detail


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.


public Animation getCreateAnimation(View view)
Returns a creation animation that adds foci, directrix, and othe stuff during the animation.

getCreateAnimation in class PlaneCurveParametric
view - The View where the animation will be installed. If this is null, then the return value is null.
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.


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.

getMorphingAnimation in class Exhibit
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)