|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectse.umu.cs.SequenceDiagramEditor.Entity
se.umu.cs.SequenceDiagramEditor.ClassEntity
se.umu.cs.SequenceDiagramEditor.SequenceObject
This class represents an object in a sequence diagram.
Field Summary | |
private java.lang.String |
bClassName
The name of the BClass that the object belongs to. |
private boolean |
color
Used when checking if the BClass still exists in the project. |
private Handle |
handle
The handle of the object, used to move the object. |
private int |
length
The lenght of the object (the drawn square). |
private javax.swing.JMenuItem |
menuDelete
Menuitem used if deleting the object. |
private javax.swing.JMenuItem |
menuDestroySymbol
Menuiten used for adding a destroy symbol to the object. |
private javax.swing.JMenuItem |
menuRename
Menuitem used for renaming the object. |
private boolean |
move
Tells if the object could be moved or not. |
private static int |
nrOfObjects
The number of objects created, used to name the object. |
Fields inherited from class se.umu.cs.SequenceDiagramEditor.ClassEntity |
bClass, destroySymbol, hasCreationMessage, hasDestroySymbol, messageList |
Fields inherited from class se.umu.cs.SequenceDiagramEditor.Entity |
drawingArea, endPoint, lifeLine, name, selected, startPoint, string |
Constructor Summary | |
SequenceObject(DrawingArea d)
The constructor of the class. |
|
SequenceObject(DrawingArea d,
bluej.extensions.BClass b)
The constructor of the class. |
Method Summary | |
void |
actionPerformed(java.awt.event.ActionEvent e)
This method is called when an ActionEvent takes place. |
void |
changeName()
This method is called when the user wants to change the name for the object. |
void |
draw(java.awt.Graphics g)
This method is called to draw the object. |
java.lang.String |
getBClassName()
This method returns the name of the BClass. |
int |
getLength()
This method returns the length of the object. |
int |
getNextState()
This method returns the next state for this class. |
int |
getNrOfObjects()
This method returns the number of objects. |
void |
setBClassName(java.lang.String s)
This method sets the name of the BClass. |
void |
setColor(boolean b)
This method sets the boolean color of the object. |
void |
setEndPoint(java.awt.Point p)
This method sets the endpoint for the object. |
void |
setLength(int l)
This method sets the length of the object. |
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 se.umu.cs.SequenceDiagramEditor.ClassEntity |
addMessage, arrangeObjects, createDestroySymbol, delete, deleteMessage, getBClass, moveObject, moveObjects, moveObjectUp, moveVertical, setSelected |
Methods inherited from class se.umu.cs.SequenceDiagramEditor.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 |
private javax.swing.JMenuItem menuRename
private javax.swing.JMenuItem menuDestroySymbol
private javax.swing.JMenuItem menuDelete
private Handle handle
private boolean move
private static int nrOfObjects
private java.lang.String bClassName
private int length
private boolean color
Constructor Detail |
public SequenceObject(DrawingArea d)
d
- The component where the object will be drawn.public SequenceObject(DrawingArea d, bluej.extensions.BClass b)
d
- The component where the object will be drawn.b
- The BClass to which the object belongs to.Method Detail |
public void draw(java.awt.Graphics g)
draw
in class Entity
g
- Used for the drawing.public void showMenu(java.awt.Point p)
showMenu
in class Entity
p
- The menu will be shown at the given point.public int getNextState()
getNextState
in class Entity
public void setEndPoint(java.awt.Point p)
setEndPoint
in class Entity
p
- The startPoint of the object.public void actionPerformed(java.awt.event.ActionEvent e)
actionPerformed
in interface java.awt.event.ActionListener
e
- The ActionEvent.public void changeName()
public void setNextState(java.awt.Point p)
setNextState
in class Entity
p
- The point of the mouse.public int getNrOfObjects()
public void setBClassName(java.lang.String s)
s
- The namepublic java.lang.String getBClassName()
public int getLength()
public void setLength(int l)
l
- The lenght of the objectpublic void setColor(boolean b)
b
- True if the BClass does not exist anymore else false
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |