Package view.itemsAndRewards
Class PointsView
java.lang.Object
view.itemsAndRewards.PointsView
The PointsView class represents the view for the
PointsModel class.
It handles drawing the points with a fading effect.-
Constructor Summary
ConstructorsConstructorDescriptionPointsView(PointsModel pointsModel) Constructs a PointsView with the specified PointsModel. -
Method Summary
Modifier and TypeMethodDescriptionvoiddraw(Graphics2D g) Draws the points on the screen with a fading effect.protected PointsModelReturns the PointsModel associated with this view.protected booleanisActive()Checks if the points item is active.
-
Constructor Details
-
PointsView
Constructs a PointsView with the specified PointsModel.- Parameters:
pointsModel- the model of the points item
-
-
Method Details
-
draw
Draws the points on the screen with a fading effect.- Parameters:
g- the Graphics2D object to draw with
-
isActive
protected boolean isActive()Checks if the points item is active.- Returns:
- true if the points item is active, false otherwise
-
getPointsModel
Returns the PointsModel associated with this view.- Returns:
- the PointsModel
-