📄 genericformpanel.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 *//* * NewCallEditPanel.java * * Created on 14 April 2003, 03:08 */package crms.applet;import crms.util.*;import crms.form.*;import org.w3c.dom.*;import crms.form.*;import javax.swing.*;import java.awt.*;import java.awt.event.*;/** * * @author dmurphy */public class GenericFormPanel extends CRMSPanel { private Form form = null; private String formName = null; private CRMSPanel cancelPanel = null; private CRMSPanel submitPanel = null; /** Creates a new instance of NewCallEditPanel */ public GenericFormPanel(String formName, CRMSPanel cancelPanel, CRMSPanel submitPanel) { this.formName = formName; this.cancelPanel = cancelPanel; this.submitPanel = submitPanel; } public void init() { refresh(); } public void refresh() {// Server server = ServerFactory.getInstance().getServer();// // ServerCommand formCommand = ServerCommand.requestForm(formName);// // StringBuffer buf = server.sendCommand(formCommand);// // Document doc = XMLUtil.createDocument(buf);// // Node node = XMLUtil.getNode("form", doc.getDocumentElement());// // form = FormXML.createForm(node);// // FormPanel panel = SwingFormBuilder.getInstance().buildForm(form);// // panel.addFormSubmitListener( new FormPanel.FormSubmitListener() {// public void formSubmitted(FormSubmission result) {// submitForm(result);// }// });// // panel.addFormResetListener( new ActionListener() {// public void actionPerformed(ActionEvent ev) {// refresh();// }// });// // panel.addFormCancelListener(new ActionListener() {// public void actionPerformed(ActionEvent ev) {// cancel();// }// });// // panel.setBackground(Color.WHITE);// // this.setLayout(new BorderLayout());// this.setBackground(Color.WHITE);// // this.add(panel, BorderLayout.CENTER);// this.setVisible(true); } public void cancel() { PanelManager.getInstance().activatePanel(cancelPanel); } public void submitForm(FormSubmission result) {// setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));// Server server = ServerFactory.getInstance().getServer();// // ServerCommand formCommand = new ServerCommand(result);// // result.setFormName(form.getName());// server.sendCommand(formCommand);//// PanelManager.getInstance().activatePanel(submitPanel);// setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR)); }}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -