com.monkeycoder.monkeyfractal.plugin
Class MandelbrotPlugin

java.lang.Object
  extended by com.monkeycoder.monkeyfractal.base.FractalPlugin
      extended by com.monkeycoder.monkeyfractal.plugin.MandelbrotPlugin

public class MandelbrotPlugin
extends FractalPlugin

This is a FractalPlugin that generates Mandelbrot fractals.

Originally part of the MonkeyFractal project.

Author:
David Stephens

Field Summary
 
Fields inherited from class com.monkeycoder.monkeyfractal.base.FractalPlugin
params, threadManager
 
Constructor Summary
MandelbrotPlugin()
          Creates a new MandelbrotPlugin.
 
Method Summary
 FractalBuffer generateFractal()
          Generates a Mandelbrot fractal using the current parameters.
 ComplexRange getComplexRange()
          This function gets the current ComplexRange used internally by the FractalPlugin.
 ComplexRange getComplexRange(java.awt.Rectangle inPixelRect)
          Calculates a new ComplexRange based on a Rectangle of pixels.
 java.lang.String getHelpAboutInfo()
          This method returns a String containing Help About information about this plugin.
 void resetParameterList()
          Creates the default required parameters for the MandelbrotPlugin.
 void setComplexRange(ComplexRange inComplexRange)
          This function sets the ComplexRange used internally by the FractalPlugin.
 void setComplexRange(java.awt.Rectangle inPixelRect)
          This function sets the ComplexRange used internally by the FractalPlugin.
 void setPixelDimensions(java.awt.Dimension inPixelDim)
          This method sets the Dimensions of the FractalBuffer that will be generated by generateFractal().
 
Methods inherited from class com.monkeycoder.monkeyfractal.base.FractalPlugin
getParameterList, setParameterList, setThreadManager
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MandelbrotPlugin

public MandelbrotPlugin()
Creates a new MandelbrotPlugin.

Method Detail

resetParameterList

public void resetParameterList()
Creates the default required parameters for the MandelbrotPlugin.

Specified by:
resetParameterList in class FractalPlugin

generateFractal

public FractalBuffer generateFractal()
Generates a Mandelbrot fractal using the current parameters.

Specified by:
generateFractal in class FractalPlugin
Returns:
A FractalBuffer containing the results of the calculation.
See Also:
FractalThreadManager.getFractalBuffer()

getComplexRange

public ComplexRange getComplexRange()
Description copied from class: FractalPlugin
This function gets the current ComplexRange used internally by the FractalPlugin.

Specified by:
getComplexRange in class FractalPlugin
Returns:
A ComplexRange containing the ranges from the internal ParameterList.

getComplexRange

public ComplexRange getComplexRange(java.awt.Rectangle inPixelRect)
Description copied from class: FractalPlugin
Calculates a new ComplexRange based on a Rectangle of pixels. This method performs its calculation based on the current ParameterList values.

Specified by:
getComplexRange in class FractalPlugin
Returns:
A ComplexRange containing the ranges from the internal ParameterList based on the supplied Rectangle of pixels.

setComplexRange

public void setComplexRange(ComplexRange inComplexRange)
Description copied from class: FractalPlugin
This function sets the ComplexRange used internally by the FractalPlugin. The complex range should be loaded into the internal ParameterList for subsequent requests to generateFractal().

Specified by:
setComplexRange in class FractalPlugin
Parameters:
inComplexRange - The new ComplexRange to be loaded into the internal ParameterList.
See Also:
FractalPlugin.generateFractal()

setComplexRange

public void setComplexRange(java.awt.Rectangle inPixelRect)
Description copied from class: FractalPlugin
This function sets the ComplexRange used internally by the FractalPlugin. This is a convenience method that processes the Rectangle of pixels through getComplexRange(Rectangle) before passing the result to setComplexRange(ComplexRange).

Specified by:
setComplexRange in class FractalPlugin
Parameters:
inPixelRect - A Rectangle of pixels to use to create a new ComplexRange to be loaded into the internal ParameterList.
See Also:
FractalPlugin.getComplexRange(Rectangle), FractalPlugin.setComplexRange(ComplexRange)

setPixelDimensions

public void setPixelDimensions(java.awt.Dimension inPixelDim)
Description copied from class: FractalPlugin
This method sets the Dimensions of the FractalBuffer that will be generated by generateFractal(). The Dimensions passed in should be loaded into the internal ParameterList for subsequent calls to generateFractal().

Specified by:
setPixelDimensions in class FractalPlugin
Parameters:
inPixelDim - A Dimension of pixels that represents how large a FractalBuffer will be generated.
See Also:
FractalPlugin.generateFractal()

getHelpAboutInfo

public java.lang.String getHelpAboutInfo()
Description copied from class: FractalPlugin
This method returns a String containing Help About information about this plugin. This information will be displayed in the Help About dialog box when this plugin is active.

Specified by:
getHelpAboutInfo in class FractalPlugin
Returns:
Help About information for this plugin.