All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class edu.cmu.owl.ui.twoD.ControlZoneTwoD

edu.cmu.owl.ui.twoD.ControlZoneTwoD

public class ControlZoneTwoD
implements MapElement
This object is a view on the ControlZone in the building OM. It implements the recursive composition pattern. This class also satisfies the MapElement interface so that ControlZoneTwoD can contain other COntrolZonewoD's and and LightTwoD's.


Constructor Index

 o ControlZoneTwoD(int)

Method Index

 o addElement(MapElement)
 o area()
 o elements()
 o getBounds()
 o getControls()
 o getName()
 o getOwlObject()
 o getParent()
 o getRef()
 o inside(Point)
 o paint(Graphics, PointConverter, ImageObserver)
paint all the lights and ControlZoneTwoD's in this zone.
 o paintSelection(Graphics, PointConverter)
This method paints the ControlZoneTwoD such that it were selected
 o removeElement(MapElement)
 o selectable()
 o setOwlObject(OwlObjectTree)
 o setParent(ControlZoneTwoD)

Constructors

 o ControlZoneTwoD
 public ControlZoneTwoD(int temp)

Methods

 o getOwlObject
 public OwlObject getOwlObject()
 o setOwlObject
 public void setOwlObject(OwlObjectTree t)
 o selectable
 public boolean selectable()
Returns:
true or false depending on whether object is selectable
 o getName
 public String getName()
Returns:
value hat will be displayed in baloon text This method sould return "Control Zone -id" with id being the id of the new OwlObjectTree that gets made.
 o getBounds
 public Rectangle getBounds()
Returns:
bounds on the ControlZoneTwoD. This method is used to find out which object the mouse is over.
 o inside
 public boolean inside(Point where)
Returns:
boolean depending on whether point is inside the wall
 o paint
 public void paint(Graphics g,
                   PointConverter pc,
                   ImageObserver observer)
paint all the lights and ControlZoneTwoD's in this zone.

Parameters:
g - the Graphics object
pc - the object that converts wall coordinates to pixel and vice-versa
 o paintSelection
 public void paintSelection(Graphics g,
                            PointConverter pc)
This method paints the ControlZoneTwoD such that it were selected

 o area
 public int area()
Returns:
the area of the ControlZoneTwoD
 o getRef
 public int getRef()
 o getControls
 public Enumeration getControls()
 o elements
 public Enumeration elements()
 o addElement
 public void addElement(MapElement elt)
 o removeElement
 public void removeElement(MapElement elt)
 o getParent
 public ControlZoneTwoD getParent()
 o setParent
 public void setParent(ControlZoneTwoD elt)

All Packages  Class Hierarchy  This Package  Previous  Next  Index