diff options
| author | Joshua Rahm <joshua.rahm@colorado.edu> | 2015-01-30 17:11:48 -0700 |
|---|---|---|
| committer | Joshua Rahm <joshua.rahm@colorado.edu> | 2015-01-30 17:11:48 -0700 |
| commit | 1c5e38fe69ac8a6decbdd8abe93112f4e3369315 (patch) | |
| tree | 926cef8cb76d46862ed2c4ec7028720611e47476 /src/GraphLineDrawEvent.java | |
| download | Modulus3D-1c5e38fe69ac8a6decbdd8abe93112f4e3369315.tar.gz Modulus3D-1c5e38fe69ac8a6decbdd8abe93112f4e3369315.tar.bz2 Modulus3D-1c5e38fe69ac8a6decbdd8abe93112f4e3369315.zip | |
added source
Diffstat (limited to 'src/GraphLineDrawEvent.java')
| -rw-r--r-- | src/GraphLineDrawEvent.java | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/src/GraphLineDrawEvent.java b/src/GraphLineDrawEvent.java new file mode 100644 index 0000000..53e8623 --- /dev/null +++ b/src/GraphLineDrawEvent.java @@ -0,0 +1,28 @@ +/* */ import java.awt.Graphics; +/* */ +/* */ public class GraphLineDrawEvent +/* */ implements GraphicsEvent +/* */ { +/* */ private Graph2D graph; +/* */ private Point2D from; +/* */ private Point2D to; +/* */ +/* */ public GraphLineDrawEvent(Graph2D graph, Point2D from, Point2D to) +/* */ { +/* 15 */ this.graph = graph; +/* 16 */ this.from = from; +/* 17 */ this.to = to; +/* */ } +/* */ +/* */ public void invoke(Graphics graphics) +/* */ { +/* 24 */ Point2D transFrom = this.graph.translate(this.from); +/* 25 */ Point2D transTo = this.graph.translate(this.to); +/* 26 */ graphics.drawLine(transFrom.getX(), transFrom.getY(), transTo.getX(), transTo.getY()); +/* */ } +/* */ } + +/* Location: Modulus.jar + * Qualified Name: GraphLineDrawEvent + * JD-Core Version: 0.6.2 + */
\ No newline at end of file |