COPYRIGHT osid.SidImplementationLicense
ALWAYS_PACKAGE eas.ui
ALWAYS_MERGE_FROM MenuToolBar.merge

BEGIN
    CLASS MenuToolBar
    EXTENDS mit.swing.xJPanel
    IMPLEMENTS java.awt.event.ActionListener
    
    DECLARE private eas.Settings settings = eas.Settings.getInstance()
    DECLARE private eas.ui.GUIServices guiServices = eas.ui.GUIServices.getInstance()
    
    MERGE MergeConstructor:METHOD public MenuToolBar()
    
    DECLARE public javax.swing.JMenuBar menuBar
    DECLARE public javax.swing.JToolBar toolBar
    
    DECLARE private MenuAction printAction = null
    DECLARE private String contextCodePrefix = eas.util.UtilityServices.localize("CONTEXT_CODE")
    DECLARE private javax.swing.JMenu contextCode = null
    
    MERGE MergeActionPerformed:METHOD public void actionPerformed(java.awt.event.ActionEvent e)
    METHOD public void enablePrintAction():printAction.setEnabled(true)
    METHOD public void disablePrintAction():printAction.setEnabled(false)
    METHOD public void setContextCode(int contextCode):this.contextCode.setText(this.contextCodePrefix + (new Integer(contextCode)).toString())
END

BEGIN
    CLASS MenuAction
    EXTENDS javax.swing.AbstractAction
    IMPLEMENTS java.awt.event.ActionListener
    
    DECLARE private eas.Settings settings = eas.Settings.getInstance()
    DECLARE private eas.ui.GUIServices guiServices = eas.ui.GUIServices.getInstance()

    METHOD public MenuAction(String text, javax.swing.Icon icon):super(text, icon)
    MERGE MergeActionPerformed:METHOD public void actionPerformed(java.awt.event.ActionEvent e)
END

