|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectasst1Services.SimpleDrawingCanvas
public class SimpleDrawingCanvas
This class implements a simple drawing canvas that has a pre-determined size (640x480). The canvas provides a small number of simple operations and actions that can be performed upon it. Resizing of the canvas is not supported.
Constructor Summary | |
---|---|
SimpleDrawingCanvas()
Instantiates a simple drawing canvas, which gets positioned according to the default behaviour of the layout manager of the system upon which the requestor is running (usually the top left corner). |
Method Summary | |
---|---|
void |
clearCanvas()
Causes the canvas to be re-initialized to blank. |
void |
drawAndAnimateImage(java.awt.image.BufferedImage bi)
Causes the passed image to be drawn in a sequence of frames, at a rate of 10 frames-per-second, each one showing the image with a small horizontal and vertical displacement so as to make it appear that the image is moving in a circular motion. |
void |
drawAndAnimateRectangle(type.lib.Rectangle3 r)
Causes the passed rectangle to be drawn in a sequence of frames, at a rate of 10 frames-per-second, each one showing the rectangle with a small horizontal and vertical displacement so as to make it appear that the rectangle is moving in a circular motion. |
void |
drawImg(java.awt.image.BufferedImage bi)
Shows the passed image so that it will be placed in the center of the canvas. |
void |
drawImgAndClear(java.awt.image.BufferedImage bi)
Same as drawImg(BufferedImage bi), but clears the screen after 500 msec |
void |
drawImgAndClear(java.awt.image.BufferedImage bi,
int mSecDisplay)
Same as drawImg(BufferedImage), but clears the screen after the specified number of msec |
void |
drawRectangle(type.lib.Rectangle3 r)
Draws the passed rectangle so that it will be placed in the center of the canvas. |
void |
drawRectangleAndClear(type.lib.Rectangle3 r)
Same as drawRectangle(Rectangle3), but clears the screen after 500 msec |
void |
drawRectangleAndClear(type.lib.Rectangle3 r,
int mSecDisplay)
Same as drawRectangle(Rectangle3), but clears the screen after the specified number of msec |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SimpleDrawingCanvas()
Method Detail |
---|
public void drawImg(java.awt.image.BufferedImage bi)
bi
- the BufferedImage to be shownpublic void drawImgAndClear(java.awt.image.BufferedImage bi)
bi
- the BufferedImage to be shownpublic void drawImgAndClear(java.awt.image.BufferedImage bi, int mSecDisplay)
bi
- the BufferedImage to be shownmSecDisplay
- the amount of time in msec that the passed image should be
shown. mSecDisplay >0public void drawRectangle(type.lib.Rectangle3 r)
r
- the Rectangle3 to be drawnpublic void drawRectangleAndClear(type.lib.Rectangle3 r)
r
- the Rectangle3 to be drawnpublic void drawRectangleAndClear(type.lib.Rectangle3 r, int mSecDisplay)
r
- the Rectangle3 to be drawnmSecDisplay
- the amount of time in msec that the passed rectangle should be
shown. mSecDisplay >0public void clearCanvas()
public void drawAndAnimateRectangle(type.lib.Rectangle3 r)
r
- the Rectangle3 to be drawnpublic void drawAndAnimateImage(java.awt.image.BufferedImage bi)
bi
- the BufferedImage to be shown
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |