Graphic Rendering System 1.0
A Java-based graphic rendering system implementing various design patterns
|
Public Member Functions | |
Line (int x1, int y1, int x2, int y2) | |
void | accept (ShapeVisitor visitor) |
Shape | clone () |
int | getX () |
int | getX1 () |
int | getX2 () |
int | getY () |
int | getY1 () |
int | getY2 () |
void | setLine (int x1, int y1, int x2, int y2) |
void | setPoint1 (int x1, int y1) |
void | setPoint2 (int x2, int y2) |
void | setPosition (int x, int y) |
Private Attributes | |
int | x1 |
int | x2 |
int | y1 |
int | y2 |
|
inline |
Constructs a line with the specified endpoints
x1 | the x coordinate of the first endpoint |
y1 | the y coordinate of the first endpoint |
x2 | the x coordinate of the second endpoint |
y2 | the y coordinate of the second endpoint |
Definition at line 21 of file Line.java.
References x1, x2, y1, and y2.
Referenced by clone().
|
inline |
Accept method for the Visitor pattern
visitor | the visitor to accept |
Implements com.example.graphics.model.Shape.
|
inline |
Clone the shape
Implements com.example.graphics.model.Shape.
Definition at line 122 of file Line.java.
References Line().
|
inline |
Get the x coordinate of the shape
Implements com.example.graphics.model.Shape.
Definition at line 29 of file Line.java.
References x1.
|
inline |
Get the x coordinate of the first endpoint
Definition at line 54 of file Line.java.
References x1.
Referenced by com.example.graphics.SwingGraphicsApp.isPointOnShape(), com.example.graphics.adapter.ThirdPartyRendererAdapter.renderLine(), com.example.graphics.proxy.RemoteRendererImpl.renderLine(), com.example.graphics.render.ConsoleRenderer.renderLine(), com.example.graphics.render.SvgRenderer.renderLine(), com.example.graphics.render.SwingRenderer.renderLine(), com.example.graphics.visitor.JsonExportVisitor.visit(), and com.example.graphics.visitor.XmlExportVisitor.visit().
|
inline |
Get the x coordinate of the second endpoint
Definition at line 70 of file Line.java.
References x2.
Referenced by com.example.graphics.SwingGraphicsApp.isPointOnShape(), com.example.graphics.adapter.ThirdPartyRendererAdapter.renderLine(), com.example.graphics.proxy.RemoteRendererImpl.renderLine(), com.example.graphics.render.ConsoleRenderer.renderLine(), com.example.graphics.render.SvgRenderer.renderLine(), com.example.graphics.render.SwingRenderer.renderLine(), com.example.graphics.visitor.JsonExportVisitor.visit(), and com.example.graphics.visitor.XmlExportVisitor.visit().
|
inline |
Get the y coordinate of the shape
Implements com.example.graphics.model.Shape.
Definition at line 34 of file Line.java.
References y1.
|
inline |
Get the y coordinate of the first endpoint
Definition at line 62 of file Line.java.
References y1.
Referenced by com.example.graphics.SwingGraphicsApp.isPointOnShape(), com.example.graphics.adapter.ThirdPartyRendererAdapter.renderLine(), com.example.graphics.proxy.RemoteRendererImpl.renderLine(), com.example.graphics.render.ConsoleRenderer.renderLine(), com.example.graphics.render.SvgRenderer.renderLine(), com.example.graphics.render.SwingRenderer.renderLine(), com.example.graphics.visitor.JsonExportVisitor.visit(), and com.example.graphics.visitor.XmlExportVisitor.visit().
|
inline |
Get the y coordinate of the second endpoint
Definition at line 78 of file Line.java.
References y2.
Referenced by com.example.graphics.SwingGraphicsApp.isPointOnShape(), com.example.graphics.adapter.ThirdPartyRendererAdapter.renderLine(), com.example.graphics.proxy.RemoteRendererImpl.renderLine(), com.example.graphics.render.ConsoleRenderer.renderLine(), com.example.graphics.render.SvgRenderer.renderLine(), com.example.graphics.render.SwingRenderer.renderLine(), com.example.graphics.visitor.JsonExportVisitor.visit(), and com.example.graphics.visitor.XmlExportVisitor.visit().
|
inline |
|
inline |
|
inline |
|
inline |
|
private |
Definition at line 9 of file Line.java.
Referenced by Line(), getX(), getX1(), setLine(), setPoint1(), and setPosition().
|
private |
Definition at line 11 of file Line.java.
Referenced by Line(), getX2(), setLine(), setPoint2(), and setPosition().
|
private |
Definition at line 10 of file Line.java.
Referenced by Line(), getY(), getY1(), setLine(), setPoint1(), and setPosition().
|
private |
Definition at line 12 of file Line.java.
Referenced by Line(), getY2(), setLine(), setPoint2(), and setPosition().