1:
2: package draw1;
3:
4: import java.awt.*;
5:
6: public class LineShape extends TwoEndsShape {
7:
8: public void draw(Graphics g) {
9: if (color != null) {
10: g.setColor(color);
11: }
12: g.drawLine(x1, y1, x2, y2);
13: }
14:
15: public void drawOutline(Graphics g, int x1, int y1, int x2, int y2) {
16: g.drawLine(x1, y1, x2, y2);
17: }
18:
19: }