Last change
on this file since c3ad11c 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
|
Rev | Line | |
---|
[abe7b3d] | 1 | package com.medievaltech.gui;
|
---|
[ece634d] | 2 |
|
---|
| 3 | import java.util.Hashtable;
|
---|
| 4 |
|
---|
| 5 | import android.graphics.Canvas;
|
---|
| 6 |
|
---|
| 7 | public 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.