interagents
Class EuLab

java.lang.Object
  |
  +--interagents.EuLab
Direct Known Subclasses:
userLab

public class EuLab
extends java.lang.Object

A EuLab is click consistent when

It is shadow consistent when It is target consistent when


Field Summary
static int DRAW_ALL
          Constant indicating a full redraw
static int DRAW_MINIMAL
          Constant indicating a minimal redraw
 boolean drawTargets
           
 int id
           
 fundamentals.mouseInfo info
          The default mouseinfo
 int maxConstructionLevel
          Maximal depth of macro call in construction so far
protected  java.util.Vector objs
          The objects in the lab.
protected static java.lang.String pspostamble
           
protected static java.lang.String pspreamble
           
 int segment
          The code for the current segment
 java.lang.StringBuffer traceTree
           
static interagents.EuLab traceTreeGlobals
           
 
Constructor Summary
EuLab()
          The constructor.
EuLab(int colorScheme)
           
EuLab(fundamentals.mouseInfo info)
           
 
Method Summary
 interagents.ObjectWithStatus add(objects.EuObject o)
           
 int addPossiblyKnown(objects.EuObject o, int n)
          add to lab, flag it as sameas n, update flags
 void clear()
          Reset the lab.
 void collect(interagents.EuLab other)
           
 void collect(interagents.finalWrapper other, interagents.EuLab lab)
           
 double confusionDistance(objects.EuObject other)
          Finds the smallest @see confusionDistance from a passed object to one on the canvas Not presently in use, but could be handy for positioning labels on objects!
 int count()
          Count objects.
 void draw(java.awt.Graphics g, int level)
           
 void draw(java.awt.Graphics g, fundamentals.mouseInfo info, int level)
          level currently ignored
 void dump()
           
 java.util.Enumeration elements()
           
 objects.EuObject get(int n)
           
 void initTraceTree()
           
 boolean isTargetConsistent()
          Check whether or not lab is target consistent, see above.
 interagents.wrapItem lookup(objects.EuObject o)
          This function does not work, because objs contains objects of the class ObjectWithStatus and not EuObject.
 interagents.ObjectWithStatus lookup(interagents.finalWrapper fw, int index)
           
 interagents.ObjectWithStatus lookup(int n)
           
 interagents.ObjectWithStatus lookup(interagents.wrapItem wi)
           
 int lookupIndex(objects.EuObject o)
           
 int lookupIndex(interagents.ObjectWithStatus ows)
           
 interagents.ObjectWithStatus lookupObject(objects.EuObject o)
           
 interagents.ObjectWithStatus lookupSolutionObject(objects.EuObject o)
           
 void removeElement(interagents.ObjectWithStatus ows)
           
 void setSegment(int segment)
           
 objects.EuPoint takeRandom(java.util.Random croupier)
           
 objects.EuPoint takeRandom(java.util.Random croupier, objects.EuParametrized other)
           
 java.lang.String toPs()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

objs

protected java.util.Vector objs
The objects in the lab. The elements of this Vector belong to the class ObjectWithStatus.


info

public fundamentals.mouseInfo info
The default mouseinfo


segment

public int segment
The code for the current segment


DRAW_ALL

public static final int DRAW_ALL
Constant indicating a full redraw

See Also:
Constant Field Values

DRAW_MINIMAL

public static final int DRAW_MINIMAL
Constant indicating a minimal redraw

See Also:
Constant Field Values

maxConstructionLevel

public int maxConstructionLevel
Maximal depth of macro call in construction so far


drawTargets

public boolean drawTargets

pspreamble

protected static java.lang.String pspreamble

pspostamble

protected static java.lang.String pspostamble

traceTree

public java.lang.StringBuffer traceTree

traceTreeGlobals

public static interagents.EuLab traceTreeGlobals

id

public int id
Constructor Detail

EuLab

public EuLab()
The constructor. Pass mouseInfo, setup empty vectors, run clear(). @param info the mouseInfo to be used in dimensioning objects on screen


EuLab

public EuLab(int colorScheme)

EuLab

public EuLab(fundamentals.mouseInfo info)
Method Detail

clear

public void clear()
Reset the lab. Remove any object, segment set to BEFORE_PREMISE, current radius and mark reset


count

public int count()
Count objects. @return number of objects presently in lab.


elements

public java.util.Enumeration elements()

removeElement

public void removeElement(interagents.ObjectWithStatus ows)

isTargetConsistent

public boolean isTargetConsistent()
Check whether or not lab is target consistent, see above.

Returns:
true if the lab is target consistent

lookup

public interagents.wrapItem lookup(objects.EuObject o)
                            throws InternalException,
                                   DesignException
This function does not work, because objs contains objects of the class ObjectWithStatus and not EuObject. IN FACT, SINCE ObjectWithStatus.equals HAS BEEN OVERWRITTEN, IT DOES WORK! BUT PRETTY IT IS NOT!

InternalException
DesignException

get

public objects.EuObject get(int n)
                     throws DesignException
DesignException

lookup

public interagents.ObjectWithStatus lookup(int n)
                                    throws DesignException
DesignException

lookupIndex

public int lookupIndex(objects.EuObject o)

lookupIndex

public int lookupIndex(interagents.ObjectWithStatus ows)

lookupObject

public interagents.ObjectWithStatus lookupObject(objects.EuObject o)

lookupSolutionObject

public interagents.ObjectWithStatus lookupSolutionObject(objects.EuObject o)

lookup

public interagents.ObjectWithStatus lookup(interagents.wrapItem wi)
                                    throws DesignException
DesignException

lookup

public interagents.ObjectWithStatus lookup(interagents.finalWrapper fw,
                                           int index)
                                    throws DesignException
DesignException

add

public interagents.ObjectWithStatus add(objects.EuObject o)

addPossiblyKnown

public int addPossiblyKnown(objects.EuObject o,
                            int n)
                     throws DesignException
add to lab, flag it as sameas n, update flags

DesignException

setSegment

public void setSegment(int segment)

dump

public void dump()

toPs

public java.lang.String toPs()
                      throws InternalException,
                             DesignException,
                             UserException
InternalException
DesignException
UserException

confusionDistance

public double confusionDistance(objects.EuObject other)
                         throws InternalException
Finds the smallest @see confusionDistance from a passed object to one on the canvas Not presently in use, but could be handy for positioning labels on objects!

Returns:
the smallest distance @param other the object being held up against the lab
InternalException

collect

public void collect(interagents.EuLab other)

collect

public void collect(interagents.finalWrapper other,
                    interagents.EuLab lab)

draw

public void draw(java.awt.Graphics g,
                 int level)
          throws InternalException,
                 DesignException,
                 UserException
InternalException
DesignException
UserException

draw

public void draw(java.awt.Graphics g,
                 fundamentals.mouseInfo info,
                 int level)
          throws InternalException,
                 DesignException,
                 UserException
level currently ignored

InternalException
DesignException
UserException

takeRandom

public objects.EuPoint takeRandom(java.util.Random croupier)
                           throws UserException,
                                  InternalException,
                                  DesignException
UserException
InternalException
DesignException

takeRandom

public objects.EuPoint takeRandom(java.util.Random croupier,
                                  objects.EuParametrized other)
                           throws UserException,
                                  InternalException,
                                  DesignException
UserException
InternalException
DesignException

initTraceTree

public void initTraceTree()