public interface Figure
Modifier and Type | Method and Description |
---|---|
void |
addFigureChangeListener(FigureChangeListener l)
Adds a listener for this figure.
|
void |
changed()
Informs that a figure has changed its display box.
|
java.awt.Rectangle |
displayBox()
Return the display box of this figure.
|
void |
draw(java.awt.Graphics g)
Draws the figure.
|
void |
invalidate()
Invalidates the figure.
|
void |
moveBy(int dx,
int dy)
Move the figure by a delta (dx, dy) offset from its present position.
|
void |
removeFigureChangeListener(FigureChangeListener l)
Removes a listener for this figure.
|
void draw(java.awt.Graphics g)
g
- the Graphics to draw intojava.awt.Rectangle displayBox()
void moveBy(int dx, int dy)
dx
- amount to move in xdy
- amount to move in yvoid invalidate()
void changed()
void addFigureChangeListener(FigureChangeListener l)
l
- the listener to associate with this figurevoid removeFigureChangeListener(FigureChangeListener l)
l
- the listener to remove this figureFrom the book: Flexible, Reliable Software, © CRC Press 2010. Author: Henrik B. Christensen, Aarhus University, Denmark