Graphic Rendering System 1.0
A Java-based graphic rendering system implementing various design patterns
Loading...
Searching...
No Matches
com.example.graphics.model.Shape Interface Reference
Inheritance diagram for com.example.graphics.model.Shape:
Inheritance graph
Collaboration diagram for com.example.graphics.model.Shape:
Collaboration graph

Public Member Functions

void accept (ShapeVisitor visitor)
Shape clone ()
int getX ()
int getY ()
void setPosition (int x, int y)

Detailed Description

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.

Member Function Documentation

◆ accept()

void com.example.graphics.model.Shape.accept ( ShapeVisitor visitor)

Accept method for the Visitor pattern

Parameters
visitorthe 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.

◆ clone()

Shape com.example.graphics.model.Shape.clone ( )

◆ getX()

◆ getY()

◆ setPosition()

void com.example.graphics.model.Shape.setPosition ( int x,
int y )

Set the position of the shape

Parameters
xthe x coordinate
ythe 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.


The documentation for this interface was generated from the following file:
  • src/main/java/com/example/graphics/model/Shape.java