## visad.formula
Class FormulaVar

    java.lang.Object
      visad.ActionImpl
          visad.formula.FormulaVar

All Implemented Interfaces:
  Action, EventListener, Runnable, ThingChangedListener

public class FormulaVar
extends ActionImpl

Represents a variable.

Field Summary
`static RealType` `CONSTANT` constant tag
`static boolean` `DEBUG` for testing purposes
`(package private) String` `name` name of this variable
`(package private) RemoteCellImpl` `rtCell`
`(package private) CellImpl` `textCell` cell for recomputing formula from referenced Text object
`(package private) ThingReference` `textRef` reference to a Text object equal to this variable's formula

Constructor Summary
`(package private)` `FormulaVar(String n, FormulaManager f)` constructor without specified ThingReference
`(package private)` `FormulaVar(String n, FormulaManager f, ThingReference t)` constructor with specified ThingReference

Method Summary
`(package private) void` `clearErrors()` clear the list of errors that have occurred during formula evaluation
`void` `doAction()` recompute this variable
`(package private) String[]` `getErrors()` get an array of Strings representing any errors that have occurred during formula evaluation
`(package private) String` `getFormula()` get the formula for this variable
`(package private) ThingReference` `getReference()` get the ThingReference for this variable
`(package private) Thing` `getThing()` get the Thing for this variable
`(package private) boolean` `isDependentOn(FormulaVar v)` return whether this variable depends on v
`(package private) boolean` `othersDepend()` return whether any other variables depend on this one
`(package private) void` `setFormula(String f)` set the formula for this variable
`(package private) void` `setReference(ThingReference tr)` set the ThingReference for this variable
`(package private) void` `setTextRef(ThingReference tr)` set the formula to be dependent on a Text object referenced by tr
`(package private) void` `setThing(Thing t)` set the Thing for this variable directly
`(package private) void` `waitForFormula()` waits for this formula to recompute

Methods inherited from class visad.ActionImpl
`addReference, checkTicks, disableAction, enableAction, findReference, getCurrentActionThread, getLinks, getName, removeAllReferences, removeReference, run, setEnabled, setName, setThreadPoolMaximum, stop, stopThreadPool, thingChanged, waitForTasks`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### DEBUG

    public static boolean DEBUG

  for testing purposes

### CONSTANT

    public static RealType CONSTANT

  constant tag

### name

    String name

  name of this variable

### textRef

    ThingReference textRef

  reference to a Text object equal to this variable's formula

### textCell

    CellImpl textCell

  cell for recomputing formula from referenced Text object

### rtCell

    RemoteCellImpl rtCell

Constructor Detail

### FormulaVar

    FormulaVar(String n,
               FormulaManager f)
         throws VisADException

  constructor without specified ThingReference

### FormulaVar

    FormulaVar(String n,
               FormulaManager f,
               ThingReference t)
         throws VisADException

  constructor with specified ThingReference

Method Detail

### othersDepend

    boolean othersDepend()

  return whether any other variables depend on this one

### isDependentOn

    boolean isDependentOn(FormulaVar v)

  return whether this variable depends on v

### setFormula

    void setFormula(String f)
              throws FormulaException

  set the formula for this variable

  Throws:
    `FormulaException`

### waitForFormula

    void waitForFormula()

  waits for this formula to recompute

### setTextRef

    void setTextRef(ThingReference tr)
              throws VisADException,
                     RemoteException

  set the formula to be dependent on a Text object referenced by tr

  Throws:
    `VisADException`
    `RemoteException`

### setThing

    void setThing(Thing t)
            throws VisADException,
                   RemoteException

  set the Thing for this variable directly

  Throws:
    `VisADException`
    `RemoteException`

### setReference

    void setReference(ThingReference tr)

  set the ThingReference for this variable

### getThing

    Thing getThing()

  get the Thing for this variable

### getReference

    ThingReference getReference()

  get the ThingReference for this variable

### getFormula

    String getFormula()

  get the formula for this variable

### getErrors

    String[] getErrors()

  get an array of Strings representing any errors that have occurred during formula evaluation

### clearErrors

    void clearErrors()

  clear the list of errors that have occurred during formula evaluation

### doAction

    public void doAction()

  recompute this variable

  Specified by:
    `doAction` in class `ActionImpl`