Beispiel #1
0
 /**
  * @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);
 }
Beispiel #2
0
 public void clearDrawables() {
   drawableStorage.clear();
 }
Beispiel #3
0
 /**
  * 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);
 }
Beispiel #4
0
 /**
  * Remove a {@link Drawable}
  *
  * @param drawable
  * @see #addDrawable(Drawable)
  */
 public void removeDrawable(Drawable drawable) {
   drawableStorage.remove(drawable);
 }
Beispiel #5
0
 private void drawObjects() {
   for (Drawable d : drawableStorage.getAllElements()) d.draw(backBufferContext);
 }