package com.gpc.client.pointofsale.invoice; // Java Imports import java.awt.Dialog; import java.awt.Frame; import java.awt.Insets; import java.awt.Font; import java.awt.Color; import java.awt.Rectangle; // Swing Imports import javax.swing.JButton; import javax.swing.JDialog; import javax.swing.JPanel; import javax.swing.JScrollPane; import javax.swing.JTextArea; import javax.swing.SwingConstants; // GPC Imports import com.gpc.client.pointofsale.util.BaseView; import com.gpc.client.backoffice.app.TamsFormMaster; import com.gpc.client.common.ClientApplicationContext; import com.sssw.rt.form.AgcTextField; // Third-Party imports import org.apache.log4j.Logger; import com.sssw.rt.jform.AgcJComboBox; import com.sssw.rt.jform.AgcJLabel; import com.sssw.rt.jform.AgcJTextField; /** *

Title: RecallSavedInvPrintDialog

*

Description: This dialog allows the user to choose a printer for Pull List & Quote rpt

* @author Copyright © 1999-2003, Genuine Parts Company, All Rights Reserved * @author Virginia Foster * @version 1.0 */ public class RecallSavedInvPrintDialog extends JDialog implements BaseView { private static final Logger logger = Logger.getLogger(RecallSavedInvPrintDialog.class); JPanel pnlPrintOption = new JPanel(); public javax.swing.JPanel pnlCompleteQuote; public com.sssw.rt.jform.AgcJLabel lblQuote; public com.sssw.rt.jform.AgcJLabel lblQuote_Number; public com.sssw.rt.jform.AgcJLabel lblCustomer; public com.sssw.rt.jform.AgcJLabel lblCustomerNumName; public com.sssw.rt.jform.AgcJLabel lblValidForDays; public com.sssw.rt.jform.AgcJLabel lblAttention; public com.sssw.rt.jform.AgcJLabel lblPO; public com.sssw.rt.jform.AgcJLabel lblComment; public com.sssw.rt.jform.AgcJTextField fldValidForDays; public com.sssw.rt.jform.AgcJTextField fldAttention; public com.sssw.rt.jform.AgcJTextField fldPONumber; //Initialize txtComment public com.sssw.rt.jform.AgcJLabel lblSelectPrinter; public com.sssw.rt.jform.AgcJLabel lblEmailQuote; public com.sssw.rt.jform.AgcJLabel lblMessageToSelectPrinter; public com.sssw.rt.jform.AgcJTextField fldEmailQuote; public com.sssw.rt.jform.AgcJLabel lblMessageToEmailQuote; public com.sssw.rt.jform.AgcJComboBox cbSelectPrinter; JButton btnPrintEmail = new JButton(); JButton btnCancel = new JButton(); JButton btnPrint = new JButton(); JButton btnEmail = new JButton(); JTextArea txtComment = new JTextArea(); JScrollPane scrlpnComment; public TamsFormMaster FM; public static final String RECALL_SAVED_INV_PRINT_DIALOG_NAME = "RecallSavedInvPrintDialog"; public static final String BTN_CANCEL = "btnCancel"; public static final String BTN_PRINT_EMAIL = "btnPrintEmail"; public static final String BTN_PRINT = "btnPrint"; public static final String BTN_EMAIL = "btnEmail"; protected ClientApplicationContext clientApplicationContext = ClientApplicationContext.getClientApplicationContext(); public com.sssw.rt.form.AgcRectangle Rectangle13; public com.sssw.rt.form.AgcRectangle Rectangle14; public com.sssw.rt.form.AgcRectangle Rectangle15; public final Number minD = (Number) new Integer(1); public final Number maxD = (Number) new Integer(99); public RecallSavedInvPrintDialog(Frame parentView) { super(parentView, true); init(); } public RecallSavedInvPrintDialog(Dialog parentView) { super(parentView, true); init(); } public void init() { setSize(470, 490); setLocation(200,200); pnlCompleteQuote = (JPanel)this.getContentPane(); pnlCompleteQuote.setLayout(null); pnlCompleteQuote.setBounds(10,10,510,165); pnlCompleteQuote.setName("pnlCompleteQuote"); pnlCompleteQuote.setVisible(true); //Initialize lblQuote lblQuote = new AgcJLabel(); lblQuote.setName("lblQuote"); lblQuote.setBounds(11,11,150,20); lblQuote.setHorizontalAlignment(SwingConstants. RIGHT); lblQuote.setHorizontalTextPosition(SwingConstants.RIGHT); lblQuote.setText("Quote #"); lblQuote.setFont(BOLD_FONT); lblQuote.setVisible(true); //Initialize lblCustomer lblCustomer = new AgcJLabel(); lblCustomer.setName("lblCustomer"); lblCustomer.setBounds(11,41,150,20); lblCustomer.setHorizontalAlignment(SwingConstants.RIGHT); lblCustomer.setHorizontalTextPosition(SwingConstants.RIGHT); lblCustomer.setFont(BOLD_FONT); lblCustomer.setText("Customer"); lblCustomer.setVisible(true); //Initialize lblValidForDays lblValidForDays = new AgcJLabel(); lblValidForDays.setName("lblValidForDays"); lblValidForDays.setBounds(11,71,150,20); lblValidForDays.setHorizontalAlignment(SwingConstants.RIGHT); lblValidForDays.setHorizontalTextPosition(SwingConstants.RIGHT); lblValidForDays.setFont(BOLD_FONT); lblValidForDays.setVisible(true); //Initialize lblAttention lblAttention = new AgcJLabel(); lblAttention.setName("lblAttention"); lblAttention.setBounds(11,101,150,20); lblAttention.setHorizontalAlignment(SwingConstants.RIGHT); lblAttention.setHorizontalTextPosition(SwingConstants.RIGHT); lblAttention.setFont(BOLD_FONT); lblAttention.setVisible(true); //Initialize lblPO lblPO = new AgcJLabel(); lblPO.setName("lblPO"); lblPO.setBounds(11,131,150,20); lblPO.setHorizontalAlignment(SwingConstants.RIGHT); lblPO.setHorizontalTextPosition(SwingConstants.RIGHT); lblPO.setFont(BOLD_FONT); lblPO.setVisible(true); //Initialize lblComment lblComment = new AgcJLabel(); lblComment.setName("lblComment"); lblComment.setBounds(11,161,150,20); lblComment.setHorizontalAlignment(SwingConstants.RIGHT); lblComment.setHorizontalTextPosition(SwingConstants.RIGHT); lblComment.setFont(BOLD_FONT); lblComment.setVisible(true); //Initialize lblQuote_Number lblQuote_Number = new AgcJLabel(); lblQuote_Number.setName("lblQuote_Number"); lblQuote_Number.setBounds(180,11,130,20); lblQuote_Number.setHorizontalAlignment(SwingConstants.LEFT); lblQuote_Number.setHorizontalTextPosition(SwingConstants.LEFT); lblQuote_Number.setFont(BOLD_FONT); lblQuote_Number.setVisible(true); //Initialize lblCustomerNumName lblCustomerNumName = new AgcJLabel(); lblCustomerNumName.setBounds(180,41,230,20); lblCustomerNumName.setHorizontalAlignment(2); lblCustomerNumName.setVisible(true); lblCustomerNumName.setFont(new Font("SansSerif", 0, 12)); lblCustomerNumName.setForeground(Color.black); lblCustomerNumName.setBackground(Color.white); //Initialize fldValidForDays fldValidForDays = new AgcJTextField(); fldValidForDays.setName("fldValidForDays"); fldValidForDays.setBounds(180,71,230,20); fldValidForDays.setHorizontalAlignment(2); fldValidForDays.setVisible(true); fldValidForDays.setFont(new Font("SansSerif", 0, 12)); fldValidForDays.setEditable(true); //Initialize fldAttention fldAttention = new AgcJTextField(); fldAttention.setName("fldAttention"); fldAttention.setBounds(180,101,230,20); fldAttention.setHorizontalAlignment(2); fldAttention.setVisible(true); fldAttention.setFont(new Font("SansSerif", 0, 12)); fldAttention.setEditable(true); fldAttention.setText(""); //Initialize fldPONumber fldPONumber = new AgcJTextField(); fldPONumber.setName("fldPONumber"); fldPONumber.setBounds(180,131,230,20); fldPONumber.setHorizontalAlignment(2); fldPONumber.setFont(new Font("SansSerif", 0, 12)); fldPONumber.setVisible(true); txtComment = new JTextArea(); txtComment.setName("txtComment"); txtComment.setBounds(new Rectangle(180, 161, 230, 100)); txtComment.setFont(new Font("SansSerif", 0, 12)); txtComment.setMargin(new Insets(1, 1, 1, 1)); txtComment.setLineWrap(true); txtComment.setWrapStyleWord(true); txtComment.setVisible(true); scrlpnComment = new JScrollPane(txtComment); scrlpnComment.setName("scrlpnComment"); scrlpnComment.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS); scrlpnComment.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_NEVER); scrlpnComment.setBounds(new Rectangle(180, 161, 230, 100)); // Initialize Rectangle13 Rectangle13 = new com.sssw.rt.form.AgcRectangle(); Rectangle13.setName("Rectangle13"); Rectangle13.setBounds(16,11, 420, 57); Rectangle13.setColor(Color.lightGray); Rectangle13.setBorderStyle(4); Rectangle13.setText(""); Rectangle13.setFont(new Font("SansSerif", 0, 12)); Rectangle13.setForeground(Color.black); Rectangle13.setTransparent(true); // Initialize Rectangle14 Rectangle14 = new com.sssw.rt.form.AgcRectangle(); Rectangle14.setName("Rectangle14"); Rectangle14.setBounds(6, 6, 440, 435); Rectangle14.setColor(Color.lightGray); Rectangle14.setBorderStyle(4); Rectangle14.setText(""); Rectangle14.setFont(new Font("SansSerif", 0, 12)); Rectangle14.setForeground(Color.black); Rectangle14.setTransparent(true); // Initialize Rectangle15 Rectangle15 = new com.sssw.rt.form.AgcRectangle(); Rectangle15.setName("Rectangle15"); Rectangle15.setBounds(16, 266, 420, 125); Rectangle15.setColor(Color.lightGray); Rectangle15.setBorderStyle(4); Rectangle15.setText(""); Rectangle15.setFont(new Font("SansSerif", 0, 12)); Rectangle15.setForeground(Color.black); Rectangle15.setTransparent(true); //Initialize lblSelectPrinter lblSelectPrinter = new AgcJLabel(); lblSelectPrinter.setName("lblSelectPrinter"); lblSelectPrinter.setBounds(11,271,150,20); lblSelectPrinter.setHorizontalAlignment(SwingConstants.RIGHT); lblSelectPrinter.setHorizontalTextPosition(SwingConstants.RIGHT); lblSelectPrinter.setFont(BOLD_FONT); //Initialize cbSortOption cbSelectPrinter = new AgcJComboBox(); cbSelectPrinter.setName("cbSelectPrinter"); cbSelectPrinter.setBounds(180, 271, 230, 20); cbSelectPrinter.setFont(BASE_FONT); //Initialize lblMessageToSelectPrinter lblMessageToSelectPrinter = new AgcJLabel(); lblMessageToSelectPrinter.setName("lblMessageToSelectPrinter"); lblMessageToSelectPrinter.setBounds(180,301,230,20); lblMessageToSelectPrinter.setHorizontalAlignment(SwingConstants.LEFT); lblMessageToSelectPrinter.setHorizontalTextPosition(SwingConstants.LEFT); lblMessageToSelectPrinter.setFont(BOLD_FONT); lblMessageToSelectPrinter.setText("Select Printer to Print Quote" ); lblMessageToSelectPrinter.setVisible(true); //Initialize lblEmailQuote lblEmailQuote = new AgcJLabel(); lblEmailQuote.setName("lblEmailQuote"); lblEmailQuote.setBounds(11,331,150,20); lblEmailQuote.setHorizontalAlignment(SwingConstants.RIGHT); lblEmailQuote.setHorizontalTextPosition(SwingConstants.RIGHT); lblEmailQuote.setFont(BOLD_FONT); lblEmailQuote.setText("EmailQuote"); lblEmailQuote.setVisible(true); //Initialize fldEmailQuote fldEmailQuote = new AgcJTextField(); fldEmailQuote.setName("fldEmailQuote"); fldEmailQuote.setBounds(180,331,230,20); fldEmailQuote.setHorizontalAlignment(2); fldEmailQuote.setVisible(true); fldEmailQuote.setFont(new Font("SansSerif", 0, 12)); fldEmailQuote.setMargin(new Insets(1, 1, 1, 1)); fldEmailQuote.setEditable(true); fldEmailQuote.setForeground(Color.black); fldEmailQuote.setBackground(Color.white); //Initialize lblMessageToEmailQuote lblMessageToEmailQuote = new AgcJLabel(); lblMessageToEmailQuote.setName("lblMessageToEmailQuote"); lblMessageToEmailQuote.setBounds(180,361,230,20); lblMessageToEmailQuote.setHorizontalAlignment(SwingConstants.LEFT); lblMessageToEmailQuote.setHorizontalTextPosition(SwingConstants.LEFT); lblMessageToEmailQuote.setFont(BOLD_FONT); lblMessageToEmailQuote.setText("Enter Email Address to Email Quote"); lblMessageToEmailQuote.setVisible(true); //Initialize btnPrint btnPrint.setName("btnPrint"); btnPrint.setBounds(10,415,80,20); btnPrint.setDefaultCapable(false); btnPrint.setContentAreaFilled(true); btnPrint.setBorderPainted(true); btnPrint.setMargin(new Insets(1, 1, 1, 1)); btnPrint.setHorizontalAlignment(SwingConstants.CENTER); btnPrint.setHorizontalTextPosition(SwingConstants.RIGHT); btnPrint.setFont(new Font("SansSerif", 0, 12)); //Initialize btnEmail btnEmail.setName("btnEmail"); btnEmail.setBounds(100,415,90,20); btnEmail.setDefaultCapable(false); btnEmail.setContentAreaFilled(true); btnEmail.setBorderPainted(true); btnEmail.setMargin(new Insets(1, 1, 1, 1)); btnEmail.setHorizontalAlignment(SwingConstants.CENTER); btnEmail.setHorizontalTextPosition(SwingConstants.RIGHT); btnEmail.setFont(new Font("SansSerif", 0, 12)); //Initialize btnPrintEmail btnPrintEmail.setName("btnPrintEmail"); btnPrintEmail.setBounds(200,415,140,20); btnPrintEmail.setDefaultCapable(false); btnPrintEmail.setContentAreaFilled(true); btnPrintEmail.setBorderPainted(true); btnPrintEmail.setMargin(new Insets(1, 1, 1, 1)); btnPrintEmail.setHorizontalAlignment(SwingConstants.CENTER); btnPrintEmail.setHorizontalTextPosition(SwingConstants.RIGHT); btnPrintEmail.setFont(new Font("SansSerif", 0, 12)); //Initialize btnCancel btnCancel.setName(BTN_CANCEL); btnCancel.setBounds(350,415,90,20); btnCancel.setDefaultCapable(false); btnCancel.setContentAreaFilled(true); btnCancel.setBorderPainted(true); btnCancel.setMargin(new Insets(1, 1, 1, 1)); btnCancel.setHorizontalAlignment(SwingConstants.CENTER); btnCancel.setHorizontalTextPosition(SwingConstants.RIGHT); btnCancel.setFont(new Font("SansSerif", 0, 12)); addComponents(); } public void addComponents() { pnlCompleteQuote.add(lblSelectPrinter); pnlCompleteQuote.add(cbSelectPrinter); pnlCompleteQuote.add(btnPrint); pnlCompleteQuote.add(btnEmail); pnlCompleteQuote.add(btnPrintEmail); pnlCompleteQuote.add(btnCancel); pnlCompleteQuote.add(lblEmailQuote); pnlCompleteQuote.add(lblMessageToSelectPrinter); pnlCompleteQuote.add(fldEmailQuote); pnlCompleteQuote.add(lblMessageToEmailQuote); pnlCompleteQuote.add(fldValidForDays); pnlCompleteQuote.add(lblComment); pnlCompleteQuote.add(scrlpnComment); pnlCompleteQuote.add(fldPONumber); pnlCompleteQuote.add(lblPO); pnlCompleteQuote.add(fldAttention); pnlCompleteQuote.add(lblAttention); pnlCompleteQuote.add(lblValidForDays); pnlCompleteQuote.add(lblQuote); pnlCompleteQuote.add(lblQuote_Number); pnlCompleteQuote.add(lblCustomer); pnlCompleteQuote.add(lblCustomerNumName); pnlCompleteQuote.add(Rectangle13); pnlCompleteQuote.add(Rectangle14); pnlCompleteQuote.add(Rectangle15); } }