⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 callreportform.java

📁 CRMS客户关系管理系统(JAVA版),这是一个客户关系管理系统。
💻 JAVA
字号:
    /* CRMS, customer relationship management system    Copyright (C) 2003  Service To Youth Council    This program 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.    This program 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 this program; if not, write to the Free Software    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA    For further information contact the SYC ICT department on GPL@syc.net.au    98 Kermode Street    North Adelaide    South Australia    SA 5006     +61 (0)8 8367 0755    *//* * CallReportForm.java * * Created on 16 June 2003, 08:43 */package crms.report.form;import crms.applet.*;import crms.vo.*;import crms.report.*;import crms.util.*;import mseries.Calendar.*;import mseries.ui.*;import javax.swing.*;import java.awt.*;import java.awt.event.*;import java.net.*;import java.util.*;import java.text.*;import java.applet.*;/** * * @author  Administrator */public class CallReportForm extends AbstractReportForm {    /** Creates a new instance of CallAddPanel */        JPanel titlePanel = new JPanel();    JLabel titleLabel = new JLabel("Call Summary Report");        //JPanel bodyPanel = new JPanel();    CRMSPanel bodyPanel = CRMSPanel.getEmptyPanel();        JButton buttonRun = new JButton("Run");    JButton buttonCancel = new JButton("Cancel");        MDateEntryField dateFromField = new MDateEntryField();    MDateEntryField dateToField = new MDateEntryField();        ReportConfig reportConfig = null;        /** Creates a new instance of CallReportForm */    public CallReportForm() {    }        public void setReportConfig(ReportConfig config) {        this.reportConfig = config;       }        public void init() {                setLayout(new BorderLayout());                titleLabel.setFont(new java.awt.Font("Serif", 1, 18));        titleLabel.setBackground(Color.WHITE);        titlePanel.add(titleLabel);        titlePanel.setBackground(Color.WHITE);                add(titlePanel, BorderLayout.NORTH);                GridBagLayout gbl = new GridBagLayout();        bodyPanel.setLayout(gbl);        bodyPanel.setBackground(Color.WHITE);                        MDefaultPullDownConstraints c = new MDefaultPullDownConstraints();        c.firstDay = Calendar.MONDAY;        dateFromField.setConstraints(c);        dateToField.setConstraints(c);        MSimpleDateFormat dateFormat = new MSimpleDateFormat("d MMMM, yyyy");        dateFromField.setDateFormatter(dateFormat);        dateToField.setDateFormatter(dateFormat);                Calendar cal = Calendar.getInstance();        cal.set(Calendar.HOUR, 0);        cal.set(Calendar.MINUTE, 0);        cal.set(Calendar.SECOND, 0);        cal.set(Calendar.MILLISECOND, 0);        cal.set(Calendar.DATE, 1);        dateFromField.setValue(cal.getTime());                cal.add(Calendar.MONTH, 1);        cal.add(Calendar.DATE, -1);        dateToField.setValue(cal.getTime());                buttonRun.addActionListener( new ActionListener() {            public void actionPerformed(ActionEvent ev) {                HashMap params = new HashMap();                try {                    params.put(CallReport.PARAM_FROM, String.valueOf(dateFromField.getValue().getTime()));                    params.put(CallReport.PARAM_TO, String.valueOf(dateToField.getValue().getTime()));                }                catch (ParseException ex) {                    ex.printStackTrace();                    throw new RuntimeException(ex);                }                executeReport(reportConfig, params);                CRMSPanel panel = new ReportPanel();                PanelManager.getInstance().activatePanel(panel);            }        });                buttonCancel.addActionListener( new ActionListener() {            public void actionPerformed(ActionEvent ev) {                CRMSPanel panel = new ReportPanel();                PanelManager.getInstance().activatePanel(panel);            }        });                Insets defaultInsets = new Insets(4,0,0,4);        bodyPanel.add(new JLabel("Date From"), new GridBagConstraints(0,0,1,1,0.0, 0.0, GridBagConstraints.EAST, GridBagConstraints.NONE,defaultInsets, 0,0));        bodyPanel.add(dateFromField, new GridBagConstraints(1,0,3,1,0.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.HORIZONTAL,defaultInsets, 0,0));                bodyPanel.add(new JLabel("Date To"), new GridBagConstraints(0,1,1,1,0.0, 0.0, GridBagConstraints.EAST, GridBagConstraints.NONE,defaultInsets, 0,0));        bodyPanel.add(dateToField, new GridBagConstraints(1,1,3,1,0.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.HORIZONTAL,defaultInsets, 0,0));                bodyPanel.add(buttonCancel, new GridBagConstraints(1,2,1,1,0.0, 0.0, GridBagConstraints.EAST, GridBagConstraints.NONE,defaultInsets, 0,0));        bodyPanel.add(buttonRun, new GridBagConstraints(3,2,1,1,0.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.NONE,defaultInsets, 0,0));                CRMSUtil.insertEmptyRows(8, 4, 3, bodyPanel);                CRMSUtil.fixGridBagLayout(gbl, bodyPanel);                add(bodyPanel, BorderLayout.CENTER);            }        public boolean validateForm() {        StringBuffer buf = new StringBuffer();        boolean valid = true;                return valid;    }        }

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -