All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class jdsltools.visualization.ContainerVisualizers.HeapVisualizer

java.lang.Object
   |
   +----java.awt.Component
           |
           +----java.awt.Canvas
                   |
                   +----jdsltools.visualization.ContainerVisualizer
                           |
                           +----jdsltools.visualization.ContainerVisualizers.HeapVisualizer

public class HeapVisualizer
extends ContainerVisualizer
Displays the Heap being visualized in the visualizer window

Author:
Ryan Shaun Baker

Variable Index

 o X_GROW
 o X_MINDISTANCE
 o Y_FRAME
 o Y_STEP

Constructor Index

 o HeapVisualizer(int, int, ElementVisualizer, Container, VisualizationController)

Method Index

 o convertToStandard(Container)
 o duplicator()
 o getMinimumSize()
 o getPreferredSize()
 o getTree()
 o mousePressed(MouseEvent)
 o paint(Graphics)
 o positionColor(Position)
 o repaint()
 o screenLoc(Container, Position)
Returns the coordinates that the given locator would have if the given container were visualized.

 o setScroller(ScrollPane)
 o setSelectedPosition(Position)
selects the given locator and redisplays the container
 o showString(String)
Display the given string.

 o spaint(Graphics)
 o treeNodeHeight(Position)
 o visualize(Container)
Display the contents of the container, with no highlighted element.

 o visualize(Container, Position, boolean)
Display the contents of the container, with the element corresponding to the given locator highlighted.

Variables

 o Y_STEP
 public static final int Y_STEP
 o Y_FRAME
 public static final int Y_FRAME
 o X_MINDISTANCE
 public static final int X_MINDISTANCE
 o X_GROW
 public static final double X_GROW

Constructors

 o HeapVisualizer
 public HeapVisualizer(int width,
                       int height,
                       ElementVisualizer ev,
                       Container initialContainer,
                       VisualizationController client)
Parameters:
width - the width of the display window
height - the height of the display window
ev - the visualizer for the elements of the enumeration
initialContainer - the initial enumeration displayed
client - the visualization controller using this

Methods

 o showString
 public void showString(String text)
Display the given string.

Overrides:
showString in class ContainerVisualizer
 o getTree
 public BinaryTree getTree()
 o setSelectedPosition
 public void setSelectedPosition(Position selected)
selects the given locator and redisplays the container

Overrides:
setSelectedPosition in class ContainerVisualizer
 o duplicator
 public ContainerDuplicator duplicator()
Overrides:
duplicator in class ContainerVisualizer
 o screenLoc
 public Point screenLoc(Container tree,
                        Position target)
Returns the coordinates that the given locator would have if the given container were visualized.

Overrides:
screenLoc in class ContainerVisualizer
 o visualize
 public void visualize(Container c)
Display the contents of the container, with no highlighted element.

Overrides:
visualize in class ContainerVisualizer
 o visualize
 public void visualize(Container c,
                       Position selected,
                       boolean active)
Display the contents of the container, with the element corresponding to the given locator highlighted.

Overrides:
visualize in class ContainerVisualizer
 o positionColor
 public Color positionColor(Position p)
 o repaint
 public void repaint()
Overrides:
repaint in class Component
 o spaint
 public void spaint(Graphics g)
 o paint
 public void paint(Graphics g)
Overrides:
paint in class Canvas
 o getPreferredSize
 public Dimension getPreferredSize()
Overrides:
getPreferredSize in class Component
 o getMinimumSize
 public Dimension getMinimumSize()
Overrides:
getMinimumSize in class Component
 o convertToStandard
 public Container convertToStandard(Container s)
Overrides:
convertToStandard in class ContainerVisualizer
 o mousePressed
 public void mousePressed(MouseEvent e)
Overrides:
mousePressed in class ContainerVisualizer
 o treeNodeHeight
 public int treeNodeHeight(Position cur)
 o setScroller
 public void setScroller(ScrollPane sp)
Overrides:
setScroller in class ContainerVisualizer

All Packages  Class Hierarchy  This Package  Previous  Next  Index