Graphic Rendering System 1.0
A Java-based graphic rendering system implementing various design patterns
|
Public Member Functions | |
void | accept (ShapeVisitor visitor) |
Shape | clone () |
int | getX () |
int | getY () |
void | setPosition (int x, int y) |
Shape interface representing a graphical shape element. This is part of the Visitor pattern (accepts visitors) and will be instantiated through Factory pattern.
Definition at line 10 of file Shape.java.
void com.example.graphics.model.Shape.accept | ( | ShapeVisitor | visitor | ) |
Accept method for the Visitor pattern
visitor | the visitor to accept |
Implemented in com.example.graphics.model.Circle, com.example.graphics.model.Line, com.example.graphics.model.Rectangle, and com.example.graphics.model.Triangle.
Shape com.example.graphics.model.Shape.clone | ( | ) |
Clone the shape
Implemented in com.example.graphics.model.Circle, com.example.graphics.model.Line, com.example.graphics.model.Rectangle, and com.example.graphics.model.Triangle.
int com.example.graphics.model.Shape.getX | ( | ) |
Get the x coordinate of the shape
Implemented in com.example.graphics.model.Circle, com.example.graphics.model.Line, com.example.graphics.model.Rectangle, and com.example.graphics.model.Triangle.
Referenced by com.example.graphics.observer.ConsoleLogger.onShapeAdded(), com.example.graphics.observer.ConsoleLogger.onShapeModified(), and com.example.graphics.observer.ConsoleLogger.onShapeRemoved().
int com.example.graphics.model.Shape.getY | ( | ) |
Get the y coordinate of the shape
Implemented in com.example.graphics.model.Circle, com.example.graphics.model.Line, com.example.graphics.model.Rectangle, and com.example.graphics.model.Triangle.
Referenced by com.example.graphics.observer.ConsoleLogger.onShapeAdded(), com.example.graphics.observer.ConsoleLogger.onShapeModified(), and com.example.graphics.observer.ConsoleLogger.onShapeRemoved().
void com.example.graphics.model.Shape.setPosition | ( | int | x, |
int | y ) |
Set the position of the shape
x | the x coordinate |
y | the y coordinate |
Implemented in com.example.graphics.model.Circle, com.example.graphics.model.Line, com.example.graphics.model.Rectangle, and com.example.graphics.model.Triangle.