vmm3d.planecurve.parametric
Class DecoratedCurve
- java.lang.Object
-
- vmm3d.core.Exhibit
-
- vmm3d.planecurve.PlaneCurve
-
- vmm3d.planecurve.parametric.PlaneCurveParametric
-
- vmm3d.planecurve.parametric.DecoratedCurve
-
- All Implemented Interfaces:
- java.util.EventListener, javax.swing.event.ChangeListener, Decorateable, Parameterizable
- Direct Known Subclasses:
- Astroid, Circle, Cissoid, Conchoid, Convex, Deltoid, Epizykloide, Lemniskate, SineCurve, Tractrix, Zykloide
public abstract class DecoratedCurve extends PlaneCurveParametric
-
-
Nested Class Summary
Nested Classes Modifier and Type Class and Description static classDecoratedCurve.MMOViewA trivial subclass of PlaneCurveParametricView that is needed to get the desired color effects during the create animation.-
Nested classes/interfaces inherited from class vmm3d.planecurve.parametric.PlaneCurveParametric
PlaneCurveParametric.PlaneCurveParametricView
-
-
Constructor Summary
Constructors Constructor and Description DecoratedCurve()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description voiddoDraw(org.freehep.graphics2d.VectorGraphics g, View view, Transform transform)Draw the curve in a specified View.AnimationgetCreateAnimation(View view)Returns an animation that shows the curve being drawn bit-by-bit.ViewgetDefaultView()Overridden to return a view of type MMOView.intgetStrokeSize()java.awt.ColorgetWantedColor()voidsetStrokeSize(int size)voidsetWantedColor(java.awt.Color color)-
Methods inherited from class vmm3d.planecurve.parametric.PlaneCurveParametric
getActionsForView, getT, getTResolution, myCircle, x2ndDerivativeValue, xDerivativeValue, xValue, y2ndDerivativeValue, yDerivativeValue, yValue
-
Methods inherited from class vmm3d.planecurve.PlaneCurve
fillRandomSquare, getPoint, getPointCount, initializeMovingSquare
-
Methods inherited from class vmm3d.core.Exhibit
addChangeListener, addDecoration, addExtraXML, addView, clearDecorations, forceRedraw, getAdditionalAnimationsForView, getAlternativeViews, getBuildAnimation, getDecorations, getDefaultBackground, getDefaultForeground, getDefaultTransform, getDefaultWindow, getFramesForMorphing, getMorphingAnimation, getName, getParameterByName, getParameters, getSettingsCommandsForView, getTitle, getUseFilmstripForMorphing, getViews, parameterChanged, readExtraXML, removeChangeListener, removeDecoration, removeView, render, setDefaultBackground, setDefaultForeground, setDefaultWindow, setDefaultWindow, setFramesForMorphing, setName, setUseFilmstripForMorphing, stateChanged
-
-
-
-
Method Detail
-
setWantedColor
public void setWantedColor(java.awt.Color color)
-
getWantedColor
public java.awt.Color getWantedColor()
-
setStrokeSize
public void setStrokeSize(int size)
-
getStrokeSize
public int getStrokeSize()
-
getCreateAnimation
public Animation getCreateAnimation(View view)
Description copied from class:PlaneCurveParametricReturns an animation that shows the curve being drawn bit-by-bit.- Overrides:
getCreateAnimationin classPlaneCurveParametric- Parameters:
view- The View where the creation animation will be shown. If this is null or if it is not an instance ofPlaneCurveParametric.PlaneCurveParametricView, 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.
-
doDraw
public void doDraw(org.freehep.graphics2d.VectorGraphics g, View view, Transform transform)Draw the curve in a specified View. If the View belongs to the classPlaneCurveParametric.PlaneCurveParametricView, then only a fraction of the curve might be drawn, as specified in the View; this feature is used in the creation animation for the curve. If the View belongs to the subclassDecoratedCurve.MMOViewof PlaneCurveParametricView (which is the default), then the curve can be in some other color besides the default (this happens during the create animation, when the curve is being constructed).- Overrides:
doDrawin classPlaneCurveParametric- Parameters:
g- The graphics context where the Exhibit is being drawn. It has already been cleared to the background color (assuming that drawing is being done in the usual way, as defined in the top-level View class).view- The View that is drawing the Exhibit; this object contains other information that might be of use, such as the Display, if any, associated with the View.transform- Contains information about the rectangular area in the xy-plane that is being drawn and about the rectangle of pixels in the graphics context where it is drawn. Note that at least for the top-level View class, transform.getX() and transform.getY() can be assumed to be zero.- See Also:
#render(Graphics2D, View, Transform, ArrayList),Exhibit.computeDrawData(View, boolean, Transform, Transform)
-
getDefaultView
public View getDefaultView()
Overridden to return a view of type MMOView.- Overrides:
getDefaultViewin classPlaneCurveParametric
-
-
DMelt 3.0 © DataMelt by jWork.ORG