|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--java.awt.Component
|
+--java.awt.Canvas
|
+--PanelConfiguration.ImageCanvas
This class provides a canvas in order to paint an image on it.
| Field Summary | |
protected Image |
currentImage
The current image (it changes when the image is resized). |
protected Image |
image
The initial image. |
protected boolean |
painted
A boolean to prevent java form drawing an unitialized image. |
| Fields inherited from class java.awt.Component |
BOTTOM_ALIGNMENT,
CENTER_ALIGNMENT,
LEFT_ALIGNMENT,
RIGHT_ALIGNMENT,
TOP_ALIGNMENT |
| Constructor Summary | |
ImageCanvas()
The constructor. |
|
| Method Summary | |
void |
componentHidden(ComponentEvent e)
When the component is hidden. |
void |
componentMoved(ComponentEvent e)
When the component is moved. |
void |
componentResized(ComponentEvent e)
When the component is resized. |
void |
componentShown(ComponentEvent e)
When the component is shown. |
void |
init(Image image)
The initialization method. |
void |
paint(Graphics g)
The paint method. |
void |
update()
This method take in account it the user is resizing the applet. |
void |
update(Image image)
This method update the image that is shown in the canvas. |
| Methods inherited from class java.awt.Canvas |
addNotify |
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
| Field Detail |
protected Image image
protected Image currentImage
protected boolean painted
| Constructor Detail |
public ImageCanvas()
| Method Detail |
public void init(Image image)
image - The image we want to paint on the canvas.public void update()
public void update(Image image)
image - The image that we must show in the cavnas.public void paint(Graphics g)
g - The graphics context.Graphicspublic void componentHidden(ComponentEvent e)
e - The ComponentEventpublic void componentMoved(ComponentEvent e)
e - The ComponentEventpublic void componentResized(ComponentEvent e)
e - The ComponentEventpublic void componentShown(ComponentEvent e)
e - The ComponentEvent
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||