artofillusion.procedural
Class ColorModule

java.lang.Object
  extended by artofillusion.procedural.Module
      extended by artofillusion.procedural.ColorModule

public class ColorModule
extends Module

This is a Module which outputs a color.


Field Summary
 
Fields inherited from class artofillusion.procedural.Module
linkFrom, linkFromIndex
 
Constructor Summary
ColorModule(java.awt.Point position)
           
ColorModule(java.awt.Point position, RGBColor color)
           
 
Method Summary
 void calcSize()
          Calculate the size on the screen of this module.
 Module duplicate()
          Create a duplicate of this module.
 boolean edit(ProcedureEditor editor, Scene theScene)
          This is an old form of edit() that exists only to maintain compatibility with old plugins.
 RGBColor getColor()
          Get the color.
 void getColor(int which, RGBColor c, double blur)
          Get the color of the specified output port.
 void readFromStream(java.io.DataInputStream in, Scene theScene)
          Read in the module's parameters from an input stream.
 void setColor(RGBColor c)
          Set the color.
 void writeToStream(java.io.DataOutputStream out, Scene theScene)
          Write out the module's parameters to an output stream.
 
Methods inherited from class artofillusion.procedural.Module
checkFeedback, draw, getAverageValue, getBounds, getClickedPort, getInputIndex, getInputPorts, getName, getOutputIndex, getOutputPorts, getValueError, getValueGradient, init, inputConnected, layout, setInput, setPosition
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ColorModule

public ColorModule(java.awt.Point position)

ColorModule

public ColorModule(java.awt.Point position,
                   RGBColor color)
Method Detail

getColor

public RGBColor getColor()
Get the color.


setColor

public void setColor(RGBColor c)
Set the color.


edit

public boolean edit(ProcedureEditor editor,
                    Scene theScene)
Description copied from class: Module
This is an old form of edit() that exists only to maintain compatibility with old plugins. Subclasses should override the other form, not this one.

Overrides:
edit in class Module

getColor

public void getColor(int which,
                     RGBColor c,
                     double blur)
Description copied from class: Module
Get the color of the specified output port. If the specified output port does not have a value type of COLOR, the result is undefined. Blur specifies the amount of smoothing to use. Subclasses which can return colors should override this method.

Overrides:
getColor in class Module

calcSize

public void calcSize()
Description copied from class: Module
Calculate the size on the screen of this module. The default implementation makes it large enough to display the name of the module.

Overrides:
calcSize in class Module

duplicate

public Module duplicate()
Description copied from class: Module
Create a duplicate of this module. Subclasses with adjustable parameters should override this.

Overrides:
duplicate in class Module

writeToStream

public void writeToStream(java.io.DataOutputStream out,
                          Scene theScene)
                   throws java.io.IOException
Description copied from class: Module
Write out the module's parameters to an output stream. Subclasses with editable parameters should override this method.

Overrides:
writeToStream in class Module
Throws:
java.io.IOException

readFromStream

public void readFromStream(java.io.DataInputStream in,
                           Scene theScene)
                    throws java.io.IOException
Description copied from class: Module
Read in the module's parameters from an input stream. Subclasses with editable parameters should override this method.

Overrides:
readFromStream in class Module
Throws:
java.io.IOException


Copyright © 1999-2011 by Peter Eastman.