Class Mandelbrot

  • All Implemented Interfaces:
    EventListener, ChangeListener, Decorateable, Parameterizable

    public class Mandelbrotextends 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 View class, 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.

    • Constructor Detail

      • Mandelbrot

        public Mandelbrot()
    • Method Detail

      • removeView

        public void removeView(View view)
        Description copied from class: Exhibit
        Removes 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.
        removeView in class Exhibit
        view - The view that is no longer displaying this exhibit.
      • parameterChanged

        public void 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.
        Specified by:
        parameterChanged in interface Parameterizable
        parameterChanged in class Exhibit
        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:
      • getActionsForView

        public ActionList getActionsForView(View view)
        Description copied from class: Exhibit
        This method returns a list of ActionItem that 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, or 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.

        getActionsForView in class Exhibit
      • 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.
        getDefaultView in class Exhibit

SCaVis 1.8 ©