org.problets.domain.viz.data.implement
Class ActivationRecordViz

java.lang.Object
  extended by org.problets.domain.viz.data.BaseViz
      extended by org.problets.domain.viz.data.implement.ActivationRecordViz
All Implemented Interfaces:
VizConstants

public class ActivationRecordViz
extends BaseViz

Displays the variables in an activation record

Author:
Stefan Kasabov, Amruth Kumar

Field Summary
 
Fields inherited from class org.problets.domain.viz.data.BaseViz
NOT_FOUND
 
Fields inherited from interface org.problets.domain.viz.data.VizConstants
ACTIVE_COLOR, COLOR_SCHEME, HIGHLIGHT_COLOR, INACTIVE_COLOR, STRIKEOUT_COLOR
 
Constructor Summary
ActivationRecordViz(ActivationRecord inModel, BlockViz inBlockViz)
           
 
Method Summary
 void deregisterChannel(Channel inChannel)
          Passes the request to deregister a channel to the block
 int draw(java.awt.Graphics g, java.awt.Font regFont, java.awt.FontMetrics regFontMetric, int inTopLeftX, int inTopLeftY, int inWidth)
          This method is called instead of the paintComponent() method.
 AbstractVarViz find(AbstractVarModel inModel)
          Searches for the variable in this activation record (only).
 AbstractVarViz findRecursively(AbstractVarModel inModel)
          Looks for the variable in this activation record, as well as the descendants and parents of its block, and returns the viz object
static void main(java.lang.String[] args)
           
 void registerChannel(Channel inChannel)
          Passes the request to register a channel to the block
 void respond(int xMouse, int yMouse)
          Responds to mouse events on the object
 void update()
          Broadcast update() to all the variables and pointers
 
Methods inherited from class org.problets.domain.viz.data.BaseViz
getLeftX, getWidth
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ActivationRecordViz

public ActivationRecordViz(ActivationRecord inModel,
                           BlockViz inBlockViz)
Method Detail

draw

public int draw(java.awt.Graphics g,
                java.awt.Font regFont,
                java.awt.FontMetrics regFontMetric,
                int inTopLeftX,
                int inTopLeftY,
                int inWidth)
Description copied from class: BaseViz
This method is called instead of the paintComponent() method. It draws the visualization in the provided Graphics context.

Parameters:
g - Graphics context on which to draw the visualization

respond

public void respond(int xMouse,
                    int yMouse)
Description copied from class: BaseViz
Responds to mouse events on the object


find

public AbstractVarViz find(AbstractVarModel inModel)
Searches for the variable in this activation record (only). If the variable is found, returns its visualization; else, returns null


findRecursively

public AbstractVarViz findRecursively(AbstractVarModel inModel)
Looks for the variable in this activation record, as well as the descendants and parents of its block, and returns the viz object


update

public void update()
Broadcast update() to all the variables and pointers

Overrides:
update in class BaseViz

registerChannel

public void registerChannel(Channel inChannel)
Passes the request to register a channel to the block


deregisterChannel

public void deregisterChannel(Channel inChannel)
Passes the request to deregister a channel to the block


main

public static void main(java.lang.String[] args)