ix.iface.ui
Class JFrameMT

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--java.awt.Window
                    |
                    +--java.awt.Frame
                          |
                          +--javax.swing.JFrame
                                |
                                +--ix.iface.ui.JFrameMT
All Implemented Interfaces:
javax.accessibility.Accessible, java.awt.event.ActionListener, java.util.EventListener, java.awt.image.ImageObserver, java.awt.MenuContainer, javax.swing.RootPaneContainer, java.io.Serializable, javax.swing.WindowConstants
Direct Known Subclasses:
JFrameMTP

public class JFrameMT
extends javax.swing.JFrame
implements java.awt.event.ActionListener

A frame with a menu bar, a tool bar, and file/about/exit dialogues. Contains a method to create a default menu/tool bar and useful methods for building menu and tool bars. Creates an About dialog, file dialogs (open, save as), provides default functions for openFile, saveFileAs, toggleToolbar, exit, and aboutDialog.

See Also:
Serialized Form

Inner classes inherited from class javax.swing.JFrame
javax.swing.JFrame.AccessibleJFrame
 
Inner classes inherited from class java.awt.Frame
java.awt.Frame.AccessibleAWTFrame
 
Inner classes inherited from class java.awt.Window
java.awt.Window.AccessibleAWTWindow
 
Inner classes inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainer
 
Inner classes inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent, java.awt.Component.AWTTreeLock
 
Field Summary
 JAboutDialog aboutDialog
           
protected  IXToolItem aboutItem
           
protected  IXToolItem closeItem
           
protected  javax.swing.ImageIcon copyIcon
           
protected  IXToolItem copyItem
           
protected  javax.swing.ImageIcon cutIcon
           
protected  IXToolItem cutItem
           
 javax.swing.JMenu editMenu
           
protected  IXToolItem exitItem
           
 javax.swing.JMenu fileMenu
           
protected  javax.swing.ImageIcon helpIcon
           
protected  IXToolItem helpItem
           
 javax.swing.JMenu helpMenu
           
 java.lang.String imageDir
           
 javax.swing.JPanel JPanel2
           
 javax.swing.JPanel mainJPanel
           
protected  IXToolItem manualItem
           
 javax.swing.JMenuBar menuBar
           
protected  javax.swing.ImageIcon newIcon
           
protected  IXToolItem newItem
           
 java.awt.FileDialog openFileDialog
           
protected  javax.swing.ImageIcon openIcon
           
protected  IXToolItem openItem
           
 javax.swing.JMenu optionsMenu
           
protected  javax.swing.ImageIcon pasteIcon
           
protected  IXToolItem pasteItem
           
protected  javax.swing.ImageIcon revertIcon
           
protected  IXToolItem revertItem
           
protected  IXToolItem saveAsItem
           
 java.awt.FileDialog saveFileDialog
           
protected  javax.swing.ImageIcon saveIcon
           
protected  IXToolItem saveItem
           
(package private)  int TB_HEIGHT
           
(package private)  int TBB_HEIGHT
           
(package private)  int TBB_WIDTH
           
(package private)  int TBB_Y
           
 javax.swing.JToolBar toolBar
           
 javax.swing.JMenu toolsMenu
           
 javax.swing.JMenu viewMenu
           
 
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, icon, ICONIFIED, mbManagement, MOVE_CURSOR, N_RESIZE_CURSOR, NE_RESIZE_CURSOR, NORMAL, NW_RESIZE_CURSOR, ownedWindows, resizable, S_RESIZE_CURSOR, SE_RESIZE_CURSOR, SW_RESIZE_CURSOR, TEXT_CURSOR, title, W_RESIZE_CURSOR, WAIT_CURSOR
 
Fields inherited from class java.awt.Window
inputContext, OPENED, ownedWindowList, state, warningString, windowListener
 
Fields inherited from class java.awt.Container
component, containerListener, layoutMgr, listeningBoundsChildren, listeningChildren, ncomponents
 
Fields inherited from class java.awt.Component
actionListenerK, adjustmentListenerK, appContext, background, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, componentListener, componentListenerK, componentOrientation, containerListenerK, cursor, dropTarget, enabled, eventMask, focusListener, focusListenerK, font, foreground, graphicsConfig, hasFocus, height, hierarchyBoundsListener, hierarchyBoundsListenerK, hierarchyListener, hierarchyListenerK, incRate, inputMethodListener, inputMethodListenerK, isInc, isPacked, itemListenerK, keyListener, keyListenerK, LEFT_ALIGNMENT, locale, LOCK, metrics, minSize, mouseListener, mouseListenerK, mouseMotionListener, mouseMotionListenerK, newEventsOnly, ownedWindowK, parent, peer, peerFont, popups, prefSize, RIGHT_ALIGNMENT, textListenerK, TOP_ALIGNMENT, valid, visible, width, windowClosingException, windowListenerK, x, y
 
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
JFrameMT()
          Creates a frame with a menu bar, a tool bar, a main panel.
JFrameMT(java.lang.String title)
          Creates a frame (see JFrameMT()) with a given title
 
Method Summary
 void aboutDialog()
           
 void actionPerformed(java.awt.event.ActionEvent event)
           
 void exit()
           
 void exitApplication()
           
 javax.swing.JCheckBoxMenuItem makeCheckMenuItem(javax.swing.JComponent parent, java.lang.String command, java.lang.String label)
          Makes a check box menu item and adds it to the given (menu) component.
 void makeDefaultMenuToolbar()
          Makes a default menubar and toolbar.
 javax.swing.JMenu makeEditMenuTool(javax.swing.JComponent parentMenu)
          Makes a default edit menu and toolbar buttons.
 javax.swing.JMenu makeFileMenuTool(javax.swing.JComponent parentMenu)
          Makes a default file menu and toolbar buttons.
 void makeFileMenuToolExits(javax.swing.JMenu fileMenu)
          Makes default close/exit menu options and and toolbar buttons.
 void makeFileMenuToolFiles(javax.swing.JMenu fileMenu)
          Makes default file new/open/save/saveAs menu items and toolbar buttons.
 void makeFrame()
           
 javax.swing.JMenu makeHelpMenuTool(javax.swing.JComponent parentMenu)
          Makes a default help menu and toolbar buttons.
 javax.swing.JMenu makeMenu(javax.swing.JComponent parent, java.lang.String label)
          Makes a menu and adds it to the given (menu) component.
 javax.swing.JMenuItem makeMenuItem(javax.swing.JComponent parent, java.lang.String command, java.lang.String label)
          Makes a menu item with the given label and command and adds it to the given (menu) parent.
 javax.swing.JMenuItem makeMenuItem(javax.swing.JComponent parent, java.lang.String command, java.lang.String label, char mnemonic)
          Makes a menu item as above but with a given mnemonic.
 javax.swing.JMenuItem makeMenuItem(javax.swing.JComponent parent, java.lang.String command, java.lang.String label, char mnemonic, javax.swing.Icon icon, javax.swing.KeyStroke accel)
          Makes a menu item as above but with a given icon and accelerator
 javax.swing.JMenuItem makeMenuItem(javax.swing.JComponent parent, java.lang.String command, java.lang.String label, javax.swing.Icon icon)
          Makes a menu item as above but with a given icon and accelerator
 javax.swing.JMenuItem makeMenuTool(javax.swing.JComponent menuParent, java.lang.String command, char mnemonic, javax.swing.Icon icon, java.lang.String tttxt)
          Makes a menu item and a toolbar button with given mnemonic.
 javax.swing.JMenuItem makeMenuTool(javax.swing.JComponent menuParent, java.lang.String command, javax.swing.Icon icon, java.lang.String tttxt)
          Makes a menu item and a toolbar button with command, icon, and ToolTipText.
 javax.swing.JMenuItem makeMenuTool(javax.swing.JComponent menuParent, java.lang.String command, java.lang.String label, char mnemonic, javax.swing.Icon icon, java.lang.String tttxt)
          Makes a menu item and a toolbar button as above but with given label.
 javax.swing.JMenuItem makeMenuTool(javax.swing.JComponent menuParent, java.lang.String command, java.lang.String label, javax.swing.Icon icon, java.lang.String tttxt)
          Makes a menu item and a toolbar button as above but with given label.
 void makeMenuToolBars()
           
 javax.swing.JMenuItem makeMenuToolITxt(javax.swing.JComponent menuParent, java.lang.String command, java.lang.String label, javax.swing.Icon icon, java.lang.String tttxt)
          Makes a menu item and a toolbar button as with makeMenuTool but adds the label to the icon too.
 javax.swing.JMenu makeOptionsMenuTool(javax.swing.JComponent parentMenu)
          Makes a default options menu and toolbar buttons.
 javax.swing.JRadioButtonMenuItem makeRadioMenuItem(javax.swing.JComponent parent, java.lang.String command, java.lang.String label)
          Makes a radio button menu item and adds it to the given (menu) component.
protected  javax.swing.JButton makeToolbarButton(java.lang.String command, javax.swing.Icon icon, char mnemo, java.lang.String tttxt)
          Makes a toolbar button as above but with a mnemonic.
protected  javax.swing.JButton makeToolbarButton(java.lang.String command, javax.swing.Icon icon, int x, char mnemo, java.lang.String tttxt)
          Makes a toolbar button as above but with a given location.
protected  javax.swing.JButton makeToolbarButton(java.lang.String command, javax.swing.Icon icon, java.lang.String tttxt)
          Makes a toolbar button with the given command, icon, and ToolTipText.
protected  javax.swing.JButton makeToolbarButton(java.lang.String command, javax.swing.Icon icon, java.lang.String text, java.lang.String tttxt)
          Makes a toolbar button with the given command, icon, text, and ToolTipText.
 javax.swing.JMenu makeToolsMenuTool(javax.swing.JComponent parentMenu)
          Makes a default tools menu and toolbar buttons.
 javax.swing.JMenu makeViewMenuTool(javax.swing.JComponent parentMenu)
          Makes a default view menu and toolbar buttons.
 void openFile()
           
 void placeToolbarButton(javax.swing.JButton button, int x)
           
 void saveFile()
           
 void saveFileAs(java.awt.event.ActionEvent event)
           
 void toggleToolbar(boolean on)
           
 
Methods inherited from class javax.swing.JFrame
addImpl, createRootPane, frameInit, getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getJMenuBar, getLayeredPane, getRootPane, isRootPaneCheckingEnabled, paramString, processKeyEvent, processWindowEvent, remove, setContentPane, setDefaultCloseOperation, setGlassPane, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, update
 
Methods inherited from class java.awt.Frame
, addNotify, addToFrameList, constructComponentName, finalize, getCursorType, getFrames, getIconImage, getMenuBar, getState, getTitle, isResizable, postProcessKeyEvent, remove, removeFromFrameList, removeNotify, setCursor, setIconImage, setMenuBar, setResizable, setState, setTitle
 
Methods inherited from class java.awt.Window
addOwnedWindow, addWindowListener, adjustListeningChildren, applyResourceBundle, applyResourceBundle, connectOwnedWindow, dispatchEventImpl, dispose, eventEnabled, getFocusOwner, getGraphicsConfiguration, getInputContext, getListeners, getLocale, getOwnedWindows, getOwner, getToolkit, getWarningString, hide, isActive, isShowing, nextFocus, pack, postEvent, postWindowEvent, preProcessKeyEvent, processEvent, removeOwnedWindow, removeWindowListener, resetGC, setCursor, setFocusOwner, show, toBack, toFront, transferFocus
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, applyOrientation, checkGD, countComponents, createChildHierarchyEvents, createHierarchyEvents, deliverEvent, dispatchEventToSelf, doLayout, findComponentAt, findComponentAt, findComponentAt, getAccessibleAt, getAccessibleChild, getAccessibleChildrenCount, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents_NoClientCode, getComponents, getInsets, getLayout, getMaximumSize, getMinimumSize, getMouseEventTarget, getPreferredSize, getWindow, insets, invalidate, invalidateTree, isAncestorOf, layout, lightweightPaint, lightweightPrint, list, list, locate, minimumSize, numListening, paint, paintComponents, paintHeavyweightComponents, postsOldMouseEvents, preferredSize, print, printComponents, printHeavyweightComponents, processContainerEvent, proxyEnableEvents, proxyRequestFocus, remove, removeAll, removeContainerListener, setFont, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addPropertyChangeListener, addPropertyChangeListener, areInputMethodsEnabled, bounds, checkImage, checkImage, checkWindowClosingException, coalesceEvents, contains, contains, createImage, createImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, getAccessibleIndexInParent, getAccessibleStateSet, getBackground, getBounds, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont_NoClientCode, getFont, getFontMetrics, getForeground, getGraphics, getHeight, getInputMethodRequests, getLocation, getLocation, getLocationOnScreen_NoTreeLock, getLocationOnScreen, getName, getNativeContainer, getParent_NoClientCode, getParent, getPeer, getSize, getSize, getToolkitImpl, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isDisplayable, isDoubleBuffered, isEnabled, isEnabledImpl, isFocusTraversable, isLightweight, isOpaque, isRecursivelyVisible, 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, processMouseEvent, processMouseMotionEvent, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setDropTarget, setEnabled, setForeground, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, size, toString, transferFocus
 
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

imageDir

public java.lang.String imageDir

TBB_Y

int TBB_Y

TBB_WIDTH

int TBB_WIDTH

TBB_HEIGHT

int TBB_HEIGHT

TB_HEIGHT

int TB_HEIGHT

aboutDialog

public JAboutDialog aboutDialog

saveFileDialog

public java.awt.FileDialog saveFileDialog

openFileDialog

public java.awt.FileDialog openFileDialog

mainJPanel

public javax.swing.JPanel mainJPanel

JPanel2

public javax.swing.JPanel JPanel2

menuBar

public javax.swing.JMenuBar menuBar

toolBar

public javax.swing.JToolBar toolBar

fileMenu

public javax.swing.JMenu fileMenu

editMenu

public javax.swing.JMenu editMenu

viewMenu

public javax.swing.JMenu viewMenu

toolsMenu

public javax.swing.JMenu toolsMenu

helpMenu

public javax.swing.JMenu helpMenu

optionsMenu

public javax.swing.JMenu optionsMenu

newIcon

protected javax.swing.ImageIcon newIcon

openIcon

protected javax.swing.ImageIcon openIcon

saveIcon

protected javax.swing.ImageIcon saveIcon

revertIcon

protected javax.swing.ImageIcon revertIcon

cutIcon

protected javax.swing.ImageIcon cutIcon

copyIcon

protected javax.swing.ImageIcon copyIcon

pasteIcon

protected javax.swing.ImageIcon pasteIcon

helpIcon

protected javax.swing.ImageIcon helpIcon

newItem

protected IXToolItem newItem

openItem

protected IXToolItem openItem

saveItem

protected IXToolItem saveItem

saveAsItem

protected IXToolItem saveAsItem

closeItem

protected IXToolItem closeItem

exitItem

protected IXToolItem exitItem

revertItem

protected IXToolItem revertItem

cutItem

protected IXToolItem cutItem

copyItem

protected IXToolItem copyItem

pasteItem

protected IXToolItem pasteItem

helpItem

protected IXToolItem helpItem

manualItem

protected IXToolItem manualItem

aboutItem

protected IXToolItem aboutItem
Constructor Detail

JFrameMT

public JFrameMT()
Creates a frame with a menu bar, a tool bar, a main panel. Also creates required dialogs (open/save file, about, exit) and handles layout.

JFrameMT

public JFrameMT(java.lang.String title)
Creates a frame (see JFrameMT()) with a given title
Parameters:
title - a string representing the frame's title
Method Detail

makeFrame

public void makeFrame()

makeMenuToolBars

public void makeMenuToolBars()

makeDefaultMenuToolbar

public void makeDefaultMenuToolbar()
Makes a default menubar and toolbar. Menus: File, Edit, View, Help

makeFileMenuTool

public javax.swing.JMenu makeFileMenuTool(javax.swing.JComponent parentMenu)
Makes a default file menu and toolbar buttons. Menu items: new, open, save, save as, S, Options, S, close, exit Toolbar buttons: new, open, save

makeFileMenuToolFiles

public void makeFileMenuToolFiles(javax.swing.JMenu fileMenu)
Makes default file new/open/save/saveAs menu items and toolbar buttons. Menu items: new, open, save, save as, S Toolbar buttons: new, open, save

makeFileMenuToolExits

public void makeFileMenuToolExits(javax.swing.JMenu fileMenu)
Makes default close/exit menu options and and toolbar buttons. Menu items: S, close, exit Toolbar buttons: none

makeOptionsMenuTool

public javax.swing.JMenu makeOptionsMenuTool(javax.swing.JComponent parentMenu)
Makes a default options menu and toolbar buttons. Menu items: cut, copy, paste Toolbar buttons: cut, copy, paste

makeEditMenuTool

public javax.swing.JMenu makeEditMenuTool(javax.swing.JComponent parentMenu)
Makes a default edit menu and toolbar buttons. Menu items: cut, copy, paste Toolbar buttons: cut, copy, paste

makeViewMenuTool

public javax.swing.JMenu makeViewMenuTool(javax.swing.JComponent parentMenu)
Makes a default view menu and toolbar buttons. Menu items: none Toolbar buttons: none

makeToolsMenuTool

public javax.swing.JMenu makeToolsMenuTool(javax.swing.JComponent parentMenu)
Makes a default tools menu and toolbar buttons. Menu items: none Toolbar buttons: none

makeHelpMenuTool

public javax.swing.JMenu makeHelpMenuTool(javax.swing.JComponent parentMenu)
Makes a default help menu and toolbar buttons. Menu items: help, manual, about Toolbar buttons: help

makeMenuTool

public javax.swing.JMenuItem makeMenuTool(javax.swing.JComponent menuParent,
                                          java.lang.String command,
                                          javax.swing.Icon icon,
                                          java.lang.String tttxt)
Makes a menu item and a toolbar button with command, icon, and ToolTipText. Uses the command to work out the label (capitalised command)
Parameters:
menuParent - the menu that the item should be added to
command - attached to item and button for recognising actions
icon - the icon to use on the button
tttxt - the tool tip text attached to the button
Returns:
the new menu item

makeMenuTool

public javax.swing.JMenuItem makeMenuTool(javax.swing.JComponent menuParent,
                                          java.lang.String command,
                                          java.lang.String label,
                                          javax.swing.Icon icon,
                                          java.lang.String tttxt)
Makes a menu item and a toolbar button as above but with given label. Useful for items like "Open..."
Parameters:
menuParent - the menu that the item should be added to
command - attached to item and button for recognising actions
label - the label to display on the menu item (usually ...)
icon - the icon to use on the button
tttxt - the tool tip text attached to the button
Returns:
the new menu item

makeMenuTool

public javax.swing.JMenuItem makeMenuTool(javax.swing.JComponent menuParent,
                                          java.lang.String command,
                                          char mnemonic,
                                          javax.swing.Icon icon,
                                          java.lang.String tttxt)
Makes a menu item and a toolbar button with given mnemonic. Same as the version above but with given mnemonic. uses the command to work out the label (capitalised command) and the mnemonic to work out the accelerator (mnemonic with CTRL_MASK)
Parameters:
menuParent - the menu that the item should be added to
command - attached to item and button for recognising actions
mnemonic - used for mnemonic and accelerator (e.g. X for cut)
icon - the icon to use on the button
tttxt - the tool tip text attached to the button
Returns:
the new menu item

makeMenuTool

public javax.swing.JMenuItem makeMenuTool(javax.swing.JComponent menuParent,
                                          java.lang.String command,
                                          java.lang.String label,
                                          char mnemonic,
                                          javax.swing.Icon icon,
                                          java.lang.String tttxt)
Makes a menu item and a toolbar button as above but with given label.
Parameters:
menuParent - the menu that the item should be added to
command - attached to item and button for recognising actions
label - the label to display on the menu item (usually ...)
mnemonic - used for mnemonic and accelerator (e.g. X for cut)
icon - the icon to use on the button
tttxt - the tool tip text attached to the button
Returns:
the new menu item

makeMenuToolITxt

public javax.swing.JMenuItem makeMenuToolITxt(javax.swing.JComponent menuParent,
                                              java.lang.String command,
                                              java.lang.String label,
                                              javax.swing.Icon icon,
                                              java.lang.String tttxt)
Makes a menu item and a toolbar button as with makeMenuTool but adds the label to the icon too. Useful for items like "Modify draft"
Parameters:
menuParent - the menu that the item should be added to
command - attached to item and button for recognising actions
label - the label to display on the menu item (usually ...)
icon - the icon to use on the button
tttxt - the tool tip text attached to the button
Returns:
the new menu item

makeToolbarButton

protected javax.swing.JButton makeToolbarButton(java.lang.String command,
                                                javax.swing.Icon icon,
                                                java.lang.String tttxt)
Makes a toolbar button with the given command, icon, and ToolTipText. The button is added to the toolbar of the frame and the frame is added to the button's action listeners.
Parameters:
command - attached to the button for recognising actions
icon - the icon to use on the button
tttxt - the tool tip text attached to the button

makeToolbarButton

protected javax.swing.JButton makeToolbarButton(java.lang.String command,
                                                javax.swing.Icon icon,
                                                char mnemo,
                                                java.lang.String tttxt)
Makes a toolbar button as above but with a mnemonic.
Parameters:
command - attached to the button for recognising actions
mnemonic - used for mnemonic and accelerator (e.g. X for cut)
icon - the icon to use on the button
tttxt - the tool tip text attached to the button

makeToolbarButton

protected javax.swing.JButton makeToolbarButton(java.lang.String command,
                                                javax.swing.Icon icon,
                                                java.lang.String text,
                                                java.lang.String tttxt)
Makes a toolbar button with the given command, icon, text, and ToolTipText. The button is added to the toolbar of the frame and the frame is added to the button's action listeners.
Parameters:
command - attached to the button for recognising actions
icon - the icon to use on the button
tttxt - the tool tip text attached to the button

makeToolbarButton

protected javax.swing.JButton makeToolbarButton(java.lang.String command,
                                                javax.swing.Icon icon,
                                                int x,
                                                char mnemo,
                                                java.lang.String tttxt)
Makes a toolbar button as above but with a given location. The button is added at the given x-location in the toolbar of the frame
Parameters:
command - attached to the button for recognising actions
mnemonic - used for mnemonic and accelerator (e.g. X for cut)
icon - the icon to use on the button
x - the x-location for the button on the toolbar -***needed?
tttxt - the tool tip text attached to the button

placeToolbarButton

public void placeToolbarButton(javax.swing.JButton button,
                               int x)

makeMenuItem

public javax.swing.JMenuItem makeMenuItem(javax.swing.JComponent parent,
                                          java.lang.String command,
                                          java.lang.String label)
Makes a menu item with the given label and command and adds it to the given (menu) parent.
Parameters:
menuParent - the menu that the item should be added to
command - attached to the item for recognising actions
label - displayed in the menu

makeMenuItem

public javax.swing.JMenuItem makeMenuItem(javax.swing.JComponent parent,
                                          java.lang.String command,
                                          java.lang.String label,
                                          char mnemonic)
Makes a menu item as above but with a given mnemonic.
Parameters:
menuParent - the menu that the item should be added to
command - attached to the item for recognising actions
label - displayed in the menu
mnemonic - used for mnemonic and accelerator (e.g. X for cut) as above but without the accelerator or an icon

makeMenuItem

public javax.swing.JMenuItem makeMenuItem(javax.swing.JComponent parent,
                                          java.lang.String command,
                                          java.lang.String label,
                                          javax.swing.Icon icon)
Makes a menu item as above but with a given icon and accelerator
Parameters:
menuParent - the menu that the item should be added to
command - attached to the item for recognising actions
label - displayed in the menu
mnemonic - used for mnemonic and accelerator (e.g. X for cut)
icon - the icon to be attached to the item
accel - the key accelerator to be used for the item

makeMenuItem

public javax.swing.JMenuItem makeMenuItem(javax.swing.JComponent parent,
                                          java.lang.String command,
                                          java.lang.String label,
                                          char mnemonic,
                                          javax.swing.Icon icon,
                                          javax.swing.KeyStroke accel)
Makes a menu item as above but with a given icon and accelerator
Parameters:
menuParent - the menu that the item should be added to
command - attached to the item for recognising actions
label - displayed in the menu
mnemonic - used for mnemonic and accelerator (e.g. X for cut)
icon - the icon to be attached to the item
accel - the key accelerator to be used for the item

makeCheckMenuItem

public javax.swing.JCheckBoxMenuItem makeCheckMenuItem(javax.swing.JComponent parent,
                                                       java.lang.String command,
                                                       java.lang.String label)
Makes a check box menu item and adds it to the given (menu) component. As above but without the accelerator or the mnemonic
Parameters:
menuParent - the menu that the item should be added to
command - attached to the item for recognising actions
label - displayed in the menu

makeRadioMenuItem

public javax.swing.JRadioButtonMenuItem makeRadioMenuItem(javax.swing.JComponent parent,
                                                          java.lang.String command,
                                                          java.lang.String label)
Makes a radio button menu item and adds it to the given (menu) component.
Parameters:
menuParent - the menu that the item should be added to
command - attached to the item for recognising actions
label - displayed in the menu

makeMenu

public javax.swing.JMenu makeMenu(javax.swing.JComponent parent,
                                  java.lang.String label)
Makes a menu and adds it to the given (menu) component. Sets the accelerator to be the first letter of the label
Parameters:
menuParent - the menu that the item should be added to
label - the name of the menu

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent event)
Specified by:
actionPerformed in interface java.awt.event.ActionListener

exitApplication

public void exitApplication()

openFile

public void openFile()

saveFile

public void saveFile()

saveFileAs

public void saveFileAs(java.awt.event.ActionEvent event)

toggleToolbar

public void toggleToolbar(boolean on)

exit

public void exit()

aboutDialog

public void aboutDialog()