Class anim.AnimCanvas
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class anim.AnimCanvas

java.lang.Object
   |
   +----java.awt.Component
           |
           +----java.awt.Canvas
                   |
                   +----anim.AnimCanvas

public class AnimCanvas
extends Canvas
AnimCanvas - Animation savvy awt canvas component. This component can be placed into your applet like any awt component, and it contains a Surface so Sprites can be drawn and manipulated.

Copyright (c) 1996-1997 Intel Corporation


VARIABLE INDEX

 O surface

CONSTRUCTOR INDEX

 O AnimCanvas(int, int)
AnimCanvas constructor.
 O AnimCanvas(Surface)
AnimCanvas constructor using passed in animation Surface.

METHOD INDEX

 O getSurface()
Returns the current animation Surface associated with this AnimCanvas
 O minimumSize()
 O paint(Graphics)
Paint Surface onto screen.
 O paintAll(Graphics)
Paint Surface onto screen.
 O preferredSize()
 O removeNotify()
Notifies this component and all its subcomponents to destroy their peers.
 O repaint()
Repaint surface on screen.
 O repaint(int, int, int, int)
Repaint the specified rectangle on the surface.
 O repaint(long)
Repaint surface within tm milliseconds.
 O repaint(long, int, int, int, int)
Repaint the specified rectangle on the surface within tm milliseconds.
 O update(Graphics)
Update Surface on screen.

VARIABLES

 O surface
  protected Surface surface

CONSTRUCTORS

 O AnimCanvas
  public AnimCanvas(int width,
                    int height)
AnimCanvas constructor. This constructor sets the Surface color to black. Change the Surface color with AnimCanvas.getSurface().setColor()
Parameters:
width - -- width of the animCanvas. If this is negative, it is set to zero.
height - -- height of the animCanvas. If this is negative, it is set to zero.
 O AnimCanvas
  public AnimCanvas(Surface surface)
AnimCanvas constructor using passed in animation Surface. AnimCanvas has the same dimensions as the Surface.
Parameters:
surface - Surface that AnimCanvas will contain

METHODS

 O paint
  public void paint(Graphics g)
Paint Surface onto screen.
Parameters:
g - Graphics Context for AnimCanvas
Overrides:
paint in class Canvas
See Also:
paint
 O paintAll
  public void paintAll(Graphics g)
Paint Surface onto screen.
Parameters:
g - Graphics Context for AnimCanvas
Overrides:
paintAll in class Component
 O update
  public void update(Graphics g)
Update Surface on screen.
Parameters:
g - Graphics Context for AnimCanvas
Overrides:
update in class Component
See Also:
update, paint
 O repaint
  public void repaint()
Repaint surface on screen.
Overrides:
repaint in class Component
 O repaint
  public void repaint(int x,
                      int y,
                      int width,
                      int height)
Repaint the specified rectangle on the surface.
Parameters:
x - x coordinate of rectangle
y - y coordinate of rectangle
width - width of rectangle
height - height of rectangle
Overrides:
repaint in class Component
 O repaint
  public void repaint(long tm)
Repaint surface within tm milliseconds.
Parameters:
tm - number of milliseconds to repaint by
Overrides:
repaint in class Component
 O repaint
  public void repaint(long tm,
                      int x,
                      int y,
                      int width,
                      int height)
Repaint the specified rectangle on the surface within tm milliseconds.
Parameters:
tm - number of milliseconds to repaint by
x - x coordinate of rectangle
y - y coordinate of rectangle
width - width of rectangle
height - height of rectangle
Overrides:
repaint in class Component
 O getSurface
  public Surface getSurface()
Returns the current animation Surface associated with this AnimCanvas
Returns:
current animation surface
 O removeNotify
  public void removeNotify()
Notifies this component and all its subcomponents to destroy their peers. Applications should not call this method directly. It is called when a component is removed from its container.
Overrides:
removeNotify in class Component
 O preferredSize
  public Dimension preferredSize()
Overrides:
preferredSize in class Component
 O minimumSize
  public Dimension minimumSize()
Overrides:
minimumSize in class Component

All Packages  Class Hierarchy  This Package  Previous  Next  Index
Free Web Hosting