|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.util.Observable
com.monkeycoder.monkeyfractal.base.FractalMtWorker
public abstract class FractalMtWorker
This is the parent class to all Multi-Threaded fractal worker classes.
It supplies the basic constructs for managing divided work.
Originally part of the MonkeyFractal project.
| Field Summary | |
|---|---|
protected ParameterList |
params
Holds the configuration of this plugin in the form of a ParameterList. |
| Constructor Summary | |
|---|---|
FractalMtWorker()
FractalMtWorker is abstract and cannot be directly constructed. |
|
FractalMtWorker(int inId)
This constructor sets the ID of this worker. |
|
| Method Summary | |
|---|---|
abstract FractalBuffer |
generateFractal()
This function generates the partial fractal represented by this FractalMtWorker and configured by values passed in through other function calls. |
abstract ComplexRange |
getComplexRange()
This function gets the current ComplexRange used internally by the FractalPlugin. |
abstract ComplexRange |
getComplexRange(java.awt.Rectangle inPixelRect)
Calculates a new ComplexRange based on a Rectangle of pixels. |
FractalBuffer |
getFractalBuffer()
This function returns the generated FractalBuffer. |
int |
getId()
Gets the ID for this worker. |
ParameterList |
getParameterList()
This function returns the current ParameterList being used by this FractalPlugin. |
abstract void |
resetParameterList()
This function creates a default ParameterList for this FractalPlugin. |
void |
run()
This manages the process of generating this piece of fractal work. |
void |
sendUpdate(UpdateMessage inMessage)
Relays an UpdateMessage to whatever is observing this class. |
abstract void |
setComplexRange(ComplexRange inComplexRange)
This function sets the ComplexRange used internally by the FractalPlugin. |
abstract void |
setComplexRange(java.awt.Rectangle inPixelRect)
This function sets the ComplexRange used internally by the FractalPlugin. |
void |
setId(int inId)
Allows the setting of an ID for this worker. |
void |
setParameterList(ParameterList inParamList)
This function takes in a ParameterList that will replace the internal ParameterList being used by this FractalPlugin. |
abstract void |
setPixelDimensions(java.awt.Dimension inPixelDim)
This method sets the Dimensions of the FractalBuffer that will be generated by generateFractal(). |
| Methods inherited from class java.util.Observable |
|---|
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChanged |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected ParameterList params
| Constructor Detail |
|---|
public FractalMtWorker()
public FractalMtWorker(int inId)
inId - A value used externally to identify this worker.| Method Detail |
|---|
public void setId(int inId)
inId - A value used externally to identify this worker.public int getId()
public ParameterList getParameterList()
FractalPlugin.resetParameterList()public void setParameterList(ParameterList inParamList)
inParamList - The new ParameterList to be used by this FractalPlugin.FractalPlugin.getParameterList()public abstract void resetParameterList()
public abstract ComplexRange getComplexRange()
public abstract ComplexRange getComplexRange(java.awt.Rectangle inPixelRect)
public abstract void setComplexRange(ComplexRange inComplexRange)
inComplexRange - The new ComplexRange to be loaded into the internal ParameterList.FractalPlugin.generateFractal()public abstract void setComplexRange(java.awt.Rectangle inPixelRect)
inPixelRect - A Rectangle of pixels to use to create a new ComplexRange to be loaded into the internal ParameterList.FractalPlugin.getComplexRange(Rectangle),
FractalPlugin.setComplexRange(ComplexRange)public abstract void setPixelDimensions(java.awt.Dimension inPixelDim)
inPixelDim - A Dimension of pixels that represents how large a FractalBuffer will be generated.FractalPlugin.generateFractal()public void run()
run in interface java.lang.RunnableThread.start()public FractalBuffer getFractalBuffer()
FractalPlugin.generateFractal()public void sendUpdate(UpdateMessage inMessage)
inMessage - The update that will be sent to observers.public abstract FractalBuffer generateFractal()
getFractalBuffer(),
setComplexRange(ComplexRange),
setPixelDimensions(Dimension)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||