All Packages  Class Hierarchy  This Package  Previous  Next  Index
  Class primitives.frames.CanvasArea
java.lang.Object
   |
   +----java.awt.Component
           |
           +----java.awt.Canvas
                   |
                   +----primitives.frames.CanvasArea
  -  public class CanvasArea
  
-  extends Canvas
  
A class which encapsulates the drawing on a canvas.
The paint method calls the redraw method of the MachineListener interface associated with
this canvas. associate a MachineListener interface by the setCurrentObject method.
A double buffer is used to preform drawings the graphic context of this buffer is passed
to the redraw method of the MachineListener interface.
    -  See Also:
    
 -  MachineListener
 
  
  -  
	backBuffer
   -  The memory set for the backbuffer.
  
 -  
	backBufferG
   -  The graphic context of backBuffer.
  
 -  
	machine
   -  The interface to call its redraw method from the paint method of this object.
 
  
  -  
	CanvasArea()
   -  
 
  
  -  
	finalize()
   -  
  
 -  
	freeBuffers()
   -  clears the memory associated with the backbuffer objects.
  
 -  
	paint(Graphics)
   -  calls the redraw method of the machine member.
  
 -  
	setCurrentObject(MachineListener)
   -  sets the MachineListener object to be called by the paint method of this object.
  
 -  
	update(Graphics)
   -  overrides update method of Canvas class.
 
  
backBuffer
 Image backBuffer
  -  The memory set for the backbuffer.
[should be private member]
 
backBufferG
 public Graphics backBufferG
  -  The graphic context of backBuffer.
[should be private]
 
machine
 public MachineListener machine
  -  The interface to call its redraw method from the paint method of this object.
  
 
    -  See Also:
    
 -  MachineListener
  
 
 
 
  
CanvasArea
 public CanvasArea()
  
finalize
 public void finalize() throws Throwable
  
    -  Throws: Throwable
    
 -  .
    
 -  Overrides:
    
 -  finalize in class Object
    
 -  See Also:
    
 -  freeBuffers
  
 
 
freeBuffers
 void freeBuffers()
  -  clears the memory associated with the backbuffer objects.
 
update
 public synchronized void update(Graphics g)
  -  overrides update method of Canvas class.
calls paint method immidiatly.
  
    -  Overrides:
    
 -  update in class Component
  
 
 
 
paint
 public synchronized void paint(Graphics g)
  -  calls the redraw method of the machine member.
Passing to this method the graphic context of the buffer.
  
    -  Overrides:
    
 -  paint in class Canvas
  
 
 
 
setCurrentObject
 public void setCurrentObject(MachineListener obj)
  -  sets the MachineListener object to be called by the paint method of this object.
  
    -  Parameters:
    
 -  obj - the Machinelistener object to associate.
    
 -  See Also:
    
 -  Machinelistener
  
 
 
 
All Packages  Class Hierarchy  This Package  Previous  Next  Index