Last change
on this file since 341 was 316, checked in by Tim Baarslag, 5 years ago |
new packages complete
|
File size:
537 bytes
|
Rev | Line | |
---|
[316] | 1 | package bargainingchips.etc;
|
---|
[315] | 2 |
|
---|
| 3 | import java.awt.Canvas;
|
---|
| 4 | import java.awt.Color;
|
---|
| 5 | import java.awt.Graphics;
|
---|
| 6 |
|
---|
| 7 |
|
---|
| 8 | /**
|
---|
| 9 | * @author Faria Nassiri-Mofakham
|
---|
| 10 | *
|
---|
| 11 | */
|
---|
| 12 | public class Line extends Canvas{
|
---|
| 13 |
|
---|
| 14 | /**
|
---|
| 15 | *
|
---|
| 16 | */
|
---|
| 17 | private static final long serialVersionUID = 1L;
|
---|
| 18 |
|
---|
| 19 | Color color;
|
---|
| 20 | int length;
|
---|
| 21 |
|
---|
| 22 | public Line(Color c, int l)
|
---|
| 23 | {
|
---|
| 24 | color=c;
|
---|
| 25 | length=l;
|
---|
| 26 | }
|
---|
| 27 | public void paint(Graphics g)
|
---|
| 28 | {
|
---|
| 29 | g.setColor(color);
|
---|
| 30 | g.drawLine(g.getClipBounds().x,g.getClipBounds().y, g.getClipBounds().x+length,g.getClipBounds().y);
|
---|
| 31 | }
|
---|
| 32 |
|
---|
| 33 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.