/** * @see DrawableStorage#getDrawableOf(Object) * @param element * @return The corresponding {@link Drawable} to the object o or null, if no {@link Drawable}, * which displays the object o, is currently on the canvas. */ public Drawable getDrawableOf(Object element) { return drawableStorage.getDrawableOf(element); }
public void clearDrawables() { drawableStorage.clear(); }
/** * Add a {@link Drawable} to this Canvas (to the {@link DrawableStorage}) to be painted on the * canvas whenever {@link #redrawCanvas()} has been called * * @param drawable * @throws DoubleLimitException */ public void addDrawable(Drawable drawable) throws DoubleLimitException { drawableStorage.add(drawable); }
/** * Remove a {@link Drawable} * * @param drawable * @see #addDrawable(Drawable) */ public void removeDrawable(Drawable drawable) { drawableStorage.remove(drawable); }
private void drawObjects() { for (Drawable d : drawableStorage.getAllElements()) d.draw(backBufferContext); }