|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.Component
java.awt.Container
java.awt.Window
java.awt.Frame
javax.swing.JFrame
se.umu.cs.SequenceDiagramEditor.SeqDiagramEditor
This class represents the editor for a sequence diagram. It creates the window to draw in and the drawingarea.
Nested Class Summary |
Nested classes inherited from class javax.swing.JFrame |
javax.swing.JFrame.AccessibleJFrame |
Nested classes inherited from class java.awt.Frame |
java.awt.Frame.AccessibleAWTFrame |
Nested classes inherited from class java.awt.Window |
java.awt.Window.AccessibleAWTWindow |
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 javax.swing.JButton |
actor
The button of the actor. |
private bluej.extensions.BlueJ |
bluej
The object of the BlueJ-program. |
private javax.swing.JButton |
classCancel
Used when the user chooses a class. |
private javax.swing.JDialog |
classdialog
Used when the user chooses the class of an object. |
private bluej.extensions.BClass[] |
classes
An array with all possible classes. |
private javax.swing.JComboBox |
classList
A list of all possible classes. |
private javax.swing.JButton |
classOk
Used when the user chooses a class. |
private boolean |
connectedToBlueJ
Tells if the program is connected to BlueJ or not. |
private org.w3c.dom.Document |
document
Used when saving and opening a sequence diagram. |
private DrawingArea |
drawingArea
The drawing area. |
private javax.swing.JMenuItem |
fileMenuItem1
|
private javax.swing.JMenuItem |
fileMenuItem2
|
private javax.swing.JMenuItem |
fileMenuItem3
|
private javax.swing.JMenuItem |
fileMenuItem4
|
private javax.swing.JMenuItem |
fileMenuItem5
|
private javax.swing.JFileChooser |
fileSaver
Used when choosing a file to save to. |
private javax.swing.JMenuItem |
helpMenuItem1
|
private javax.swing.JMenuItem |
helpMenuItem2
|
private javax.swing.JButton |
message
The button of a message. |
private javax.swing.JButton |
noteClose
Used when writing notes. |
private javax.swing.JButton |
noteOK
Used when writing notes. |
private javax.swing.JButton |
notes
The button of the notes for a sequence diagram. |
private javax.swing.JTextArea |
noteText
The textarea where the notes of a sequence diagram is written. |
private javax.swing.JFrame |
noteWindow
The window where the notes are written for a sequence diagram. |
private javax.swing.JButton |
object
The button of the object. |
private javax.swing.JCheckBoxMenuItem |
optionMenuItem1
|
private javax.swing.JCheckBoxMenuItem |
optionMenuItem2
|
private boolean |
showReturnMessages
Tells if the return messages should be shown or not. |
Fields inherited from class javax.swing.JFrame |
accessibleContext, EXIT_ON_CLOSE, rootPane, rootPaneCheckingEnabled |
Fields inherited from class java.awt.Frame |
CROSSHAIR_CURSOR, DEFAULT_CURSOR, E_RESIZE_CURSOR, HAND_CURSOR, ICONIFIED, MAXIMIZED_BOTH, MAXIMIZED_HORIZ, MAXIMIZED_VERT, MOVE_CURSOR, N_RESIZE_CURSOR, NE_RESIZE_CURSOR, NORMAL, NW_RESIZE_CURSOR, S_RESIZE_CURSOR, SE_RESIZE_CURSOR, SW_RESIZE_CURSOR, TEXT_CURSOR, W_RESIZE_CURSOR, WAIT_CURSOR |
Fields inherited from class java.awt.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 javax.swing.WindowConstants |
DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, HIDE_ON_CLOSE |
Fields inherited from interface java.awt.image.ImageObserver |
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
SeqDiagramEditor()
The constructor of the class. |
|
SeqDiagramEditor(bluej.extensions.BlueJ b)
The constructor of the class which takes an object of the BlueJ-class. |
Method Summary | |
void |
actionPerformed(java.awt.event.ActionEvent e)
This method is called when an event takes place. |
private java.io.File |
blueJFileSaveChooser()
This method is called to let the user choose which file to save the current sequence diagram in. |
private java.io.File |
blueJOpenFileChooser(java.io.File currDir)
This method is called to let the user choose what file to open when the editor is in BlueJ-mode. |
private void |
chooseClass(bluej.extensions.BPackage pack)
This method is used when the user wants to add a new object to the sequence diagram and the editor is connected to a BlueJ-project. |
private boolean |
closeAndExit()
This method is called when the user wants to close a sequence diagram or exit the program. |
private void |
createMenu()
This method is called to create the menu. |
private void |
createToolBar()
This method is called to create the toolbar where the user can choose to create actors, objects and messages. |
private java.io.File |
fileOpenChooser()
This method is called to let the user choose what file to open the sequence diagram from. |
private java.io.File |
fileSaveChooser()
This method is called to let the user choose what file to save the sequence diagram in. |
boolean |
getShowReturnMessages()
Tells if return messages should be shown or not. |
boolean |
isConnectedToBlueJ()
This method tells if the editor is connected to BlueJ or not. |
private void |
open()
This method is called when the user want to open a sequence diagram. |
private void |
saveAs()
This method is called when the user wants to save the current sequence diagram but there is still no file. |
void |
setIsConnectedToBlueJ(boolean b)
Sets whether the editor is connected to BlueJ or not. |
private void |
takeNotes()
This method is called when the user wants to write some notes about the sequence diagram. |
void |
windowActivated(java.awt.event.WindowEvent w)
|
void |
windowClosed(java.awt.event.WindowEvent w)
This method is called when the user closes the window. |
void |
windowClosing(java.awt.event.WindowEvent w)
This method is called when the user closes the window. |
void |
windowDeactivated(java.awt.event.WindowEvent w)
|
void |
windowDeiconified(java.awt.event.WindowEvent w)
|
void |
windowIconified(java.awt.event.WindowEvent w)
|
void |
windowOpened(java.awt.event.WindowEvent w)
|
Methods inherited from class javax.swing.JFrame |
addImpl, createRootPane, frameInit, getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getJMenuBar, getLayeredPane, getRootPane, isDefaultLookAndFeelDecorated, isRootPaneCheckingEnabled, paramString, processWindowEvent, remove, setContentPane, setDefaultCloseOperation, setDefaultLookAndFeelDecorated, setGlassPane, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, update |
Methods inherited from class java.awt.Frame |
addNotify, finalize, getCursorType, getExtendedState, getFrames, getIconImage, getMaximizedBounds, getMenuBar, getState, getTitle, isResizable, isUndecorated, remove, removeNotify, setCursor, setExtendedState, setIconImage, setMaximizedBounds, setMenuBar, setResizable, setState, setTitle, setUndecorated |
Methods inherited from class java.awt.Window |
addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, dispose, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getGraphicsConfiguration, getInputContext, getListeners, getLocale, getMostRecentFocusOwner, getOwnedWindows, getOwner, getToolkit, getWarningString, getWindowFocusListeners, getWindowListeners, getWindowStateListeners, hide, isActive, isFocusableWindow, isFocusCycleRoot, isFocused, isShowing, pack, postEvent, processEvent, processWindowFocusEvent, processWindowStateEvent, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, setCursor, setFocusableWindowState, setFocusCycleRoot, setLocationRelativeTo, show, toBack, toFront |
Methods inherited from class java.awt.Container |
add, add, add, add, add, addContainerListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalPolicy, getInsets, getLayout, getMaximumSize, getMinimumSize, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paint, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, removeAll, removeContainerListener, setFocusTraversalKeys, setFocusTraversalPolicy, setFont, 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, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isOpaque, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, size, toString, transferFocus, transferFocusUpCycle |
Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.awt.MenuContainer |
getFont, postEvent |
Field Detail |
private javax.swing.JButton actor
private javax.swing.JButton object
private javax.swing.JButton message
private javax.swing.JButton notes
private javax.swing.JButton classOk
private javax.swing.JButton classCancel
private javax.swing.JDialog classdialog
private javax.swing.JComboBox classList
private bluej.extensions.BClass[] classes
private javax.swing.JMenuItem fileMenuItem1
private javax.swing.JMenuItem fileMenuItem2
private javax.swing.JMenuItem fileMenuItem3
private javax.swing.JMenuItem fileMenuItem4
private javax.swing.JMenuItem fileMenuItem5
private javax.swing.JCheckBoxMenuItem optionMenuItem1
private javax.swing.JCheckBoxMenuItem optionMenuItem2
private javax.swing.JMenuItem helpMenuItem1
private javax.swing.JMenuItem helpMenuItem2
private DrawingArea drawingArea
private org.w3c.dom.Document document
private bluej.extensions.BlueJ bluej
private boolean connectedToBlueJ
private boolean showReturnMessages
private javax.swing.JFileChooser fileSaver
private javax.swing.JTextArea noteText
private javax.swing.JButton noteOK
private javax.swing.JButton noteClose
private javax.swing.JFrame noteWindow
Constructor Detail |
public SeqDiagramEditor(bluej.extensions.BlueJ b)
b
- The BlueJ object.public SeqDiagramEditor()
Method Detail |
private void createToolBar()
private void createMenu()
public void actionPerformed(java.awt.event.ActionEvent e)
actionPerformed
in interface java.awt.event.ActionListener
e
- The actionEvent.private void takeNotes()
private void chooseClass(bluej.extensions.BPackage pack)
pack
- The current open project in BlueJprivate java.io.File blueJFileSaveChooser()
private java.io.File fileSaveChooser()
private java.io.File blueJOpenFileChooser(java.io.File currDir)
currDir
- The directory were the file is in
private java.io.File fileOpenChooser()
public void windowClosed(java.awt.event.WindowEvent w)
windowClosed
in interface java.awt.event.WindowListener
w
- The windowEventpublic void windowClosing(java.awt.event.WindowEvent w)
windowClosing
in interface java.awt.event.WindowListener
w
- The windowEventprivate void saveAs()
private void open()
private boolean closeAndExit()
public boolean isConnectedToBlueJ()
public void setIsConnectedToBlueJ(boolean b)
b
- True if connected else falsepublic boolean getShowReturnMessages()
public void windowActivated(java.awt.event.WindowEvent w)
windowActivated
in interface java.awt.event.WindowListener
public void windowDeactivated(java.awt.event.WindowEvent w)
windowDeactivated
in interface java.awt.event.WindowListener
public void windowDeiconified(java.awt.event.WindowEvent w)
windowDeiconified
in interface java.awt.event.WindowListener
public void windowIconified(java.awt.event.WindowEvent w)
windowIconified
in interface java.awt.event.WindowListener
public void windowOpened(java.awt.event.WindowEvent w)
windowOpened
in interface java.awt.event.WindowListener
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |