home *** CD-ROM | disk | FTP | other *** search
Java Source | 1996-08-14 | 1.6 KB | 62 lines |
- // BuildingLevelMap.java
- // 23.02.96
- //
- // a map of one floor in a building
-
- package cybcerone.orient;
-
- import java.awt.Image;
-
- /**
- * One level in a building. Photos, legend, desc, and all that are stored
- * in the parent (essentially the default level).
- */
- public class BuildingLevelMap implements Maplike {
-
- private String name;
- private String parent;
- private Image map;
- private Zones children;
- private Zones clickableZones;
-
- private Maplikes theMaps;
-
- public BuildingLevelMap (String name, String parent, Image map,
- Zones children, Zones clickableZones) {
- this.name = name;
- this.parent = parent;
- this.map = map;
- this.children = children;
- this.clickableZones = clickableZones;
- }
-
- public String getName () { return name; }
- public Image getMap () { return map; }
- public Image getLegend () { return (getParent().getLegend()); }
- public String getDesc () { return (getParent().getDesc()); }
- public Image[] getPhotos () { return (getParent().getPhotos()); }
- public Maplike getParent () { return (theMaps.findMap (parent)); }
-
- public void setMaplikes (Maplikes theMaps) {
- this.theMaps = theMaps;
- }
-
- public Zone find (String name) {
- Zone theZone = children.which (name);
- if (theZone == null)
- theZone = clickableZones.which (name);
- return theZone;
- }
-
- public Zone find (int x, int y) {
- Zone theZone = children.which (x, y);
- if (theZone == null)
- theZone = clickableZones.which (x, y);
- return theZone;
- }
-
- public String toString () {
- return ("BuildingLevelMap[" + getName () + "]");
- }
- }
-