source: src/main/java/onetomany/etc/Line.java@ 256

Last change on this file since 256 was 253, checked in by Faria Nassiri Mofakham, 5 years ago

Commit #1 of:
+ negotiator.onetomany package refactored into onetomany package.
+ info created for all contained the packages.
+ current work defined under onetomany.bargainingchipsgame.
+ in this package, onetomany.bargainingchipsgame.players package includes packages for utility function, coordinator, negotiatior, and buyer and seller.
+ negotiator.onetomany package now contains nothing, can be deleted.
+ Interaction thread

File size: 531 bytes
RevLine 
[253]1package onetomany.etc;
[215]2
[219]3import java.awt.Canvas;
4import java.awt.Color;
5import java.awt.Graphics;
[215]6
7
[219]8/**
9 * @author Faria Nassiri-Mofakham
10 *
11 */
12public class Line extends Canvas{
[215]13
[219]14 /**
15 *
16 */
17 private static final long serialVersionUID = 1L;
[215]18
[219]19 Color color;
20 int length;
21
22 public Line(Color c, int l)
23 {
24 color=c;
25 length=l;
[215]26 }
[219]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.