org.problets.domain.viz.data.implement
Class StackViz
java.lang.Object
org.problets.domain.viz.data.BaseViz
org.problets.domain.viz.data.AggregateBaseViz
org.problets.domain.viz.data.implement.StackViz
- All Implemented Interfaces:
- VizConstants
public class StackViz
- extends AggregateBaseViz
Displays the stack of functions in the program
- Author:
- Stefan Kasabov
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)
We will ask data space to find the variable in the heap and global areas |
AbstractVarViz |
findInDescendants(AbstractVarModel inModel)
Since the stack does not have its own activation record,
we will pass the request down to the last function still on the stack. |
static void |
main(java.lang.String[] args)
|
void |
respond(int xMouse,
int yMouse)
Broadcast the mouse coordinates to all the FunctionViz children |
void |
update()
Broadcast call for updating visualization objects |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
StackViz
public StackViz(StackModel inModel,
DataSpaceViz inParentViz)
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)
- Broadcast the mouse coordinates to all the FunctionViz children
findInAncestors
public AbstractVarViz findInAncestors(AbstractVarModel inModel)
- We will ask data space to find the variable in the heap and global areas
- Specified by:
findInAncestors
in class AggregateBaseViz
findInDescendants
public AbstractVarViz findInDescendants(AbstractVarModel inModel)
- Since the stack does not have its own activation record,
we will pass the request down to the last function still on the stack.
This scheme will work for C++, but not Pascal in which variables could be inherited.
- Specified by:
findInDescendants
in class AggregateBaseViz
update
public void update()
- Broadcast call for updating visualization objects
- Overrides:
update
in class BaseViz
main
public static void main(java.lang.String[] args)