ui
Class Canvas

java.lang.Object
  extended by ui.Canvas
All Implemented Interfaces:
java.awt.event.ActionListener, java.util.EventListener

public class Canvas
extends java.lang.Object
implements java.awt.event.ActionListener

For bringing objects onto the screen.


Constructor Summary
Canvas(int width, int height, GlobalLists glists, java.lang.String fileName)
          Creates and displays a canvas for drawing.
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent arg0)
           
 void fill(java.awt.Color color)
          Fills the complete canvas with a given color.
 void fillRect(Rectangle region, java.awt.Color col)
           
 void fillRect(Rectangle region, java.awt.Image image)
           
 IPixelFilter getFilter()
          The pixel filter.
 int getHeight()
          The height.
 int getNumSamples()
          The number of samples.
 int getNumThreads()
          The number of threads.
 int getRecursionDepth()
          The recursion depth.
 int getWidth()
          The width.
 void killAllThreads()
           
 void openFile(java.lang.String FileName)
           
 void render(int numthreads_, IPixelFilter filter_, int numsamples_)
           
 void saveToFile(java.lang.String outFileName)
           
 void setFilter(IPixelFilter filter_)
           
 void setNumSamples(int num)
           
 void setNumThreads(int num)
           
 void setRaycaster(Raycaster raycaster_)
           
 void setRecursionDepth(int depth)
           
 void setSize(int width_, int height_)
           
 void update()
          Causes a repaint of the canvas.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Canvas

public Canvas(int width,
              int height,
              GlobalLists glists,
              java.lang.String fileName)
Creates and displays a canvas for drawing.

Parameters:
width -
height -
Method Detail

setSize

public void setSize(int width_,
                    int height_)

getWidth

public int getWidth()
The width.

Returns:
The width.

getHeight

public int getHeight()
The height.

Returns:
The height.

getNumSamples

public int getNumSamples()
The number of samples.

Returns:
The number of samples.

getNumThreads

public int getNumThreads()
The number of threads.

Returns:
The number of threads.

getFilter

public IPixelFilter getFilter()
The pixel filter.

Returns:
The pixel filter.

getRecursionDepth

public int getRecursionDepth()
The recursion depth.

Returns:
The recursion depth.

update

public void update()
Causes a repaint of the canvas.


fill

public void fill(java.awt.Color color)
Fills the complete canvas with a given color.

Parameters:
color -

fillRect

public void fillRect(Rectangle region,
                     java.awt.Image image)

fillRect

public void fillRect(Rectangle region,
                     java.awt.Color col)

openFile

public void openFile(java.lang.String FileName)

saveToFile

public void saveToFile(java.lang.String outFileName)

setNumThreads

public void setNumThreads(int num)

setNumSamples

public void setNumSamples(int num)

setFilter

public void setFilter(IPixelFilter filter_)

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent arg0)
Specified by:
actionPerformed in interface java.awt.event.ActionListener

setRaycaster

public void setRaycaster(Raycaster raycaster_)

setRecursionDepth

public void setRecursionDepth(int depth)

killAllThreads

public void killAllThreads()

render

public void render(int numthreads_,
                   IPixelFilter filter_,
                   int numsamples_)