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/ExtendedPointInvoker.java | |
| download | Modulus3D-1c5e38fe69ac8a6decbdd8abe93112f4e3369315.tar.gz Modulus3D-1c5e38fe69ac8a6decbdd8abe93112f4e3369315.tar.bz2 Modulus3D-1c5e38fe69ac8a6decbdd8abe93112f4e3369315.zip | |
added source
Diffstat (limited to 'src/ExtendedPointInvoker.java')
| -rw-r--r-- | src/ExtendedPointInvoker.java | 161 |
1 files changed, 161 insertions, 0 deletions
diff --git a/src/ExtendedPointInvoker.java b/src/ExtendedPointInvoker.java new file mode 100644 index 0000000..e1824e9 --- /dev/null +++ b/src/ExtendedPointInvoker.java @@ -0,0 +1,161 @@ +/* */ import java.awt.Color; +/* */ import java.awt.Graphics; +/* */ +/* */ public abstract interface ExtendedPointInvoker extends PointInvoker +/* */ { +/* */ public abstract Color getColor(); +/* */ +/* */ public abstract void setSize(int paramInt); +/* */ +/* */ public abstract int getSize(); +/* */ +/* */ public abstract void setColor(Color paramColor); +/* */ +/* */ public static final class CirclePointInvoker +/* */ implements ExtendedPointInvoker +/* */ { +/* */ private int radius; +/* */ private Color color; +/* */ +/* */ public CirclePointInvoker(int radius, Color color) +/* */ { +/* 78 */ this.radius = radius; +/* 79 */ this.color = color; +/* */ } +/* */ +/* */ public void drawPoint(Graphics g, int x, int y) { +/* 83 */ Color temp = g.getColor(); +/* 84 */ g.setColor(this.color); +/* 85 */ g.drawOval(x - this.radius / 2, y - this.radius / 2, this.radius, this.radius); +/* 86 */ g.setColor(temp); +/* */ } +/* */ +/* */ public Color getColor() { +/* 90 */ return this.color; +/* */ } +/* */ +/* */ public void setColor(Color color) { +/* 94 */ this.color = color; +/* */ } +/* */ +/* */ public int getSize() +/* */ { +/* 99 */ return this.radius; +/* */ } +/* */ +/* */ public void setSize(int size) { +/* 103 */ this.radius = size; +/* */ } +/* */ } +/* */ +/* */ public static final class PixelPointInvoker implements ExtendedPointInvoker { +/* */ private Color color; +/* */ +/* */ public PixelPointInvoker(Color color) { +/* 111 */ this.color = color; +/* */ } +/* */ +/* */ public void drawPoint(Graphics g, int x, int y) { +/* 115 */ Color temp = g.getColor(); +/* 116 */ g.setColor(this.color); +/* 117 */ g.drawRect(x, y, 0, 0); +/* 118 */ g.setColor(temp); +/* */ } +/* */ +/* */ public Color getColor() { +/* 122 */ return this.color; +/* */ } +/* */ +/* */ public void setColor(Color color) { +/* 126 */ this.color = color; +/* */ } +/* */ +/* */ public int getSize() +/* */ { +/* 131 */ return 1; +/* */ } +/* */ +/* */ public void setSize(int size) +/* */ { +/* */ } +/* */ } +/* */ +/* */ public static final class SquareFillPointInvoker +/* */ implements ExtendedPointInvoker +/* */ { +/* */ private int size; +/* */ private Color color; +/* */ +/* */ public SquareFillPointInvoker(int size, Color color) +/* */ { +/* 45 */ this.size = size; +/* 46 */ this.color = color; +/* */ } +/* */ +/* */ public void drawPoint(Graphics g, int x, int y) { +/* 50 */ Color temp = g.getColor(); +/* 51 */ g.setColor(this.color); +/* 52 */ g.fillRect(x - this.size / 2, y - this.size / 2, this.size, this.size); +/* 53 */ g.setColor(temp); +/* */ } +/* */ +/* */ public Color getColor() { +/* 57 */ return this.color; +/* */ } +/* */ +/* */ public void setColor(Color color) { +/* 61 */ this.color = color; +/* */ } +/* */ +/* */ public int getSize() +/* */ { +/* 66 */ return this.size; +/* */ } +/* */ +/* */ public void setSize(int size) { +/* 70 */ this.size = size; +/* */ } +/* */ } +/* */ +/* */ public static final class SquarePointInvoker +/* */ implements ExtendedPointInvoker +/* */ { +/* */ private int size; +/* */ private Color color; +/* */ +/* */ public SquarePointInvoker(int size, Color color) +/* */ { +/* 11 */ this.size = size; +/* 12 */ this.color = color; +/* */ } +/* */ +/* */ public void drawPoint(Graphics g, int x, int y) { +/* 16 */ Color temp = g.getColor(); +/* 17 */ g.setColor(this.color); +/* 18 */ g.drawRect(x - this.size / 2, y - this.size / 2, this.size, this.size); +/* 19 */ g.setColor(temp); +/* */ } +/* */ +/* */ public Color getColor() { +/* 23 */ return this.color; +/* */ } +/* */ +/* */ public void setColor(Color color) { +/* 27 */ this.color = color; +/* */ } +/* */ +/* */ public int getSize() +/* */ { +/* 32 */ return this.size; +/* */ } +/* */ +/* */ public void setSize(int size) { +/* 36 */ this.size = size; +/* */ } +/* */ } +/* */ } + +/* Location: Modulus.jar + * Qualified Name: ExtendedPointInvoker + * JD-Core Version: 0.6.2 + */
\ No newline at end of file |