CSE115.BehaviorShapeWorld
Class MutableShape

java.lang.Object
  extended byCSE115.BehaviorShapeWorld.MutableShape
All Implemented Interfaces:
EventListener, Graphic, Graphic, MouseListener, MouseMotionListener, Reactor, Shape, Shape
Direct Known Subclasses:
Box

public abstract class MutableShape
extends Object
implements Shape, Shape


Constructor Summary
MutableShape(Graphic graphic)
           
 
Method Summary
 boolean contains(Point p)
           
 Behavior getBehavior()
           
 Point getCenterLocation()
           
 Color getColor()
           
 Dimension getDimension()
           
 DrawingPanel getDrawingPanel()
           
 Graphic getGraphic()
           
 Point getLocation()
           
 int getRotation()
           
 void hide()
           
 void mouseClicked(MouseEvent param1)
          Delegated to the shape.
 void mouseDragged(MouseEvent param1)
          Delegated to the shape.
 void mouseEntered(MouseEvent param1)
          Delegated to the shape.
 void mouseExited(MouseEvent param1)
          Delegated to the shape.
 void mouseMoved(MouseEvent param1)
          Delegated to the shape.
 void mousePressed(MouseEvent param1)
          Delegated to the shape.
 void mouseReleased(MouseEvent param1)
          Delegated to the shape.
 void setBehavior(Behavior behavior)
           
 void setCenterLocation(Point p)
           
 void setColor(Color color)
           
 void setDimension(Dimension d)
           
 void setDrawingPanel(DrawingPanel dp)
           
 void setGraphic(Graphic graphic)
           
 void setLocation(Point p)
           
 void setRotation(int r)
           
 void update()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface NGP.Reactor
react
 

Constructor Detail

MutableShape

public MutableShape(Graphic graphic)
Method Detail

hide

public void hide()
Specified by:
hide in interface Shape

update

public void update()
Specified by:
update in interface Shape

setColor

public void setColor(Color color)
Specified by:
setColor in interface Graphic

getColor

public Color getColor()
Specified by:
getColor in interface Graphic

setLocation

public void setLocation(Point p)
Specified by:
setLocation in interface Graphic

getLocation

public Point getLocation()
Specified by:
getLocation in interface Graphic

setCenterLocation

public void setCenterLocation(Point p)
Specified by:
setCenterLocation in interface Graphic

getCenterLocation

public Point getCenterLocation()
Specified by:
getCenterLocation in interface Graphic

setDimension

public void setDimension(Dimension d)
Specified by:
setDimension in interface Graphic

getDimension

public Dimension getDimension()
Specified by:
getDimension in interface Graphic

setRotation

public void setRotation(int r)
Specified by:
setRotation in interface Graphic

getRotation

public int getRotation()
Specified by:
getRotation in interface Graphic

setDrawingPanel

public void setDrawingPanel(DrawingPanel dp)
Specified by:
setDrawingPanel in interface Graphic

getDrawingPanel

public DrawingPanel getDrawingPanel()
Specified by:
getDrawingPanel in interface Graphic

setBehavior

public void setBehavior(Behavior behavior)

getBehavior

public Behavior getBehavior()

setGraphic

public void setGraphic(Graphic graphic)

getGraphic

public Graphic getGraphic()

contains

public boolean contains(Point p)
Specified by:
contains in interface Graphic

mouseDragged

public void mouseDragged(MouseEvent param1)
Delegated to the shape.

Specified by:
mouseDragged in interface MouseMotionListener
See Also:
MouseMotionListener.mouseDragged(MouseEvent)

mouseMoved

public void mouseMoved(MouseEvent param1)
Delegated to the shape.

Specified by:
mouseMoved in interface MouseMotionListener
See Also:
MouseMotionListener.mouseMoved(MouseEvent)

mouseClicked

public void mouseClicked(MouseEvent param1)
Delegated to the shape.

Specified by:
mouseClicked in interface MouseListener
See Also:
MouseListener.mouseClicked(MouseEvent)

mouseEntered

public void mouseEntered(MouseEvent param1)
Delegated to the shape.

Specified by:
mouseEntered in interface MouseListener
See Also:
MouseListener.mouseEntered(MouseEvent)

mouseExited

public void mouseExited(MouseEvent param1)
Delegated to the shape.

Specified by:
mouseExited in interface MouseListener
See Also:
MouseListener.mouseExited(MouseEvent)

mousePressed

public void mousePressed(MouseEvent param1)
Delegated to the shape.

Specified by:
mousePressed in interface MouseListener
See Also:
MouseListener.mousePressed(MouseEvent)

mouseReleased

public void mouseReleased(MouseEvent param1)
Delegated to the shape.

Specified by:
mouseReleased in interface MouseListener
See Also:
MouseListener.mouseReleased(MouseEvent)