4,10 → 4,10 |
* Coded by: Group 5, software practice summer 2003 |
* University of Bielefeld, Germany |
* |
* @version $Revision: 1.75 $ |
* @version $Revision: 1.76 $ |
* |
* Last modification: $Date: 2003/07/19 12:53:12 $ |
* $Id: GUI.java,v 1.75 2003/07/19 12:53:12 smcsporr Exp $ |
* Last modification: $Date: 2003/07/21 14:56:02 $ |
* $Id: GUI.java,v 1.76 2003/07/21 14:56:02 hjokusch Exp $ |
*/ |
|
package src.gui; |
49,7 → 49,7 |
* <code> ActionListener</code> |
* @author group 5 |
* |
* @version $Revision: 1.75 $ Last modification: $Date: 2003/07/19 12:53:12 $ |
* @version $Revision: 1.76 $ Last modification: $Date: 2003/07/21 14:56:02 $ |
*/ |
public class GUI |
extends JFrame implements GuiInterface,WindowListener { |
58,6 → 58,7 |
//added 11/07/03 Sascha W.; testing with plugins - generate plugin-dependend menu |
private JMenuBar myMenuBar; |
private JMenu pluginMenu; |
private JMenu pluginConfigurationMenu; |
|
/* attributes for the menu */ |
private JMenuItem exit; |
77,6 → 78,12 |
private JMenuItem closeActDoc; |
private JMenuItem closeAll; |
|
/* Menu buttons for the configuration of the plugins */ |
private JMenuItem resetConfiguration; |
private JMenuItem changeDefaultPlugin; |
private JMenuItem switchToAndFroDefaultPlugin; |
private JMenuItem showActualConfiguration; |
|
/* attributes for logging and status */ |
private LogPanel logPanel = new LogPanel(); |
private StatusPanel statusPanel = new StatusPanel(); |
101,6 → 108,7 |
private ActionListener validatorListener; |
private ActionListener docManager; |
private ActionListener updateViewListener; |
private ActionListener pluginManager; |
private ChangeListener docManagerCL; |
private DocumentManagerInterface docMaster; |
|
342,6 → 350,44 |
return view; |
|
} |
|
/** |
* <code>createPluginConfigurationMenu</code> creates the menu for operations |
* on the plugins, for example the <em>reset</em> of the configuration, or the |
* switching between the associated and the default plugin. |
* |
* @return The <code>JMenu</code> object that represents the created menu. |
* |
* author Sascha Walkenhorst |
* |
* Last Revision: 21-Jul-2003 by Sascha W. |
*/ |
private JMenu createPluginConfigurationMenu() { |
pluginConfigurationMenu = new JMenu("plugin configuration"); |
|
resetConfiguration = new JMenuItem("reset configuration"); |
resetConfiguration.setToolTipText("click to reset the plugin configuration"); |
resetConfiguration.addActionListener(pluginManager); |
pluginConfigurationMenu.add(resetConfiguration); |
|
changeDefaultPlugin = new JMenuItem("change default plugin"); |
changeDefaultPlugin.setToolTipText("click to choose a other plugin as the default plugin"); |
changeDefaultPlugin.addActionListener(pluginManager); |
pluginConfigurationMenu.add(changeDefaultPlugin); |
|
switchToAndFroDefaultPlugin = new JMenuItem("switch to and fro default plugin"); |
switchToAndFroDefaultPlugin.setToolTipText("click to switch between the associated and the default plugin"); |
switchToAndFroDefaultPlugin.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_D, Event.CTRL_MASK));; |
switchToAndFroDefaultPlugin.addActionListener(pluginManager); |
pluginConfigurationMenu.add(switchToAndFroDefaultPlugin); |
|
showActualConfiguration = new JMenuItem("show actual configuration"); |
showActualConfiguration.setToolTipText("click to show the actual plugin configuration"); |
showActualConfiguration.addActionListener(pluginManager); |
pluginConfigurationMenu.add(showActualConfiguration); |
|
return pluginConfigurationMenu; |
} |
|
/** |
* <code>MakeMenu</code> makes the menu bar. |
352,6 → 398,7 |
myMenuBar.add(createFileMenu()); |
myMenuBar.add(createDocumentMenu()); |
myMenuBar.add(createViewMenu()); |
myMenuBar.add(createPluginConfigurationMenu()); |
myMenuBar.add(createPluginMenu()); |
myMenuBar.add(createTestMenu()); |
setJMenuBar(myMenuBar); |
556,11 → 603,13 |
*/ |
public void setInterfaces(ActionListener otherGuiThings, |
ActionListener duocManager, ActionListener updateViewListenerParam, |
ActionListener newPluginManager, |
ChangeListener chList,DocumentManagerInterface docManInt) { |
|
otherGUIListener= otherGuiThings; |
docManager= duocManager; |
updateViewListener = updateViewListenerParam; |
pluginManager = newPluginManager; |
docManagerCL = chList; |
docMaster= docManInt; |
makeMenu(); |