|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
DrawingArea
This class represents the drawingarea where all objects in a sequence diagram is drawn.
Nested Class Summary |
Nested classes inherited from class javax.swing.JPanel |
javax.swing.JPanel.AccessibleJPanel |
Nested classes inherited from class javax.swing.JComponent |
javax.swing.JComponent.AccessibleJComponent |
Nested classes inherited from class java.awt.Container |
java.awt.Container.AccessibleAWTContainer |
Nested classes inherited from class java.awt.Component |
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy |
Field Summary | |
private java.util.Vector |
actorsAndObjects
The list with all classEntitys(actors and objects) in the drawingarea. |
protected bluej.extensions.BlueJ |
bluej
The BlueJ object used when the editor is connected to a BlueJ-project |
private javax.swing.JButton |
classCancel
|
private javax.swing.JDialog |
classDialog
|
private bluej.extensions.BClass[] |
classes
|
private javax.swing.JComboBox |
classList
|
private javax.swing.JButton |
classOk
|
private Entity |
currentEntity
The active entity in the drawingarea. |
private java.io.File |
currentFile
The file for the current sequence diagram |
private CurrentState |
currentState
The current state for the drawingarea. |
static float[] |
dash1
|
static java.awt.BasicStroke |
dashed
|
private java.util.Vector |
drawingObjects
The list with all objects to draw in the drawingarea. |
private java.util.Vector |
lifelines
The list with all lifelines in the drawingarea. |
private javax.swing.JDialog |
messageDialog
|
private javax.swing.JComboBox |
messageList
|
private javax.swing.JButton |
messageOk
|
private bluej.extensions.BMethod[] |
methods
|
private long |
newtime
|
private java.lang.String |
notes
|
protected int |
nrOfObjects
The number of classEntitys(actor and objects) in the drawingarea. |
private long |
oldtime
|
private SeqDiagramEditor |
seqDiagramEditor
The Sequence Diagram Editor this drawingArea belongs to |
Fields inherited from class javax.swing.JPanel |
|
Fields inherited from class javax.swing.JComponent |
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
Fields inherited from class java.awt.Container |
|
Fields inherited from class java.awt.Component |
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
Fields inherited from interface java.awt.image.ImageObserver |
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
DrawingArea(bluej.extensions.BlueJ b,
SeqDiagramEditor s)
The constructor for the class, used when the editor is started from BlueJ. |
|
DrawingArea(SeqDiagramEditor s)
The constructor for the class. |
Method Summary | |
void |
actionPerformed(java.awt.event.ActionEvent e)
This method is called when an event takes place. |
void |
addClassEntity(Entity e)
This method adds an object or an actor to the drawingarea. |
void |
addEntity(Entity e)
This method adds an entity to the drawingarea. |
void |
arrangeReturnMessages()
This method is used to arrange all return messages. |
protected void |
chooseMethod(Entity e)
This methos is used when the editor is in "BlueJ"-mode. |
private void |
chooseNewObject(Entity e)
This method is used when the editor is in "BlueJ"-mode. |
void |
clear()
This method is called when the user wants to open a new sequence diagram. |
java.util.Vector |
getActorsAndObject()
|
Entity |
getCurrentEntity()
|
java.io.File |
getCurrentFile()
|
CurrentState |
getCurrState()
|
java.util.Vector |
getDrawingObjects()
|
java.util.Vector |
getLifelines()
|
private Message |
getMessage(org.w3c.dom.Element e)
This method is used by the method readInMessage. |
java.lang.String |
getNoteFile()
|
SeqDiagramEditor |
getSeqDiagramEditor()
|
void |
hideReturnMessages()
This method is used to remove all return messages from the drawingobjects. |
void |
mouseClicked(java.awt.event.MouseEvent e)
This method is called when the mouse is clicked in the drawingarea. |
void |
mouseDragged(java.awt.event.MouseEvent e)
This method is called when the mouse is dragged. |
void |
mouseEntered(java.awt.event.MouseEvent e)
|
void |
mouseExited(java.awt.event.MouseEvent e)
|
void |
mouseMoved(java.awt.event.MouseEvent e)
This method is called when the mouse is moved in the drawingarea. |
void |
mousePressed(java.awt.event.MouseEvent e)
This method is called when the mouse is pressed in the drawingarea. |
void |
mouseReleased(java.awt.event.MouseEvent e)
This method is called when the mouse is released on the drawingarea. |
void |
openFromFile(java.io.File file)
This method is called when the user wants to open a saved sequence diagram. |
void |
paintComponent(java.awt.Graphics g)
This method draws all objects on the drawingarea by calling the draw-method for all objects. |
private void |
readInDestroySymbol(ClassEntity c,
org.w3c.dom.Element d)
This method is used by the readInObject method. |
private void |
readInLifeLine(ClassEntity c,
org.w3c.dom.Element m)
This method is used by the readInObject method to read in a lifeline for an object/actor. |
private void |
readInMessage(ClassEntity c,
org.w3c.dom.Element m)
This method is used by the readInObject method. |
private void |
readInObject(org.w3c.dom.Element object)
This method is called to read in an actor or a sequenceobject from a file. |
org.w3c.dom.Document |
saveToFile(java.io.File file)
This method is called when the editor tells the drawingarea that it should save itself to a file. |
void |
setCurrentFile(java.io.File f)
|
void |
setNoteFile(java.lang.String n)
|
void |
showReturnMessages()
This method is used to add all return messages to the drawingobjects. |
Methods inherited from class javax.swing.JPanel |
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI |
Methods inherited from class javax.swing.JComponent |
addAncestorListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getPropertyChangeListeners, getPropertyChangeListeners, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getWidth, getVisibleRect, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFont, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update |
Methods inherited from class java.awt.Container |
add, add, add, add, add, addContainerListener, addImpl, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setLayout, transferFocusBackward, transferFocusDownCycle, validate, validateTree |
Methods inherited from class java.awt.Component |
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
private CurrentState currentState
private java.util.Vector drawingObjects
private java.util.Vector lifelines
private java.util.Vector actorsAndObjects
private Entity currentEntity
protected int nrOfObjects
protected bluej.extensions.BlueJ bluej
private SeqDiagramEditor seqDiagramEditor
private java.io.File currentFile
public static final float[] dash1
public static final java.awt.BasicStroke dashed
private javax.swing.JDialog messageDialog
private javax.swing.JComboBox messageList
private javax.swing.JButton messageOk
private bluej.extensions.BMethod[] methods
private javax.swing.JDialog classDialog
private javax.swing.JComboBox classList
private javax.swing.JButton classOk
private javax.swing.JButton classCancel
private bluej.extensions.BClass[] classes
private java.lang.String notes
private long oldtime
private long newtime
Constructor Detail |
public DrawingArea(SeqDiagramEditor s)
s
- The editor window that creates the drawingAreapublic DrawingArea(bluej.extensions.BlueJ b, SeqDiagramEditor s)
b
- The BlueJ-objects
- The editor window that creates the drawingAreaMethod Detail |
public void addEntity(Entity e)
e
- The Entity to addpublic void addClassEntity(Entity e)
e
- The entity to addpublic void mouseClicked(java.awt.event.MouseEvent e)
mouseClicked
in interface java.awt.event.MouseListener
e
- The mouseEvent.public void paintComponent(java.awt.Graphics g)
g
- The graphics used for the drawing.public void mouseDragged(java.awt.event.MouseEvent e)
mouseDragged
in interface java.awt.event.MouseMotionListener
e
- The mouseEvent.public void mouseMoved(java.awt.event.MouseEvent e)
mouseMoved
in interface java.awt.event.MouseMotionListener
e
- The mouseEvent.public void mousePressed(java.awt.event.MouseEvent e)
mousePressed
in interface java.awt.event.MouseListener
e
- The mouseevent.public void mouseReleased(java.awt.event.MouseEvent e)
mouseReleased
in interface java.awt.event.MouseListener
e
- The mouseEvent.public org.w3c.dom.Document saveToFile(java.io.File file) throws java.io.FileNotFoundException
file
- The file where the sequence diagram should
be saved.
java.io.FileNotFoundException
public void openFromFile(java.io.File file) throws javax.xml.parsers.ParserConfigurationException
file
- The file for the saved sequence diagram.
javax.xml.parsers.ParserConfigurationException
private void readInObject(org.w3c.dom.Element object)
object
- The actor/sequence-object to read in.private void readInLifeLine(ClassEntity c, org.w3c.dom.Element m)
c
- The ClassEntity for this lifelinem
- The lifelineprivate void readInMessage(ClassEntity c, org.w3c.dom.Element m)
c
- The startEntity or endEntity of this message.m
- The message.private Message getMessage(org.w3c.dom.Element e)
e
- The Message
private void readInDestroySymbol(ClassEntity c, org.w3c.dom.Element d)
c
- The ownerentity of this destroysymbol.d
- The destroysymbol.public void clear()
protected void chooseMethod(Entity e)
e
- The current entity of the drawingAreaprivate void chooseNewObject(Entity e)
e
- The current entity of the drawingArea.public void actionPerformed(java.awt.event.ActionEvent e)
actionPerformed
in interface java.awt.event.ActionListener
e
- The ActionEventpublic void showReturnMessages()
public void hideReturnMessages()
public void arrangeReturnMessages()
public java.util.Vector getDrawingObjects()
public java.util.Vector getLifelines()
public java.util.Vector getActorsAndObject()
public CurrentState getCurrState()
public java.io.File getCurrentFile()
public void setCurrentFile(java.io.File f)
public SeqDiagramEditor getSeqDiagramEditor()
public Entity getCurrentEntity()
public java.lang.String getNoteFile()
public void setNoteFile(java.lang.String n)
public void mouseEntered(java.awt.event.MouseEvent e)
mouseEntered
in interface java.awt.event.MouseListener
public void mouseExited(java.awt.event.MouseEvent e)
mouseExited
in interface java.awt.event.MouseListener
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |