source: src/main/java/negotiator/onetomany/etc/Line.java@ 244

Last change on this file since 244 was 219, checked in by Faria Nassiri Mofakham, 6 years ago

'Line' problem (and in GUI) fixed. (There also have been several updates in other files before this commit!!)

File size: 542 bytes
Line 
1package negotiator.onetomany.etc;
2
3import java.awt.Canvas;
4import java.awt.Color;
5import java.awt.Graphics;
6
7
8/**
9 * @author Faria Nassiri-Mofakham
10 *
11 */
12public 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.