|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface CustomGraphic
Interface for everything that is to be drawn on a DrawingPanel.
| Method Summary | |
|---|---|
boolean |
contains(java.awt.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(java.awt.event.MouseEvent e)
Called when mouse is clicked over the graphic. |
void |
mouseDragged(java.awt.event.MouseEvent e)
Called when mouse button is pressed and dragged over graphic. |
void |
mousePressed(java.awt.event.MouseEvent e)
Called when a mouse button is pressed over the graphic. |
void |
mouseReleased(java.awt.event.MouseEvent e)
Called when a mouse button is released over the graphic. |
void |
paint(java.awt.Graphics2D g)
The real meat of the interface. |
| Method Detail |
|---|
void paint(java.awt.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
graphicboolean contains(java.awt.Point p)
p - the pointvoid mousePressed(java.awt.event.MouseEvent e)
void mouseReleased(java.awt.event.MouseEvent e)
void mouseClicked(java.awt.event.MouseEvent e)
void mouseDragged(java.awt.event.MouseEvent e)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||