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
-
surface
-
-
AnimCanvas(int, int)
- AnimCanvas constructor.
-
AnimCanvas(Surface)
- AnimCanvas constructor using passed in animation Surface.
-
getSurface()
- Returns the current animation Surface associated with this AnimCanvas
-
minimumSize()
-
-
paint(Graphics)
- Paint Surface onto screen.
-
paintAll(Graphics)
- Paint Surface onto screen.
-
preferredSize()
-
-
removeNotify()
- Notifies this component and all its subcomponents to destroy
their peers.
-
repaint()
- Repaint surface on screen.
-
repaint(int, int, int, int)
- Repaint the specified rectangle on the surface.
-
repaint(long)
- Repaint surface within tm milliseconds.
-
repaint(long, int, int, int, int)
- Repaint the specified rectangle on the surface within tm milliseconds.
-
update(Graphics)
- Update Surface on screen.
surface
protected Surface surface
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.
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
paint
public void paint(Graphics g)
- Paint Surface onto screen.
- Parameters:
- g - Graphics Context for AnimCanvas
- Overrides:
- paint in class Canvas
- See Also:
- paint
paintAll
public void paintAll(Graphics g)
- Paint Surface onto screen.
- Parameters:
- g - Graphics Context for AnimCanvas
- Overrides:
- paintAll in class Component
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
repaint
public void repaint()
- Repaint surface on screen.
- Overrides:
- repaint in class Component
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
repaint
public void repaint(long tm)
- Repaint surface within tm milliseconds.
- Parameters:
- tm - number of milliseconds to repaint by
- Overrides:
- repaint in class Component
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
getSurface
public Surface getSurface()
- Returns the current animation Surface associated with this AnimCanvas
- Returns:
- current animation surface
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
preferredSize
public Dimension preferredSize()
- Overrides:
- preferredSize in class Component
minimumSize
public Dimension minimumSize()
- Overrides:
- minimumSize in class Component
All Packages Class Hierarchy This Package Previous Next Index