All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class edu.cmu.owl.ui.twoD.LightTwoD

edu.cmu.owl.ui.twoD.LightTwoD

public class LightTwoD
implements MapElement
A light for the map. Light's are selectable, and have the same name ("Light")


Constructor Index

 o LightTwoD(BoundingBox, LightingFixture, int, TwoDBean)
Construct a LightTwoD with the given reference number and list of vertices.

Method Index

 o area()
 o getBounds()
 o getColor(Color)
 o getControls()
 o getName()
 o getOwlObject()
 o getParent()
 o getRef()
 o inside(Point)
 o lightError()
 o lightRepaired()
 o lightTurnedOff()
 o lightTurnedOn()
 o paint(Graphics, PointConverter, ImageObserver)
paint the Light on the graphics object passed to it
 o paintSelection(Graphics, PointConverter)
 o selectable()
 o setColor(Color)
 o setParent(ControlZoneTwoD)

Constructors

 o LightTwoD
 public LightTwoD(BoundingBox box,
                  LightingFixture l,
                  int ref,
                  TwoDBean twoDBean)
Construct a LightTwoD with the given reference number and list of vertices.

Parameters:
ref - id for the Light
points - is the vector of points.

Methods

 o getOwlObject
 public OwlObject getOwlObject()
 o selectable
 public boolean selectable()
Returns:
true or false depending on whether object is selectable
 o getName
 public String getName()
Returns:
string of value "Light"
 o getBounds
 public Rectangle getBounds()
Returns:
bounds on the wall.
 o getControls
 public Enumeration getControls()
 o inside
 public boolean inside(Point where)
Returns:
boolean depending on whethear point is inside the wall
 o paint
 public void paint(Graphics g,
                   PointConverter pc,
                   ImageObserver observer)
paint the Light on the graphics object passed to it

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)
 o setColor
 public void setColor(Color c)
 o getColor
 public Color getColor(Color c)
 o area
 public int area()
Returns:
the area of the wall
 o getRef
 public int getRef()
Returns:
the in ref of the object
 o getParent
 public ControlZoneTwoD getParent()
 o setParent
 public void setParent(ControlZoneTwoD elt)
 o lightTurnedOn
 public void lightTurnedOn()
 o lightTurnedOff
 public void lightTurnedOff()
 o lightError
 public void lightError()
 o lightRepaired
 public void lightRepaired()

All Packages  Class Hierarchy  This Package  Previous  Next  Index