Graphic Rendering System 1.0
A Java-based graphic rendering system implementing various design patterns
|
Public Member Functions | |
Rectangle (int x, int y, int width, int height) | |
void | accept (ShapeVisitor visitor) |
Shape | clone () |
int | getHeight () |
int | getWidth () |
int | getX () |
int | getY () |
void | setHeight (int height) |
void | setPosition (int x, int y) |
void | setSize (int width, int height) |
void | setWidth (int width) |
Private Attributes | |
int | height |
int | width |
int | x |
int | y |
Rectangle implementation of the Shape interface.
Definition at line 8 of file Rectangle.java.
|
inline |
Constructs a rectangle with the specified parameters
x | the x coordinate of the top-left corner |
y | the y coordinate of the top-left corner |
width | the width of the rectangle |
height | the height of the rectangle |
Definition at line 21 of file Rectangle.java.
References height, width, x, and y.
Referenced by clone().
|
inline |
Accept method for the Visitor pattern
visitor | the visitor to accept |
Implements com.example.graphics.model.Shape.
Definition at line 87 of file Rectangle.java.
|
inline |
Clone the shape
Implements com.example.graphics.model.Shape.
Definition at line 92 of file Rectangle.java.
References Rectangle().
|
inline |
Get the height of the rectangle
Definition at line 64 of file Rectangle.java.
References height.
Referenced by com.example.graphics.SwingGraphicsApp.isPointOnShape(), com.example.graphics.adapter.ThirdPartyRendererAdapter.renderRectangle(), com.example.graphics.proxy.RemoteRendererImpl.renderRectangle(), com.example.graphics.render.ConsoleRenderer.renderRectangle(), com.example.graphics.render.SvgRenderer.renderRectangle(), com.example.graphics.render.SwingRenderer.renderRectangle(), com.example.graphics.visitor.JsonExportVisitor.visit(), and com.example.graphics.visitor.XmlExportVisitor.visit().
|
inline |
Get the width of the rectangle
Definition at line 48 of file Rectangle.java.
References width.
Referenced by com.example.graphics.SwingGraphicsApp.isPointOnShape(), com.example.graphics.adapter.ThirdPartyRendererAdapter.renderRectangle(), com.example.graphics.proxy.RemoteRendererImpl.renderRectangle(), com.example.graphics.render.ConsoleRenderer.renderRectangle(), com.example.graphics.render.SvgRenderer.renderRectangle(), com.example.graphics.render.SwingRenderer.renderRectangle(), com.example.graphics.visitor.JsonExportVisitor.visit(), and com.example.graphics.visitor.XmlExportVisitor.visit().
|
inline |
Get the x coordinate of the shape
Implements com.example.graphics.model.Shape.
Definition at line 29 of file Rectangle.java.
References x.
Referenced by com.example.graphics.SwingGraphicsApp.isPointOnShape(), com.example.graphics.adapter.ThirdPartyRendererAdapter.renderRectangle(), com.example.graphics.proxy.RemoteRendererImpl.renderRectangle(), com.example.graphics.render.ConsoleRenderer.renderRectangle(), com.example.graphics.render.SvgRenderer.renderRectangle(), com.example.graphics.render.SwingRenderer.renderRectangle(), 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 Rectangle.java.
References y.
Referenced by com.example.graphics.SwingGraphicsApp.isPointOnShape(), com.example.graphics.adapter.ThirdPartyRendererAdapter.renderRectangle(), com.example.graphics.proxy.RemoteRendererImpl.renderRectangle(), com.example.graphics.render.ConsoleRenderer.renderRectangle(), com.example.graphics.render.SvgRenderer.renderRectangle(), com.example.graphics.render.SwingRenderer.renderRectangle(), com.example.graphics.visitor.JsonExportVisitor.visit(), and com.example.graphics.visitor.XmlExportVisitor.visit().
|
inline |
Set the height of the rectangle
height | the new height |
Definition at line 72 of file Rectangle.java.
References height.
|
inline |
Set the position of the shape
x | the x coordinate |
y | the y coordinate |
Implements com.example.graphics.model.Shape.
Definition at line 39 of file Rectangle.java.
|
inline |
Set both width and height of the rectangle at once
width | the new width |
height | the new height |
Definition at line 81 of file Rectangle.java.
|
inline |
Set the width of the rectangle
width | the new width |
Definition at line 56 of file Rectangle.java.
References width.
|
private |
Definition at line 12 of file Rectangle.java.
Referenced by Rectangle(), getHeight(), setHeight(), and setSize().
|
private |
Definition at line 11 of file Rectangle.java.
Referenced by Rectangle(), getWidth(), setSize(), and setWidth().
|
private |
Definition at line 9 of file Rectangle.java.
Referenced by Rectangle(), getX(), and setPosition().
|
private |
Definition at line 10 of file Rectangle.java.
Referenced by Rectangle(), getY(), and setPosition().