summaryrefslogtreecommitdiff
path: root/java/EAC/RubberbandLine.java
blob: 8a4ebfd22308d43ee65ee69f9e11ec8463cb26a5 (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
/**
 * Title:        RubberbandLine
 * Description:  A line subclass of Rubberband
 */
package EAC;
import java.awt.*;

public class RubberbandLine extends Rubberband {

  public RubberbandLine(EACPanel p) {
    super(p);
  } /* RubberbandLine constructor */

  public void drawNext(Graphics g) {
    g.drawLine(getAnchor().x,
               getAnchor().y,
               getStretched().x,
               getStretched().y);
  } /* drawNext */

  public void drawLast(Graphics g) {
    g.drawLine(getAnchor().x,
               getAnchor().y,
               getLast().x,
               getLast().y);
  } /* drawLast */

} /* RubberbandLine */