/// Evolver Copyright 2000, Morgan McGuire
/// matrix@alum.mit.edu   http://graphics3d.com/matrix
/**
 * Runs a single behavior for a period of time.
 */
class BehaviorChunk extends AnimationChunk
{
  /**
   * The expression.
   */
  private ELExpression expression;
  
  public BehaviorChunk()
  {
    expression = new ELScalar(0);
  }

  public ELExpression getExpression()
  {
    return expression;
  }

  public void setExpression(ELExpression e) 
  {
    expression = e;
  }

  public ChunkDisplay getDisplay(AnimationEditor editor)
  {
    return new BehaviorChunkDisplay(index, editor);
  }

  public String unparse()
  {
    return 
      "BehaviorChunk: " +
      "duration = " + duration + ", " + 
      "expression = \"" + expression.unparse() + "\"\n";
  }
}

