blob: bfcb1bfc32c4bccd09d38bdf7b7a566f40f26405 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
package gjt.rubberband;
import java.awt.Component;
import java.awt.Graphics;
import java.awt.Rectangle;
/**
* A Rubberband that does rectangles.
*
* @version 1.00, 12/27/95
* @author David Geary
* @see Rubberband
* @see gjt.test.RubberbandTest
*/
public class RubberbandRectangle extends Rubberband {
public RubberbandRectangle(Component component) {
super(component);
}
public void drawLast(Graphics graphics) {
Rectangle rect = lastBounds();
graphics.drawRect(rect.x, rect.y,
rect.width, rect.height);
}
public void drawNext(Graphics graphics) {
Rectangle rect = bounds();
graphics.drawRect(rect.x, rect.y,
rect.width, rect.height);
}
}
|