Class Mandelbrot
- java.lang.Object
-
- vmm3d.core.Exhibit
-
- vmm3d.fractals.Mandelbrot
-
- All Implemented Interfaces:
- java.util.EventListener, javax.swing.event.ChangeListener, Decorateable, Parameterizable
public class Mandelbrot extends Exhibit
The 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 classMandelbrot.MandelbrotViewA View class suitable for viewing a Mandelbrot exhibit.
-
Constructor Summary
Constructors Constructor and Description Mandelbrot()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description ActionListgetActionsForView(View view)This method returns a list ofActionItemthat can be applied to a View that contains this Exhibit.ViewgetDefaultView()Overridden to return an object belonging to the nested class MandelbrotView.voidparameterChanged(Parameter param, java.lang.Object oldValue, java.lang.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.voidremoveView(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
-
-
-
-
Method Detail
-
removeView
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.- Overrides:
removeViewin classExhibit- Parameters:
view- The view that is no longer displaying this exhibit.
-
parameterChanged
public void parameterChanged(Parameter param, java.lang.Object oldValue, java.lang.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.- Specified by:
parameterChangedin interfaceParameterizable- Overrides:
parameterChangedin classExhibit- Parameters:
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:
Exhibit.forceRedraw()
-
getActionsForView
public ActionList getActionsForView(View view)
Description copied from class:ExhibitThis method returns a list ofActionItemthat 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
AbstractActionVMM,ToggleAction,ActionRadioGroup, orActionList. 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.
- Overrides:
getActionsForViewin classExhibit
-
getDefaultView
public View getDefaultView()
Overridden to return an object belonging to the nested class MandelbrotView. Note that the View for a Mandelbrot exhibit MUST be of this type.- Overrides:
getDefaultViewin classExhibit
-
-
DMelt 3.0 © DataMelt by jWork.ORG