Class jovial.slotCar.animator.Drawable
All Packages  Class Hierarchy  This Package  Previous  Next  Index
  Class jovial.slotCar.animator.Drawable
java.lang.Object
   |
   +----jovial.slotCar.animator.Drawable
  -  public class Drawable
  -  extends Object
Represesnts something that can be drawn by an Animator.  When Animator
 wants to draw a scene, it sorts its Drawable's by height (to get 
 overlapping right), and then asks each Drawable to draw itself.
   
  -   Drawable() Drawable()
-  
   
  -   canMove() canMove()
-  
  
-   erase(Graphics) erase(Graphics)
-  Erase this drawable.
  
-   height() height()
-  
  
-   paint(Graphics) paint(Graphics)
-  Paint this drawable
   
 Drawable
Drawable
  public Drawable()
   
 height
height
  public abstract int height()
  
    -  Returns:
    
-  the height of this drawable.  Higher drawables will be drawn
	       first.  By convention, heights <= 0 means that this Drawable
        is part of the "background", and won't be re-drawn with each frame.
  
 paint
paint
  public abstract void paint(Graphics g)
  -  Paint this drawable
  
    -  Parameters:
    
-  g - The grahics to be drawn to
  
 
 erase
erase
  public abstract void erase(Graphics g)
  -  Erase this drawable.  This only needs to do something if canMove() gives
true.
  
    -  Parameters:
    
-  g - The graphics on which erasing is to occur
  
 
 canMove
canMove
  public abstract boolean canMove()
  
    -  Returns:
    
-  true iff this drawable might move around the screen
  
All Packages  Class Hierarchy  This Package  Previous  Next  Index