All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class berkeley.cs.dmc.probtree.ProbabilityTreePlot

java.lang.Object
   |
   +----java.awt.Component
           |
           +----java.awt.Canvas
                   |
                   +----berkeley.cs.dmc.probtree.ProbabilityTreePlot

public class ProbabilityTreePlot
extends Canvas
implements Runnable
Used to produce plots of probability trees, but it will only work for two dimensional distributions, or it will plot the first two variables. For one dimensional variables, it will plot stripes.


Constructor Index

 o ProbabilityTreePlot(ProbabilityTree, int, int)
The constructor sets up a pixel array and window, and sets a thread running to manage redraws and updates.

Method Index

 o getMinimumSize()
 o getPreferredSize()
 o paint(Graphics)
 o refreshData()
Should be called whenever the distribution to plot is changed and a plot update is required.
 o run()
 o update(Graphics)

Constructors

 o ProbabilityTreePlot
 public ProbabilityTreePlot(ProbabilityTree distrib,
                            int width,
                            int height)
The constructor sets up a pixel array and window, and sets a thread running to manage redraws and updates.

Parameters:
distrib - The distribution to be plotted.
width - The desired plot width, in pixels.
height - The desired plot height, in pixels.

Methods

 o update
 public void update(Graphics g)
Overrides:
update in class Component
 o paint
 public void paint(Graphics g)
Overrides:
paint in class Canvas
 o refreshData
 public void refreshData()
Should be called whenever the distribution to plot is changed and a plot update is required.

 o run
 public void run()
 o getPreferredSize
 public Dimension getPreferredSize()
Overrides:
getPreferredSize in class Component
 o getMinimumSize
 public Dimension getMinimumSize()
Overrides:
getMinimumSize in class Component

All Packages  Class Hierarchy  This Package  Previous  Next  Index