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

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

public class HeapViz
extends AggregateBaseViz

Displays the variables in HeapModel

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
HeapViz(HeapModel inModel, DataSpaceViz inParentViz)
           
 
Method Summary
 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 findInAncestors(AbstractVarModel inModel)
          Recursively look for the variable in the stack and global areas
 AbstractVarViz findInDescendants(AbstractVarModel inModel)
          Given a variable to which a pointer is pointing, look for it in the heap and return its visualization, if found
static void main(java.lang.String[] args)
           
 void respond(int xMouse, int yMouse)
          Responds to mouse events on the object
 void update()
          Method called every time this vizualization must be updated
 
Methods inherited from class org.problets.domain.viz.data.AggregateBaseViz
deregisterChannel, getParentViz, registerChannel, setParentViz
 
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

HeapViz

public HeapViz(HeapModel inModel,
               DataSpaceViz inParentViz)
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


findInDescendants

public AbstractVarViz findInDescendants(AbstractVarModel inModel)
Given a variable to which a pointer is pointing, look for it in the heap and return its visualization, if found

Specified by:
findInDescendants in class AggregateBaseViz

findInAncestors

public AbstractVarViz findInAncestors(AbstractVarModel inModel)
Recursively look for the variable in the stack and global areas

Specified by:
findInAncestors in class AggregateBaseViz

update

public void update()
Description copied from class: BaseViz
Method called every time this vizualization must be updated

Overrides:
update in class BaseViz

main

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