MenuBarEvent.java
资源名称:Appjxc.rar [点击查看]
上传用户:whbcdz
上传日期:2008-08-04
资源大小:7683k
文件大小:6k
源码类别:
JavaScript
开发平台:
Java
- package appjxc.constrol;
- import java.awt.event.ActionEvent;
- import java.awt.event.ActionListener;
- //import appgdzc.view.*;
- import java.awt.Dimension;
- import java.awt.Toolkit;
- import javax.swing.DefaultDesktopManager;
- import javax.swing.JOptionPane;
- import appjxc.view.*;
- public class MenuBarEvent implements ActionListener{
- private javax.swing.JDesktopPane JDeskTop = null;
- private String EventName = "";
- private DefaultDesktopManager desktopManager = new DefaultDesktopManager();
- public void setDeskTop(javax.swing.JDesktopPane deskTop){
- this.JDeskTop = deskTop;
- // JDeskTop.setDesktopManager(desktopManager);
- }
- public void setEventName(String eventName){
- this.EventName = eventName;
- }
- public void actionPerformed(ActionEvent e) {
- System.out.println("e.getActionCommand() = " + e.getActionCommand() + ";EventName = " + EventName);
- if(e.getActionCommand().equals("JB_EXIT") || EventName.equals("JB_EXIT")){
- javax.swing.DefaultDesktopManager manger = new DefaultDesktopManager();
- int result = JOptionPane.showOptionDialog(null,"是否真的退出医药进销存管理系统?","系统提示",
- JOptionPane.YES_NO_OPTION,JOptionPane.QUESTION_MESSAGE,
- null,new String[] {"是","否"},"否");
- if (result == JOptionPane.YES_OPTION) {
- System.exit(0);
- }
- EventName = "";
- }
- if(e.getActionCommand().equals("JF_view_medicine")||EventName.equals("JF_view_medicine")){
- JF_view_medicine jfInternalFrame = new JF_view_medicine();
- jfInternalFrame.setLocation(50,50);
- JDeskTop.add(jfInternalFrame);
- EventName = "";
- return;
- }
- if(e.getActionCommand().equals("JF_view_client")||EventName.equals("JF_view_client")){
- JF_view_client jfInternalFrame = new JF_view_client();
- jfInternalFrame.setLocation(80,80);
- JDeskTop.add(jfInternalFrame);
- EventName = "";
- return;
- }
- if(e.getActionCommand().equals("JF_view_gys")||EventName.equals("JF_view_gys")){
- JF_view_gys jfInternalFrame = new JF_view_gys();
- jfInternalFrame.setLocation(80,80);
- JDeskTop.add(jfInternalFrame);
- EventName = "";
- return;
- }
- if(e.getActionCommand().equals("JF_view_sell")||EventName.equals("JF_view_sell")){
- JF_view_sell jfInternalFrame = new JF_view_sell();
- jfInternalFrame.setLocation(20,20);
- JDeskTop.add(jfInternalFrame);
- EventName = "";
- return;
- }
- if(e.getActionCommand().equals("JF_view_buy")||EventName.equals("JF_view_buy")){
- JF_view_buy jfInternalFrame = new JF_view_buy();
- jfInternalFrame.setLocation(20,20);
- JDeskTop.add(jfInternalFrame);
- EventName = "";
- return;
- }
- if(e.getActionCommand().equals("JF_view_stock")||EventName.equals("JF_view_stock")){
- JF_view_kcpd jfInternalFrame = new JF_view_kcpd();
- jfInternalFrame.setLocation(80,20);
- JDeskTop.add(jfInternalFrame);
- EventName = "";
- return;
- }
- if(e.getActionCommand().equals("JF_view_xstk")||EventName.equals("JF_view_xstk")){
- JF_view_xstk jfInternalFrame = new JF_view_xstk();
- jfInternalFrame.setLocation(80,20);
- JDeskTop.add(jfInternalFrame);
- EventName = "";
- return;
- }
- if(e.getActionCommand().equals("JF_view_hkgl")||EventName.equals("JF_view_hkgl")){
- JF_view_hkgl jfInternalFrame = new JF_view_hkgl();
- jfInternalFrame.setLocation(20,20);
- jfInternalFrame.setTitle("医药进销存管理系统--[客户回款]");
- JDeskTop.add(jfInternalFrame);
- EventName = "";
- return;
- }
- if(e.getActionCommand().equals("JF_view_query_jbqk")||EventName.equals("JF_view_query_jbqk")){
- JF_view_query_jbqk jfInternalFrame = new JF_view_query_jbqk();
- jfInternalFrame.setLocation(20,20);
- jfInternalFrame.setTitle("医药进销存管理系统--[基本信息查询]");
- JDeskTop.add(jfInternalFrame);
- EventName = "";
- return;
- }
- if(e.getActionCommand().equals("JF_view_query_rkqk")||EventName.equals("JF_view_query_rkqk")){
- JF_view_query_kcmx_rk jfInternalFrame = new JF_view_query_kcmx_rk();
- jfInternalFrame.setLocation(80,20);
- jfInternalFrame.setTitle("医药进销存管理系统--[入库明细表查询]");
- JDeskTop.add(jfInternalFrame);
- EventName = "";
- return;
- }
- if(e.getActionCommand().equals("JF_view_query_kcmx_ck")||EventName.equals("JF_view_query_kcmx_ck")){
- JF_view_query_kcmx_ck jfInternalFrame = new JF_view_query_kcmx_ck();
- jfInternalFrame.setLocation(80,20);
- jfInternalFrame.setTitle("医药进销存管理系统--[销售明细表查询]");
- JDeskTop.add(jfInternalFrame);
- EventName = "";
- return;
- }
- if(e.getActionCommand().equals("JF_view_query_kcmx_hk")||EventName.equals("JF_view_query_kcmx_hk")){
- JF_view_query_kcmx_hk jfInternalFrame = new JF_view_query_kcmx_hk();
- jfInternalFrame.setLocation(80,20);
- jfInternalFrame.setTitle("医药进销存管理系统--[客户回款情况查询]");
- JDeskTop.add(jfInternalFrame);
- EventName = "";
- return;
- }
- if(e.getActionCommand().equals("sys_user_add")||EventName.equals("sys_user_add")){
- JF_user_add jfzcxxzcwx = new JF_user_add();
- jfzcxxzcwx.setLocation(150,150);
- JDeskTop.add(jfzcxxzcwx);
- EventName = "";
- return;
- }
- if(e.getActionCommand().equals("sys_user_modify")||EventName.equals("sys_user_modify")){
- JF_user_modi jfzcxxzcwx = new JF_user_modi();
- jfzcxxzcwx.setLocation(150,150);
- JDeskTop.add(jfzcxxzcwx);
- EventName = "";
- return;
- }
- /* if(EventName.equals("JB_LOGIN")){
- JF_Login_try jfzcxxzcwx = new JF_Login_try();
- jfzcxxzcwx.setLocation(150,150);
- JDeskTop.add(jfzcxxzcwx);
- return;
- }*/
- }
- }