org.problets.domain.viz.data.control.abstraction
Class BlockViz

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.control.abstraction.BlockViz
All Implemented Interfaces:
VizConstants
Direct Known Subclasses:
FunctionViz

public class BlockViz
extends AggregateBaseViz

Draws the rectangle in which an ActivationRecord is displayed.

Version:
1.0, Jan 25, 2006
Author:
Stefan Kasabov

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
BlockViz(ActivationRecord inModel, AggregateBaseViz inParentViz)
           
 
Method Summary
 void addChild(BlockViz tmpBlockViz)
          Adds a child to this block or its descendant as appropriate, used by stackviz
 void deleteLastChild()
          Deletes a child of the current block or of its descendants
 void deregisterChannel(Channel inChannel)
          Passing up the channel to be deregistered by the ChannelManager
 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)
          Given a variable, looks for it in this block and its parents until found
 AbstractVarViz findInDescendants(AbstractVarModel inModel)
          Given a variable to which a pointer is pointing, look for it in the embedded scopes and return its visualization, if found
static void main(java.lang.String[] args)
           
 void registerChannel(Channel inChannel)
          Passing up the channel to be registered by the ChannelManager
 void respond(int xMouse, int yMouse)
          Responds to mouse events on the object
 void update()
          Broadcast call for updating visualization objects
 
Methods inherited from class org.problets.domain.viz.data.AggregateBaseViz
getParentViz, 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

BlockViz

public BlockViz(ActivationRecord inModel,
                AggregateBaseViz 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


findInAncestors

public AbstractVarViz findInAncestors(AbstractVarModel inModel)
Given a variable, looks for it in this block and its parents until found

Specified by:
findInAncestors in class AggregateBaseViz

findInDescendants

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

Specified by:
findInDescendants in class AggregateBaseViz

update

public void update()
Broadcast call for updating visualization objects

Overrides:
update in class BaseViz

registerChannel

public void registerChannel(Channel inChannel)
Passing up the channel to be registered by the ChannelManager

Overrides:
registerChannel in class AggregateBaseViz

deregisterChannel

public void deregisterChannel(Channel inChannel)
Passing up the channel to be deregistered by the ChannelManager

Overrides:
deregisterChannel in class AggregateBaseViz

addChild

public void addChild(BlockViz tmpBlockViz)
Adds a child to this block or its descendant as appropriate, used by stackviz


deleteLastChild

public void deleteLastChild()
Deletes a child of the current block or of its descendants


main

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