Coding the component interfaces
Each component will implement an interface so that although they behave differently, they can be used the same way as one another because of polymorphism.
GraphicsComponent
Add the GraphicsComponent
interface:
import android.content.Context; import android.graphics.Canvas; import android.graphics.Paint; import android.graphics.PointF; interface GraphicsComponent { Â Â Â Â void initialize(Context c, Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â ObjectSpec s, Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â PointF screensize); Â Â Â Â Â Â Â Â void draw(Canvas canvas, Â Â Â Â Â Â Â Â Â Â Â Â Â Â Paint paint, Â Â Â Â Â Â Â Â Â Â Â Â Â Â Transform...