Пример #1
0
  // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
  private void initComponents() {
    java.awt.GridBagConstraints gridBagConstraints;

    m_jOptions = new javax.swing.JPanel();
    m_jButtons = new javax.swing.JPanel();
    m_jTicketId = new javax.swing.JLabel();
    m_jEdit = new javax.swing.JButton();
    m_jRefund = new javax.swing.JButton();
    m_jPrint = new javax.swing.JButton();
    jPanel2 = new javax.swing.JPanel();
    m_jPanelTicket = new javax.swing.JPanel();
    jPanel3 = new javax.swing.JPanel();
    jPanel4 = new javax.swing.JPanel();
    m_jKeys = new com.openbravo.editor.JEditorKeys();
    jPanel5 = new javax.swing.JPanel();
    jButton1 = new javax.swing.JButton();
    m_jTicketEditor = new com.openbravo.editor.JEditorIntegerPositive();

    setLayout(new java.awt.BorderLayout());

    m_jOptions.setLayout(new java.awt.BorderLayout());

    m_jButtons.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.LEFT));

    m_jTicketId.setBackground(java.awt.Color.white);
    m_jTicketId.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
    m_jTicketId.setBorder(
        javax.swing.BorderFactory.createCompoundBorder(
            javax.swing.BorderFactory.createLineBorder(
                javax.swing.UIManager.getDefaults().getColor("Button.darkShadow")),
            javax.swing.BorderFactory.createEmptyBorder(1, 4, 1, 4)));
    m_jTicketId.setOpaque(true);
    m_jTicketId.setPreferredSize(new java.awt.Dimension(160, 25));
    m_jTicketId.setRequestFocusEnabled(false);
    m_jButtons.add(m_jTicketId);

    m_jEdit.setIcon(
        new javax.swing.ImageIcon(
            getClass().getResource("/com/openbravo/images/edit.png"))); // NOI18N
    m_jEdit.setText(AppLocal.getIntString("button.edit")); // NOI18N
    m_jEdit.setFocusPainted(false);
    m_jEdit.setFocusable(false);
    m_jEdit.setMargin(new java.awt.Insets(8, 14, 8, 14));
    m_jEdit.setRequestFocusEnabled(false);
    m_jEdit.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            m_jEditActionPerformed(evt);
          }
        });
    m_jButtons.add(m_jEdit);

    m_jRefund.setIcon(
        new javax.swing.ImageIcon(
            getClass().getResource("/com/openbravo/images/inbox.png"))); // NOI18N
    m_jRefund.setText(AppLocal.getIntString("button.refund")); // NOI18N
    m_jRefund.setFocusPainted(false);
    m_jRefund.setFocusable(false);
    m_jRefund.setMargin(new java.awt.Insets(8, 14, 8, 14));
    m_jRefund.setRequestFocusEnabled(false);
    m_jRefund.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            m_jRefundActionPerformed(evt);
          }
        });
    m_jButtons.add(m_jRefund);

    m_jPrint.setIcon(
        new javax.swing.ImageIcon(
            getClass().getResource("/com/openbravo/images/yast_printer.png"))); // NOI18N
    m_jPrint.setText(AppLocal.getIntString("button.print")); // NOI18N
    m_jPrint.setFocusPainted(false);
    m_jPrint.setFocusable(false);
    m_jPrint.setMargin(new java.awt.Insets(8, 14, 8, 14));
    m_jPrint.setRequestFocusEnabled(false);
    m_jPrint.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            m_jPrintActionPerformed(evt);
          }
        });
    m_jButtons.add(m_jPrint);

    m_jOptions.add(m_jButtons, java.awt.BorderLayout.WEST);

    jPanel2.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.LEFT));
    m_jOptions.add(jPanel2, java.awt.BorderLayout.CENTER);

    add(m_jOptions, java.awt.BorderLayout.NORTH);

    m_jPanelTicket.setBorder(javax.swing.BorderFactory.createEmptyBorder(5, 5, 5, 5));
    m_jPanelTicket.setLayout(new java.awt.BorderLayout());
    add(m_jPanelTicket, java.awt.BorderLayout.CENTER);

    jPanel3.setLayout(new java.awt.BorderLayout());

    jPanel4.setLayout(new javax.swing.BoxLayout(jPanel4, javax.swing.BoxLayout.Y_AXIS));

    m_jKeys.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            m_jKeysActionPerformed(evt);
          }
        });
    jPanel4.add(m_jKeys);

    jPanel5.setBorder(javax.swing.BorderFactory.createEmptyBorder(5, 5, 5, 5));
    jPanel5.setLayout(new java.awt.GridBagLayout());

    jButton1.setIcon(
        new javax.swing.ImageIcon(
            getClass().getResource("/com/openbravo/images/button_ok.png"))); // NOI18N
    jButton1.setFocusPainted(false);
    jButton1.setFocusable(false);
    jButton1.setMargin(new java.awt.Insets(8, 14, 8, 14));
    jButton1.setRequestFocusEnabled(false);
    jButton1.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            jButton1ActionPerformed(evt);
          }
        });
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 1;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    gridBagConstraints.weightx = 1.0;
    gridBagConstraints.weighty = 1.0;
    gridBagConstraints.insets = new java.awt.Insets(0, 5, 0, 0);
    jPanel5.add(jButton1, gridBagConstraints);
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 0;
    jPanel5.add(m_jTicketEditor, gridBagConstraints);

    jPanel4.add(jPanel5);

    jPanel3.add(jPanel4, java.awt.BorderLayout.NORTH);

    add(jPanel3, java.awt.BorderLayout.EAST);
  } // </editor-fold>//GEN-END:initComponents
Пример #2
0
  // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
  private void initComponents() {
    java.awt.GridBagConstraints gridBagConstraints;

    buttonGroup1 = new javax.swing.ButtonGroup();
    m_jOptions = new javax.swing.JPanel();
    m_jButtons = new javax.swing.JPanel();
    m_jTicketId = new javax.swing.JLabel();
    jButton2 = new javax.swing.JButton();
    m_jEdit = new javax.swing.JButton();
    m_jRefund = new javax.swing.JButton();
    m_jPrint = new javax.swing.JButton();
    jPanel2 = new javax.swing.JPanel();
    m_jPanelTicket = new javax.swing.JPanel();
    jPanel3 = new javax.swing.JPanel();
    jPanel4 = new javax.swing.JPanel();
    m_jKeys = new com.openbravo.editor.JEditorKeys();
    jPanel5 = new javax.swing.JPanel();
    jButton1 = new javax.swing.JButton();
    m_jTicketEditor = new com.openbravo.editor.JEditorIntegerPositive();
    jPanel1 = new javax.swing.JPanel();
    jrbSales = new javax.swing.JRadioButton();
    jrbRefunds = new javax.swing.JRadioButton();

    setLayout(new java.awt.BorderLayout());

    m_jButtons.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.LEFT));

    m_jTicketId.setFont(new java.awt.Font("Arial", 0, 12)); // NOI18N
    m_jTicketId.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
    m_jTicketId.setBorder(
        javax.swing.BorderFactory.createCompoundBorder(
            javax.swing.BorderFactory.createLineBorder(
                javax.swing.UIManager.getDefaults().getColor("Button.darkShadow")),
            javax.swing.BorderFactory.createEmptyBorder(1, 4, 1, 4)));
    m_jTicketId.setOpaque(true);
    m_jTicketId.setPreferredSize(new java.awt.Dimension(160, 25));
    m_jTicketId.setRequestFocusEnabled(false);
    m_jButtons.add(m_jTicketId);

    jButton2.setFont(new java.awt.Font("Arial", 0, 11)); // NOI18N
    jButton2.setIcon(
        new javax.swing.ImageIcon(
            getClass().getResource("/com/openbravo/images/search24.png"))); // NOI18N
    jButton2.setText(AppLocal.getIntString("button.print")); // NOI18N
    jButton2.setToolTipText("Search Tickets");
    jButton2.setFocusPainted(false);
    jButton2.setFocusable(false);
    jButton2.setMargin(new java.awt.Insets(0, 4, 0, 4));
    jButton2.setMaximumSize(new java.awt.Dimension(50, 40));
    jButton2.setMinimumSize(new java.awt.Dimension(50, 40));
    jButton2.setPreferredSize(new java.awt.Dimension(50, 40));
    jButton2.setRequestFocusEnabled(false);
    jButton2.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            jButton2ActionPerformed(evt);
          }
        });
    m_jButtons.add(jButton2);

    m_jEdit.setFont(new java.awt.Font("Arial", 0, 11)); // NOI18N
    m_jEdit.setIcon(
        new javax.swing.ImageIcon(
            getClass().getResource("/com/openbravo/images/sale_editline.png"))); // NOI18N
    m_jEdit.setText(AppLocal.getIntString("button.print")); // NOI18N
    m_jEdit.setToolTipText("Edit current Ticket");
    m_jEdit.setFocusPainted(false);
    m_jEdit.setFocusable(false);
    m_jEdit.setMargin(new java.awt.Insets(0, 4, 0, 4));
    m_jEdit.setMaximumSize(new java.awt.Dimension(50, 40));
    m_jEdit.setMinimumSize(new java.awt.Dimension(50, 40));
    m_jEdit.setPreferredSize(new java.awt.Dimension(50, 40));
    m_jEdit.setRequestFocusEnabled(false);
    m_jEdit.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            m_jEditActionPerformed(evt);
          }
        });
    m_jButtons.add(m_jEdit);

    m_jRefund.setFont(new java.awt.Font("Arial", 0, 11)); // NOI18N
    m_jRefund.setIcon(
        new javax.swing.ImageIcon(
            getClass().getResource("/com/openbravo/images/inbox.png"))); // NOI18N
    m_jRefund.setText(AppLocal.getIntString("button.print")); // NOI18N
    m_jRefund.setToolTipText("Receipt Refund");
    m_jRefund.setFocusPainted(false);
    m_jRefund.setFocusable(false);
    m_jRefund.setMargin(new java.awt.Insets(0, 4, 0, 4));
    m_jRefund.setMaximumSize(new java.awt.Dimension(50, 40));
    m_jRefund.setMinimumSize(new java.awt.Dimension(50, 40));
    m_jRefund.setPreferredSize(new java.awt.Dimension(50, 40));
    m_jRefund.setRequestFocusEnabled(false);
    m_jRefund.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            m_jRefundActionPerformed(evt);
          }
        });
    m_jButtons.add(m_jRefund);

    m_jPrint.setFont(new java.awt.Font("Arial", 0, 11)); // NOI18N
    m_jPrint.setIcon(
        new javax.swing.ImageIcon(
            getClass().getResource("/com/openbravo/images/printer24.png"))); // NOI18N
    m_jPrint.setText(AppLocal.getIntString("button.print")); // NOI18N
    m_jPrint.setToolTipText("Reprint Receipt");
    m_jPrint.setFocusPainted(false);
    m_jPrint.setFocusable(false);
    m_jPrint.setMargin(new java.awt.Insets(0, 4, 0, 4));
    m_jPrint.setMaximumSize(new java.awt.Dimension(50, 40));
    m_jPrint.setMinimumSize(new java.awt.Dimension(50, 40));
    m_jPrint.setPreferredSize(new java.awt.Dimension(50, 40));
    m_jPrint.setRequestFocusEnabled(false);
    m_jPrint.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            m_jPrintActionPerformed(evt);
          }
        });
    m_jButtons.add(m_jPrint);

    m_jOptions.add(m_jButtons);

    jPanel2.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.LEFT));
    m_jOptions.add(jPanel2);

    add(m_jOptions, java.awt.BorderLayout.NORTH);

    m_jPanelTicket.setBorder(javax.swing.BorderFactory.createEmptyBorder(5, 5, 5, 5));
    m_jPanelTicket.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
    m_jPanelTicket.setLayout(new java.awt.BorderLayout());
    add(m_jPanelTicket, java.awt.BorderLayout.CENTER);

    jPanel3.setLayout(new java.awt.BorderLayout());

    jPanel4.setLayout(new javax.swing.BoxLayout(jPanel4, javax.swing.BoxLayout.Y_AXIS));

    m_jKeys.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            m_jKeysActionPerformed(evt);
          }
        });
    jPanel4.add(m_jKeys);

    jPanel5.setBorder(javax.swing.BorderFactory.createEmptyBorder(5, 5, 5, 5));
    jPanel5.setLayout(new java.awt.GridBagLayout());

    jButton1.setIcon(
        new javax.swing.ImageIcon(
            getClass().getResource("/com/openbravo/images/ok.png"))); // NOI18N
    jButton1.setToolTipText("Enter Receipt and touch to Find by Number");
    jButton1.setFocusPainted(false);
    jButton1.setFocusable(false);
    jButton1.setMargin(new java.awt.Insets(8, 14, 8, 14));
    jButton1.setRequestFocusEnabled(false);
    jButton1.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            jButton1ActionPerformed(evt);
          }
        });
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 1;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    gridBagConstraints.weightx = 1.0;
    gridBagConstraints.weighty = 1.0;
    gridBagConstraints.insets = new java.awt.Insets(0, 5, 0, 0);
    jPanel5.add(jButton1, gridBagConstraints);

    m_jTicketEditor.setFont(new java.awt.Font("Arial", 0, 12)); // NOI18N
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 0;
    jPanel5.add(m_jTicketEditor, gridBagConstraints);

    jPanel4.add(jPanel5);

    jPanel3.add(jPanel4, java.awt.BorderLayout.NORTH);

    buttonGroup1.add(jrbSales);
    jrbSales.setFont(new java.awt.Font("Arial", 1, 14)); // NOI18N
    jrbSales.setText(AppLocal.getIntString("label.sales")); // NOI18N
    jrbSales.setToolTipText("Show Sales Only");
    jrbSales.setFocusPainted(false);
    jrbSales.setFocusable(false);
    jrbSales.setRequestFocusEnabled(false);
    jPanel1.add(jrbSales);

    buttonGroup1.add(jrbRefunds);
    jrbRefunds.setFont(new java.awt.Font("Arial", 1, 14)); // NOI18N
    jrbRefunds.setForeground(new java.awt.Color(255, 0, 0));
    jrbRefunds.setText(AppLocal.getIntString("label.refunds")); // NOI18N
    jrbRefunds.setToolTipText("Show Refunds Only");
    jrbRefunds.setFocusPainted(false);
    jrbRefunds.setFocusable(false);
    jrbRefunds.setRequestFocusEnabled(false);
    jPanel1.add(jrbRefunds);

    jPanel3.add(jPanel1, java.awt.BorderLayout.CENTER);

    add(jPanel3, java.awt.BorderLayout.EAST);
  } // </editor-fold>//GEN-END:initComponents