org.norvelle.textcite.gui.menu
Class MainMenuBar

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by javax.swing.JComponent
              extended by javax.swing.JMenuBar
                  extended by org.norvelle.textcite.gui.menu.MainMenuBar
All Implemented Interfaces:
java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, javax.accessibility.Accessible, javax.swing.MenuElement, SaveFlagChangeSignalReceiver

public class MainMenuBar
extends javax.swing.JMenuBar
implements SaveFlagChangeSignalReceiver

MainMenuBar: Contains the implementation of the JMenuBar and submneus for the TextCite GUI

Author:
Erik Norvelle
See Also:
Serialized Form

Nested Class Summary
(package private)  class MainMenuBar.Menu_ActionAdapter
           
 
Nested classes/interfaces inherited from class javax.swing.JMenuBar
javax.swing.JMenuBar.AccessibleJMenuBar
 
Nested classes/interfaces inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent
 
Nested classes/interfaces inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainer
 
Nested classes/interfaces inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
 
Field Summary
(package private)  javax.swing.ImageIcon assocBiblioIcon
           
(package private)  javax.swing.ImageIcon closeFileIcon
           
(package private) static int EXIT_ACTION
           
(package private)  javax.swing.ImageIcon exportPDFIcon
           
(package private)  javax.swing.ImageIcon exportWordIcon
           
(package private) static int HELP_ABOUT_ACTION
           
(package private) static int HELP_SHOWHELP_ACTION
           
(package private)  javax.swing.ImageIcon helpShowIcon
           
(package private) static int IMPORT_BIBLIO_ACTION
           
(package private) static int INTERFACE_ENGLISH_ACTION
           
(package private) static int INTERFACE_SPANISH_ACTION
           
(package private)  javax.swing.JMenuItem jMenuEnglish
           
(package private)  javax.swing.JMenu jMenuFile
           
(package private)  javax.swing.JMenuItem jMenuFileExit
           
(package private)  javax.swing.JMenuItem jMenuFileExportPDF
           
(package private)  javax.swing.JMenuItem jMenuFileExportWord
           
(package private)  javax.swing.JMenuItem jMenuFileImportBibliography
           
(package private)  javax.swing.JMenuItem jMenuFileNewAuthor
           
(package private)  javax.swing.JMenuItem jMenuFileNewBook
           
(package private)  javax.swing.JMenuItem jMenuFileNewCategory
           
(package private)  javax.swing.JMenuItem jMenuFileNewCitation
           
(package private)  javax.swing.JMenuItem jMenuFileNewCitebook
           
(package private)  javax.swing.JMenuItem jMenuFileOpenCitebook
           
(package private)  javax.swing.JMenuItem jMenuFilePreferences
           
(package private)  RecentDocumentsMenu jMenuFileRecentDocuments
           
(package private)  javax.swing.JMenuItem jMenuFileSaveCitebook
           
(package private)  javax.swing.JMenuItem jMenuFileSaveCitebookAs
           
(package private)  javax.swing.JMenu jMenuHelp
           
(package private)  javax.swing.JMenuItem jMenuHelpAbout
           
(package private)  javax.swing.JMenuItem jMenuHelpShow
           
(package private)  javax.swing.JMenu jMenuInterfaceLanguage
           
(package private)  javax.swing.JMenu jMenuNew
           
(package private)  javax.swing.JMenuItem jMenuSpanish
           
(package private)  javax.swing.JMenu jMenuView
           
(package private)  javax.swing.JMenuItem jMenuViewClipboard
           
(package private)  javax.swing.ButtonGroup languageGroup
           
(package private) static int NEW_AUTHOR_ACTION
           
(package private) static int NEW_BOOK_ACTION
           
(package private) static int NEW_CATEGORY_ACTION
           
(package private) static int NEW_CITATION_ACTION
           
(package private) static int NEW_CITEBOOK_ACTION
           
(package private)  javax.swing.ImageIcon newFileIcon
           
(package private)  javax.swing.ImageIcon openFileIcon
           
(package private) static int PREFERENCES_ACTION
           
(package private)  javax.swing.ImageIcon saveFileAsIcon
           
(package private)  javax.swing.ImageIcon saveFileIcon
           
(package private) static int VIEW_CLIPBOARD_ACTION
           
 
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.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
MainMenuBar(MainFrame mainFrame)
           
 
Method Summary
 void addRecentFile(java.io.File recentFile)
          Update the RecentDocuments menu.
 void loadNewContents()
          Upon loading a new data file, we need to reattach the various GUI items to the new data objects (i.e. connect the views to their models)
 void receiveChangeSignal(boolean currValue)
          Called when the CiteBook has been saved, or data has been changed, so that we can change menu items (enable/disable).
 
Methods inherited from class javax.swing.JMenuBar
add, addNotify, getAccessibleContext, getComponent, getComponentAtIndex, getComponentIndex, getHelpMenu, getMargin, getMenu, getMenuCount, getSelectionModel, getSubElements, getUI, getUIClassID, isBorderPainted, isSelected, menuSelectionChanged, paintBorder, paramString, processKeyBinding, processKeyEvent, processMouseEvent, removeNotify, setBorderPainted, setHelpMenu, setMargin, setSelected, setSelectionModel, setUI, updateUI
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, 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, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, 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, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, 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, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, 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

NEW_CITEBOOK_ACTION

static final int NEW_CITEBOOK_ACTION
See Also:
Constant Field Values

NEW_AUTHOR_ACTION

static final int NEW_AUTHOR_ACTION
See Also:
Constant Field Values

NEW_BOOK_ACTION

static final int NEW_BOOK_ACTION
See Also:
Constant Field Values

NEW_CITATION_ACTION

static final int NEW_CITATION_ACTION
See Also:
Constant Field Values

NEW_CATEGORY_ACTION

static final int NEW_CATEGORY_ACTION
See Also:
Constant Field Values

IMPORT_BIBLIO_ACTION

static final int IMPORT_BIBLIO_ACTION
See Also:
Constant Field Values

EXIT_ACTION

static final int EXIT_ACTION
See Also:
Constant Field Values

HELP_ABOUT_ACTION

static final int HELP_ABOUT_ACTION
See Also:
Constant Field Values

INTERFACE_ENGLISH_ACTION

static final int INTERFACE_ENGLISH_ACTION
See Also:
Constant Field Values

INTERFACE_SPANISH_ACTION

static final int INTERFACE_SPANISH_ACTION
See Also:
Constant Field Values

VIEW_CLIPBOARD_ACTION

static final int VIEW_CLIPBOARD_ACTION
See Also:
Constant Field Values

PREFERENCES_ACTION

static final int PREFERENCES_ACTION
See Also:
Constant Field Values

HELP_SHOWHELP_ACTION

static final int HELP_SHOWHELP_ACTION
See Also:
Constant Field Values

jMenuFile

javax.swing.JMenu jMenuFile

jMenuNew

javax.swing.JMenu jMenuNew

jMenuFileNewCitebook

javax.swing.JMenuItem jMenuFileNewCitebook

jMenuFileNewCitation

javax.swing.JMenuItem jMenuFileNewCitation

jMenuFileNewAuthor

javax.swing.JMenuItem jMenuFileNewAuthor

jMenuFileNewBook

javax.swing.JMenuItem jMenuFileNewBook

jMenuFileNewCategory

javax.swing.JMenuItem jMenuFileNewCategory

jMenuFileOpenCitebook

javax.swing.JMenuItem jMenuFileOpenCitebook

jMenuFileSaveCitebook

javax.swing.JMenuItem jMenuFileSaveCitebook

jMenuFileSaveCitebookAs

javax.swing.JMenuItem jMenuFileSaveCitebookAs

jMenuFileImportBibliography

javax.swing.JMenuItem jMenuFileImportBibliography

jMenuFileExportPDF

javax.swing.JMenuItem jMenuFileExportPDF

jMenuFileExportWord

javax.swing.JMenuItem jMenuFileExportWord

jMenuFilePreferences

javax.swing.JMenuItem jMenuFilePreferences

jMenuFileRecentDocuments

RecentDocumentsMenu jMenuFileRecentDocuments

jMenuFileExit

javax.swing.JMenuItem jMenuFileExit

jMenuView

javax.swing.JMenu jMenuView

jMenuInterfaceLanguage

javax.swing.JMenu jMenuInterfaceLanguage

languageGroup

javax.swing.ButtonGroup languageGroup

jMenuEnglish

javax.swing.JMenuItem jMenuEnglish

jMenuSpanish

javax.swing.JMenuItem jMenuSpanish

jMenuViewClipboard

javax.swing.JMenuItem jMenuViewClipboard

jMenuHelp

javax.swing.JMenu jMenuHelp

jMenuHelpAbout

javax.swing.JMenuItem jMenuHelpAbout

jMenuHelpShow

javax.swing.JMenuItem jMenuHelpShow

openFileIcon

javax.swing.ImageIcon openFileIcon

saveFileIcon

javax.swing.ImageIcon saveFileIcon

saveFileAsIcon

javax.swing.ImageIcon saveFileAsIcon

newFileIcon

javax.swing.ImageIcon newFileIcon

closeFileIcon

javax.swing.ImageIcon closeFileIcon

assocBiblioIcon

javax.swing.ImageIcon assocBiblioIcon

exportPDFIcon

javax.swing.ImageIcon exportPDFIcon

exportWordIcon

javax.swing.ImageIcon exportWordIcon

helpShowIcon

javax.swing.ImageIcon helpShowIcon
Constructor Detail

MainMenuBar

public MainMenuBar(MainFrame mainFrame)
Method Detail

loadNewContents

public void loadNewContents()
Upon loading a new data file, we need to reattach the various GUI items to the new data objects (i.e. connect the views to their models)


receiveChangeSignal

public void receiveChangeSignal(boolean currValue)
Called when the CiteBook has been saved, or data has been changed, so that we can change menu items (enable/disable).

Specified by:
receiveChangeSignal in interface SaveFlagChangeSignalReceiver
Parameters:
currValue -

addRecentFile

public void addRecentFile(java.io.File recentFile)
Update the RecentDocuments menu.