|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Interface for everything that is to be drawn on a DrawingPanel.
| Method Summary | |
boolean |
contains(Point p)
If you are going to deal with mouse input, this function must return true if the passed-in point is within the bounds of the graphic and false otherwise. |
void |
mouseClicked(MouseEvent e)
Called when mouse is clicked over the graphic. |
void |
mouseDragged(MouseEvent e)
Called when mouse button is pressed and dragged over graphic. |
void |
mousePressed(MouseEvent e)
Called when a mouse button is pressed over the graphic. |
void |
mouseReleased(MouseEvent e)
Called when a mouse button is released over the graphic. |
void |
paint(Graphics2D g)
The real meat of the interface. |
| Method Detail |
public void paint(Graphics2D g)
Graphics2D. This
method will be called often (whenever the containing drawing panel is
repainted).
g - the Graphics2D you should use to paint your
graphicpublic boolean contains(Point p)
p - the pointpublic void mousePressed(MouseEvent e)
public void mouseReleased(MouseEvent e)
public void mouseClicked(MouseEvent e)
public void mouseDragged(MouseEvent e)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||