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

Last change on this file since bb2fa26 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
RevLine 
[abe7b3d]1package com.medievaltech.gui;
[ece634d]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.