Class AbstractELOperator

java.lang.Object
  |
  +--AbstractELOperator
All Implemented Interfaces:
ELOperator
Direct Known Subclasses:
MultiArgumentOperator, OneArgumentOperator, TwoArgumentOperator, ZeroArgumentOperator

public abstract class AbstractELOperator
extends java.lang.Object
implements ELOperator

An operator that paints its icon based on the name of the operator.


Fields inherited from interface ELOperator
LARGE_NUMER_OF_ARGUMENTS
 
Constructor Summary
AbstractELOperator()
           
 
Method Summary
protected static float clamp(float c)
          Computes min(-1.0, max(1.0, c)).
 boolean hasExternalInfluences()
          Returns true if the output is influenced by the environment.
protected  java.lang.String iconString()
          Override to change the string painted for an icon.
 void paintIcon(java.awt.Graphics2D graphics, int x, int y, int width, int height)
          Draw an icon for this operator
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface ELOperator
apply, description, getMaxNumArguments, getMinNumArguments, name, unparse
 

Constructor Detail

AbstractELOperator

public AbstractELOperator()
Method Detail

iconString

protected java.lang.String iconString()
Override to change the string painted for an icon.

paintIcon

public void paintIcon(java.awt.Graphics2D graphics,
                      int x,
                      int y,
                      int width,
                      int height)
Description copied from interface: ELOperator
Draw an icon for this operator
Specified by:
paintIcon in interface ELOperator

clamp

protected static final float clamp(float c)
Computes min(-1.0, max(1.0, c)). A useful utility method to call from compose().

hasExternalInfluences

public boolean hasExternalInfluences()
Description copied from interface: ELOperator
Returns true if the output is influenced by the environment.
Specified by:
hasExternalInfluences in interface ELOperator