Class Actor

java.lang.Object
  extended byEntity
      extended byClassEntity
          extended byActor
All Implemented Interfaces:
java.awt.event.ActionListener, java.util.EventListener

public class Actor
extends ClassEntity
implements java.awt.event.ActionListener

This class represents an actor in a sequence diagram.

Author:
Matilda Östling

Field Summary
private  Handle handle
           
private  javax.swing.JMenuItem menuDelete
           
private  javax.swing.JMenuItem menuDestroySymbol
           
private  boolean move
           
 
Fields inherited from class ClassEntity
bClass, destroySymbol, hasCreationMessage, hasDestroySymbol, messageList
 
Fields inherited from class Entity
drawingArea, end, endPoint, lifeLine, name, selected, start, startPoint, string
 
Constructor Summary
Actor(DrawingArea d)
          The constructor of the class.
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent e)
          This method is called when an ActionEvent takes place.
 void draw(java.awt.Graphics g)
          This method is called to draw the actor.
 int getNextState()
          This method returns the next state for this class.
 void setEndPoint(java.awt.Point p)
          This method sets the endpoint for the actor.
 void setNextState(java.awt.Point p)
          This method is called to update the next state of the class based upon what the user has choosen.
 void showMenu(java.awt.Point p)
          This method is called to show the menu of the object.
 
Methods inherited from class ClassEntity
addMessage, arrangeObjects, createDestroySymbol, delete, deleteMessage, getBClass, moveObject, moveObjects, moveObjectUp, moveVertical, setSelected
 
Methods inherited from class Entity
getEndPoint, getName, getStartPoint, getString, isClickedOn, modifyString, setName, setStartPoint
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

menuDestroySymbol

private javax.swing.JMenuItem menuDestroySymbol

menuDelete

private javax.swing.JMenuItem menuDelete

handle

private Handle handle

move

private boolean move
Constructor Detail

Actor

public Actor(DrawingArea d)
The constructor of the class.

Parameters:
d - The component where the actor will be drawn.
Method Detail

draw

public void draw(java.awt.Graphics g)
This method is called to draw the actor.

Specified by:
draw in class Entity
Parameters:
g - Used for the drawing.

showMenu

public void showMenu(java.awt.Point p)
This method is called to show the menu of the object.

Specified by:
showMenu in class Entity
Parameters:
p - The menu will be shown at the given point.

getNextState

public int getNextState()
This method returns the next state for this class.

Specified by:
getNextState in class Entity
Returns:
The next state for this class.

setEndPoint

public void setEndPoint(java.awt.Point p)
This method sets the endpoint for the actor.

Overrides:
setEndPoint in class Entity
Parameters:
p - The startPoint of the actor.

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent e)
This method is called when an ActionEvent takes place.

Specified by:
actionPerformed in interface java.awt.event.ActionListener
Parameters:
e - The ActionEvent.

setNextState

public void setNextState(java.awt.Point p)
This method is called to update the next state of the class based upon what the user has choosen.

Specified by:
setNextState in class Entity
Parameters:
p - The point of the mouse.