com.swfm.mica.core
Interface MiiCanvas

All Known Implementing Classes:
MiAWT102Canvas, MiAWTCanvas, MiJCanvas

public interface MiiCanvas

Version:
%I% %G%
Author:
Michael L. Davis

Method Summary
 java.awt.Image createImage(int width, int height)
           
 java.awt.Rectangle getCanvasBounds()
          Get the bounds of the canvas in pixels.
 java.awt.Insets getContainerInsets()
           
 java.awt.Graphics getGraphics()
           
 java.awt.Dimension getMinimumSize()
          Returns the minimum size of this canvas.
 int getMouseAppearance()
          Returns the appearance of the mouse cursor in this canvas.
 java.awt.Dimension getPreferredSize()
          Returns the preferred size of this canvas.
 boolean handleEvent(java.awt.Event evt)
          Process the awt.event as per the awt.Component API.
 void paint(java.awt.Graphics g)
          Causes the canvas to be redrawn as per the awt.Component API.
 void requestRepaint()
           
 void setBounds(int x, int y, int width, int height)
          Causes the canvas to be reshaped as per the awt.Component API.
 void setCanvas(MiCanvas canvas)
           
 void setCanvasBounds(MiBounds deviceBounds)
          Sets the bounds of the canvas, in pixels.
 void setMouseAppearance(int appearance)
          Sets the appearance of the mouse cursor within the bounds of this canvas.
 void update(java.awt.Graphics g)
          Causes the canvas to be redrawn as per the awt.Component API.
 

Method Detail

setCanvas

public void setCanvas(MiCanvas canvas)

setMouseAppearance

public void setMouseAppearance(int appearance)
Sets the appearance of the mouse cursor within the bounds of this canvas.

Parameters:
appearance - the cursor appearance

getMouseAppearance

public int getMouseAppearance()
Returns the appearance of the mouse cursor in this canvas.

Returns:
the animation manager
See Also:
MiAnimationManager

setCanvasBounds

public void setCanvasBounds(MiBounds deviceBounds)
Sets the bounds of the canvas, in pixels.

Parameters:
deviceBounds - the bounds of this canvas

getCanvasBounds

public java.awt.Rectangle getCanvasBounds()
Get the bounds of the canvas in pixels.

Returns:
the bounds of this canvas

getPreferredSize

public java.awt.Dimension getPreferredSize()
Returns the preferred size of this canvas. This routine is in support of the Component API.

Returns:
the preferred size

getMinimumSize

public java.awt.Dimension getMinimumSize()
Returns the minimum size of this canvas. This routine is in support of the Component API.

Returns:
the minimum size

handleEvent

public boolean handleEvent(java.awt.Event evt)
Process the awt.event as per the awt.Component API.

Parameters:
evt - the awt.Event event

update

public void update(java.awt.Graphics g)
Causes the canvas to be redrawn as per the awt.Component API.

Parameters:
g - the awt.graphics renderer

paint

public void paint(java.awt.Graphics g)
Causes the canvas to be redrawn as per the awt.Component API.

Parameters:
g - the awt.graphics renderer

requestRepaint

public void requestRepaint()

setBounds

public void setBounds(int x,
                      int y,
                      int width,
                      int height)
Causes the canvas to be reshaped as per the awt.Component API.

Parameters:
x - the x coordinate
y - the y coordinate
width - the width
height - the height

getContainerInsets

public java.awt.Insets getContainerInsets()

getGraphics

public java.awt.Graphics getGraphics()

createImage

public java.awt.Image createImage(int width,
                                  int height)