public class Mandelbrotextends ExhibitThe Mandelbrot set. The exhibit has an associated decoration that can show an approximation of the outline of the Julia set and the zero-orbit associated with a point (cx,cy). This decoration is not visible by default, but can be made visible in a view of the exhibit. If it is visible, the start point (cx,cy) is marked with a white cross, and the user can drag this cross; in addition to the cross, either the Julia set or the zero-orbit or both can be shown. The coordinates cx, cy are given by the values of two parameters that are associated with the exhibit, so they can also be set directly.
This exhibit differs from others in that the basic data needed to draw the exhibit is a bitmap. To make this work properly, a nested View class is defined that works only for Mandelbrot exhibits. The view class overrides the render() method from the base
Viewclass, which means that it is using a completly different rendering system from other exhibits. Various other changes were made that are unique to the Mandelbrot exhibit. Since this might be the only exhibit where the basic data is a bitmap, no attempt was made to make the modifications in a general way. Note that the View for a Mandelbrot exhibit MUST be of type Mandelbrot.MandelbrotView.
Nested Class Summary
Nested Classes Modifier and Type Class and Description
Mandelbrot.MandelbrotViewA View class suitable for viewing a Mandelbrot exhibit.
Constructors Constructor and Description
Methods Modifier and Type Method and Description
getActionsForView(View view)This method returns a list of
ActionItemthat can be applied to a View that contains this Exhibit.
getDefaultView()Overridden to return an object belonging to the nested class MandelbrotView.
parameterChanged(Parameter param, Object oldValue, Object newValue)This method is overridden so that in addition to redrawing the Exhibit, it also sets the Julia set point, (cx,cy), to match the values of the associated parameters.
removeView(View view)Removes a view from the list of views that are displaying this Exhibit.
Methods inherited from class vmm3d.core.Exhibit
addChangeListener, addDecoration, addExtraXML, addView, clearDecorations, forceRedraw, getAdditionalAnimationsForView, getAlternativeViews, getBuildAnimation, getCreateAnimation, getDecorations, getDefaultBackground, getDefaultForeground, getDefaultTransform, getDefaultWindow, getFramesForMorphing, getMorphingAnimation, getName, getParameterByName, getParameters, getSettingsCommandsForView, getTitle, getUseFilmstripForMorphing, getViews, readExtraXML, removeChangeListener, removeDecoration, render, setDefaultBackground, setDefaultForeground, setDefaultWindow, setDefaultWindow, setFramesForMorphing, setName, setUseFilmstripForMorphing, stateChanged
public void removeView(View view)Description copied from class:
ExhibitRemoves a view from the list of views that are displaying this Exhibit. This method is called by the view when the exhibit is removed from the view; it is not meant to be called directly.
parameterChangedThis method is overridden so that in addition to redrawing the Exhibit, it also sets the Julia set point, (cx,cy), to match the values of the associated parameters.
- Specified by:
param- The Parmeter whose value has been set.
oldValue- The previous value of the parameter.
newValue- The new, current value of the parameter. This is not necessarily guaranteed to be different from the old value (although it is for parameters definedin the VMM core).
- See Also:
public ActionList getActionsForView(View view)Description copied from class:
ExhibitThis method returns a list of
ActionItemthat can be applied to a View that contains this Exhibit. If the view parameter is null, it should return actions that are appropriate in any View. View is presumably one that is displaying this Exhibit.
The items in the returned list must implement the ActionItem interface and generally belong to one of the classes
ActionList. Null items represent separators.
In this top-level Exhibit class, the return value is a list that contains one object of type
AbstractActionVMM. The action represents the "Create" command, which is meant to run the "create animation" of the Exhibit.
In general, when overriding this method, subclasses should call "super.getActionsForView()" to obtain a list of actions from the superclass. It can then add additional actions or remove or disable actions that are in the list from the superclass.
SCaVis 2.2 © jWork.ORG