You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

117 lines
2.9 KiB

//==============================================================================
//
// Copyright (c) 2002-2004, Andrew Hinton, Dave Parker
//
// This file is part of PRISM.
//
// PRISM is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 2 of the License, or
// (at your option) any later version.
//
// PRISM is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with PRISM; if not, write to the Free Software Foundation,
// Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
//==============================================================================
package userinterface;
import javax.swing.JMenu;
import javax.swing.Action;
import javax.swing.AbstractAction;
import java.awt.event.*;
import javax.swing.*;
import userinterface.util.*;
/**
*
* @author ug60axh
*/
public class GUIFileMenu extends GUIPlugin
{
private JMenu menu;
private Action exitAction;
public GUIFileMenu(GUIPrism pr)
{
super(pr, false);
initComponents();
}
public void takeCLArgs(String args[])
{
}
public boolean displaysTab()
{
return false;
}
public javax.swing.JMenu getMenu()
{
return menu;
}
public OptionsPanel getOptions()
{
return null;
}
public String getTabText()
{
return "";
}
public javax.swing.JToolBar getToolBar()
{
return null;
}
public String getXMLIDTag()
{
return "";
}
public Object getXMLSaveTree()
{
return null;
}
public void loadXML(Object c)
{
}
public boolean processGUIEvent(GUIEvent e)
{
return false;
}
private void initComponents()
{
menu = new JMenu("File");
menu.setMnemonic('F');
exitAction = new AbstractAction()
{
public void actionPerformed(ActionEvent e)
{
getGUI().exit();
}
};
exitAction.putValue(Action.LONG_DESCRIPTION, "Exits the application");
//exitAction.putValue(Action.SHORT_DESCRIPTION, "Exit");
exitAction.putValue(Action.MNEMONIC_KEY, new Integer(KeyEvent.VK_X));
exitAction.putValue(Action.NAME, "Exit");
exitAction.putValue(Action.SMALL_ICON, GUIPrism.getIconFromImage("smallExit.gif"));
exitAction.putValue(Action.ACCELERATOR_KEY, KeyStroke.getKeyStroke(KeyEvent.VK_Q, InputEvent.CTRL_MASK));
menu.add(exitAction);
}
public void notifySettings(prism.PrismSettings settings)
{}
}