source: advance-wars/src/com/medievaltech/gui/Window.java@ abe7b3d

Last change on this file since abe7b3d was abe7b3d, checked in by dportnoy <devnull@…>, 14 years ago

Changed the package names from com.example.* to com.medievaltech.*

  • Property mode set to 100644
File size: 681 bytes
Line 
1package com.medievaltech.gui;
2
3import java.util.Hashtable;
4
5import android.graphics.Canvas;
6
7public class Window extends GUIObject {
8 private Hashtable<String, GUIObject> drawableObjects;
9
10 public Window(int newX, int newY, int newWidth, int newHeight) {
11 super(newX, newY, newWidth, newHeight, null);
12
13 drawableObjects = new Hashtable<String, GUIObject>();
14 }
15
16 public void addGUIObject(String name, GUIObject o) {
17 drawableObjects.put(name, o);
18 }
19
20 public GUIObject getGUIObject(String name) {
21 return drawableObjects.get(name);
22 }
23
24 public void draw(Canvas c) {
25 for (GUIObject o : drawableObjects.values()) {
26 o.draw(c);
27 }
28 }
29}
Note: See TracBrowser for help on using the repository browser.