|
|||||||||
| 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
|
+--DrawableSurface.DrawableSurface
|
+--DrawableSurface.PaintSurface
This class defines a surface on which a user can draw forms and can manipulate them.
| Field Summary | |
protected Point |
circleCenter
We keep in memory the first click of the user. |
protected FormsAdministrator |
formsAdministrator
Administrator for the texture. |
protected FormsMakerPanel |
formsMakerPanel
We must take the different parameters the user specified (texture, color, type of forms). |
protected int |
indexCircleChoosen
We keep in mind if the user has clicked on a circle. |
protected int |
indexPolygonChoosen
We keep in mind if the user has clicked on a polygon. |
protected int |
indexRectangleChoosen
We keep in mind if the user has clicked on a rectangle. |
protected int |
numberOfClicks
This variable is very useful for drawing a polygon. |
protected Point |
rectangleFirstPoint
We keep in memory the first click of the user. |
protected TextureAdministrator |
textureAdministrator
Administrator for the texture. |
protected ToolPanel |
toolPanel
This is the panel on which we can give some explanation about what the user must do. |
| Fields inherited from class DrawableSurface.DrawableSurface |
animatedImage,
height,
painted,
width |
| Fields inherited from class java.awt.Component |
BOTTOM_ALIGNMENT,
CENTER_ALIGNMENT,
LEFT_ALIGNMENT,
RIGHT_ALIGNMENT,
TOP_ALIGNMENT |
| Constructor Summary | |
PaintSurface(int width,
int height)
A second constructor. |
|
PaintSurface(int width,
int height,
Color backgroundColor)
The first constructor. |
|
| Method Summary | |
void |
init(ToolPanel toolPanel,
FormsMakerPanel formsMakerPanel)
Initialisation of the paintSurface. |
void |
mouseClicked(MouseEvent e)
When the user clicked on the area. |
void |
mouseDragged(MouseEvent e)
When the mouse is dragged. |
void |
mouseEntered(MouseEvent e)
When the mouse enters the area. |
void |
mouseExited(MouseEvent e)
When the mouse exits the area. |
void |
mouseMoved(MouseEvent e)
When the mouse is moved on the area. |
void |
mousePressed(MouseEvent e)
When the mouse is pressed. |
void |
mouseReleased(MouseEvent e)
When the mouse is released. |
boolean |
negativeChoosen()
Test if the user has choosen the negative image or not. |
| Methods inherited from class DrawableSurface.DrawableSurface |
animatedImage,
eraseSurface,
height,
paint,
start,
update,
width |
| 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 ToolPanel toolPanel
protected FormsMakerPanel formsMakerPanel
protected FormsAdministrator formsAdministrator
FormsAdministratorprotected TextureAdministrator textureAdministrator
TextureAdministratorprotected Point circleCenter
protected Point rectangleFirstPoint
protected int numberOfClicks
protected int indexCircleChoosen
protected int indexRectangleChoosen
protected int indexPolygonChoosen
| Constructor Detail |
public PaintSurface(int width,
int height,
Color backgroundColor)
width - The width of our PaintSurface.height - The height of our PaintSurface.backgroundColor - The background color of our PaintSurface.
public PaintSurface(int width,
int height)
width - The width of our PaintSurface.height - The height of our PaintSurface.| Method Detail |
public void init(ToolPanel toolPanel,
FormsMakerPanel formsMakerPanel)
toolPanel - The panel on which we are going to display help messages.formsMakerPanel - That panel is going to give us the information about waht the user want to do.public boolean negativeChoosen()
public void mousePressed(MouseEvent e)
public void mouseReleased(MouseEvent e)
public void mouseEntered(MouseEvent e)
public void mouseExited(MouseEvent e)
public void mouseClicked(MouseEvent e)
public void mouseDragged(MouseEvent e)
public void mouseMoved(MouseEvent e)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||