blob: 95daafa32a6384d69c4c9f38bee6850790ef85df (
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
|
package gjt.rubberband;
import java.awt.Component;
import java.awt.Graphics;
/**
* A Rubberband that does lines.
*
* @version 1.0, 12/27/95
* @author David Geary
* @see Rubberband
* @see gjt.test.RubberbandTest
*/
public class RubberbandLine extends Rubberband {
public RubberbandLine(Component component) {
super(component);
}
public void drawLast(Graphics graphics) {
graphics.drawLine(anchor.x, anchor.y, last.x, last.y);
}
public void drawNext(Graphics graphics) {
graphics.drawLine(anchor.x, anchor.y,
stretched.x, stretched.y);
}
}
|